From 970c6a24eba9c5622d1e17645363f35adec420eb Mon Sep 17 00:00:00 2001 From: Ivan Lanin Date: Sun, 18 May 2014 16:48:15 +0700 Subject: [PATCH] Bug fixes for last commit --- src/PhpWord/Writer/ODText/Part/Styles.php | 2 -- src/PhpWord/Writer/Word2007/Part/Styles.php | 2 +- tests/PhpWord/Tests/Writer/ODText/Part/ContentTest.php | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/PhpWord/Writer/ODText/Part/Styles.php b/src/PhpWord/Writer/ODText/Part/Styles.php index de8ebd92..b7864fe3 100644 --- a/src/PhpWord/Writer/ODText/Part/Styles.php +++ b/src/PhpWord/Writer/ODText/Part/Styles.php @@ -175,8 +175,6 @@ class Styles extends AbstractPart */ private function writeMaster(XMLWriter $xmlWriter) { - $xmlWriter = $this->getXmlWriter(); - $xmlWriter->startElement('office:master-styles'); $xmlWriter->startElement('style:master-page'); diff --git a/src/PhpWord/Writer/Word2007/Part/Styles.php b/src/PhpWord/Writer/Word2007/Part/Styles.php index 06ee88d7..a0a6317a 100644 --- a/src/PhpWord/Writer/Word2007/Part/Styles.php +++ b/src/PhpWord/Writer/Word2007/Part/Styles.php @@ -154,7 +154,7 @@ class Styles extends AbstractPart * Write default font and other default styles * * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter - * @param \PhpOffice\PhpWord\Style\AbstractStyle $styles + * @param \PhpOffice\PhpWord\Style\AbstractStyle[] $styles */ private function writeDefaultStyles(XMLWriter $xmlWriter, $styles) { diff --git a/tests/PhpWord/Tests/Writer/ODText/Part/ContentTest.php b/tests/PhpWord/Tests/Writer/ODText/Part/ContentTest.php index 619e3573..03f0cfeb 100644 --- a/tests/PhpWord/Tests/Writer/ODText/Part/ContentTest.php +++ b/tests/PhpWord/Tests/Writer/ODText/Part/ContentTest.php @@ -84,7 +84,7 @@ class ContentTest extends \PHPUnit_Framework_TestCase $doc = TestHelperDOCX::getDocument($phpWord, 'ODText'); - $element = "/office:document-content/office:body/office:text/text:p"; + $element = "/office:document-content/office:body/office:text/text:section/text:p"; $this->assertEquals($expected, $doc->getElement($element, 'content.xml')->nodeValue); }