Fixed bug in header, wherein all images were assigned to the first

header in a section. This resulted in a corrupt DOCX
This commit is contained in:
Bas-Jan 't Jong 2014-05-04 10:16:28 +02:00
parent 9c11067720
commit 2187954b56
1 changed files with 1 additions and 2 deletions

View File

@ -249,7 +249,6 @@ abstract class AbstractContainer extends AbstractElement
$rId = Media::addElement($elementDocPart, 'image', $src, $image);
$image->setRelationId($rId);
$this->addElement($image);
return $image;
}
@ -413,7 +412,7 @@ abstract class AbstractContainer extends AbstractElement
$docPart = $isCellTextrun ? $this->getDocPart() : $this->container;
$docPartId = $isCellTextrun ? $this->getDocPartId() : $this->sectionId;
$inHeaderFooter = ($docPart == 'header' || $docPart == 'footer');
$docPartId = $inHeaderFooter ? $this->getDocPartId() : $docPartId;
return $inHeaderFooter ? $docPart . $docPartId : $docPart;
}