From ac357d10d52b8c2e491e56683f8a07665d3fa5ff Mon Sep 17 00:00:00 2001 From: troosan Date: Sat, 18 Nov 2017 15:55:05 +0100 Subject: [PATCH] Various fixes - parse text inside list items - add tests - rename Cell widthType attribute to unit --- docs/elements.rst | 2 +- samples/Sample_26_Html.php | 20 ++++++++++-- src/PhpWord/Element/AbstractContainer.php | 2 -- src/PhpWord/Element/Footnote.php | 5 ++- src/PhpWord/Element/Section.php | 6 ---- src/PhpWord/Settings.php | 4 --- src/PhpWord/Shared/Html.php | 14 ++++---- src/PhpWord/SimpleType/Jc.php | 2 -- src/PhpWord/SimpleType/JcTable.php | 2 -- src/PhpWord/Style/Cell.php | 16 +++++----- src/PhpWord/Writer/AbstractWriter.php | 4 +-- src/PhpWord/Writer/Word2007/Style/Cell.php | 12 ++++--- tests/PhpWord/Shared/ConverterTest.php | 1 + tests/PhpWord/Shared/HtmlTest.php | 32 +++++++++++++++++-- tests/PhpWord/Writer/Word2007/ElementTest.php | 19 +++++++++++ 15 files changed, 96 insertions(+), 45 deletions(-) diff --git a/docs/elements.rst b/docs/elements.rst index e27b45d9..a2e41566 100644 --- a/docs/elements.rst +++ b/docs/elements.rst @@ -415,7 +415,7 @@ Line elements can be added to sections by using ``addLine``. .. code-block:: php $lineStyle = array('weight' => 1, 'width' => 100, 'height' => 0, 'color' => 635552); - $section->addLine($lineStyle) + $section->addLine($lineStyle); Available line style attributes: diff --git a/samples/Sample_26_Html.php b/samples/Sample_26_Html.php index 8e6e9a33..ba06b063 100644 --- a/samples/Sample_26_Html.php +++ b/samples/Sample_26_Html.php @@ -14,11 +14,25 @@ $html .= '