Fix documentation format and some type check

This commit is contained in:
Ivan Lanin 2014-04-11 18:16:24 +07:00
parent 297eeaadf0
commit 42167f8855
4 changed files with 9 additions and 8 deletions

View File

@ -63,9 +63,9 @@ XML Writer compatibility
~~~~~~~~~~~~~~~~~~~~~~~~
This option sets
```XMLWriter::setIndent`` <http://www.php.net/manual/en/function.xmlwriter-set-indent.php>`__
`XMLWriter::setIndent <http://www.php.net/manual/en/function.xmlwriter-set-indent.php>`__
and
```XMLWriter::setIndentString`` <http://www.php.net/manual/en/function.xmlwriter-set-indent-string.php>`__.
`XMLWriter::setIndentString <http://www.php.net/manual/en/function.xmlwriter-set-indent-string.php>`__.
The default value of this option is ``true`` (compatible), which is
`required for OpenOffice <https://github.com/PHPOffice/PHPWord/issues/103>`__ to
render OOXML document correctly. You can set this option to ``false``

View File

@ -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;
}
}

View File

@ -107,7 +107,7 @@ abstract class AbstractStyle
/**
* Set integer value
*
* @param mixed $value
* @param integer|null $value
* @param integer|null $default
* @return integer|null
*/

View File

@ -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
*/