From aae9ad424947ef58a2f31542324c775a33e5f304 Mon Sep 17 00:00:00 2001 From: Andrey Tyshev Date: Mon, 19 Jun 2017 13:47:47 +0300 Subject: [PATCH 1/2] Fix names of styles --- src/PhpWord/Reader/Word2007/Document.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/PhpWord/Reader/Word2007/Document.php b/src/PhpWord/Reader/Word2007/Document.php index b89a99ad..e5063fd9 100644 --- a/src/PhpWord/Reader/Word2007/Document.php +++ b/src/PhpWord/Reader/Word2007/Document.php @@ -113,10 +113,10 @@ class Document extends AbstractPart 'orientation' => array(self::READ_VALUE, 'w:pgSz', 'w:orient'), 'colsNum' => array(self::READ_VALUE, 'w:cols', 'w:num'), 'colsSpace' => array(self::READ_VALUE, 'w:cols', 'w:space'), - 'topMargin' => array(self::READ_VALUE, 'w:pgMar', 'w:top'), - 'leftMargin' => array(self::READ_VALUE, 'w:pgMar', 'w:left'), - 'bottomMargin' => array(self::READ_VALUE, 'w:pgMar', 'w:bottom'), - 'rightMargin' => array(self::READ_VALUE, 'w:pgMar', 'w:right'), + 'marginTop' => array(self::READ_VALUE, 'w:pgMar', 'w:top'), + 'marginLeft' => array(self::READ_VALUE, 'w:pgMar', 'w:left'), + 'marginBottom' => array(self::READ_VALUE, 'w:pgMar', 'w:bottom'), + 'marginRight' => array(self::READ_VALUE, 'w:pgMar', 'w:right'), 'headerHeight' => array(self::READ_VALUE, 'w:pgMar', 'w:header'), 'footerHeight' => array(self::READ_VALUE, 'w:pgMar', 'w:footer'), 'gutter' => array(self::READ_VALUE, 'w:pgMar', 'w:gutter'), From 2074d35ab035323c27f6642aaa2d6d0ac79d253e Mon Sep 17 00:00:00 2001 From: Andrey Tyshev Date: Mon, 19 Jun 2017 13:51:41 +0300 Subject: [PATCH 2/2] Fix PreserveText in Section #452 --- src/PhpWord/Element/AbstractContainer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PhpWord/Element/AbstractContainer.php b/src/PhpWord/Element/AbstractContainer.php index a3872e0b..9d1267db 100644 --- a/src/PhpWord/Element/AbstractContainer.php +++ b/src/PhpWord/Element/AbstractContainer.php @@ -211,7 +211,7 @@ abstract class AbstractContainer extends AbstractElement 'TextBox' => array('Section', 'Header', 'Footer', 'Cell'), 'Footnote' => array('Section', 'TextRun', 'Cell'), 'Endnote' => array('Section', 'TextRun', 'Cell'), - 'PreserveText' => array('Header', 'Footer', 'Cell'), + 'PreserveText' => array('Section', 'Header', 'Footer', 'Cell'), 'Title' => array('Section'), 'TOC' => array('Section'), 'PageBreak' => array('Section'),