Merge pull request #1637 from bhattnishant/master

To support PreserveText inside sub container
This commit is contained in:
troosan 2019-08-08 07:08:13 +02:00 committed by GitHub
commit 487622bb9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -254,7 +254,7 @@ abstract class AbstractContainer extends AbstractElement
// Special condition, e.g. preservetext can only exists in cell when
// the cell is located in header or footer
$validSubcontainers = array(
'PreserveText' => array(array('Cell'), array('Header', 'Footer')),
'PreserveText' => array(array('Cell'), array('Header', 'Footer', 'Section')),
'Footnote' => array(array('Cell', 'TextRun'), array('Section')),
'Endnote' => array(array('Cell', 'TextRun'), array('Section')),
);

View File

@ -233,7 +233,7 @@ class CellTest extends AbstractWebServerEmbeddedTest
public function testAddPreserveTextException()
{
$oCell = new Cell();
$oCell->setDocPart('Section', 1);
$oCell->setDocPart('TextRun', 1);
$oCell->addPreserveText('text');
}