Fixed bug in header / footer, in which media elements were all assigned

to the first header element. This resulted in a corrupted DOCX, when a
media element was assigned to a second header in the same section.
This commit is contained in:
Bas-Jan 't Jong 2014-05-04 10:36:13 +02:00
parent 15dcb384c6
commit 1a544cb2fa
1 changed files with 1 additions and 0 deletions

View File

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