Revert "Fixed a bug in TextBox; addText to a TextBox was treated 'withoutP'. This is not the expected behaviour"

This reverts commit ade740b562.
This commit is contained in:
Bas-Jan 't Jong 2014-05-08 21:41:30 +02:00
parent ade740b562
commit 841bc2ac69
2 changed files with 3 additions and 1 deletions

View File

@ -57,7 +57,9 @@ 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')) ? true : false;
$withoutP = in_array($containerName, array('TextRun', 'Footnote', 'Endnote', 'TextBox')) ? true : false;
if (count($elements) > 0) {
foreach ($elements as $element) {
if ($element instanceof AbstractElement) {