Fixed a bug in TextBox; addText to a TextBox was treated 'withoutP'.

This is not the expected behaviour
This commit is contained in:
Bas-Jan 't Jong 2014-05-08 21:38:54 +02:00
parent e9c548ea17
commit ade740b562
2 changed files with 1 additions and 3 deletions

View File

@ -57,9 +57,7 @@ class TextBox extends Element
$margins = implode(', ', $tbxStyle->getInnerMargin());
$this->xmlWriter->writeAttribute('inset', $margins);
$this->xmlWriter->startElement('w:txbxContent');
$this->xmlWriter->startElement('w:p');
$this->parentWriter->writeContainerElements($this->xmlWriter, $this->element);
$this->xmlWriter->endElement(); // w:p
$this->xmlWriter->endElement(); // w:txbxContent
$this->xmlWriter->endElement(); // v: textbox
$styleWriter->writeW10Wrap();

View File

@ -110,7 +110,7 @@ abstract class AbstractPart
// Loop through elements
$elements = $container->getElements();
$withoutP = in_array($containerName, array('TextRun', 'Footnote', 'Endnote', 'TextBox')) ? true : false;
$withoutP = in_array($containerName, array('TextRun', 'Footnote', 'Endnote')) ? true : false;
if (count($elements) > 0) {
foreach ($elements as $element) {
if ($element instanceof AbstractElement) {