import v2.0.0.0_RC3 | 2012-07-01
https://github.com/lucanos/CommunityID -> http://www.itadmins.net/archives/357
This commit is contained in:
@ -16,56 +16,13 @@
|
||||
* @package Zend_Pdf
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: ElementFactory.php 17533 2009-08-10 19:06:27Z alexander $
|
||||
* @version $Id: ElementFactory.php 18993 2009-11-15 17:09:16Z alexander $
|
||||
*/
|
||||
|
||||
|
||||
/** Zend_Pdf_ElementFactory_Interface */
|
||||
require_once 'Zend/Pdf/ElementFactory/Interface.php';
|
||||
|
||||
/** Zend_Pdf_ElementFactory_Proxy */
|
||||
require_once 'Zend/Pdf/ElementFactory/Proxy.php';
|
||||
|
||||
/** Zend_Pdf_Element */
|
||||
require_once 'Zend/Pdf/Element.php';
|
||||
|
||||
/** Zend_Pdf_Element_Array */
|
||||
require_once 'Zend/Pdf/Element/Array.php';
|
||||
|
||||
/** Zend_Pdf_Element_String_Binary */
|
||||
require_once 'Zend/Pdf/Element/String/Binary.php';
|
||||
|
||||
/** Zend_Pdf_Element_Boolean */
|
||||
require_once 'Zend/Pdf/Element/Boolean.php';
|
||||
|
||||
/** Zend_Pdf_Element_Dictionary */
|
||||
require_once 'Zend/Pdf/Element/Dictionary.php';
|
||||
|
||||
/** Zend_Pdf_Element_Name */
|
||||
require_once 'Zend/Pdf/Element/Name.php';
|
||||
|
||||
/** Zend_Pdf_Element_Numeric */
|
||||
require_once 'Zend/Pdf/Element/Numeric.php';
|
||||
|
||||
/** Zend_Pdf_Element_Object */
|
||||
require_once 'Zend/Pdf/Element/Object.php';
|
||||
|
||||
/** Zend_Pdf_Element_Reference */
|
||||
require_once 'Zend/Pdf/Element/Reference.php';
|
||||
|
||||
/** Zend_Pdf_Element_Object_Stream */
|
||||
require_once 'Zend/Pdf/Element/Object/Stream.php';
|
||||
|
||||
/** Zend_Pdf_Element_String */
|
||||
require_once 'Zend/Pdf/Element/String.php';
|
||||
|
||||
/** Zend_Pdf_Element_Null */
|
||||
require_once 'Zend/Pdf/Element/Null.php';
|
||||
|
||||
/** Zend_Pdf_UpdateInfoContainer */
|
||||
require_once 'Zend/Pdf/UpdateInfoContainer.php';
|
||||
|
||||
|
||||
/**
|
||||
* PDF element factory.
|
||||
* Responsibility is to log PDF changes
|
||||
@ -167,6 +124,7 @@ class Zend_Pdf_ElementFactory implements Zend_Pdf_ElementFactory_Interface
|
||||
*/
|
||||
static public function createFactory($objCount)
|
||||
{
|
||||
require_once 'Zend/Pdf/ElementFactory/Proxy.php';
|
||||
return new Zend_Pdf_ElementFactory_Proxy(new Zend_Pdf_ElementFactory($objCount));
|
||||
}
|
||||
|
||||
@ -292,9 +250,6 @@ class Zend_Pdf_ElementFactory implements Zend_Pdf_ElementFactory_Interface
|
||||
/**
|
||||
* Clean enumeration shift cache.
|
||||
* Has to be used after PDF render operation to let followed updates be correct.
|
||||
*
|
||||
* @param Zend_Pdf_ElementFactory_Interface $factory
|
||||
* @return integer
|
||||
*/
|
||||
public function cleanEnumerationShiftCache()
|
||||
{
|
||||
@ -315,6 +270,7 @@ class Zend_Pdf_ElementFactory implements Zend_Pdf_ElementFactory_Interface
|
||||
public function getEnumerationShift(Zend_Pdf_ElementFactory_Interface $factory)
|
||||
{
|
||||
if (($shift = $this->calculateShift($factory)) == -1) {
|
||||
require_once 'Zend/Pdf/Exception.php';
|
||||
throw new Zend_Pdf_Exception('Wrong object context');
|
||||
}
|
||||
|
||||
@ -330,6 +286,7 @@ class Zend_Pdf_ElementFactory implements Zend_Pdf_ElementFactory_Interface
|
||||
public function markAsModified(Zend_Pdf_Element_Object $obj)
|
||||
{
|
||||
if ($obj->getFactory() !== $this) {
|
||||
require_once 'Zend/Pdf/Exception.php';
|
||||
throw new Zend_Pdf_Exception('Object is not generated by this factory');
|
||||
}
|
||||
|
||||
@ -346,6 +303,7 @@ class Zend_Pdf_ElementFactory implements Zend_Pdf_ElementFactory_Interface
|
||||
public function remove(Zend_Pdf_Element_Object $obj)
|
||||
{
|
||||
if (!$obj->compareFactory($this)) {
|
||||
require_once 'Zend/Pdf/Exception.php';
|
||||
throw new Zend_Pdf_Exception('Object is not generated by this factory');
|
||||
}
|
||||
|
||||
@ -364,6 +322,7 @@ class Zend_Pdf_ElementFactory implements Zend_Pdf_ElementFactory_Interface
|
||||
*/
|
||||
public function newObject(Zend_Pdf_Element $objectValue)
|
||||
{
|
||||
require_once 'Zend/Pdf/Element/Object.php';
|
||||
$obj = new Zend_Pdf_Element_Object($objectValue, $this->_objectCount++, 0, $this);
|
||||
$this->_modifiedObjects[$obj->getObjNum()] = $obj;
|
||||
return $obj;
|
||||
@ -379,6 +338,7 @@ class Zend_Pdf_ElementFactory implements Zend_Pdf_ElementFactory_Interface
|
||||
*/
|
||||
public function newStreamObject($streamValue)
|
||||
{
|
||||
require_once 'Zend/Pdf/Element/Object/Stream.php';
|
||||
$obj = new Zend_Pdf_Element_Object_Stream($streamValue, $this->_objectCount++, 0, $this);
|
||||
$this->_modifiedObjects[$obj->getObjNum()] = $obj;
|
||||
return $obj;
|
||||
@ -404,9 +364,10 @@ class Zend_Pdf_ElementFactory implements Zend_Pdf_ElementFactory_Interface
|
||||
ksort($this->_modifiedObjects);
|
||||
|
||||
$result = array();
|
||||
require_once 'Zend/Pdf/UpdateInfoContainer.php';
|
||||
foreach ($this->_modifiedObjects as $objNum => $obj) {
|
||||
if ($this->_removedObjects->contains($obj)) {
|
||||
$result[$objNum+$shift] = new Zend_Pdf_UpdateInfoContainer($objNum + $shift,
|
||||
$result[$objNum+$shift] = new Zend_Pdf_UpdateInfoContainer($objNum + $shift,
|
||||
$obj->getGenNum()+1,
|
||||
true);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user