diff --git a/docs/general.rst b/docs/general.rst index c267d87d..40c8da7e 100644 --- a/docs/general.rst +++ b/docs/general.rst @@ -63,9 +63,9 @@ XML Writer compatibility ~~~~~~~~~~~~~~~~~~~~~~~~ This option sets -```XMLWriter::setIndent`` `__ +`XMLWriter::setIndent `__ and -```XMLWriter::setIndentString`` `__. +`XMLWriter::setIndentString `__. The default value of this option is ``true`` (compatible), which is `required for OpenOffice `__ to render OOXML document correctly. You can set this option to ``false`` diff --git a/src/PhpWord/Reader/Word2007.php b/src/PhpWord/Reader/Word2007.php index 4ff84c3f..8df6c4ec 100644 --- a/src/PhpWord/Reader/Word2007.php +++ b/src/PhpWord/Reader/Word2007.php @@ -224,7 +224,9 @@ class Word2007 extends AbstractReader implements ReaderInterface if (!is_null($settingsNode)) { $settings = $this->readSectionStyle($xmlReader, $settingsNode); $section->setSettings($settings); - $this->readHeaderFooter($filename, $settings, $section); + if (!is_null($settings)) { + $this->readHeaderFooter($filename, $settings, $section); + } } $section = $this->phpWord->addSection(); } @@ -237,7 +239,9 @@ class Word2007 extends AbstractReader implements ReaderInterface case 'w:sectPr': // Last section $settings = $this->readSectionStyle($xmlReader, $node); $section->setSettings($settings); - $this->readHeaderFooter($filename, $settings, $section); + if (!is_null($settings)) { + $this->readHeaderFooter($filename, $settings, $section); + } break; } } diff --git a/src/PhpWord/Style/AbstractStyle.php b/src/PhpWord/Style/AbstractStyle.php index e77c26a6..11bfd8a4 100644 --- a/src/PhpWord/Style/AbstractStyle.php +++ b/src/PhpWord/Style/AbstractStyle.php @@ -107,7 +107,7 @@ abstract class AbstractStyle /** * Set integer value * - * @param mixed $value + * @param integer|null $value * @param integer|null $default * @return integer|null */ diff --git a/src/PhpWord/Style/ListItem.php b/src/PhpWord/Style/ListItem.php index f9e5e947..bb04d0e6 100644 --- a/src/PhpWord/Style/ListItem.php +++ b/src/PhpWord/Style/ListItem.php @@ -100,8 +100,6 @@ class ListItem extends AbstractStyle /** * Set numbering style name - * - * @param string $value */ public function setNumStyle($value) { @@ -126,7 +124,6 @@ class ListItem extends AbstractStyle /** * Get legacy numbering definition * - * @param integer $listType * @return array * @since 0.9.2 */