From 2a5c66784b5e723d0cdae9249f80d44522196a3b Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Fri, 6 Feb 2015 22:28:31 +0400 Subject: [PATCH 01/99] #51 (updated tests, refactored a little). --- docs/general.rst | 14 +- docs/src/documentation.md | 14 +- samples/Sample_01_SimpleText.php | 72 +++--- samples/Sample_02_TabStops.php | 6 +- samples/Sample_03_Sections.php | 14 +- samples/Sample_04_Textrun.php | 26 +- samples/Sample_05_Multicolumn.php | 10 +- samples/Sample_06_Footnote.php | 26 +- samples/Sample_07_TemplateCloneRow.php | 72 +++--- samples/Sample_08_ParagraphPagination.php | 22 +- samples/Sample_09_Tables.php | 48 ++-- samples/Sample_10_EastAsianFontStyle.php | 2 +- samples/Sample_12_HeaderFooter.php | 25 +- samples/Sample_13_Images.php | 16 +- samples/Sample_14_ListItem.php | 64 ++--- samples/Sample_15_Link.php | 4 +- samples/Sample_16_Object.php | 2 +- samples/Sample_17_TitleTOC.php | 42 ++-- samples/Sample_18_Watermark.php | 2 +- samples/Sample_19_TextBreak.php | 12 +- samples/Sample_20_BGColor.php | 6 +- samples/Sample_21_TableRowRules.php | 16 +- samples/Sample_22_CheckBox.php | 8 +- samples/Sample_25_TextBox.php | 20 +- samples/Sample_27_Field.php | 10 +- samples/Sample_29_Line.php | 8 +- samples/Sample_31_Shape.php | 12 +- samples/Sample_32_Chart.php | 4 +- samples/Sample_33_FormField.php | 10 +- samples/Sample_34_SDT.php | 6 +- samples/Sample_35_InternalLink.php | 8 +- samples/Sample_36_RTL.php | 4 +- samples/resources/Sample_28_ReadRTF.rtf | 2 +- tests/PhpWord/Tests/AutoloaderTest.php | 8 +- .../Tests/Element/AbstractElementTest.php | 4 +- tests/PhpWord/Tests/Element/CellTest.php | 40 +-- tests/PhpWord/Tests/Element/CheckBoxTest.php | 20 +- tests/PhpWord/Tests/Element/FieldTest.php | 17 +- tests/PhpWord/Tests/Element/FooterTest.php | 18 +- tests/PhpWord/Tests/Element/FootnoteTest.php | 10 +- tests/PhpWord/Tests/Element/HeaderTest.php | 30 +-- tests/PhpWord/Tests/Element/ImageTest.php | 45 ++-- tests/PhpWord/Tests/Element/LineTest.php | 28 +-- tests/PhpWord/Tests/Element/LinkTest.php | 28 +-- .../PhpWord/Tests/Element/ListItemRunTest.php | 30 +-- tests/PhpWord/Tests/Element/ListItemTest.php | 13 +- tests/PhpWord/Tests/Element/ObjectTest.php | 18 +- .../Tests/Element/PreserveTextTest.php | 21 +- tests/PhpWord/Tests/Element/RowTest.php | 4 +- tests/PhpWord/Tests/Element/SectionTest.php | 46 ++-- tests/PhpWord/Tests/Element/TOCTest.php | 8 +- tests/PhpWord/Tests/Element/TableTest.php | 20 +- tests/PhpWord/Tests/Element/TextBoxTest.php | 18 +- tests/PhpWord/Tests/Element/TextRunTest.php | 24 +- tests/PhpWord/Tests/Element/TextTest.php | 18 +- tests/PhpWord/Tests/Element/TitleTest.php | 8 +- tests/PhpWord/Tests/IOFactoryTest.php | 2 +- tests/PhpWord/Tests/MediaTest.php | 12 +- tests/PhpWord/Tests/Metadata/DocInfoTest.php | 90 ++----- tests/PhpWord/Tests/PhpWordTest.php | 2 +- tests/PhpWord/Tests/SettingsTest.php | 4 +- tests/PhpWord/Tests/Shared/HtmlTest.php | 4 +- tests/PhpWord/Tests/Shared/XMLReaderTest.php | 6 +- tests/PhpWord/Tests/Shared/ZipArchiveTest.php | 18 +- .../PhpWord/Tests/Style/AbstractStyleTest.php | 3 +- tests/PhpWord/Tests/Style/CellTest.php | 24 +- tests/PhpWord/Tests/Style/FontTest.php | 83 +++---- tests/PhpWord/Tests/Style/ImageTest.php | 30 +-- tests/PhpWord/Tests/Style/IndentationTest.php | 6 +- .../PhpWord/Tests/Style/LineNumberingTest.php | 6 +- tests/PhpWord/Tests/Style/LineTest.php | 38 +-- .../Tests/Style/NumberingLevelTest.php | 22 +- tests/PhpWord/Tests/Style/NumberingTest.php | 4 +- tests/PhpWord/Tests/Style/ParagraphTest.php | 48 ++-- tests/PhpWord/Tests/Style/RowTest.php | 8 +- tests/PhpWord/Tests/Style/SectionTest.php | 11 +- tests/PhpWord/Tests/Style/SpacingTest.php | 6 +- tests/PhpWord/Tests/Style/TableTest.php | 46 ++-- tests/PhpWord/Tests/Style/TextBoxTest.php | 137 +++++------ tests/PhpWord/Tests/StyleTest.php | 2 +- tests/PhpWord/Tests/TemplateProcessorTest.php | 22 +- .../PhpWord/Tests/Writer/HTML/ElementTest.php | 10 +- tests/PhpWord/Tests/Writer/HTMLTest.php | 44 ++-- .../Writer/ODText/Part/AbstractPartTest.php | 14 +- .../Tests/Writer/ODText/Part/ContentTest.php | 33 ++- tests/PhpWord/Tests/Writer/ODTextTest.php | 27 +- tests/PhpWord/Tests/Writer/PDF/DomPDFTest.php | 4 +- tests/PhpWord/Tests/Writer/PDF/MPDFTest.php | 4 +- tests/PhpWord/Tests/Writer/PDF/TCPDFTest.php | 4 +- tests/PhpWord/Tests/Writer/PDFTest.php | 2 +- tests/PhpWord/Tests/Writer/RTFTest.php | 26 +- .../Tests/Writer/Word2007/ElementTest.php | 63 +++-- .../Writer/Word2007/Part/AbstractPartTest.php | 14 +- .../Writer/Word2007/Part/DocumentTest.php | 231 ++++++++++-------- .../Tests/Writer/Word2007/Part/FooterTest.php | 8 +- .../Writer/Word2007/Part/FootnotesTest.php | 12 +- .../Tests/Writer/Word2007/Part/HeaderTest.php | 8 +- .../Writer/Word2007/Part/NumberingTest.php | 20 +- .../Tests/Writer/Word2007/Part/StylesTest.php | 7 +- .../Tests/Writer/Word2007/Style/FontTest.php | 4 +- tests/PhpWord/Tests/Writer/Word2007Test.php | 45 ++-- .../PhpWord/Tests/_files/documents/reader.rtf | 2 +- .../Tests/_includes/TestHelperDOCX.php | 12 +- tests/PhpWord/Tests/_includes/XmlDocument.php | 2 +- 104 files changed, 1171 insertions(+), 1142 deletions(-) diff --git a/docs/general.rst b/docs/general.rst index 34d3af2477..64298928d9 100644 --- a/docs/general.rst +++ b/docs/general.rst @@ -28,7 +28,9 @@ folder `__. htmlspecialchars( '"Learn from yesterday, live for today, hope for tomorrow. ' . 'The important thing is not to stop questioning." ' - . '(Albert Einstein)' + . '(Albert Einstein)', + ENT_COMPAT, + 'UTF-8' ) ); @@ -44,7 +46,9 @@ folder `__. htmlspecialchars( '"Great achievement is usually born of great sacrifice, ' . 'and is never the result of selfishness." ' - . '(Napoleon Hill)' + . '(Napoleon Hill)', + ENT_COMPAT, + 'UTF-8' ), array('name' => 'Tahoma', 'size' => 10) ); @@ -59,7 +63,9 @@ folder `__. htmlspecialchars( '"The greatest accomplishment is not in never falling, ' . 'but in rising again after you fall." ' - . '(Vince Lombardi)' + . '(Vince Lombardi)', + ENT_COMPAT, + 'UTF-8' ), $fontStyleName ); @@ -70,7 +76,7 @@ folder `__. $fontStyle->setName('Tahoma'); $fontStyle->setSize(13); $myTextElement = $section->addText( - htmlspecialchars('"Believe you can and you\'re halfway there." (Theodor Roosevelt)') + htmlspecialchars('"Believe you can and you\'re halfway there." (Theodor Roosevelt)', ENT_COMPAT, 'UTF-8') ); $myTextElement->setFontStyle($fontStyle); diff --git a/docs/src/documentation.md b/docs/src/documentation.md index 1a59e94230..36c8ad6b67 100644 --- a/docs/src/documentation.md +++ b/docs/src/documentation.md @@ -228,7 +228,9 @@ $section->addText( htmlspecialchars( '"Learn from yesterday, live for today, hope for tomorrow. ' . 'The important thing is not to stop questioning." ' - . '(Albert Einstein)' + . '(Albert Einstein)', + ENT_COMPAT, + 'UTF-8' ) ); @@ -244,7 +246,9 @@ $section->addText( htmlspecialchars( '"Great achievement is usually born of great sacrifice, ' . 'and is never the result of selfishness." ' - . '(Napoleon Hill)' + . '(Napoleon Hill)', + ENT_COMPAT, + 'UTF-8' ), array('name' => 'Tahoma', 'size' => 10) ); @@ -259,7 +263,9 @@ $section->addText( htmlspecialchars( '"The greatest accomplishment is not in never falling, ' . 'but in rising again after you fall." ' - . '(Vince Lombardi)' + . '(Vince Lombardi)', + ENT_COMPAT, + 'UTF-8' ), $fontStyleName ); @@ -270,7 +276,7 @@ $fontStyle->setBold(true); $fontStyle->setName('Tahoma'); $fontStyle->setSize(13); $myTextElement = $section->addText( - htmlspecialchars('"Believe you can and you\'re halfway there." (Theodor Roosevelt)') + htmlspecialchars('"Believe you can and you\'re halfway there." (Theodor Roosevelt)', ENT_COMPAT, 'UTF-8') ); $myTextElement->setFontStyle($fontStyle); diff --git a/samples/Sample_01_SimpleText.php b/samples/Sample_01_SimpleText.php index f7aaece30a..391622b821 100644 --- a/samples/Sample_01_SimpleText.php +++ b/samples/Sample_01_SimpleText.php @@ -12,16 +12,16 @@ $section = $phpWord->addSection(); // Simple text -$section->addTitle(htmlspecialchars('Welcome to PhpWord'), 1); -$section->addText(htmlspecialchars('Hello World!')); +$section->addTitle(htmlspecialchars('Welcome to PhpWord', ENT_COMPAT, 'UTF-8'), 1); +$section->addText(htmlspecialchars('Hello World!', ENT_COMPAT, 'UTF-8')); // Two text break $section->addTextBreak(2); // Defined style -$section->addText(htmlspecialchars('I am styled by a font style definition.'), 'rStyle'); -$section->addText(htmlspecialchars('I am styled by a paragraph style definition.'), null, 'pStyle'); -$section->addText(htmlspecialchars('I am styled by both font and paragraph style.'), 'rStyle', 'pStyle'); +$section->addText(htmlspecialchars('I am styled by a font style definition.', ENT_COMPAT, 'UTF-8'), 'rStyle'); +$section->addText(htmlspecialchars('I am styled by a paragraph style definition.', ENT_COMPAT, 'UTF-8'), null, 'pStyle'); +$section->addText(htmlspecialchars('I am styled by both font and paragraph style.', ENT_COMPAT, 'UTF-8'), 'rStyle', 'pStyle'); $section->addTextBreak(); @@ -30,39 +30,39 @@ $fontStyle['size'] = 20; $textrun = $section->addTextRun(); -$textrun->addText(htmlspecialchars('I am inline styled '), $fontStyle); -$textrun->addText(htmlspecialchars('with ')); -$textrun->addText(htmlspecialchars('color'), array('color' => '996699')); -$textrun->addText(htmlspecialchars(', ')); -$textrun->addText(htmlspecialchars('bold'), array('bold' => true)); -$textrun->addText(htmlspecialchars(', ')); -$textrun->addText(htmlspecialchars('italic'), array('italic' => true)); -$textrun->addText(htmlspecialchars(', ')); -$textrun->addText(htmlspecialchars('underline'), array('underline' => 'dash')); -$textrun->addText(htmlspecialchars(', ')); -$textrun->addText(htmlspecialchars('strikethrough'), array('strikethrough' => true)); -$textrun->addText(htmlspecialchars(', ')); -$textrun->addText(htmlspecialchars('doubleStrikethrough'), array('doubleStrikethrough' => true)); -$textrun->addText(htmlspecialchars(', ')); -$textrun->addText(htmlspecialchars('superScript'), array('superScript' => true)); -$textrun->addText(htmlspecialchars(', ')); -$textrun->addText(htmlspecialchars('subScript'), array('subScript' => true)); -$textrun->addText(htmlspecialchars(', ')); -$textrun->addText(htmlspecialchars('smallCaps'), array('smallCaps' => true)); -$textrun->addText(htmlspecialchars(', ')); -$textrun->addText(htmlspecialchars('allCaps'), array('allCaps' => true)); -$textrun->addText(htmlspecialchars(', ')); -$textrun->addText(htmlspecialchars('fgColor'), array('fgColor' => 'yellow')); -$textrun->addText(htmlspecialchars(', ')); -$textrun->addText(htmlspecialchars('scale'), array('scale' => 200)); -$textrun->addText(htmlspecialchars(', ')); -$textrun->addText(htmlspecialchars('spacing'), array('spacing' => 120)); -$textrun->addText(htmlspecialchars(', ')); -$textrun->addText(htmlspecialchars('kerning'), array('kerning' => 10)); -$textrun->addText(htmlspecialchars('. ')); +$textrun->addText(htmlspecialchars('I am inline styled ', ENT_COMPAT, 'UTF-8'), $fontStyle); +$textrun->addText(htmlspecialchars('with ', ENT_COMPAT, 'UTF-8')); +$textrun->addText(htmlspecialchars('color', ENT_COMPAT, 'UTF-8'), array('color' => '996699')); +$textrun->addText(htmlspecialchars(', ', ENT_COMPAT, 'UTF-8')); +$textrun->addText(htmlspecialchars('bold', ENT_COMPAT, 'UTF-8'), array('bold' => true)); +$textrun->addText(htmlspecialchars(', ', ENT_COMPAT, 'UTF-8')); +$textrun->addText(htmlspecialchars('italic', ENT_COMPAT, 'UTF-8'), array('italic' => true)); +$textrun->addText(htmlspecialchars(', ', ENT_COMPAT, 'UTF-8')); +$textrun->addText(htmlspecialchars('underline', ENT_COMPAT, 'UTF-8'), array('underline' => 'dash')); +$textrun->addText(htmlspecialchars(', ', ENT_COMPAT, 'UTF-8')); +$textrun->addText(htmlspecialchars('strikethrough', ENT_COMPAT, 'UTF-8'), array('strikethrough' => true)); +$textrun->addText(htmlspecialchars(', ', ENT_COMPAT, 'UTF-8')); +$textrun->addText(htmlspecialchars('doubleStrikethrough', ENT_COMPAT, 'UTF-8'), array('doubleStrikethrough' => true)); +$textrun->addText(htmlspecialchars(', ', ENT_COMPAT, 'UTF-8')); +$textrun->addText(htmlspecialchars('superScript', ENT_COMPAT, 'UTF-8'), array('superScript' => true)); +$textrun->addText(htmlspecialchars(', ', ENT_COMPAT, 'UTF-8')); +$textrun->addText(htmlspecialchars('subScript', ENT_COMPAT, 'UTF-8'), array('subScript' => true)); +$textrun->addText(htmlspecialchars(', ', ENT_COMPAT, 'UTF-8')); +$textrun->addText(htmlspecialchars('smallCaps', ENT_COMPAT, 'UTF-8'), array('smallCaps' => true)); +$textrun->addText(htmlspecialchars(', ', ENT_COMPAT, 'UTF-8')); +$textrun->addText(htmlspecialchars('allCaps', ENT_COMPAT, 'UTF-8'), array('allCaps' => true)); +$textrun->addText(htmlspecialchars(', ', ENT_COMPAT, 'UTF-8')); +$textrun->addText(htmlspecialchars('fgColor', ENT_COMPAT, 'UTF-8'), array('fgColor' => 'yellow')); +$textrun->addText(htmlspecialchars(', ', ENT_COMPAT, 'UTF-8')); +$textrun->addText(htmlspecialchars('scale', ENT_COMPAT, 'UTF-8'), array('scale' => 200)); +$textrun->addText(htmlspecialchars(', ', ENT_COMPAT, 'UTF-8')); +$textrun->addText(htmlspecialchars('spacing', ENT_COMPAT, 'UTF-8'), array('spacing' => 120)); +$textrun->addText(htmlspecialchars(', ', ENT_COMPAT, 'UTF-8')); +$textrun->addText(htmlspecialchars('kerning', ENT_COMPAT, 'UTF-8'), array('kerning' => 10)); +$textrun->addText(htmlspecialchars('. ', ENT_COMPAT, 'UTF-8')); // Link -$section->addLink('http://www.google.com', htmlspecialchars('Google')); +$section->addLink('https://github.com/PHPOffice/PHPWord', htmlspecialchars('PHPWord on GitHub', ENT_COMPAT, 'UTF-8')); $section->addTextBreak(); // Image diff --git a/samples/Sample_02_TabStops.php b/samples/Sample_02_TabStops.php index 46d91cec34..618454b299 100644 --- a/samples/Sample_02_TabStops.php +++ b/samples/Sample_02_TabStops.php @@ -29,9 +29,9 @@ $section = $phpWord->addSection(); // Add listitem elements -$section->addText(htmlspecialchars("Multiple Tabs:\tOne\tTwo\tThree"), null, 'multipleTab'); -$section->addText(htmlspecialchars("Left Aligned\tRight Aligned"), null, 'rightTab'); -$section->addText(htmlspecialchars("\tCenter Aligned"), null, 'centerTab'); +$section->addText(htmlspecialchars("Multiple Tabs:\tOne\tTwo\tThree", ENT_COMPAT, 'UTF-8'), null, 'multipleTab'); +$section->addText(htmlspecialchars("Left Aligned\tRight Aligned", ENT_COMPAT, 'UTF-8'), null, 'rightTab'); +$section->addText(htmlspecialchars("\tCenter Aligned", ENT_COMPAT, 'UTF-8'), null, 'centerTab'); // Save file echo write($phpWord, basename(__FILE__, '.php'), $writers); diff --git a/samples/Sample_03_Sections.php b/samples/Sample_03_Sections.php index a95b15d644..3a7ea19ec6 100644 --- a/samples/Sample_03_Sections.php +++ b/samples/Sample_03_Sections.php @@ -7,13 +7,15 @@ // New portrait section $section = $phpWord->addSection(array('borderColor' => '00FF00', 'borderSize' => 12)); -$section->addText(htmlspecialchars('I am placed on a default section.')); +$section->addText(htmlspecialchars('I am placed on a default section.', ENT_COMPAT, 'UTF-8')); // New landscape section $section = $phpWord->addSection(array('orientation' => 'landscape')); $section->addText( htmlspecialchars( - 'I am placed on a landscape section. Every page starting from this section will be landscape style.' + 'I am placed on a landscape section. Every page starting from this section will be landscape style.', + ENT_COMPAT, + 'UTF-8' ) ); $section->addPageBreak(); @@ -23,7 +25,7 @@ $section = $phpWord->addSection( array('paperSize' => 'Folio', 'marginLeft' => 600, 'marginRight' => 600, 'marginTop' => 600, 'marginBottom' => 600) ); -$section->addText(htmlspecialchars('This section uses other margins with folio papersize.')); +$section->addText(htmlspecialchars('This section uses other margins with folio papersize.', ENT_COMPAT, 'UTF-8')); // New portrait section with Header & Footer $section = $phpWord->addSection( @@ -36,9 +38,9 @@ 'footerHeight' => 50, ) ); -$section->addText(htmlspecialchars('This section and we play with header/footer height.')); -$section->addHeader()->addText(htmlspecialchars('Header')); -$section->addFooter()->addText(htmlspecialchars('Footer')); +$section->addText(htmlspecialchars('This section and we play with header/footer height.', ENT_COMPAT, 'UTF-8')); +$section->addHeader()->addText(htmlspecialchars('Header', ENT_COMPAT, 'UTF-8')); +$section->addFooter()->addText(htmlspecialchars('Footer', ENT_COMPAT, 'UTF-8')); // Save file echo write($phpWord, basename(__FILE__, '.php'), $writers); diff --git a/samples/Sample_04_Textrun.php b/samples/Sample_04_Textrun.php index 7ebf6e3365..9590f6df37 100644 --- a/samples/Sample_04_Textrun.php +++ b/samples/Sample_04_Textrun.php @@ -20,24 +20,24 @@ // Add text run $textrun = $section->addTextRun('pStyle'); -$textrun->addText(htmlspecialchars('Each textrun can contain native text, link elements or an image.')); -$textrun->addText(htmlspecialchars(' No break is placed after adding an element.'), 'BoldText'); -$textrun->addText(htmlspecialchars(' Both ')); -$textrun->addText(htmlspecialchars('superscript'), array('superScript' => true)); -$textrun->addText(htmlspecialchars(' and ')); -$textrun->addText(htmlspecialchars('subscript'), array('subScript' => true)); -$textrun->addText(htmlspecialchars(' are also available.')); +$textrun->addText(htmlspecialchars('Each textrun can contain native text, link elements or an image.', ENT_COMPAT, 'UTF-8')); +$textrun->addText(htmlspecialchars(' No break is placed after adding an element.', ENT_COMPAT, 'UTF-8'), 'BoldText'); +$textrun->addText(htmlspecialchars(' Both ', ENT_COMPAT, 'UTF-8')); +$textrun->addText(htmlspecialchars('superscript', ENT_COMPAT, 'UTF-8'), array('superScript' => true)); +$textrun->addText(htmlspecialchars(' and ', ENT_COMPAT, 'UTF-8')); +$textrun->addText(htmlspecialchars('subscript', ENT_COMPAT, 'UTF-8'), array('subScript' => true)); +$textrun->addText(htmlspecialchars(' are also available.', ENT_COMPAT, 'UTF-8')); $textrun->addText( - htmlspecialchars(' All elements are placed inside a paragraph with the optionally given p-Style.'), + htmlspecialchars(' All elements are placed inside a paragraph with the optionally given p-Style.', ENT_COMPAT, 'UTF-8'), 'ColoredText' ); -$textrun->addText(htmlspecialchars(' Sample Link: ')); -$textrun->addLink('http://www.google.com', null, 'NLink'); -$textrun->addText(htmlspecialchars(' Sample Image: ')); +$textrun->addText(htmlspecialchars(' Sample Link: ', ENT_COMPAT, 'UTF-8')); +$textrun->addLink('https://github.com/PHPOffice/PHPWord', htmlspecialchars('PHPWord on GitHub', ENT_COMPAT, 'UTF-8'), 'NLink'); +$textrun->addText(htmlspecialchars(' Sample Image: ', ENT_COMPAT, 'UTF-8')); $textrun->addImage('resources/_earth.jpg', array('width' => 18, 'height' => 18)); -$textrun->addText(htmlspecialchars(' Sample Object: ')); +$textrun->addText(htmlspecialchars(' Sample Object: ', ENT_COMPAT, 'UTF-8')); $textrun->addObject('resources/_sheet.xls'); -$textrun->addText(htmlspecialchars(' Here is some more text. ')); +$textrun->addText(htmlspecialchars(' Here is some more text. ', ENT_COMPAT, 'UTF-8')); // Save file echo write($phpWord, basename(__FILE__, '.php'), $writers); diff --git a/samples/Sample_05_Multicolumn.php b/samples/Sample_05_Multicolumn.php index b93ab344c1..5c0367294c 100644 --- a/samples/Sample_05_Multicolumn.php +++ b/samples/Sample_05_Multicolumn.php @@ -11,7 +11,7 @@ // Normal $section = $phpWord->addSection(); -$section->addText(htmlspecialchars("Normal paragraph. {$filler}")); +$section->addText(htmlspecialchars("Normal paragraph. {$filler}", ENT_COMPAT, 'UTF-8')); // Two columns $section = $phpWord->addSection( @@ -21,11 +21,11 @@ 'breakType' => 'continuous', ) ); -$section->addText(htmlspecialchars("Two columns, one inch (1440 twips) spacing. {$filler}")); +$section->addText(htmlspecialchars("Two columns, one inch (1440 twips) spacing. {$filler}", ENT_COMPAT, 'UTF-8')); // Normal $section = $phpWord->addSection(array('breakType' => 'continuous')); -$section->addText(htmlspecialchars("Normal paragraph again. {$filler}")); +$section->addText(htmlspecialchars("Normal paragraph again. {$filler}", ENT_COMPAT, 'UTF-8')); // Three columns $section = $phpWord->addSection( @@ -35,11 +35,11 @@ 'breakType' => 'continuous', ) ); -$section->addText(htmlspecialchars("Three columns, half inch (720 twips) spacing. {$filler}")); +$section->addText(htmlspecialchars("Three columns, half inch (720 twips) spacing. {$filler}", ENT_COMPAT, 'UTF-8')); // Normal $section = $phpWord->addSection(array('breakType' => 'continuous')); -$section->addText(htmlspecialchars('Normal paragraph again.')); +$section->addText(htmlspecialchars('Normal paragraph again.', ENT_COMPAT, 'UTF-8')); // Save file echo write($phpWord, basename(__FILE__, '.php'), $writers); diff --git a/samples/Sample_06_Footnote.php b/samples/Sample_06_Footnote.php index c7f3d8c0bc..71c1ff1de9 100644 --- a/samples/Sample_06_Footnote.php +++ b/samples/Sample_06_Footnote.php @@ -20,30 +20,32 @@ // Add text elements $textrun = $section->addTextRun('pStyle'); -$textrun->addText(htmlspecialchars('This is some lead text in a paragraph with a following footnote. '), 'pStyle'); +$textrun->addText(htmlspecialchars('This is some lead text in a paragraph with a following footnote. ', ENT_COMPAT, 'UTF-8'), 'pStyle'); $footnote = $textrun->addFootnote(); -$footnote->addText(htmlspecialchars('Just like a textrun, a footnote can contain native texts. ')); -$footnote->addText(htmlspecialchars('No break is placed after adding an element. '), 'BoldText'); -$footnote->addText(htmlspecialchars('All elements are placed inside a paragraph. '), 'ColoredText'); +$footnote->addText(htmlspecialchars('Just like a textrun, a footnote can contain native texts. ', ENT_COMPAT, 'UTF-8')); +$footnote->addText(htmlspecialchars('No break is placed after adding an element. ', ENT_COMPAT, 'UTF-8'), 'BoldText'); +$footnote->addText(htmlspecialchars('All elements are placed inside a paragraph. ', ENT_COMPAT, 'UTF-8'), 'ColoredText'); $footnote->addTextBreak(); -$footnote->addText(htmlspecialchars('But you can insert a manual text break like above, ')); -$footnote->addText(htmlspecialchars('links like ')); -$footnote->addLink('http://www.google.com', null, 'NLink'); -$footnote->addText(htmlspecialchars(', image like ')); +$footnote->addText(htmlspecialchars('But you can insert a manual text break like above, ', ENT_COMPAT, 'UTF-8')); +$footnote->addText(htmlspecialchars('links like ', ENT_COMPAT, 'UTF-8')); +$footnote->addLink('https://github.com/PHPOffice/PHPWord', htmlspecialchars('PHPWord on GitHub', ENT_COMPAT, 'UTF-8'), 'NLink'); +$footnote->addText(htmlspecialchars(', image like ', ENT_COMPAT, 'UTF-8')); $footnote->addImage('resources/_earth.jpg', array('width' => 18, 'height' => 18)); -$footnote->addText(htmlspecialchars(', or object like ')); +$footnote->addText(htmlspecialchars(', or object like ', ENT_COMPAT, 'UTF-8')); $footnote->addObject('resources/_sheet.xls'); -$footnote->addText(htmlspecialchars('But you can only put footnote in section, not in header or footer.')); +$footnote->addText(htmlspecialchars('But you can only put footnote in section, not in header or footer.', ENT_COMPAT, 'UTF-8')); $section->addText( htmlspecialchars( 'You can also create the footnote directly from the section making it wrap in a paragraph ' - . 'like the footnote below this paragraph. But is is best used from within a textrun.' + . 'like the footnote below this paragraph. But is is best used from within a textrun.', + ENT_COMPAT, + 'UTF-8' ) ); $footnote = $section->addFootnote(); -$footnote->addText(htmlspecialchars('The reference for this is wrapped in its own line')); +$footnote->addText(htmlspecialchars('The reference for this is wrapped in its own line', ENT_COMPAT, 'UTF-8')); // Save file echo write($phpWord, basename(__FILE__, '.php'), $writers); diff --git a/samples/Sample_07_TemplateCloneRow.php b/samples/Sample_07_TemplateCloneRow.php index 60edacb5a7..c227a67488 100644 --- a/samples/Sample_07_TemplateCloneRow.php +++ b/samples/Sample_07_TemplateCloneRow.php @@ -6,52 +6,52 @@ $templateProcessor = new \PhpOffice\PhpWord\TemplateProcessor('resources/Sample_07_TemplateCloneRow.docx'); // Variables on different parts of document -$templateProcessor->setValue('weekday', htmlspecialchars(date('l'))); // On section/content -$templateProcessor->setValue('time', htmlspecialchars(date('H:i'))); // On footer -$templateProcessor->setValue('serverName', htmlspecialchars(realpath(__DIR__))); // On header +$templateProcessor->setValue('weekday', htmlspecialchars(date('l'), ENT_COMPAT, 'UTF-8')); // On section/content +$templateProcessor->setValue('time', htmlspecialchars(date('H:i'), ENT_COMPAT, 'UTF-8')); // On footer +$templateProcessor->setValue('serverName', htmlspecialchars(realpath(__DIR__), ENT_COMPAT, 'UTF-8')); // On header // Simple table $templateProcessor->cloneRow('rowValue', 10); -$templateProcessor->setValue('rowValue#1', htmlspecialchars('Sun')); -$templateProcessor->setValue('rowValue#2', htmlspecialchars('Mercury')); -$templateProcessor->setValue('rowValue#3', htmlspecialchars('Venus')); -$templateProcessor->setValue('rowValue#4', htmlspecialchars('Earth')); -$templateProcessor->setValue('rowValue#5', htmlspecialchars('Mars')); -$templateProcessor->setValue('rowValue#6', htmlspecialchars('Jupiter')); -$templateProcessor->setValue('rowValue#7', htmlspecialchars('Saturn')); -$templateProcessor->setValue('rowValue#8', htmlspecialchars('Uranus')); -$templateProcessor->setValue('rowValue#9', htmlspecialchars('Neptun')); -$templateProcessor->setValue('rowValue#10', htmlspecialchars('Pluto')); - -$templateProcessor->setValue('rowNumber#1', htmlspecialchars('1')); -$templateProcessor->setValue('rowNumber#2', htmlspecialchars('2')); -$templateProcessor->setValue('rowNumber#3', htmlspecialchars('3')); -$templateProcessor->setValue('rowNumber#4', htmlspecialchars('4')); -$templateProcessor->setValue('rowNumber#5', htmlspecialchars('5')); -$templateProcessor->setValue('rowNumber#6', htmlspecialchars('6')); -$templateProcessor->setValue('rowNumber#7', htmlspecialchars('7')); -$templateProcessor->setValue('rowNumber#8', htmlspecialchars('8')); -$templateProcessor->setValue('rowNumber#9', htmlspecialchars('9')); -$templateProcessor->setValue('rowNumber#10', htmlspecialchars('10')); +$templateProcessor->setValue('rowValue#1', htmlspecialchars('Sun', ENT_COMPAT, 'UTF-8')); +$templateProcessor->setValue('rowValue#2', htmlspecialchars('Mercury', ENT_COMPAT, 'UTF-8')); +$templateProcessor->setValue('rowValue#3', htmlspecialchars('Venus', ENT_COMPAT, 'UTF-8')); +$templateProcessor->setValue('rowValue#4', htmlspecialchars('Earth', ENT_COMPAT, 'UTF-8')); +$templateProcessor->setValue('rowValue#5', htmlspecialchars('Mars', ENT_COMPAT, 'UTF-8')); +$templateProcessor->setValue('rowValue#6', htmlspecialchars('Jupiter', ENT_COMPAT, 'UTF-8')); +$templateProcessor->setValue('rowValue#7', htmlspecialchars('Saturn', ENT_COMPAT, 'UTF-8')); +$templateProcessor->setValue('rowValue#8', htmlspecialchars('Uranus', ENT_COMPAT, 'UTF-8')); +$templateProcessor->setValue('rowValue#9', htmlspecialchars('Neptun', ENT_COMPAT, 'UTF-8')); +$templateProcessor->setValue('rowValue#10', htmlspecialchars('Pluto', ENT_COMPAT, 'UTF-8')); + +$templateProcessor->setValue('rowNumber#1', htmlspecialchars('1', ENT_COMPAT, 'UTF-8')); +$templateProcessor->setValue('rowNumber#2', htmlspecialchars('2', ENT_COMPAT, 'UTF-8')); +$templateProcessor->setValue('rowNumber#3', htmlspecialchars('3', ENT_COMPAT, 'UTF-8')); +$templateProcessor->setValue('rowNumber#4', htmlspecialchars('4', ENT_COMPAT, 'UTF-8')); +$templateProcessor->setValue('rowNumber#5', htmlspecialchars('5', ENT_COMPAT, 'UTF-8')); +$templateProcessor->setValue('rowNumber#6', htmlspecialchars('6', ENT_COMPAT, 'UTF-8')); +$templateProcessor->setValue('rowNumber#7', htmlspecialchars('7', ENT_COMPAT, 'UTF-8')); +$templateProcessor->setValue('rowNumber#8', htmlspecialchars('8', ENT_COMPAT, 'UTF-8')); +$templateProcessor->setValue('rowNumber#9', htmlspecialchars('9', ENT_COMPAT, 'UTF-8')); +$templateProcessor->setValue('rowNumber#10', htmlspecialchars('10', ENT_COMPAT, 'UTF-8')); // Table with a spanned cell $templateProcessor->cloneRow('userId', 3); -$templateProcessor->setValue('userId#1', htmlspecialchars('1')); -$templateProcessor->setValue('userFirstName#1', htmlspecialchars('James')); -$templateProcessor->setValue('userName#1', htmlspecialchars('Taylor')); -$templateProcessor->setValue('userPhone#1', htmlspecialchars('+1 428 889 773')); +$templateProcessor->setValue('userId#1', htmlspecialchars('1', ENT_COMPAT, 'UTF-8')); +$templateProcessor->setValue('userFirstName#1', htmlspecialchars('James', ENT_COMPAT, 'UTF-8')); +$templateProcessor->setValue('userName#1', htmlspecialchars('Taylor', ENT_COMPAT, 'UTF-8')); +$templateProcessor->setValue('userPhone#1', htmlspecialchars('+1 428 889 773', ENT_COMPAT, 'UTF-8')); -$templateProcessor->setValue('userId#2', htmlspecialchars('2')); -$templateProcessor->setValue('userFirstName#2', htmlspecialchars('Robert')); -$templateProcessor->setValue('userName#2', htmlspecialchars('Bell')); -$templateProcessor->setValue('userPhone#2', htmlspecialchars('+1 428 889 774')); +$templateProcessor->setValue('userId#2', htmlspecialchars('2', ENT_COMPAT, 'UTF-8')); +$templateProcessor->setValue('userFirstName#2', htmlspecialchars('Robert', ENT_COMPAT, 'UTF-8')); +$templateProcessor->setValue('userName#2', htmlspecialchars('Bell', ENT_COMPAT, 'UTF-8')); +$templateProcessor->setValue('userPhone#2', htmlspecialchars('+1 428 889 774', ENT_COMPAT, 'UTF-8')); -$templateProcessor->setValue('userId#3', htmlspecialchars('3')); -$templateProcessor->setValue('userFirstName#3', htmlspecialchars('Michael')); -$templateProcessor->setValue('userName#3', htmlspecialchars('Ray')); -$templateProcessor->setValue('userPhone#3', htmlspecialchars('+1 428 889 775')); +$templateProcessor->setValue('userId#3', htmlspecialchars('3', ENT_COMPAT, 'UTF-8')); +$templateProcessor->setValue('userFirstName#3', htmlspecialchars('Michael', ENT_COMPAT, 'UTF-8')); +$templateProcessor->setValue('userName#3', htmlspecialchars('Ray', ENT_COMPAT, 'UTF-8')); +$templateProcessor->setValue('userPhone#3', htmlspecialchars('+1 428 889 775', ENT_COMPAT, 'UTF-8')); echo date('H:i:s'), ' Saving the result document...', EOL; $templateProcessor->saveAs('results/Sample_07_TemplateCloneRow.docx'); diff --git a/samples/Sample_08_ParagraphPagination.php b/samples/Sample_08_ParagraphPagination.php index dd364562d0..979d6c0f01 100644 --- a/samples/Sample_08_ParagraphPagination.php +++ b/samples/Sample_08_ParagraphPagination.php @@ -19,7 +19,9 @@ htmlspecialchars( 'Below are the samples on how to control your paragraph ' . 'pagination. See "Line and Page Break" tab on paragraph properties ' - . 'window to see the attribute set by these controls.' + . 'window to see the attribute set by these controls.', + ENT_COMPAT, + 'UTF-8' ), array('bold' => true), array('space' => array('before' => 360, 'after' => 480)) @@ -31,7 +33,9 @@ . 'A "widow" is the last line of a paragraph printed by itself at the top ' . 'of a page. An "orphan" is the first line of a paragraph printed by ' . 'itself at the bottom of a page. Set this option to "false" if you want ' - . 'to disable this automatic control.' + . 'to disable this automatic control.', + ENT_COMPAT, + 'UTF-8' ), null, array('widowControl' => false, 'indentation' => array('left' => 240, 'right' => 120)) @@ -42,7 +46,9 @@ 'Paragraph with keepNext = true (default: false). ' . '"Keep with next" is used to prevent Word from inserting automatic page ' . 'breaks between paragraphs. Set this option to "true" if you do not want ' - . 'your paragraph to be separated with the next paragraph.' + . 'your paragraph to be separated with the next paragraph.', + ENT_COMPAT, + 'UTF-8' ), null, array('keepNext' => true, 'indentation' => array('firstLine' => 240)) @@ -53,20 +59,24 @@ 'Paragraph with keepLines = true (default: false). ' . '"Keep lines together" will prevent Word from inserting an automatic page ' . 'break within a paragraph. Set this option to "true" if you do not want ' - . 'all lines of your paragraph to be in the same page.' + . 'all lines of your paragraph to be in the same page.', + ENT_COMPAT, + 'UTF-8' ), null, array('keepLines' => true, 'indentation' => array('left' => 240, 'hanging' => 240)) ); -$section->addText(htmlspecialchars('Keep scrolling. More below.')); +$section->addText(htmlspecialchars('Keep scrolling. More below.', ENT_COMPAT, 'UTF-8')); $section->addText( htmlspecialchars( 'Paragraph with pageBreakBefore = true (default: false). ' . 'Different with all other control above, "page break before" separates ' . 'your paragraph into the next page. This option is most useful for ' - . 'heading styles.' + . 'heading styles.', + ENT_COMPAT, + 'UTF-8' ), null, array('pageBreakBefore' => true) diff --git a/samples/Sample_09_Tables.php b/samples/Sample_09_Tables.php index 5c305c8342..241efcb9fd 100644 --- a/samples/Sample_09_Tables.php +++ b/samples/Sample_09_Tables.php @@ -11,20 +11,20 @@ $rows = 10; $cols = 5; -$section->addText(htmlspecialchars('Basic table'), $header); +$section->addText(htmlspecialchars('Basic table', ENT_COMPAT, 'UTF-8'), $header); $table = $section->addTable(); for ($r = 1; $r <= 8; $r++) { $table->addRow(); for ($c = 1; $c <= 5; $c++) { - $table->addCell(1750)->addText(htmlspecialchars("Row {$r}, Cell {$c}")); + $table->addCell(1750)->addText(htmlspecialchars("Row {$r}, Cell {$c}", ENT_COMPAT, 'UTF-8')); } } // 2. Advanced table $section->addTextBreak(1); -$section->addText(htmlspecialchars('Fancy table'), $header); +$section->addText(htmlspecialchars('Fancy table', ENT_COMPAT, 'UTF-8'), $header); $styleTable = array('borderSize' => 6, 'borderColor' => '006699', 'cellMargin' => 80); $styleFirstRow = array('borderBottomSize' => 18, 'borderBottomColor' => '0000FF', 'bgColor' => '66BBFF'); @@ -34,25 +34,25 @@ $phpWord->addTableStyle('Fancy Table', $styleTable, $styleFirstRow); $table = $section->addTable('Fancy Table'); $table->addRow(900); -$table->addCell(2000, $styleCell)->addText(htmlspecialchars('Row 1'), $fontStyle); -$table->addCell(2000, $styleCell)->addText(htmlspecialchars('Row 2'), $fontStyle); -$table->addCell(2000, $styleCell)->addText(htmlspecialchars('Row 3'), $fontStyle); -$table->addCell(2000, $styleCell)->addText(htmlspecialchars('Row 4'), $fontStyle); -$table->addCell(500, $styleCellBTLR)->addText(htmlspecialchars('Row 5'), $fontStyle); +$table->addCell(2000, $styleCell)->addText(htmlspecialchars('Row 1', ENT_COMPAT, 'UTF-8'), $fontStyle); +$table->addCell(2000, $styleCell)->addText(htmlspecialchars('Row 2', ENT_COMPAT, 'UTF-8'), $fontStyle); +$table->addCell(2000, $styleCell)->addText(htmlspecialchars('Row 3', ENT_COMPAT, 'UTF-8'), $fontStyle); +$table->addCell(2000, $styleCell)->addText(htmlspecialchars('Row 4', ENT_COMPAT, 'UTF-8'), $fontStyle); +$table->addCell(500, $styleCellBTLR)->addText(htmlspecialchars('Row 5', ENT_COMPAT, 'UTF-8'), $fontStyle); for ($i = 1; $i <= 8; $i++) { $table->addRow(); - $table->addCell(2000)->addText(htmlspecialchars("Cell {$i}")); - $table->addCell(2000)->addText(htmlspecialchars("Cell {$i}")); - $table->addCell(2000)->addText(htmlspecialchars("Cell {$i}")); - $table->addCell(2000)->addText(htmlspecialchars("Cell {$i}")); + $table->addCell(2000)->addText(htmlspecialchars("Cell {$i}", ENT_COMPAT, 'UTF-8')); + $table->addCell(2000)->addText(htmlspecialchars("Cell {$i}", ENT_COMPAT, 'UTF-8')); + $table->addCell(2000)->addText(htmlspecialchars("Cell {$i}", ENT_COMPAT, 'UTF-8')); + $table->addCell(2000)->addText(htmlspecialchars("Cell {$i}", ENT_COMPAT, 'UTF-8')); $text = (0== $i % 2) ? 'X' : ''; - $table->addCell(500)->addText(htmlspecialchars($text)); + $table->addCell(500)->addText(htmlspecialchars($text, ENT_COMPAT, 'UTF-8')); } // 3. colspan (gridSpan) and rowspan (vMerge) $section->addPageBreak(); -$section->addText(htmlspecialchars('Table with colspan and rowspan'), $header); +$section->addText(htmlspecialchars('Table with colspan and rowspan', ENT_COMPAT, 'UTF-8'), $header); $styleTable = array('borderSize' => 6, 'borderColor' => '999999'); $cellRowSpan = array('vMerge' => 'restart', 'valign' => 'center', 'bgColor' => 'FFFF00'); @@ -68,32 +68,32 @@ $cell1 = $table->addCell(2000, $cellRowSpan); $textrun1 = $cell1->addTextRun($cellHCentered); -$textrun1->addText(htmlspecialchars('A')); -$textrun1->addFootnote()->addText(htmlspecialchars('Row span')); +$textrun1->addText(htmlspecialchars('A', ENT_COMPAT, 'UTF-8')); +$textrun1->addFootnote()->addText(htmlspecialchars('Row span', ENT_COMPAT, 'UTF-8')); $cell2 = $table->addCell(4000, $cellColSpan); $textrun2 = $cell2->addTextRun($cellHCentered); -$textrun2->addText(htmlspecialchars('B')); -$textrun2->addFootnote()->addText(htmlspecialchars('Colspan span')); +$textrun2->addText(htmlspecialchars('B', ENT_COMPAT, 'UTF-8')); +$textrun2->addFootnote()->addText(htmlspecialchars('Colspan span', ENT_COMPAT, 'UTF-8')); -$table->addCell(2000, $cellRowSpan)->addText(htmlspecialchars('E'), null, $cellHCentered); +$table->addCell(2000, $cellRowSpan)->addText(htmlspecialchars('E', ENT_COMPAT, 'UTF-8'), null, $cellHCentered); $table->addRow(); $table->addCell(null, $cellRowContinue); -$table->addCell(2000, $cellVCentered)->addText(htmlspecialchars('C'), null, $cellHCentered); -$table->addCell(2000, $cellVCentered)->addText(htmlspecialchars('D'), null, $cellHCentered); +$table->addCell(2000, $cellVCentered)->addText(htmlspecialchars('C', ENT_COMPAT, 'UTF-8'), null, $cellHCentered); +$table->addCell(2000, $cellVCentered)->addText(htmlspecialchars('D', ENT_COMPAT, 'UTF-8'), null, $cellHCentered); $table->addCell(null, $cellRowContinue); // 4. Nested table $section->addTextBreak(2); -$section->addText(htmlspecialchars('Nested table in a centered and 50% width table.'), $header); +$section->addText(htmlspecialchars('Nested table in a centered and 50% width table.', ENT_COMPAT, 'UTF-8'), $header); $table = $section->addTable(array('width' => 50 * 50, 'unit' => 'pct', 'align' => 'center')); $cell = $table->addRow()->addCell(); -$cell->addText(htmlspecialchars('This cell contains nested table.')); +$cell->addText(htmlspecialchars('This cell contains nested table.', ENT_COMPAT, 'UTF-8')); $innerCell = $cell->addTable(array('align' => 'center'))->addRow()->addCell(); -$innerCell->addText(htmlspecialchars('Inside nested table')); +$innerCell->addText(htmlspecialchars('Inside nested table', ENT_COMPAT, 'UTF-8')); // Save file echo write($phpWord, basename(__FILE__, '.php'), $writers); diff --git a/samples/Sample_10_EastAsianFontStyle.php b/samples/Sample_10_EastAsianFontStyle.php index f3553bfef2..e4cda63695 100644 --- a/samples/Sample_10_EastAsianFontStyle.php +++ b/samples/Sample_10_EastAsianFontStyle.php @@ -7,7 +7,7 @@ $section = $phpWord->addSection(); $header = array('size' => 16, 'bold' => true); //1.Use EastAisa FontStyle -$section->addText(htmlspecialchars('中文楷体样式测试'), array('name' => '楷体', 'size' => 16, 'color' => '1B2232')); +$section->addText(htmlspecialchars('中文楷体样式测试', ENT_COMPAT, 'UTF-8'), array('name' => '楷体', 'size' => 16, 'color' => '1B2232')); // Save file echo write($phpWord, basename(__FILE__, '.php'), $writers); diff --git a/samples/Sample_12_HeaderFooter.php b/samples/Sample_12_HeaderFooter.php index dc4fc129cb..b759121c60 100644 --- a/samples/Sample_12_HeaderFooter.php +++ b/samples/Sample_12_HeaderFooter.php @@ -15,50 +15,47 @@ $table->addRow(); $cell = $table->addCell(4500); $textrun = $cell->addTextRun(); -$textrun->addText(htmlspecialchars('This is the header with ')); -$textrun->addLink('http://google.com', htmlspecialchars('link to Google')); -$table->addCell(4500)->addImage( - 'resources/PhpWord.png', - array('width' => 80, 'height' => 80, 'align' => 'right') -); +$textrun->addText(htmlspecialchars('This is the header with ', ENT_COMPAT, 'UTF-8')); +$textrun->addLink('https://github.com/PHPOffice/PHPWord', htmlspecialchars('PHPWord on GitHub', ENT_COMPAT, 'UTF-8')); +$table->addCell(4500)->addImage('resources/PhpWord.png', array('width' => 80, 'height' => 80, 'align' => 'right')); // Add header for all other pages $subsequent = $section->addHeader(); -$subsequent->addText(htmlspecialchars('Subsequent pages in Section 1 will Have this!')); +$subsequent->addText(htmlspecialchars('Subsequent pages in Section 1 will Have this!', ENT_COMPAT, 'UTF-8')); $subsequent->addImage('resources/_mars.jpg', array('width' => 80, 'height' => 80)); // Add footer $footer = $section->addFooter(); -$footer->addPreserveText(htmlspecialchars('Page {PAGE} of {NUMPAGES}.'), array('align' => 'center')); -$footer->addLink('http://google.com', htmlspecialchars('Direct Google')); +$footer->addPreserveText(htmlspecialchars('Page {PAGE} of {NUMPAGES}.', ENT_COMPAT, 'UTF-8'), array('align' => 'center')); +$footer->addLink('https://github.com/PHPOffice/PHPWord', htmlspecialchars('PHPWord on GitHub', ENT_COMPAT, 'UTF-8')); // Write some text $section->addTextBreak(); -$section->addText(htmlspecialchars('Some text...')); +$section->addText(htmlspecialchars('Some text...', ENT_COMPAT, 'UTF-8')); // Create a second page $section->addPageBreak(); // Write some text $section->addTextBreak(); -$section->addText(htmlspecialchars('Some text...')); +$section->addText(htmlspecialchars('Some text...', ENT_COMPAT, 'UTF-8')); // Create a third page $section->addPageBreak(); // Write some text $section->addTextBreak(); -$section->addText(htmlspecialchars('Some text...')); +$section->addText(htmlspecialchars('Some text...', ENT_COMPAT, 'UTF-8')); // New portrait section $section2 = $phpWord->addSection(); $sec2Header = $section2->addHeader(); -$sec2Header->addText(htmlspecialchars('All pages in Section 2 will Have this!')); +$sec2Header->addText(htmlspecialchars('All pages in Section 2 will Have this!', ENT_COMPAT, 'UTF-8')); // Write some text $section2->addTextBreak(); -$section2->addText(htmlspecialchars('Some text...')); +$section2->addText(htmlspecialchars('Some text...', ENT_COMPAT, 'UTF-8')); // Save file echo write($phpWord, basename(__FILE__, '.php'), $writers); diff --git a/samples/Sample_13_Images.php b/samples/Sample_13_Images.php index d13912119b..f24dbfba7b 100644 --- a/samples/Sample_13_Images.php +++ b/samples/Sample_13_Images.php @@ -7,17 +7,17 @@ // Begin code $section = $phpWord->addSection(); -$section->addText(htmlspecialchars('Local image without any styles:')); +$section->addText(htmlspecialchars('Local image without any styles:', ENT_COMPAT, 'UTF-8')); $section->addImage('resources/_mars.jpg'); $section->addTextBreak(2); -$section->addText(htmlspecialchars('Local image with styles:')); +$section->addText(htmlspecialchars('Local image with styles:', ENT_COMPAT, 'UTF-8')); $section->addImage('resources/_earth.jpg', array('width' => 210, 'height' => 210, 'align' => 'center')); $section->addTextBreak(2); // Remote image $source = 'http://php.net/images/logos/php-med-trans-light.gif'; -$section->addText(htmlspecialchars("Remote image from: {$source}")); +$section->addText(htmlspecialchars("Remote image from: {$source}", ENT_COMPAT, 'UTF-8')); $section->addImage($source); //Wrapping style @@ -25,7 +25,7 @@ $wrappingStyles = array('inline', 'behind', 'infront', 'square', 'tight'); foreach ($wrappingStyles as $wrappingStyle) { $section->addTextBreak(5); - $section->addText(htmlspecialchars("Wrapping style {$wrappingStyle}")); + $section->addText(htmlspecialchars("Wrapping style {$wrappingStyle}", ENT_COMPAT, 'UTF-8')); $section->addImage( 'resources/_earth.jpg', array( @@ -37,12 +37,12 @@ 'wrappingStyle' => $wrappingStyle, ) ); - $section->addText(htmlspecialchars($text)); + $section->addText(htmlspecialchars($text, ENT_COMPAT, 'UTF-8')); } //Absolute positioning $section->addTextBreak(3); -$section->addText(htmlspecialchars('Absolute positioning: see top right corner of page')); +$section->addText(htmlspecialchars('Absolute positioning: see top right corner of page', ENT_COMPAT, 'UTF-8')); $section->addImage( 'resources/_mars.jpg', array( @@ -59,8 +59,8 @@ //Relative positioning $section->addTextBreak(3); -$section->addText(htmlspecialchars('Relative positioning: Horizontal position center relative to column,')); -$section->addText(htmlspecialchars('Vertical position top relative to line')); +$section->addText(htmlspecialchars('Relative positioning: Horizontal position center relative to column,', ENT_COMPAT, 'UTF-8')); +$section->addText(htmlspecialchars('Vertical position top relative to line', ENT_COMPAT, 'UTF-8')); $section->addImage( 'resources/_mars.jpg', array( diff --git a/samples/Sample_14_ListItem.php b/samples/Sample_14_ListItem.php index 3a29e3fdee..df5ffee3fd 100644 --- a/samples/Sample_14_ListItem.php +++ b/samples/Sample_14_ListItem.php @@ -26,46 +26,46 @@ // Lists -$section->addText(htmlspecialchars('Multilevel list.')); -$section->addListItem(htmlspecialchars('List Item I'), 0, null, 'multilevel'); -$section->addListItem(htmlspecialchars('List Item I.a'), 1, null, 'multilevel'); -$section->addListItem(htmlspecialchars('List Item I.b'), 1, null, 'multilevel'); -$section->addListItem(htmlspecialchars('List Item II'), 0, null, 'multilevel'); -$section->addListItem(htmlspecialchars('List Item II.a'), 1, null, 'multilevel'); -$section->addListItem(htmlspecialchars('List Item III'), 0, null, 'multilevel'); +$section->addText(htmlspecialchars('Multilevel list.', ENT_COMPAT, 'UTF-8')); +$section->addListItem(htmlspecialchars('List Item I', ENT_COMPAT, 'UTF-8'), 0, null, 'multilevel'); +$section->addListItem(htmlspecialchars('List Item I.a', ENT_COMPAT, 'UTF-8'), 1, null, 'multilevel'); +$section->addListItem(htmlspecialchars('List Item I.b', ENT_COMPAT, 'UTF-8'), 1, null, 'multilevel'); +$section->addListItem(htmlspecialchars('List Item II', ENT_COMPAT, 'UTF-8'), 0, null, 'multilevel'); +$section->addListItem(htmlspecialchars('List Item II.a', ENT_COMPAT, 'UTF-8'), 1, null, 'multilevel'); +$section->addListItem(htmlspecialchars('List Item III', ENT_COMPAT, 'UTF-8'), 0, null, 'multilevel'); $section->addTextBreak(2); -$section->addText(htmlspecialchars('Basic simple bulleted list.')); -$section->addListItem(htmlspecialchars('List Item 1')); -$section->addListItem(htmlspecialchars('List Item 2')); -$section->addListItem(htmlspecialchars('List Item 3')); +$section->addText(htmlspecialchars('Basic simple bulleted list.', ENT_COMPAT, 'UTF-8')); +$section->addListItem(htmlspecialchars('List Item 1', ENT_COMPAT, 'UTF-8')); +$section->addListItem(htmlspecialchars('List Item 2', ENT_COMPAT, 'UTF-8')); +$section->addListItem(htmlspecialchars('List Item 3', ENT_COMPAT, 'UTF-8')); $section->addTextBreak(2); -$section->addText(htmlspecialchars('Continue from multilevel list above.')); -$section->addListItem(htmlspecialchars('List Item IV'), 0, null, 'multilevel'); -$section->addListItem(htmlspecialchars('List Item IV.a'), 1, null, 'multilevel'); +$section->addText(htmlspecialchars('Continue from multilevel list above.', ENT_COMPAT, 'UTF-8')); +$section->addListItem(htmlspecialchars('List Item IV', ENT_COMPAT, 'UTF-8'), 0, null, 'multilevel'); +$section->addListItem(htmlspecialchars('List Item IV.a', ENT_COMPAT, 'UTF-8'), 1, null, 'multilevel'); $section->addTextBreak(2); -$section->addText(htmlspecialchars('Multilevel predefined list.')); -$section->addListItem(htmlspecialchars('List Item 1'), 0, 'myOwnStyle', $predefinedMultilevel, 'P-Style'); -$section->addListItem(htmlspecialchars('List Item 2'), 0, 'myOwnStyle', $predefinedMultilevel, 'P-Style'); -$section->addListItem(htmlspecialchars('List Item 3'), 1, 'myOwnStyle', $predefinedMultilevel, 'P-Style'); -$section->addListItem(htmlspecialchars('List Item 4'), 1, 'myOwnStyle', $predefinedMultilevel, 'P-Style'); -$section->addListItem(htmlspecialchars('List Item 5'), 2, 'myOwnStyle', $predefinedMultilevel, 'P-Style'); -$section->addListItem(htmlspecialchars('List Item 6'), 1, 'myOwnStyle', $predefinedMultilevel, 'P-Style'); -$section->addListItem(htmlspecialchars('List Item 7'), 0, 'myOwnStyle', $predefinedMultilevel, 'P-Style'); +$section->addText(htmlspecialchars('Multilevel predefined list.', ENT_COMPAT, 'UTF-8')); +$section->addListItem(htmlspecialchars('List Item 1', ENT_COMPAT, 'UTF-8'), 0, 'myOwnStyle', $predefinedMultilevel, 'P-Style'); +$section->addListItem(htmlspecialchars('List Item 2', ENT_COMPAT, 'UTF-8'), 0, 'myOwnStyle', $predefinedMultilevel, 'P-Style'); +$section->addListItem(htmlspecialchars('List Item 3', ENT_COMPAT, 'UTF-8'), 1, 'myOwnStyle', $predefinedMultilevel, 'P-Style'); +$section->addListItem(htmlspecialchars('List Item 4', ENT_COMPAT, 'UTF-8'), 1, 'myOwnStyle', $predefinedMultilevel, 'P-Style'); +$section->addListItem(htmlspecialchars('List Item 5', ENT_COMPAT, 'UTF-8'), 2, 'myOwnStyle', $predefinedMultilevel, 'P-Style'); +$section->addListItem(htmlspecialchars('List Item 6', ENT_COMPAT, 'UTF-8'), 1, 'myOwnStyle', $predefinedMultilevel, 'P-Style'); +$section->addListItem(htmlspecialchars('List Item 7', ENT_COMPAT, 'UTF-8'), 0, 'myOwnStyle', $predefinedMultilevel, 'P-Style'); $section->addTextBreak(2); -$section->addText(htmlspecialchars('List with inline formatting.')); +$section->addText(htmlspecialchars('List with inline formatting.', ENT_COMPAT, 'UTF-8')); $listItemRun = $section->addListItemRun(); -$listItemRun->addText(htmlspecialchars('List item 1')); -$listItemRun->addText(htmlspecialchars(' in bold'), array('bold' => true)); +$listItemRun->addText(htmlspecialchars('List item 1', ENT_COMPAT, 'UTF-8')); +$listItemRun->addText(htmlspecialchars(' in bold', ENT_COMPAT, 'UTF-8'), array('bold' => true)); $listItemRun = $section->addListItemRun(); -$listItemRun->addText(htmlspecialchars('List item 2')); -$listItemRun->addText(htmlspecialchars(' in italic'), array('italic' => true)); +$listItemRun->addText(htmlspecialchars('List item 2', ENT_COMPAT, 'UTF-8')); +$listItemRun->addText(htmlspecialchars(' in italic', ENT_COMPAT, 'UTF-8'), array('italic' => true)); $listItemRun = $section->addListItemRun(); -$listItemRun->addText(htmlspecialchars('List item 3')); -$listItemRun->addText(htmlspecialchars(' underlined'), array('underline' => 'dash')); +$listItemRun->addText(htmlspecialchars('List item 3', ENT_COMPAT, 'UTF-8')); +$listItemRun->addText(htmlspecialchars(' underlined', ENT_COMPAT, 'UTF-8'), array('underline' => 'dash')); $section->addTextBreak(2); // Numbered heading @@ -84,9 +84,9 @@ $phpWord->addTitleStyle(2, array('size' => 14), array('numStyle' => 'headingNumbering', 'numLevel' => 1)); $phpWord->addTitleStyle(3, array('size' => 12), array('numStyle' => 'headingNumbering', 'numLevel' => 2)); -$section->addTitle(htmlspecialchars('Heading 1'), 1); -$section->addTitle(htmlspecialchars('Heading 2'), 2); -$section->addTitle(htmlspecialchars('Heading 3'), 3); +$section->addTitle(htmlspecialchars('Heading 1', ENT_COMPAT, 'UTF-8'), 1); +$section->addTitle(htmlspecialchars('Heading 2', ENT_COMPAT, 'UTF-8'), 2); +$section->addTitle(htmlspecialchars('Heading 3', ENT_COMPAT, 'UTF-8'), 3); // Save file echo write($phpWord, basename(__FILE__, '.php'), $writers); diff --git a/samples/Sample_15_Link.php b/samples/Sample_15_Link.php index dd06670e65..b55db21cae 100644 --- a/samples/Sample_15_Link.php +++ b/samples/Sample_15_Link.php @@ -10,8 +10,8 @@ // Add hyperlink elements $section->addLink( - 'http://www.google.com', - htmlspecialchars('Best search engine'), + 'https://github.com/PHPOffice/PHPWord', + htmlspecialchars('PHPWord on GitHub', ENT_COMPAT, 'UTF-8'), array('color' => '0000FF', 'underline' => \PhpOffice\PhpWord\Style\Font::UNDERLINE_SINGLE) ); $section->addTextBreak(2); diff --git a/samples/Sample_16_Object.php b/samples/Sample_16_Object.php index 2a216c2378..950f7743df 100644 --- a/samples/Sample_16_Object.php +++ b/samples/Sample_16_Object.php @@ -7,7 +7,7 @@ // Begin code $section = $phpWord->addSection(); -$section->addText(htmlspecialchars('You can open this OLE object by double clicking on the icon:')); +$section->addText(htmlspecialchars('You can open this OLE object by double clicking on the icon:', ENT_COMPAT, 'UTF-8')); $section->addTextBreak(2); $section->addObject('resources/_sheet.xls'); diff --git a/samples/Sample_17_TitleTOC.php b/samples/Sample_17_TitleTOC.php index 8f8889b83c..6fcf671500 100644 --- a/samples/Sample_17_TitleTOC.php +++ b/samples/Sample_17_TitleTOC.php @@ -19,7 +19,7 @@ $phpWord->addTitleStyle(4, array('size' => 12)); // Add text elements -$section->addText(htmlspecialchars('Table of contents 1')); +$section->addText(htmlspecialchars('Table of contents 1', ENT_COMPAT, 'UTF-8')); $section->addTextBreak(2); // Add TOC #1 @@ -27,11 +27,11 @@ $section->addTextBreak(2); // Filler -$section->addText(htmlspecialchars('Text between TOC')); +$section->addText(htmlspecialchars('Text between TOC', ENT_COMPAT, 'UTF-8')); $section->addTextBreak(2); // Add TOC #1 -$section->addText(htmlspecialchars('Table of contents 2')); +$section->addText(htmlspecialchars('Table of contents 2', ENT_COMPAT, 'UTF-8')); $section->addTextBreak(2); $toc2 = $section->addTOC($fontStyle2); $toc2->setMinDepth(2); @@ -40,31 +40,31 @@ // Add Titles $section->addPageBreak(); -$section->addTitle(htmlspecialchars('Foo & Bar'), 1); -$section->addText(htmlspecialchars('Some text...')); +$section->addTitle(htmlspecialchars('Foo & Bar', ENT_COMPAT, 'UTF-8'), 1); +$section->addText(htmlspecialchars('Some text...', ENT_COMPAT, 'UTF-8')); $section->addTextBreak(2); -$section->addTitle(htmlspecialchars('I am a Subtitle of Title 1'), 2); +$section->addTitle(htmlspecialchars('I am a Subtitle of Title 1', ENT_COMPAT, 'UTF-8'), 2); $section->addTextBreak(2); -$section->addText(htmlspecialchars('Some more text...')); +$section->addText(htmlspecialchars('Some more text...', ENT_COMPAT, 'UTF-8')); $section->addTextBreak(2); -$section->addTitle(htmlspecialchars('Another Title (Title 2)'), 1); -$section->addText(htmlspecialchars('Some text...')); +$section->addTitle(htmlspecialchars('Another Title (Title 2)', ENT_COMPAT, 'UTF-8'), 1); +$section->addText(htmlspecialchars('Some text...', ENT_COMPAT, 'UTF-8')); $section->addPageBreak(); -$section->addTitle(htmlspecialchars('I am Title 3'), 1); -$section->addText(htmlspecialchars('And more text...')); +$section->addTitle(htmlspecialchars('I am Title 3', ENT_COMPAT, 'UTF-8'), 1); +$section->addText(htmlspecialchars('And more text...', ENT_COMPAT, 'UTF-8')); $section->addTextBreak(2); -$section->addTitle(htmlspecialchars('I am a Subtitle of Title 3'), 2); -$section->addText(htmlspecialchars('Again and again, more text...')); -$section->addTitle(htmlspecialchars('Subtitle 3.1.1'), 3); -$section->addText(htmlspecialchars('Text')); -$section->addTitle(htmlspecialchars('Subtitle 3.1.1.1'), 4); -$section->addText(htmlspecialchars('Text')); -$section->addTitle(htmlspecialchars('Subtitle 3.1.1.2'), 4); -$section->addText(htmlspecialchars('Text')); -$section->addTitle(htmlspecialchars('Subtitle 3.1.2'), 3); -$section->addText(htmlspecialchars('Text')); +$section->addTitle(htmlspecialchars('I am a Subtitle of Title 3', ENT_COMPAT, 'UTF-8'), 2); +$section->addText(htmlspecialchars('Again and again, more text...', ENT_COMPAT, 'UTF-8')); +$section->addTitle(htmlspecialchars('Subtitle 3.1.1', ENT_COMPAT, 'UTF-8'), 3); +$section->addText(htmlspecialchars('Text', ENT_COMPAT, 'UTF-8')); +$section->addTitle(htmlspecialchars('Subtitle 3.1.1.1', ENT_COMPAT, 'UTF-8'), 4); +$section->addText(htmlspecialchars('Text', ENT_COMPAT, 'UTF-8')); +$section->addTitle(htmlspecialchars('Subtitle 3.1.1.2', ENT_COMPAT, 'UTF-8'), 4); +$section->addText(htmlspecialchars('Text', ENT_COMPAT, 'UTF-8')); +$section->addTitle(htmlspecialchars('Subtitle 3.1.2', ENT_COMPAT, 'UTF-8'), 3); +$section->addText(htmlspecialchars('Text', ENT_COMPAT, 'UTF-8')); echo date('H:i:s'), ' Note: Please refresh TOC manually.', EOL; diff --git a/samples/Sample_18_Watermark.php b/samples/Sample_18_Watermark.php index f630bdf22d..5a26fd0465 100644 --- a/samples/Sample_18_Watermark.php +++ b/samples/Sample_18_Watermark.php @@ -10,7 +10,7 @@ $section = $phpWord->addSection(); $header = $section->addHeader(); $header->addWatermark('resources/_earth.jpg', array('marginTop' => 200, 'marginLeft' => 55)); -$section->addText(htmlspecialchars('The header reference to the current section includes a watermark image.')); +$section->addText(htmlspecialchars('The header reference to the current section includes a watermark image.', ENT_COMPAT, 'UTF-8')); // Save file echo write($phpWord, basename(__FILE__, '.php'), $writers); diff --git a/samples/Sample_19_TextBreak.php b/samples/Sample_19_TextBreak.php index fc0e5419b0..b0405b6c72 100644 --- a/samples/Sample_19_TextBreak.php +++ b/samples/Sample_19_TextBreak.php @@ -13,17 +13,17 @@ $fontStyle = array('size' => 24); $section = $phpWord->addSection(); -$section->addText(htmlspecialchars('Text break with no style:')); +$section->addText(htmlspecialchars('Text break with no style:', ENT_COMPAT, 'UTF-8')); $section->addTextBreak(); -$section->addText(htmlspecialchars('Text break with defined font style:')); +$section->addText(htmlspecialchars('Text break with defined font style:', ENT_COMPAT, 'UTF-8')); $section->addTextBreak(1, 'fontStyle'); -$section->addText(htmlspecialchars('Text break with defined paragraph style:')); +$section->addText(htmlspecialchars('Text break with defined paragraph style:', ENT_COMPAT, 'UTF-8')); $section->addTextBreak(1, null, 'paragraphStyle'); -$section->addText(htmlspecialchars('Text break with inline font style:')); +$section->addText(htmlspecialchars('Text break with inline font style:', ENT_COMPAT, 'UTF-8')); $section->addTextBreak(1, $fontStyle); -$section->addText(htmlspecialchars('Text break with inline paragraph style:')); +$section->addText(htmlspecialchars('Text break with inline paragraph style:', ENT_COMPAT, 'UTF-8')); $section->addTextBreak(1, null, $paragraphStyle); -$section->addText(htmlspecialchars('Done.')); +$section->addText(htmlspecialchars('Done.', ENT_COMPAT, 'UTF-8')); // Save file echo write($phpWord, basename(__FILE__, '.php'), $writers); diff --git a/samples/Sample_20_BGColor.php b/samples/Sample_20_BGColor.php index ebee8544fa..143189ad86 100644 --- a/samples/Sample_20_BGColor.php +++ b/samples/Sample_20_BGColor.php @@ -7,14 +7,14 @@ $section = $phpWord->addSection(); $section->addText( - htmlspecialchars('This is some text highlighted using fgColor (limited to 15 colors) '), + htmlspecialchars('This is some text highlighted using fgColor (limited to 15 colors) ', ENT_COMPAT, 'UTF-8'), array('fgColor' => \PhpOffice\PhpWord\Style\Font::FGCOLOR_YELLOW) ); $section->addText( - htmlspecialchars('This one uses bgColor and is using hex value (0xfbbb10)'), + htmlspecialchars('This one uses bgColor and is using hex value (0xfbbb10)', ENT_COMPAT, 'UTF-8'), array('bgColor' => 'fbbb10') ); -$section->addText(htmlspecialchars('Compatible with font colors'), array('color' => '0000ff', 'bgColor' => 'fbbb10')); +$section->addText(htmlspecialchars('Compatible with font colors', ENT_COMPAT, 'UTF-8'), array('color' => '0000ff', 'bgColor' => 'fbbb10')); // Save file echo write($phpWord, basename(__FILE__, '.php'), $writers); diff --git a/samples/Sample_21_TableRowRules.php b/samples/Sample_21_TableRowRules.php index df3162c33c..f22b616517 100644 --- a/samples/Sample_21_TableRowRules.php +++ b/samples/Sample_21_TableRowRules.php @@ -6,14 +6,16 @@ $phpWord = new \PhpOffice\PhpWord\PhpWord(); $section = $phpWord->addSection(); -$section->addText(htmlspecialchars('By default, when you insert an image, it adds a textbreak after its content.')); +$section->addText(htmlspecialchars('By default, when you insert an image, it adds a textbreak after its content.', ENT_COMPAT, 'UTF-8')); $section->addText( - htmlspecialchars('If we want a simple border around an image, we wrap the image inside a table->row->cell') + htmlspecialchars('If we want a simple border around an image, we wrap the image inside a table->row->cell', ENT_COMPAT, 'UTF-8') ); $section->addText( htmlspecialchars( 'On the image with the red border, even if we set the row height to the height of the image, ' - . 'the textbreak is still there:' + . 'the textbreak is still there:', + ENT_COMPAT, + 'UTF-8' ) ); @@ -25,7 +27,9 @@ $section->addTextBreak(); $section->addText( htmlspecialchars( - "But if we set the rowStyle 'exactHeight' to true, the real row height is used, removing the textbreak:" + "But if we set the rowStyle 'exactHeight' to true, the real row height is used, removing the textbreak:", + ENT_COMPAT, + 'UTF-8' ) ); @@ -43,9 +47,9 @@ $section->addTextBreak(); $section->addText( - htmlspecialchars('In this example, image is 250px height. Rows are calculated in twips, and 1px = 15twips.') + htmlspecialchars('In this example, image is 250px height. Rows are calculated in twips, and 1px = 15twips.', ENT_COMPAT, 'UTF-8') ); -$section->addText(htmlspecialchars('So: $' . "table2->addRow(3750, array('exactHeight'=>true));")); +$section->addText(htmlspecialchars('So: $' . "table2->addRow(3750, array('exactHeight'=>true));", ENT_COMPAT, 'UTF-8')); // Save file echo write($phpWord, basename(__FILE__, '.php'), $writers); diff --git a/samples/Sample_22_CheckBox.php b/samples/Sample_22_CheckBox.php index b5d4a7a5a8..9c8c05a71a 100644 --- a/samples/Sample_22_CheckBox.php +++ b/samples/Sample_22_CheckBox.php @@ -6,13 +6,13 @@ $phpWord = new \PhpOffice\PhpWord\PhpWord(); $section = $phpWord->addSection(); -$section->addText(htmlspecialchars('Check box in section')); -$section->addCheckBox('chkBox1', htmlspecialchars('Checkbox 1')); -$section->addText(htmlspecialchars('Check box in table cell')); +$section->addText(htmlspecialchars('Check box in section', ENT_COMPAT, 'UTF-8')); +$section->addCheckBox('chkBox1', htmlspecialchars('Checkbox 1', ENT_COMPAT, 'UTF-8')); +$section->addText(htmlspecialchars('Check box in table cell', ENT_COMPAT, 'UTF-8')); $table = $section->addTable(); $table->addRow(); $cell = $table->addCell(); -$cell->addCheckBox('chkBox2', htmlspecialchars('Checkbox 2')); +$cell->addCheckBox('chkBox2', htmlspecialchars('Checkbox 2', ENT_COMPAT, 'UTF-8')); // Save file echo write($phpWord, basename(__FILE__, '.php'), $writers); diff --git a/samples/Sample_25_TextBox.php b/samples/Sample_25_TextBox.php index afeb863d1c..ebd597d235 100644 --- a/samples/Sample_25_TextBox.php +++ b/samples/Sample_25_TextBox.php @@ -17,28 +17,28 @@ 'borderColor' => '#FF0000', ) ); -$textbox->addText(htmlspecialchars('Text box content in section.')); -$textbox->addText(htmlspecialchars('Another line.')); +$textbox->addText(htmlspecialchars('Text box content in section.', ENT_COMPAT, 'UTF-8')); +$textbox->addText(htmlspecialchars('Another line.', ENT_COMPAT, 'UTF-8')); $cell = $textbox->addTable()->addRow()->addCell(); -$cell->addText(htmlspecialchars('Table inside textbox')); +$cell->addText(htmlspecialchars('Table inside textbox', ENT_COMPAT, 'UTF-8')); // Inside table $section->addTextBreak(2); $cell = $section->addTable()->addRow()->addCell(300); $textbox = $cell->addTextBox(array('borderSize' => 1, 'borderColor' => '#0000FF', 'innerMargin' => 100)); -$textbox->addText(htmlspecialchars('Textbox inside table')); +$textbox->addText(htmlspecialchars('Textbox inside table', ENT_COMPAT, 'UTF-8')); // Inside header with textrun $header = $section->addHeader(); $textbox = $header->addTextBox(array('width' => 600, 'borderSize' => 1, 'borderColor' => '#00FF00')); $textrun = $textbox->addTextRun(); -$textrun->addText(htmlspecialchars('TextBox in header. TextBox can contain a TextRun ')); -$textrun->addText(htmlspecialchars('with bold text'), array('bold' => true)); -$textrun->addText(htmlspecialchars(', ')); -$textrun->addLink('http://www.google.com', htmlspecialchars('link')); -$textrun->addText(htmlspecialchars(', and image ')); +$textrun->addText(htmlspecialchars('TextBox in header. TextBox can contain a TextRun ', ENT_COMPAT, 'UTF-8')); +$textrun->addText(htmlspecialchars('with bold text', ENT_COMPAT, 'UTF-8'), array('bold' => true)); +$textrun->addText(htmlspecialchars(', ', ENT_COMPAT, 'UTF-8')); +$textrun->addLink('https://github.com/PHPOffice/PHPWord', htmlspecialchars('PHPWord on GitHub', ENT_COMPAT, 'UTF-8')); +$textrun->addText(htmlspecialchars(', and image ', ENT_COMPAT, 'UTF-8')); $textrun->addImage('resources/_earth.jpg', array('width' => 18, 'height' => 18)); -$textrun->addText(htmlspecialchars('.')); +$textrun->addText(htmlspecialchars('.', ENT_COMPAT, 'UTF-8')); // Save file echo write($phpWord, basename(__FILE__, '.php'), $writers); diff --git a/samples/Sample_27_Field.php b/samples/Sample_27_Field.php index 9bdbef8243..165a3e8ca1 100644 --- a/samples/Sample_27_Field.php +++ b/samples/Sample_27_Field.php @@ -10,19 +10,19 @@ // Add Field elements // See Element/Field.php for all options -$section->addText(htmlspecialchars('Date field:')); +$section->addText(htmlspecialchars('Date field:', ENT_COMPAT, 'UTF-8')); $section->addField('DATE', array('dateformat' => 'dddd d MMMM yyyy H:mm:ss'), array('PreserveFormat')); -$section->addText(htmlspecialchars('Page field:')); +$section->addText(htmlspecialchars('Page field:', ENT_COMPAT, 'UTF-8')); $section->addField('PAGE', array('format' => 'ArabicDash')); -$section->addText(htmlspecialchars('Number of pages field:')); +$section->addText(htmlspecialchars('Number of pages field:', ENT_COMPAT, 'UTF-8')); $section->addField('NUMPAGES', array('format' => 'Arabic', 'numformat' => '0,00'), array('PreserveFormat')); $textrun = $section->addTextRun(array('align' => 'center')); -$textrun->addText(htmlspecialchars('This is the date of lunar calendar ')); +$textrun->addText(htmlspecialchars('This is the date of lunar calendar ', ENT_COMPAT, 'UTF-8')); $textrun->addField('DATE', array('dateformat' => 'd-M-yyyy H:mm:ss'), array('PreserveFormat', 'LunarCalendar')); -$textrun->addText(htmlspecialchars(' written in a textrun.')); +$textrun->addText(htmlspecialchars(' written in a textrun.', ENT_COMPAT, 'UTF-8')); // Save file echo write($phpWord, basename(__FILE__, '.php'), $writers); diff --git a/samples/Sample_29_Line.php b/samples/Sample_29_Line.php index 8bb192cfc8..5b288803a4 100644 --- a/samples/Sample_29_Line.php +++ b/samples/Sample_29_Line.php @@ -10,7 +10,7 @@ // Add Line elements // See Element/Line.php for all options -$section->addText(htmlspecialchars('Horizontal Line (Inline style):')); +$section->addText(htmlspecialchars('Horizontal Line (Inline style):', ENT_COMPAT, 'UTF-8')); $section->addLine( array( 'width' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(4), @@ -18,7 +18,7 @@ 'positioning' => 'absolute', ) ); -$section->addText(htmlspecialchars('Vertical Line (Inline style):')); +$section->addText(htmlspecialchars('Vertical Line (Inline style):', ENT_COMPAT, 'UTF-8')); $section->addLine( array( 'width' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(0), @@ -29,7 +29,7 @@ // Two text break $section->addTextBreak(1); -$section->addText(htmlspecialchars('Positioned Line (red):')); +$section->addText(htmlspecialchars('Positioned Line (red):', ENT_COMPAT, 'UTF-8')); $section->addLine( array( 'width' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(4), @@ -44,7 +44,7 @@ ) ); -$section->addText(htmlspecialchars('Horizontal Formatted Line')); +$section->addText(htmlspecialchars('Horizontal Formatted Line', ENT_COMPAT, 'UTF-8')); $section->addLine( array( 'width' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(15), diff --git a/samples/Sample_31_Shape.php b/samples/Sample_31_Shape.php index 3df71b4cc8..d8c4e4f208 100644 --- a/samples/Sample_31_Shape.php +++ b/samples/Sample_31_Shape.php @@ -10,7 +10,7 @@ $section = $phpWord->addSection(); // Arc -$section->addTitle(htmlspecialchars('Arc'), 1); +$section->addTitle(htmlspecialchars('Arc', ENT_COMPAT, 'UTF-8'), 1); $section->addShape( 'arc', array( @@ -21,7 +21,7 @@ ); // Curve -$section->addTitle(htmlspecialchars('Curve'), 1); +$section->addTitle(htmlspecialchars('Curve', ENT_COMPAT, 'UTF-8'), 1); $section->addShape( 'curve', array( @@ -38,7 +38,7 @@ ); // Line -$section->addTitle(htmlspecialchars('Line'), 1); +$section->addTitle(htmlspecialchars('Line', ENT_COMPAT, 'UTF-8'), 1); $section->addShape( 'line', array( @@ -54,7 +54,7 @@ ); // Polyline -$section->addTitle(htmlspecialchars('Polyline'), 1); +$section->addTitle(htmlspecialchars('Polyline', ENT_COMPAT, 'UTF-8'), 1); $section->addShape( 'polyline', array( @@ -64,7 +64,7 @@ ); // Rectangle -$section->addTitle(htmlspecialchars('Rectangle'), 1); +$section->addTitle(htmlspecialchars('Rectangle', ENT_COMPAT, 'UTF-8'), 1); $section->addShape( 'rect', array( @@ -77,7 +77,7 @@ ); // Oval -$section->addTitle(htmlspecialchars('Oval'), 1); +$section->addTitle(htmlspecialchars('Oval', ENT_COMPAT, 'UTF-8'), 1); $section->addShape( 'oval', array( diff --git a/samples/Sample_32_Chart.php b/samples/Sample_32_Chart.php index b61a646fde..bc18392ef9 100644 --- a/samples/Sample_32_Chart.php +++ b/samples/Sample_32_Chart.php @@ -12,7 +12,7 @@ // 2D charts $section = $phpWord->addSection(); -$section->addTitle(htmlspecialchars('2D charts'), 1); +$section->addTitle(htmlspecialchars('2D charts', ENT_COMPAT, 'UTF-8'), 1); $section = $phpWord->addSection(array('colsNum' => 2, 'breakType' => 'continuous')); $chartTypes = array('pie', 'doughnut', 'bar', 'column', 'line', 'area', 'scatter', 'radar'); @@ -38,7 +38,7 @@ // 3D charts $section = $phpWord->addSection(array('breakType' => 'continuous')); -$section->addTitle(htmlspecialchars('3D charts'), 1); +$section->addTitle(htmlspecialchars('3D charts', ENT_COMPAT, 'UTF-8'), 1); $section = $phpWord->addSection(array('colsNum' => 2, 'breakType' => 'continuous')); $chartTypes = array('pie', 'bar', 'column', 'line', 'area'); diff --git a/samples/Sample_33_FormField.php b/samples/Sample_33_FormField.php index 9f356810dc..df7fcb7ae9 100644 --- a/samples/Sample_33_FormField.php +++ b/samples/Sample_33_FormField.php @@ -9,15 +9,15 @@ $section = $phpWord->addSection(); $textrun = $section->addTextRun(); -$textrun->addText(htmlspecialchars('Form fields can be added in a text run and can be in form of textinput ')); +$textrun->addText(htmlspecialchars('Form fields can be added in a text run and can be in form of textinput ', ENT_COMPAT, 'UTF-8')); $textrun->addFormField('textinput')->setName('MyTextBox'); -$textrun->addText(htmlspecialchars(', checkbox ')); +$textrun->addText(htmlspecialchars(', checkbox ', ENT_COMPAT, 'UTF-8')); $textrun->addFormField('checkbox')->setDefault(true); -$textrun->addText(htmlspecialchars(', or dropdown ')); +$textrun->addText(htmlspecialchars(', or dropdown ', ENT_COMPAT, 'UTF-8')); $textrun->addFormField('dropdown')->setEntries(array('Choice 1', 'Choice 2', 'Choice 3')); -$textrun->addText(htmlspecialchars('. You have to set document protection to "forms" to enable dropdown.')); +$textrun->addText(htmlspecialchars('. You have to set document protection to "forms" to enable dropdown.', ENT_COMPAT, 'UTF-8')); -$section->addText(htmlspecialchars('They can also be added as a stand alone paragraph.')); +$section->addText(htmlspecialchars('They can also be added as a stand alone paragraph.', ENT_COMPAT, 'UTF-8')); $section->addFormField('textinput')->setValue('Your name'); // Save file diff --git a/samples/Sample_34_SDT.php b/samples/Sample_34_SDT.php index 19ac42fe34..3f2cdcc154 100644 --- a/samples/Sample_34_SDT.php +++ b/samples/Sample_34_SDT.php @@ -8,15 +8,15 @@ $section = $phpWord->addSection(); $textrun = $section->addTextRun(); -$textrun->addText(htmlspecialchars('Combobox: ')); +$textrun->addText(htmlspecialchars('Combobox: ', ENT_COMPAT, 'UTF-8')); $textrun->addSDT('comboBox')->setListItems(array('1' => 'Choice 1', '2' => 'Choice 2')); $textrun = $section->addTextRun(); -$textrun->addText(htmlspecialchars('Date: ')); +$textrun->addText(htmlspecialchars('Date: ', ENT_COMPAT, 'UTF-8')); $textrun->addSDT('date'); $textrun = $section->addTextRun(); -$textrun->addText(htmlspecialchars('Drop down list: ')); +$textrun->addText(htmlspecialchars('Drop down list: ', ENT_COMPAT, 'UTF-8')); $textrun->addSDT('dropDownList')->setListItems(array('1' => 'Choice 1', '2' => 'Choice 2')); // Save file diff --git a/samples/Sample_35_InternalLink.php b/samples/Sample_35_InternalLink.php index 1b907f8724..90bae238ef 100644 --- a/samples/Sample_35_InternalLink.php +++ b/samples/Sample_35_InternalLink.php @@ -6,13 +6,13 @@ $phpWord = new \PhpOffice\PhpWord\PhpWord(); $section = $phpWord->addSection(); -$section->addTitle(htmlspecialchars('This is page 1'), 1); +$section->addTitle(htmlspecialchars('This is page 1', ENT_COMPAT, 'UTF-8'), 1); $linkIsInternal = true; -$section->addLink('MyBookmark', htmlspecialchars('Take me to page 3'), null, null, $linkIsInternal); +$section->addLink('MyBookmark', htmlspecialchars('Take me to page 3', ENT_COMPAT, 'UTF-8'), null, null, $linkIsInternal); $section->addPageBreak(); -$section->addTitle(htmlspecialchars('This is page 2'), 1); +$section->addTitle(htmlspecialchars('This is page 2', ENT_COMPAT, 'UTF-8'), 1); $section->addPageBreak(); -$section->addTitle(htmlspecialchars('This is page 3'), 1); +$section->addTitle(htmlspecialchars('This is page 3', ENT_COMPAT, 'UTF-8'), 1); $section->addBookmark('MyBookmark'); // Save file diff --git a/samples/Sample_36_RTL.php b/samples/Sample_36_RTL.php index ec326ae025..486e8d6d8b 100644 --- a/samples/Sample_36_RTL.php +++ b/samples/Sample_36_RTL.php @@ -7,10 +7,10 @@ $section = $phpWord->addSection(); $textrun = $section->addTextRun(); -$textrun->addText(htmlspecialchars('This is a Left to Right paragraph.')); +$textrun->addText(htmlspecialchars('This is a Left to Right paragraph.', ENT_COMPAT, 'UTF-8')); $textrun = $section->addTextRun(array('align' => 'right')); -$textrun->addText(htmlspecialchars('سلام این یک پاراگراف راست به چپ است'), array('rtl' => true)); +$textrun->addText(htmlspecialchars('سلام این یک پاراگراف راست به چپ است', ENT_COMPAT, 'UTF-8'), array('rtl' => true)); // Save file echo write($phpWord, basename(__FILE__, '.php'), $writers); diff --git a/samples/resources/Sample_28_ReadRTF.rtf b/samples/resources/Sample_28_ReadRTF.rtf index 6f9ac0f8b8..ccccc0e707 100644 --- a/samples/resources/Sample_28_ReadRTF.rtf +++ b/samples/resources/Sample_28_ReadRTF.rtf @@ -16,6 +16,6 @@ \pard\nowidctlpar\qc\sa100{\cf0\f0\fs32\b\i I am styled by both font and paragraph style.}\par \pard\nowidctlpar{\cf1\f1\fs40\b\i\ul\strike\super I am inline styled.}\par \par -{\field {\*\fldinst {HYPERLINK "http://www.google.com"}}{\fldrslt {Google}}}\par +{\field {\*\fldinst {HYPERLINK "https://github.com/PHPOffice/PHPWord"}}{\fldrslt {PHPWord on GitHub}}}\par \par } \ No newline at end of file diff --git a/tests/PhpWord/Tests/AutoloaderTest.php b/tests/PhpWord/Tests/AutoloaderTest.php index dace5bdb49..9d3cd2001a 100644 --- a/tests/PhpWord/Tests/AutoloaderTest.php +++ b/tests/PhpWord/Tests/AutoloaderTest.php @@ -48,15 +48,15 @@ public function testAutoload() $this->assertCount( $declaredCount, get_declared_classes(), - 'PhpOffice\\PhpWord\\Autoloader::autoload() is trying to load ' . - 'classes outside of the PhpOffice\\PhpWord namespace' + 'PhpOffice\\PhpWord\\Autoloader::autoload() is trying to load ' + . 'classes outside of the PhpOffice\\PhpWord namespace' ); // TODO change this class to the main PhpWord class when it is namespaced Autoloader::autoload('PhpOffice\\PhpWord\\Exception\\InvalidStyleException'); $this->assertTrue( in_array('PhpOffice\\PhpWord\\Exception\\InvalidStyleException', get_declared_classes()), - 'PhpOffice\\PhpWord\\Autoloader::autoload() failed to autoload the ' . - 'PhpOffice\\PhpWord\\Exception\\InvalidStyleException class' + 'PhpOffice\\PhpWord\\Autoloader::autoload() failed to autoload the ' + . 'PhpOffice\\PhpWord\\Exception\\InvalidStyleException class' ); } } diff --git a/tests/PhpWord/Tests/Element/AbstractElementTest.php b/tests/PhpWord/Tests/Element/AbstractElementTest.php index 180dd4d0b6..53485c6b88 100644 --- a/tests/PhpWord/Tests/Element/AbstractElementTest.php +++ b/tests/PhpWord/Tests/Element/AbstractElementTest.php @@ -30,7 +30,7 @@ public function testElementIndex() $stub = $this->getMockForAbstractClass('\PhpOffice\PhpWord\Element\AbstractElement'); $ival = rand(0, 100); $stub->setElementIndex($ival); - $this->assertEquals($stub->getElementIndex(), $ival); + $this->assertEquals($ival, $stub->getElementIndex()); } /** @@ -40,6 +40,6 @@ public function testElementId() { $stub = $this->getMockForAbstractClass('\PhpOffice\PhpWord\Element\AbstractElement'); $stub->setElementId(); - $this->assertEquals(strlen($stub->getElementId()), 6); + $this->assertEquals(6, strlen($stub->getElementId())); } } diff --git a/tests/PhpWord/Tests/Element/CellTest.php b/tests/PhpWord/Tests/Element/CellTest.php index aa07ec0394..322f6417a7 100644 --- a/tests/PhpWord/Tests/Element/CellTest.php +++ b/tests/PhpWord/Tests/Element/CellTest.php @@ -34,7 +34,7 @@ public function testConstruct() $oCell = new Cell(); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Cell', $oCell); - $this->assertEquals($oCell->getWidth(), null); + $this->assertNull($oCell->getWidth()); } /** @@ -45,7 +45,7 @@ public function testConstructWithStyleArray() $oCell = new Cell(null, array('valign' => 'center')); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Cell', $oCell->getStyle()); - $this->assertEquals($oCell->getWidth(), null); + $this->assertNull($oCell->getWidth()); } /** @@ -54,7 +54,7 @@ public function testConstructWithStyleArray() public function testAddText() { $oCell = new Cell(); - $element = $oCell->addText('text'); + $element = $oCell->addText(htmlspecialchars('text', ENT_COMPAT, 'UTF-8')); $this->assertCount(1, $oCell->getElements()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Text', $element); @@ -66,11 +66,11 @@ public function testAddText() public function testAddTextNotUTF8() { $oCell = new Cell(); - $element = $oCell->addText(utf8_decode('ééé')); + $element = $oCell->addText(utf8_decode(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8'))); $this->assertCount(1, $oCell->getElements()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Text', $element); - $this->assertEquals($element->getText(), 'ééé'); + $this->assertEquals(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8'), $element->getText()); } /** @@ -79,7 +79,7 @@ public function testAddTextNotUTF8() public function testAddLink() { $oCell = new Cell(); - $element = $oCell->addLink(utf8_decode('ééé'), utf8_decode('ééé')); + $element = $oCell->addLink(utf8_decode('ééé'), utf8_decode(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8'))); $this->assertCount(1, $oCell->getElements()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Link', $element); @@ -102,11 +102,11 @@ public function testAddTextBreak() public function testAddListItem() { $oCell = new Cell(); - $element = $oCell->addListItem('text'); + $element = $oCell->addListItem(htmlspecialchars('text', ENT_COMPAT, 'UTF-8')); $this->assertCount(1, $oCell->getElements()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\ListItem', $element); - $this->assertEquals($element->getTextObject()->getText(), 'text'); + $this->assertEquals(htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), $element->getTextObject()->getText()); } /** @@ -115,11 +115,11 @@ public function testAddListItem() public function testAddListItemNotUTF8() { $oCell = new Cell(); - $element = $oCell->addListItem(utf8_decode('ééé')); + $element = $oCell->addListItem(utf8_decode(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8'))); $this->assertCount(1, $oCell->getElements()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\ListItem', $element); - $this->assertEquals($element->getTextObject()->getText(), 'ééé'); + $this->assertEquals(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8'), $element->getTextObject()->getText()); } /** @@ -127,7 +127,7 @@ public function testAddListItemNotUTF8() */ public function testAddImageSection() { - $src = __DIR__ . "/../_files/images/earth.jpg"; + $src = __DIR__ . '/../_files/images/earth.jpg'; $oCell = new Cell(); $element = $oCell->addImage($src); @@ -140,7 +140,7 @@ public function testAddImageSection() */ public function testAddImageHeader() { - $src = __DIR__ . "/../_files/images/earth.jpg"; + $src = __DIR__ . '/../_files/images/earth.jpg'; $oCell = new Cell('header', 1); $element = $oCell->addImage($src); @@ -153,7 +153,7 @@ public function testAddImageHeader() */ public function testAddImageFooter() { - $src = __DIR__ . "/../_files/images/earth.jpg"; + $src = __DIR__ . '/../_files/images/earth.jpg'; $oCell = new Cell('footer', 1); $element = $oCell->addImage($src); @@ -180,7 +180,7 @@ public function testAddImageSectionByUrl() */ public function testAddObjectXLS() { - $src = __DIR__ . "/../_files/documents/sheet.xls"; + $src = __DIR__ . '/../_files/documents/sheet.xls'; $oCell = new Cell(); $element = $oCell->addObject($src); @@ -195,7 +195,7 @@ public function testAddObjectXLS() */ public function testAddObjectException() { - $src = __DIR__ . "/../_files/xsl/passthrough.xsl"; + $src = __DIR__ . '/../_files/xsl/passthrough.xsl'; $oCell = new Cell(); $oCell->addObject($src); } @@ -207,7 +207,7 @@ public function testAddPreserveText() { $oCell = new Cell(); $oCell->setDocPart('Header', 1); - $element = $oCell->addPreserveText('text'); + $element = $oCell->addPreserveText(htmlspecialchars('text', ENT_COMPAT, 'UTF-8')); $this->assertCount(1, $oCell->getElements()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\PreserveText', $element); @@ -220,11 +220,11 @@ public function testAddPreserveTextNotUTF8() { $oCell = new Cell(); $oCell->setDocPart('Header', 1); - $element = $oCell->addPreserveText(utf8_decode('ééé')); + $element = $oCell->addPreserveText(utf8_decode(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8'))); $this->assertCount(1, $oCell->getElements()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\PreserveText', $element); - $this->assertEquals($element->getText(), array('ééé')); + $this->assertEquals(array(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8')), $element->getText()); } /** @@ -236,7 +236,7 @@ public function testAddPreserveTextException() { $oCell = new Cell(); $oCell->setDocPart('Section', 1); - $oCell->addPreserveText('text'); + $oCell->addPreserveText(htmlspecialchars('text', ENT_COMPAT, 'UTF-8')); } /** @@ -257,7 +257,7 @@ public function testCreateTextRun() public function testAddCheckBox() { $oCell = new Cell(); - $element = $oCell->addCheckBox(utf8_decode('ééé'), utf8_decode('ééé')); + $element = $oCell->addCheckBox(utf8_decode(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8')), utf8_decode(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8'))); $this->assertCount(1, $oCell->getElements()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\CheckBox', $element); diff --git a/tests/PhpWord/Tests/Element/CheckBoxTest.php b/tests/PhpWord/Tests/Element/CheckBoxTest.php index 8f7bf3cd0f..942c908df5 100644 --- a/tests/PhpWord/Tests/Element/CheckBoxTest.php +++ b/tests/PhpWord/Tests/Element/CheckBoxTest.php @@ -35,7 +35,7 @@ public function testConstruct() $oCheckBox = new CheckBox(); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\CheckBox', $oCheckBox); - $this->assertEquals(null, $oCheckBox->getText()); + $this->assertNull($oCheckBox->getText()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Font', $oCheckBox->getFontStyle()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Paragraph', $oCheckBox->getParagraphStyle()); } @@ -45,10 +45,10 @@ public function testConstruct() */ public function testCheckBox() { - $oCheckBox = new CheckBox('chkBox', 'CheckBox'); + $oCheckBox = new CheckBox(htmlspecialchars('chkBox', ENT_COMPAT, 'UTF-8'), htmlspecialchars('CheckBox', ENT_COMPAT, 'UTF-8')); - $this->assertEquals($oCheckBox->getName(), 'chkBox'); - $this->assertEquals($oCheckBox->getText(), 'CheckBox'); + $this->assertEquals(htmlspecialchars('chkBox', ENT_COMPAT, 'UTF-8'), $oCheckBox->getName()); + $this->assertEquals(htmlspecialchars('CheckBox', ENT_COMPAT, 'UTF-8'), $oCheckBox->getText()); } /** @@ -56,8 +56,8 @@ public function testCheckBox() */ public function testFont() { - $oCheckBox = new CheckBox('chkBox', 'CheckBox', 'fontStyle'); - $this->assertEquals($oCheckBox->getFontStyle(), 'fontStyle'); + $oCheckBox = new CheckBox(htmlspecialchars('chkBox', ENT_COMPAT, 'UTF-8'), htmlspecialchars('CheckBox', ENT_COMPAT, 'UTF-8'), 'fontStyle'); + $this->assertEquals('fontStyle', $oCheckBox->getFontStyle()); $oCheckBox->setFontStyle(array('bold' => true, 'italic' => true, 'size' => 16)); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Font', $oCheckBox->getFontStyle()); @@ -69,8 +69,8 @@ public function testFont() public function testFontObject() { $font = new Font(); - $oCheckBox = new CheckBox('chkBox', 'CheckBox', $font); - $this->assertEquals($oCheckBox->getFontStyle(), $font); + $oCheckBox = new CheckBox(htmlspecialchars('chkBox', ENT_COMPAT, 'UTF-8'), htmlspecialchars('CheckBox', ENT_COMPAT, 'UTF-8'), $font); + $this->assertEquals($font, $oCheckBox->getFontStyle()); } /** @@ -78,8 +78,8 @@ public function testFontObject() */ public function testParagraph() { - $oCheckBox = new CheckBox('chkBox', 'CheckBox', 'fontStyle', 'paragraphStyle'); - $this->assertEquals($oCheckBox->getParagraphStyle(), 'paragraphStyle'); + $oCheckBox = new CheckBox(htmlspecialchars('chkBox', ENT_COMPAT, 'UTF-8'), htmlspecialchars('CheckBox', ENT_COMPAT, 'UTF-8'), 'fontStyle', 'paragraphStyle'); + $this->assertEquals('paragraphStyle', $oCheckBox->getParagraphStyle()); $oCheckBox->setParagraphStyle(array('align' => 'center', 'spaceAfter' => 100)); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Paragraph', $oCheckBox->getParagraphStyle()); diff --git a/tests/PhpWord/Tests/Element/FieldTest.php b/tests/PhpWord/Tests/Element/FieldTest.php index 2f9193d461..552b5cf5c0 100644 --- a/tests/PhpWord/Tests/Element/FieldTest.php +++ b/tests/PhpWord/Tests/Element/FieldTest.php @@ -18,7 +18,6 @@ namespace PhpOffice\PhpWord\Tests\Element; use PhpOffice\PhpWord\Element\Field; -use PhpOffice\PhpWord\PhpWord; /** * Test class for PhpOffice\PhpWord\Element\Field @@ -45,7 +44,7 @@ public function testConstructWithType() $oField = new Field('DATE'); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Field', $oField); - $this->assertEquals($oField->getType(), 'DATE'); + $this->assertEquals('DATE', $oField->getType()); } /** @@ -53,11 +52,11 @@ public function testConstructWithType() */ public function testConstructWithTypeProperties() { - $oField = new Field('DATE', array('dateformat'=>'d-M-yyyy')); + $oField = new Field('DATE', array('dateformat' => 'd-M-yyyy')); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Field', $oField); - $this->assertEquals($oField->getType(), 'DATE'); - $this->assertEquals($oField->getProperties(), array('dateformat'=>'d-M-yyyy')); + $this->assertEquals('DATE', $oField->getType()); + $this->assertEquals(array('dateformat' => 'd-M-yyyy'), $oField->getProperties()); } /** @@ -65,12 +64,12 @@ public function testConstructWithTypeProperties() */ public function testConstructWithTypePropertiesOptions() { - $oField = new Field('DATE', array('dateformat'=>'d-M-yyyy'), array('SakaEraCalendar', 'PreserveFormat')); + $oField = new Field('DATE', array('dateformat' => 'd-M-yyyy'), array('SakaEraCalendar', 'PreserveFormat')); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Field', $oField); - $this->assertEquals($oField->getType(), 'DATE'); - $this->assertEquals($oField->getProperties(), array('dateformat'=>'d-M-yyyy')); - $this->assertEquals($oField->getOptions(), array('SakaEraCalendar', 'PreserveFormat')); + $this->assertEquals('DATE', $oField->getType()); + $this->assertEquals(array('dateformat' => 'd-M-yyyy'), $oField->getProperties()); + $this->assertEquals(array('SakaEraCalendar', 'PreserveFormat'), $oField->getOptions()); } /** diff --git a/tests/PhpWord/Tests/Element/FooterTest.php b/tests/PhpWord/Tests/Element/FooterTest.php index c5d04b410a..8fe6289419 100644 --- a/tests/PhpWord/Tests/Element/FooterTest.php +++ b/tests/PhpWord/Tests/Element/FooterTest.php @@ -35,7 +35,7 @@ public function testConstruct() $oFooter = new Footer($iVal); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Footer', $oFooter); - $this->assertEquals($oFooter->getSectionId(), $iVal); + $this->assertEquals($iVal, $oFooter->getSectionId()); } /** @@ -44,7 +44,7 @@ public function testConstruct() public function testAddText() { $oFooter = new Footer(1); - $element = $oFooter->addText('text'); + $element = $oFooter->addText(htmlspecialchars('text', ENT_COMPAT, 'UTF-8')); $this->assertCount(1, $oFooter->getElements()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Text', $element); @@ -56,11 +56,11 @@ public function testAddText() public function testAddTextNotUTF8() { $oFooter = new Footer(1); - $element = $oFooter->addText(utf8_decode('ééé')); + $element = $oFooter->addText(utf8_decode(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8'))); $this->assertCount(1, $oFooter->getElements()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Text', $element); - $this->assertEquals($element->getText(), 'ééé'); + $this->assertEquals(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8'), $element->getText()); } /** @@ -104,7 +104,7 @@ public function testAddTable() */ public function testAddImage() { - $src = __DIR__ . "/../_files/images/earth.jpg"; + $src = __DIR__ . '/../_files/images/earth.jpg'; $oFooter = new Footer(1); $element = $oFooter->addImage($src); @@ -132,7 +132,7 @@ public function testAddImageByUrl() public function testAddPreserveText() { $oFooter = new Footer(1); - $element = $oFooter->addPreserveText('text'); + $element = $oFooter->addPreserveText(htmlspecialchars('text', ENT_COMPAT, 'UTF-8')); $this->assertCount(1, $oFooter->getElements()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\PreserveText', $element); @@ -144,11 +144,11 @@ public function testAddPreserveText() public function testAddPreserveTextNotUTF8() { $oFooter = new Footer(1); - $element = $oFooter->addPreserveText(utf8_decode('ééé')); + $element = $oFooter->addPreserveText(utf8_decode(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8'))); $this->assertCount(1, $oFooter->getElements()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\PreserveText', $element); - $this->assertEquals($element->getText(), array('ééé')); + $this->assertEquals(array(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8')), $element->getText()); } /** @@ -171,7 +171,7 @@ public function testRelationID() $iVal = rand(1, 1000); $oFooter->setRelationId($iVal); - $this->assertEquals($oFooter->getRelationId(), $iVal); + $this->assertEquals($iVal, $oFooter->getRelationId()); $this->assertEquals(Footer::AUTO, $oFooter->getType()); } } diff --git a/tests/PhpWord/Tests/Element/FootnoteTest.php b/tests/PhpWord/Tests/Element/FootnoteTest.php index 2ba015d741..745c602f1e 100644 --- a/tests/PhpWord/Tests/Element/FootnoteTest.php +++ b/tests/PhpWord/Tests/Element/FootnoteTest.php @@ -35,7 +35,7 @@ public function testConstruct() $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Footnote', $oFootnote); $this->assertCount(0, $oFootnote->getElements()); - $this->assertEquals($oFootnote->getParagraphStyle(), null); + $this->assertNull($oFootnote->getParagraphStyle()); } /** @@ -45,7 +45,7 @@ public function testConstructString() { $oFootnote = new Footnote('pStyle'); - $this->assertEquals($oFootnote->getParagraphStyle(), 'pStyle'); + $this->assertEquals('pStyle', $oFootnote->getParagraphStyle()); } /** @@ -67,7 +67,7 @@ public function testConstructArray() public function testAddText() { $oFootnote = new Footnote(); - $element = $oFootnote->addText('text'); + $element = $oFootnote->addText(htmlspecialchars('text', ENT_COMPAT, 'UTF-8')); $this->assertCount(1, $oFootnote->getElements()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Text', $element); @@ -90,7 +90,7 @@ public function testAddTextBreak() public function testAddLink() { $oFootnote = new Footnote(); - $element = $oFootnote->addLink('http://www.google.fr'); + $element = $oFootnote->addLink('https://github.com/PHPOffice/PHPWord'); $this->assertCount(1, $oFootnote->getElements()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Link', $element); @@ -105,7 +105,7 @@ public function testReferenceId() $iVal = rand(1, 1000); $oFootnote->setRelationId($iVal); - $this->assertEquals($oFootnote->getRelationId(), $iVal); + $this->assertEquals($iVal, $oFootnote->getRelationId()); } /** diff --git a/tests/PhpWord/Tests/Element/HeaderTest.php b/tests/PhpWord/Tests/Element/HeaderTest.php index 796b24f012..0bce5e4f91 100644 --- a/tests/PhpWord/Tests/Element/HeaderTest.php +++ b/tests/PhpWord/Tests/Element/HeaderTest.php @@ -35,8 +35,8 @@ public function testConstructDefault() $oHeader = new Header($iVal); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Header', $oHeader); - $this->assertEquals($oHeader->getSectionId(), $iVal); - $this->assertEquals($oHeader->getType(), Header::AUTO); + $this->assertEquals($iVal, $oHeader->getSectionId()); + $this->assertEquals(Header::AUTO, $oHeader->getType()); } /** @@ -45,11 +45,11 @@ public function testConstructDefault() public function testAddText() { $oHeader = new Header(1); - $element = $oHeader->addText('text'); + $element = $oHeader->addText(htmlspecialchars('text', ENT_COMPAT, 'UTF-8')); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Text', $element); $this->assertCount(1, $oHeader->getElements()); - $this->assertEquals($element->getText(), 'text'); + $this->assertEquals(htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), $element->getText()); } /** @@ -58,11 +58,11 @@ public function testAddText() public function testAddTextNotUTF8() { $oHeader = new Header(1); - $element = $oHeader->addText(utf8_decode('ééé')); + $element = $oHeader->addText(utf8_decode(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8'))); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Text', $element); $this->assertCount(1, $oHeader->getElements()); - $this->assertEquals($element->getText(), 'ééé'); + $this->assertEquals(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8'), $element->getText()); } /** @@ -113,7 +113,7 @@ public function testAddTable() */ public function testAddImage() { - $src = __DIR__ . "/../_files/images/earth.jpg"; + $src = __DIR__ . '/../_files/images/earth.jpg'; $oHeader = new Header(1); $element = $oHeader->addImage($src); @@ -141,7 +141,7 @@ public function testAddImageByUrl() public function testAddPreserveText() { $oHeader = new Header(1); - $element = $oHeader->addPreserveText('text'); + $element = $oHeader->addPreserveText(htmlspecialchars('text', ENT_COMPAT, 'UTF-8')); $this->assertCount(1, $oHeader->getElements()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\PreserveText', $element); @@ -153,11 +153,11 @@ public function testAddPreserveText() public function testAddPreserveTextNotUTF8() { $oHeader = new Header(1); - $element = $oHeader->addPreserveText(utf8_decode('ééé')); + $element = $oHeader->addPreserveText(utf8_decode(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8'))); $this->assertCount(1, $oHeader->getElements()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\PreserveText', $element); - $this->assertEquals($element->getText(), array('ééé')); + $this->assertEquals(array(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8')), $element->getText()); } /** @@ -165,7 +165,7 @@ public function testAddPreserveTextNotUTF8() */ public function testAddWatermark() { - $src = __DIR__ . "/../_files/images/earth.jpg"; + $src = __DIR__ . '/../_files/images/earth.jpg'; $oHeader = new Header(1); $element = $oHeader->addWatermark($src); @@ -192,7 +192,7 @@ public function testRelationId() $iVal = rand(1, 1000); $oHeader->setRelationId($iVal); - $this->assertEquals($oHeader->getRelationId(), $iVal); + $this->assertEquals($iVal, $oHeader->getRelationId()); } /** @@ -204,7 +204,7 @@ public function testResetType() $oHeader->firstPage(); $oHeader->resetType(); - $this->assertEquals($oHeader->getType(), Header::AUTO); + $this->assertEquals(Header::AUTO, $oHeader->getType()); } /** @@ -215,7 +215,7 @@ public function testFirstPage() $oHeader = new Header(1); $oHeader->firstPage(); - $this->assertEquals($oHeader->getType(), Header::FIRST); + $this->assertEquals(Header::FIRST, $oHeader->getType()); } /** @@ -226,7 +226,7 @@ public function testEvenPage() $oHeader = new Header(1); $oHeader->evenPage(); - $this->assertEquals($oHeader->getType(), Header::EVEN); + $this->assertEquals(Header::EVEN, $oHeader->getType()); } /** diff --git a/tests/PhpWord/Tests/Element/ImageTest.php b/tests/PhpWord/Tests/Element/ImageTest.php index 11b33d8785..e73abb2aa8 100644 --- a/tests/PhpWord/Tests/Element/ImageTest.php +++ b/tests/PhpWord/Tests/Element/ImageTest.php @@ -31,14 +31,15 @@ class ImageTest extends \PHPUnit_Framework_TestCase */ public function testConstruct() { - $src = __DIR__ . "/../_files/images/firefox.png"; + $src = __DIR__ . '/../_files/images/firefox.png'; $oImage = new Image($src); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Image', $oImage); - $this->assertEquals($oImage->getSource(), $src); - $this->assertEquals($oImage->getMediaId(), md5($src)); - $this->assertEquals($oImage->isWatermark(), false); - $this->assertEquals($oImage->getSourceType(), Image::SOURCE_LOCAL); + $this->assertEquals($src, $oImage->getSource()); + $this->assertEquals(md5($src), $oImage->getMediaId()); + // todo: change to assertNotTrue when got upgraded to PHPUnit 4.x + $this->assertEquals(false, $oImage->isWatermark()); + $this->assertEquals(Image::SOURCE_LOCAL, $oImage->getSourceType()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Image', $oImage->getStyle()); } @@ -47,11 +48,15 @@ public function testConstruct() */ public function testConstructWithStyle() { - $src = __DIR__ . "/../_files/images/firefox.png"; + $src = __DIR__ . '/../_files/images/firefox.png'; $oImage = new Image( $src, - array('width' => 210, 'height' => 210, 'align' => 'center', - 'wrappingStyle' => \PhpOffice\PhpWord\Style\Image::WRAPPING_STYLE_BEHIND) + array( + 'width' => 210, + 'height' => 210, + 'align' => 'center', + 'wrappingStyle' => \PhpOffice\PhpWord\Style\Image::WRAPPING_STYLE_BEHIND, + ) ); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Image', $oImage->getStyle()); @@ -72,15 +77,15 @@ public function testImages() foreach ($images as $imageData) { list($source, $type, $extension, $createFunction, $imageFunction) = $imageData; - $source = __DIR__ . "/../_files/images/" . $source; + $source = __DIR__ . "/../_files/images/{$source}"; $image = new Image($source); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Image', $image); - $this->assertEquals($image->getSource(), $source); - $this->assertEquals($image->getMediaId(), md5($source)); - $this->assertEquals($image->getImageType(), $type); - $this->assertEquals($image->getImageExtension(), $extension); - $this->assertEquals($image->getImageCreateFunction(), $createFunction); - $this->assertEquals($image->getImageFunction(), $imageFunction); + $this->assertEquals($source, $image->getSource()); + $this->assertEquals(md5($source), $image->getMediaId()); + $this->assertEquals($type, $image->getImageType()); + $this->assertEquals($extension, $image->getImageExtension()); + $this->assertEquals($createFunction, $image->getImageCreateFunction()); + $this->assertEquals($imageFunction, $image->getImageFunction()); $this->assertFalse($image->isMemImage()); } } @@ -91,7 +96,7 @@ public function testImages() public function testStyle() { $oImage = new Image( - __DIR__ . "/../_files/images/earth.jpg", + __DIR__ . '/../_files/images/earth.jpg', array('height' => 210, 'align' => 'center') ); @@ -105,7 +110,7 @@ public function testStyle() */ public function testInvalidImageLocal() { - new Image(__DIR__ . "/../_files/images/thisisnotarealimage"); + new Image(__DIR__ . '/../_files/images/thisisnotarealimage'); } /** @@ -135,10 +140,10 @@ public function testUnsupportedImage() */ public function testRelationID() { - $oImage = new Image(__DIR__ . "/../_files/images/earth.jpg", array('width' => 100)); + $oImage = new Image(__DIR__ . '/../_files/images/earth.jpg', array('width' => 100)); $iVal = rand(1, 1000); $oImage->setRelationId($iVal); - $this->assertEquals($oImage->getRelationId(), $iVal); + $this->assertEquals($iVal, $oImage->getRelationId()); } /** @@ -146,7 +151,7 @@ public function testRelationID() */ public function testArchivedImage() { - $archiveFile = __DIR__ . "/../_files/documents/reader.docx"; + $archiveFile = __DIR__ . '/../_files/documents/reader.docx'; $imageFile = 'word/media/image1.jpeg'; $image = new Image("zip://{$archiveFile}#{$imageFile}"); $this->assertEquals('image/jpeg', $image->getImageType()); diff --git a/tests/PhpWord/Tests/Element/LineTest.php b/tests/PhpWord/Tests/Element/LineTest.php index 5add9a6b07..66ab257eca 100644 --- a/tests/PhpWord/Tests/Element/LineTest.php +++ b/tests/PhpWord/Tests/Element/LineTest.php @@ -35,7 +35,7 @@ public function testConstruct() $oLine = new Line(); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Line', $oLine); - $this->assertEquals($oLine->getStyle(), null); + $this->assertNull($oLine->getStyle()); } /** @@ -45,7 +45,7 @@ public function testStyleText() { $oLine = new Line('lineStyle'); - $this->assertEquals($oLine->getStyle(), 'lineStyle'); + $this->assertEquals('lineStyle', $oLine->getStyle()); } /** @@ -55,19 +55,19 @@ public function testStyleArray() { $oLine = new Line( array( - 'width' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(14), - 'height' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(4), - 'positioning' => 'absolute', + 'width' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(14), + 'height' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(4), + 'positioning' => 'absolute', 'posHorizontalRel' => 'page', - 'posVerticalRel' => 'page', - 'flip' => true, - 'marginLeft' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(5), - 'marginTop' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(3), - 'wrappingStyle' => \PhpOffice\PhpWord\Style\Image::WRAPPING_STYLE_SQUARE, - 'beginArrow' => \PhpOffice\PhpWord\Style\Line::ARROW_STYLE_BLOCK, - 'endArrow' => \PhpOffice\PhpWord\Style\Line::ARROW_STYLE_OVAL, - 'dash' => \PhpOffice\PhpWord\Style\Line::DASH_STYLE_LONG_DASH_DOT_DOT, - 'weight' => 10 + 'posVerticalRel' => 'page', + 'flip' => true, + 'marginLeft' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(5), + 'marginTop' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(3), + 'wrappingStyle' => \PhpOffice\PhpWord\Style\Image::WRAPPING_STYLE_SQUARE, + 'beginArrow' => \PhpOffice\PhpWord\Style\Line::ARROW_STYLE_BLOCK, + 'endArrow' => \PhpOffice\PhpWord\Style\Line::ARROW_STYLE_OVAL, + 'dash' => \PhpOffice\PhpWord\Style\Line::DASH_STYLE_LONG_DASH_DOT_DOT, + 'weight' => 10, ) ); diff --git a/tests/PhpWord/Tests/Element/LinkTest.php b/tests/PhpWord/Tests/Element/LinkTest.php index ada6a36a9f..16bd531ac1 100644 --- a/tests/PhpWord/Tests/Element/LinkTest.php +++ b/tests/PhpWord/Tests/Element/LinkTest.php @@ -33,13 +33,13 @@ class LinkTest extends \PHPUnit_Framework_TestCase */ public function testConstructDefault() { - $oLink = new Link('http://www.google.com'); + $oLink = new Link('https://github.com/PHPOffice/PHPWord'); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Link', $oLink); - $this->assertEquals($oLink->getSource(), 'http://www.google.com'); - $this->assertEquals($oLink->getText(), $oLink->getSource()); - $this->assertEquals($oLink->getFontStyle(), null); - $this->assertEquals($oLink->getParagraphStyle(), null); + $this->assertEquals('https://github.com/PHPOffice/PHPWord', $oLink->getSource()); + $this->assertEquals($oLink->getSource(), $oLink->getText()); + $this->assertNull($oLink->getFontStyle()); + $this->assertNull($oLink->getParagraphStyle()); } /** @@ -48,15 +48,15 @@ public function testConstructDefault() public function testConstructWithParamsArray() { $oLink = new Link( - 'http://www.google.com', - 'Search Engine', + 'https://github.com/PHPOffice/PHPWord', + htmlspecialchars('PHPWord on GitHub', ENT_COMPAT, 'UTF-8'), array('color' => '0000FF', 'underline' => Font::UNDERLINE_SINGLE), array('marginLeft' => 600, 'marginRight' => 600, 'marginTop' => 600, 'marginBottom' => 600) ); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Link', $oLink); - $this->assertEquals($oLink->getSource(), 'http://www.google.com'); - $this->assertEquals($oLink->getText(), 'Search Engine'); + $this->assertEquals('https://github.com/PHPOffice/PHPWord', $oLink->getSource()); + $this->assertEquals(htmlspecialchars('PHPWord on GitHub', ENT_COMPAT, 'UTF-8'), $oLink->getText()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Font', $oLink->getFontStyle()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Paragraph', $oLink->getParagraphStyle()); } @@ -66,10 +66,10 @@ public function testConstructWithParamsArray() */ public function testConstructWithParamsString() { - $oLink = new Link('http://www.google.com', null, 'fontStyle', 'paragraphStyle'); + $oLink = new Link('https://github.com/PHPOffice/PHPWord', null, 'fontStyle', 'paragraphStyle'); - $this->assertEquals($oLink->getFontStyle(), 'fontStyle'); - $this->assertEquals($oLink->getParagraphStyle(), 'paragraphStyle'); + $this->assertEquals('fontStyle', $oLink->getFontStyle()); + $this->assertEquals('paragraphStyle', $oLink->getParagraphStyle()); } /** @@ -77,10 +77,10 @@ public function testConstructWithParamsString() */ public function testRelationId() { - $oLink = new Link('http://www.google.com'); + $oLink = new Link('https://github.com/PHPOffice/PHPWord'); $iVal = rand(1, 1000); $oLink->setRelationId($iVal); - $this->assertEquals($oLink->getRelationId(), $iVal); + $this->assertEquals($iVal, $oLink->getRelationId()); } } diff --git a/tests/PhpWord/Tests/Element/ListItemRunTest.php b/tests/PhpWord/Tests/Element/ListItemRunTest.php index 7bb0c25d71..2e003a20bc 100644 --- a/tests/PhpWord/Tests/Element/ListItemRunTest.php +++ b/tests/PhpWord/Tests/Element/ListItemRunTest.php @@ -18,7 +18,6 @@ namespace PhpOffice\PhpWord\Tests\Element; use PhpOffice\PhpWord\Element\ListItemRun; -use PhpOffice\PhpWord\PhpWord; /** * Test class for PhpOffice\PhpWord\Element\ListItemRun @@ -36,7 +35,7 @@ public function testConstructNull() $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\ListItemRun', $oListItemRun); $this->assertCount(0, $oListItemRun->getElements()); - $this->assertEquals($oListItemRun->getParagraphStyle(), null); + $this->assertNull($oListItemRun->getParagraphStyle()); } /** @@ -48,7 +47,7 @@ public function testConstructString() $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\ListItemRun', $oListItemRun); $this->assertCount(0, $oListItemRun->getElements()); - $this->assertEquals($oListItemRun->getParagraphStyle(), 'pStyle'); + $this->assertEquals('pStyle', $oListItemRun->getParagraphStyle()); } /** @@ -82,8 +81,9 @@ public function testStyle() $oListItemRun = new ListItemRun(1, array('listType' => \PhpOffice\PhpWord\Style\ListItem::TYPE_NUMBER)); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\ListItem', $oListItemRun->getStyle()); - $this->assertEquals($oListItemRun->getStyle()->getListType(), \PhpOffice\PhpWord\Style\ListItem::TYPE_NUMBER); + $this->assertEquals(\PhpOffice\PhpWord\Style\ListItem::TYPE_NUMBER, $oListItemRun->getStyle()->getListType()); } + /** * getDepth */ @@ -92,7 +92,7 @@ public function testDepth() $iVal = rand(1, 1000); $oListItemRun = new ListItemRun($iVal); - $this->assertEquals($oListItemRun->getDepth(), $iVal); + $this->assertEquals($iVal, $oListItemRun->getDepth()); } /** @@ -101,11 +101,11 @@ public function testDepth() public function testAddText() { $oListItemRun = new ListItemRun(); - $element = $oListItemRun->addText('text'); + $element = $oListItemRun->addText(htmlspecialchars('text', ENT_COMPAT, 'UTF-8')); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Text', $element); $this->assertCount(1, $oListItemRun->getElements()); - $this->assertEquals($element->getText(), 'text'); + $this->assertEquals(htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), $element->getText()); } /** @@ -114,11 +114,11 @@ public function testAddText() public function testAddTextNotUTF8() { $oListItemRun = new ListItemRun(); - $element = $oListItemRun->addText(utf8_decode('ééé')); + $element = $oListItemRun->addText(utf8_decode(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8'))); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Text', $element); $this->assertCount(1, $oListItemRun->getElements()); - $this->assertEquals($element->getText(), 'ééé'); + $this->assertEquals(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8'), $element->getText()); } /** @@ -127,11 +127,11 @@ public function testAddTextNotUTF8() public function testAddLink() { $oListItemRun = new ListItemRun(); - $element = $oListItemRun->addLink('http://www.google.fr'); + $element = $oListItemRun->addLink('https://github.com/PHPOffice/PHPWord'); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Link', $element); $this->assertCount(1, $oListItemRun->getElements()); - $this->assertEquals($element->getSource(), 'http://www.google.fr'); + $this->assertEquals('https://github.com/PHPOffice/PHPWord', $element->getSource()); } /** @@ -140,12 +140,12 @@ public function testAddLink() public function testAddLinkWithName() { $oListItemRun = new ListItemRun(); - $element = $oListItemRun->addLink('http://www.google.fr', utf8_decode('ééé')); + $element = $oListItemRun->addLink('https://github.com/PHPOffice/PHPWord', htmlspecialchars('PHPWord on GitHub', ENT_COMPAT, 'UTF-8')); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Link', $element); $this->assertCount(1, $oListItemRun->getElements()); - $this->assertEquals($element->getSource(), 'http://www.google.fr'); - $this->assertEquals($element->getText(), 'ééé'); + $this->assertEquals('https://github.com/PHPOffice/PHPWord', $element->getSource()); + $this->assertEquals(htmlspecialchars('PHPWord on GitHub', ENT_COMPAT, 'UTF-8'), $element->getText()); } /** @@ -164,7 +164,7 @@ public function testAddTextBreak() */ public function testAddImage() { - $src = __DIR__ . "/../_files/images/earth.jpg"; + $src = __DIR__ . '/../_files/images/earth.jpg'; $oListItemRun = new ListItemRun(); $element = $oListItemRun->addImage($src); diff --git a/tests/PhpWord/Tests/Element/ListItemTest.php b/tests/PhpWord/Tests/Element/ListItemTest.php index 1362eb4392..f8e76d74cf 100644 --- a/tests/PhpWord/Tests/Element/ListItemTest.php +++ b/tests/PhpWord/Tests/Element/ListItemTest.php @@ -32,7 +32,7 @@ class ListItemTest extends \PHPUnit_Framework_TestCase */ public function testText() { - $oListItem = new ListItem('text'); + $oListItem = new ListItem(htmlspecialchars('text', ENT_COMPAT, 'UTF-8')); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Text', $oListItem->getTextObject()); } @@ -43,17 +43,14 @@ public function testText() public function testStyle() { $oListItem = new ListItem( - 'text', + htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), 1, null, array('listType' => \PhpOffice\PhpWord\Style\ListItem::TYPE_NUMBER) ); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\ListItem', $oListItem->getStyle()); - $this->assertEquals( - $oListItem->getStyle()->getListType(), - \PhpOffice\PhpWord\Style\ListItem::TYPE_NUMBER - ); + $this->assertEquals(\PhpOffice\PhpWord\Style\ListItem::TYPE_NUMBER, $oListItem->getStyle()->getListType()); } /** @@ -62,8 +59,8 @@ public function testStyle() public function testDepth() { $iVal = rand(1, 1000); - $oListItem = new ListItem('text', $iVal); + $oListItem = new ListItem(htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), $iVal); - $this->assertEquals($oListItem->getDepth(), $iVal); + $this->assertEquals($iVal, $oListItem->getDepth()); } } diff --git a/tests/PhpWord/Tests/Element/ObjectTest.php b/tests/PhpWord/Tests/Element/ObjectTest.php index 6b82313453..ae72b3d61a 100644 --- a/tests/PhpWord/Tests/Element/ObjectTest.php +++ b/tests/PhpWord/Tests/Element/ObjectTest.php @@ -32,12 +32,12 @@ class ObjectTest extends \PHPUnit_Framework_TestCase */ public function testConstructWithSupportedFiles() { - $src = __DIR__ . "/../_files/documents/sheet.xls"; + $src = __DIR__ . '/../_files/documents/sheet.xls'; $oObject = new Object($src); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Object', $oObject); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Image', $oObject->getStyle()); - $this->assertEquals($oObject->getSource(), $src); + $this->assertEquals($src, $oObject->getSource()); } /** @@ -47,7 +47,7 @@ public function testConstructWithSupportedFiles() */ public function testConstructWithNotSupportedFiles() { - $src = __DIR__ . "/../_files/xsl/passthrough.xsl"; + $src = __DIR__ . '/../_files/xsl/passthrough.xsl'; $oObject = new Object($src); $oObject->getSource(); } @@ -57,12 +57,12 @@ public function testConstructWithNotSupportedFiles() */ public function testConstructWithSupportedFilesAndStyle() { - $src = __DIR__ . "/../_files/documents/sheet.xls"; + $src = __DIR__ . '/../_files/documents/sheet.xls'; $oObject = new Object($src, array('width' => '230px')); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Object', $oObject); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Image', $oObject->getStyle()); - $this->assertEquals($oObject->getSource(), $src); + $this->assertEquals($src, $oObject->getSource()); } /** @@ -70,12 +70,12 @@ public function testConstructWithSupportedFilesAndStyle() */ public function testRelationId() { - $src = __DIR__ . "/../_files/documents/sheet.xls"; + $src = __DIR__ . '/../_files/documents/sheet.xls'; $oObject = new Object($src); $iVal = rand(1, 1000); $oObject->setRelationId($iVal); - $this->assertEquals($oObject->getRelationId(), $iVal); + $this->assertEquals($iVal, $oObject->getRelationId()); } /** @@ -83,11 +83,11 @@ public function testRelationId() */ public function testImageRelationId() { - $src = __DIR__ . "/../_files/documents/sheet.xls"; + $src = __DIR__ . '/../_files/documents/sheet.xls'; $oObject = new Object($src); $iVal = rand(1, 1000); $oObject->setImageRelationId($iVal); - $this->assertEquals($oObject->getImageRelationId(), $iVal); + $this->assertEquals($iVal, $oObject->getImageRelationId()); } } diff --git a/tests/PhpWord/Tests/Element/PreserveTextTest.php b/tests/PhpWord/Tests/Element/PreserveTextTest.php index 5d2e4f3e6f..51679939e7 100644 --- a/tests/PhpWord/Tests/Element/PreserveTextTest.php +++ b/tests/PhpWord/Tests/Element/PreserveTextTest.php @@ -34,9 +34,9 @@ public function testConstruct() $oPreserveText = new PreserveText(); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\PreserveText', $oPreserveText); - $this->assertEquals($oPreserveText->getText(), null); - $this->assertEquals($oPreserveText->getFontStyle(), null); - $this->assertEquals($oPreserveText->getParagraphStyle(), null); + $this->assertNull($oPreserveText->getText()); + $this->assertNull($oPreserveText->getFontStyle()); + $this->assertNull($oPreserveText->getParagraphStyle()); } /** @@ -44,10 +44,10 @@ public function testConstruct() */ public function testConstructWithString() { - $oPreserveText = new PreserveText('text', 'styleFont', 'styleParagraph'); - $this->assertEquals($oPreserveText->getText(), array('text')); - $this->assertEquals($oPreserveText->getFontStyle(), 'styleFont'); - $this->assertEquals($oPreserveText->getParagraphStyle(), 'styleParagraph'); + $oPreserveText = new PreserveText(htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), 'styleFont', 'styleParagraph'); + $this->assertEquals(array(htmlspecialchars('text', ENT_COMPAT, 'UTF-8')), $oPreserveText->getText()); + $this->assertEquals('styleFont', $oPreserveText->getFontStyle()); + $this->assertEquals('styleParagraph', $oPreserveText->getParagraphStyle()); } /** @@ -56,14 +56,11 @@ public function testConstructWithString() public function testConstructWithArray() { $oPreserveText = new PreserveText( - 'text', + htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), array('align' => 'center'), array('marginLeft' => 600, 'marginRight' => 600, 'marginTop' => 600, 'marginBottom' => 600) ); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Font', $oPreserveText->getFontStyle()); - $this->assertInstanceOf( - 'PhpOffice\\PhpWord\\Style\\Paragraph', - $oPreserveText->getParagraphStyle() - ); + $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Paragraph', $oPreserveText->getParagraphStyle()); } } diff --git a/tests/PhpWord/Tests/Element/RowTest.php b/tests/PhpWord/Tests/Element/RowTest.php index c377bb7cd2..446884c6e3 100644 --- a/tests/PhpWord/Tests/Element/RowTest.php +++ b/tests/PhpWord/Tests/Element/RowTest.php @@ -35,7 +35,7 @@ public function testConstruct() $oRow = new Row(); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Row', $oRow); - $this->assertEquals($oRow->getHeight(), null); + $this->assertNull($oRow->getHeight()); $this->assertInternalType('array', $oRow->getCells()); $this->assertCount(0, $oRow->getCells()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Row', $oRow->getStyle()); @@ -49,7 +49,7 @@ public function testConstructWithParams() $iVal = rand(1, 1000); $oRow = new Row($iVal, array('borderBottomSize' => 18, 'borderBottomColor' => '0000FF', 'bgColor' => '66BBFF')); - $this->assertEquals($oRow->getHeight(), $iVal); + $this->assertEquals($iVal, $oRow->getHeight()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Row', $oRow->getStyle()); } diff --git a/tests/PhpWord/Tests/Element/SectionTest.php b/tests/PhpWord/Tests/Element/SectionTest.php index 853ebc5d3f..79a2168412 100644 --- a/tests/PhpWord/Tests/Element/SectionTest.php +++ b/tests/PhpWord/Tests/Element/SectionTest.php @@ -36,7 +36,7 @@ class SectionTest extends \PHPUnit_Framework_TestCase public function testGetStyle() { $oSection = new Section(0); - $this->assertAttributeEquals($oSection->getStyle(), 'style', new Section(0)); + $this->assertAttributeEquals($oSection->getStyle(), 'style', $oSection); } /** @@ -45,7 +45,7 @@ public function testGetStyle() public function testGetElements() { $oSection = new Section(0); - $this->assertAttributeEquals($oSection->getElements(), 'elements', new Section(0)); + $this->assertAttributeEquals($oSection->getElements(), 'elements', $oSection); } /** @@ -54,7 +54,7 @@ public function testGetElements() public function testGetFooters() { $oSection = new Section(0); - $this->assertAttributeEquals($oSection->getFooters(), 'footers', new Section(0)); + $this->assertAttributeEquals($oSection->getFooters(), 'footers', $oSection); } /** @@ -63,7 +63,7 @@ public function testGetFooters() public function testGetHeaders() { $oSection = new Section(0); - $this->assertAttributeEquals($oSection->getHeaders(), 'headers', new Section(0)); + $this->assertAttributeEquals($oSection->getHeaders(), 'headers', $oSection); } /** @@ -82,30 +82,42 @@ public function testSetStyle() */ public function testAddElements() { - $objectSource = __DIR__ . "/../_files/documents/reader.docx"; - $imageSource = __DIR__ . "/../_files/images/PhpWord.png"; + $objectSource = __DIR__ . '/../_files/documents/reader.docx'; + $imageSource = __DIR__ . '/../_files/images/PhpWord.png'; // $imageUrl = 'http://php.net//images/logos/php-med-trans-light.gif'; $section = new Section(0); $section->setPhpWord(new PhpWord()); - $section->addText(utf8_decode('ä')); - $section->addLink(utf8_decode('http://äää.com'), utf8_decode('ä')); + $section->addText(utf8_decode(htmlspecialchars('ä', ENT_COMPAT, 'UTF-8'))); + $section->addLink(utf8_decode('http://äää.com'), utf8_decode(htmlspecialchars('ä', ENT_COMPAT, 'UTF-8'))); $section->addTextBreak(); $section->addPageBreak(); $section->addTable(); - $section->addListItem(utf8_decode('ä')); + $section->addListItem(utf8_decode(htmlspecialchars('ä', ENT_COMPAT, 'UTF-8'))); $section->addObject($objectSource); $section->addImage($imageSource); - $section->addTitle(utf8_decode('ä'), 1); + $section->addTitle(utf8_decode(htmlspecialchars('ä', ENT_COMPAT, 'UTF-8')), 1); $section->addTextRun(); $section->addFootnote(); - $section->addCheckBox(utf8_decode('chkä'), utf8_decode('Contentä')); + $section->addCheckBox(utf8_decode(htmlspecialchars('chkä', ENT_COMPAT, 'UTF-8')), utf8_decode(htmlspecialchars('Contentä', ENT_COMPAT, 'UTF-8'))); $section->addTOC(); $elementCollection = $section->getElements(); - $elementTypes = array('Text', 'Link', 'TextBreak', 'PageBreak', - 'Table', 'ListItem', 'Object', 'Image', - 'Title', 'TextRun', 'Footnote', 'CheckBox', 'TOC'); + $elementTypes = array( + 'Text', + 'Link', + 'TextBreak', + 'PageBreak', + 'Table', + 'ListItem', + 'Object', + 'Image', + 'Title', + 'TextRun', + 'Footnote', + 'CheckBox', + 'TOC', + ); $elmCount = 0; foreach ($elementTypes as $elementType) { $this->assertInstanceOf("PhpOffice\\PhpWord\\Element\\{$elementType}", $elementCollection[$elmCount]); @@ -120,7 +132,7 @@ public function testAddElements() */ public function testAddObjectException() { - $source = __DIR__ . "/_files/xsl/passthrough.xsl"; + $source = __DIR__ . '/_files/xsl/passthrough.xsl'; $section = new Section(0); $section->addObject($source); } @@ -133,10 +145,10 @@ public function testAddTitleWithStyle() Style::addTitleStyle(1, array('size' => 14)); $section = new Section(0); $section->setPhpWord(new PhpWord()); - $section->addTitle('Test', 1); + $section->addTitle(htmlspecialchars('Test', ENT_COMPAT, 'UTF-8'), 1); $elementCollection = $section->getElements(); - $this->assertInstanceOf("PhpOffice\\PhpWord\\Element\\Title", $elementCollection[0]); + $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Title', $elementCollection[0]); } /** diff --git a/tests/PhpWord/Tests/Element/TOCTest.php b/tests/PhpWord/Tests/Element/TOCTest.php index d0ebf343fe..e4d984ebb9 100644 --- a/tests/PhpWord/Tests/Element/TOCTest.php +++ b/tests/PhpWord/Tests/Element/TOCTest.php @@ -34,9 +34,9 @@ class TOCTest extends \PHPUnit_Framework_TestCase public function testConstructWithStyleArray() { $expected = array( - 'position' => 9062, - 'leader' => \PhpOffice\PhpWord\Style\Tab::TAB_LEADER_DOT, - 'indent' => 200, + 'position' => 9062, + 'leader' => \PhpOffice\PhpWord\Style\Tab::TAB_LEADER_DOT, + 'indent' => 200, ); $object = new TOC(array('size' => 11), array('position' => $expected['position'])); $tocStyle = $object->getStyleTOC(); @@ -86,7 +86,7 @@ public function testSetGetMinMaxDepth() $phpWord = new PhpWord(); foreach ($titles as $text => $depth) { - $phpWord->addTitle(new Title($text, $depth)); + $phpWord->addTitle(new Title(htmlspecialchars($text, ENT_COMPAT, 'UTF-8'), $depth)); } $toc = new TOC(); $toc->setPhpWord($phpWord); diff --git a/tests/PhpWord/Tests/Element/TableTest.php b/tests/PhpWord/Tests/Element/TableTest.php index 0977639f32..be5df55c96 100644 --- a/tests/PhpWord/Tests/Element/TableTest.php +++ b/tests/PhpWord/Tests/Element/TableTest.php @@ -35,9 +35,9 @@ public function testConstruct() $oTable = new Table(); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Table', $oTable); - $this->assertEquals($oTable->getStyle(), null); - $this->assertEquals($oTable->getWidth(), null); - $this->assertEquals($oTable->getRows(), array()); + $this->assertNull($oTable->getStyle()); + $this->assertNull($oTable->getWidth()); + $this->assertEquals(array(), $oTable->getRows()); $this->assertCount(0, $oTable->getRows()); } @@ -48,7 +48,7 @@ public function testStyleText() { $oTable = new Table('tableStyle'); - $this->assertEquals($oTable->getStyle(), 'tableStyle'); + $this->assertEquals('tableStyle', $oTable->getStyle()); } /** @@ -56,11 +56,7 @@ public function testStyleText() */ public function testStyleArray() { - $oTable = new Table(array( - 'borderSize' => 6, - 'borderColor' => '006699', - 'cellMargin' => 80 - )); + $oTable = new Table(array('borderSize' => 6, 'borderColor' => '006699', 'cellMargin' => 80)); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Table', $oTable->getStyle()); } @@ -71,9 +67,9 @@ public function testStyleArray() public function testWidth() { $oTable = new Table(); - $iVal = rand(1, 1000); + $iVal = rand(1, 1000); $oTable->setWidth($iVal); - $this->assertEquals($oTable->getWidth(), $iVal); + $this->assertEquals($iVal, $oTable->getWidth()); } /** @@ -81,7 +77,7 @@ public function testWidth() */ public function testRow() { - $oTable = new Table(); + $oTable = new Table(); $element = $oTable->addRow(); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Row', $element); $this->assertCount(1, $oTable->getRows()); diff --git a/tests/PhpWord/Tests/Element/TextBoxTest.php b/tests/PhpWord/Tests/Element/TextBoxTest.php index 2c6da4655d..0dda48994e 100644 --- a/tests/PhpWord/Tests/Element/TextBoxTest.php +++ b/tests/PhpWord/Tests/Element/TextBoxTest.php @@ -35,7 +35,7 @@ public function testConstruct() $oTextBox = new TextBox(); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\TextBox', $oTextBox); - $this->assertEquals($oTextBox->getStyle(), null); + $this->assertNull($oTextBox->getStyle()); } /** @@ -45,7 +45,7 @@ public function testStyleText() { $oTextBox = new TextBox('textBoxStyle'); - $this->assertEquals($oTextBox->getStyle(), 'textBoxStyle'); + $this->assertEquals('textBoxStyle', $oTextBox->getStyle()); } /** @@ -55,15 +55,15 @@ public function testStyleArray() { $oTextBox = new TextBox( array( - 'width' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(4.5), - 'height' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(17.5), + 'width' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(4.5), + 'height' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(17.5), 'positioning' => 'absolute', - 'marginLeft' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(15.4), - 'marginTop' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(9.9), - 'stroke' => 0, + 'marginLeft' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(15.4), + 'marginTop' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(9.9), + 'stroke' => 0, 'innerMargin' => 0, - 'borderSize' => 1, - 'borderColor' => '' + 'borderSize' => 1, + 'borderColor' => '', ) ); diff --git a/tests/PhpWord/Tests/Element/TextRunTest.php b/tests/PhpWord/Tests/Element/TextRunTest.php index de62a920da..5e2dd856e8 100644 --- a/tests/PhpWord/Tests/Element/TextRunTest.php +++ b/tests/PhpWord/Tests/Element/TextRunTest.php @@ -36,7 +36,7 @@ public function testConstructNull() $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\TextRun', $oTextRun); $this->assertCount(0, $oTextRun->getElements()); - $this->assertEquals($oTextRun->getParagraphStyle(), null); + $this->assertNull($oTextRun->getParagraphStyle()); } /** @@ -48,7 +48,7 @@ public function testConstructString() $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\TextRun', $oTextRun); $this->assertCount(0, $oTextRun->getElements()); - $this->assertEquals($oTextRun->getParagraphStyle(), 'pStyle'); + $this->assertEquals('pStyle', $oTextRun->getParagraphStyle()); } /** @@ -69,11 +69,11 @@ public function testConstructArray() public function testAddText() { $oTextRun = new TextRun(); - $element = $oTextRun->addText('text'); + $element = $oTextRun->addText(htmlspecialchars('text', ENT_COMPAT, 'UTF-8')); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Text', $element); $this->assertCount(1, $oTextRun->getElements()); - $this->assertEquals($element->getText(), 'text'); + $this->assertEquals(htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), $element->getText()); } /** @@ -82,11 +82,11 @@ public function testAddText() public function testAddTextNotUTF8() { $oTextRun = new TextRun(); - $element = $oTextRun->addText(utf8_decode('ééé')); + $element = $oTextRun->addText(utf8_decode(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8'))); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Text', $element); $this->assertCount(1, $oTextRun->getElements()); - $this->assertEquals($element->getText(), 'ééé'); + $this->assertEquals(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8'), $element->getText()); } /** @@ -95,11 +95,11 @@ public function testAddTextNotUTF8() public function testAddLink() { $oTextRun = new TextRun(); - $element = $oTextRun->addLink('http://www.google.fr'); + $element = $oTextRun->addLink('https://github.com/PHPOffice/PHPWord'); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Link', $element); $this->assertCount(1, $oTextRun->getElements()); - $this->assertEquals($element->getSource(), 'http://www.google.fr'); + $this->assertEquals('https://github.com/PHPOffice/PHPWord', $element->getSource()); } /** @@ -108,12 +108,12 @@ public function testAddLink() public function testAddLinkWithName() { $oTextRun = new TextRun(); - $element = $oTextRun->addLink('http://www.google.fr', utf8_decode('ééé')); + $element = $oTextRun->addLink('https://github.com/PHPOffice/PHPWord', htmlspecialchars('PHPWord on GitHub', ENT_COMPAT, 'UTF-8')); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Link', $element); $this->assertCount(1, $oTextRun->getElements()); - $this->assertEquals($element->getSource(), 'http://www.google.fr'); - $this->assertEquals($element->getText(), 'ééé'); + $this->assertEquals('https://github.com/PHPOffice/PHPWord', $element->getSource()); + $this->assertEquals(htmlspecialchars('PHPWord on GitHub', ENT_COMPAT, 'UTF-8'), $element->getText()); } /** @@ -132,7 +132,7 @@ public function testAddTextBreak() */ public function testAddImage() { - $src = __DIR__ . "/../_files/images/earth.jpg"; + $src = __DIR__ . '/../_files/images/earth.jpg'; $oTextRun = new TextRun(); $element = $oTextRun->addImage($src); diff --git a/tests/PhpWord/Tests/Element/TextTest.php b/tests/PhpWord/Tests/Element/TextTest.php index a306d4b938..3112dbfa6a 100644 --- a/tests/PhpWord/Tests/Element/TextTest.php +++ b/tests/PhpWord/Tests/Element/TextTest.php @@ -35,7 +35,7 @@ public function testConstruct() $oText = new Text(); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Text', $oText); - $this->assertEquals(null, $oText->getText()); + $this->assertNull($oText->getText()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Font', $oText->getFontStyle()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Paragraph', $oText->getParagraphStyle()); } @@ -45,9 +45,9 @@ public function testConstruct() */ public function testText() { - $oText = new Text('text'); + $oText = new Text(htmlspecialchars('text', ENT_COMPAT, 'UTF-8')); - $this->assertEquals($oText->getText(), 'text'); + $this->assertEquals(htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), $oText->getText()); } /** @@ -55,8 +55,8 @@ public function testText() */ public function testFont() { - $oText = new Text('text', 'fontStyle'); - $this->assertEquals($oText->getFontStyle(), 'fontStyle'); + $oText = new Text(htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), 'fontStyle'); + $this->assertEquals('fontStyle', $oText->getFontStyle()); $oText->setFontStyle(array('bold' => true, 'italic' => true, 'size' => 16)); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Font', $oText->getFontStyle()); @@ -68,8 +68,8 @@ public function testFont() public function testFontObject() { $font = new Font(); - $oText = new Text('text', $font); - $this->assertEquals($oText->getFontStyle(), $font); + $oText = new Text(htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), $font); + $this->assertEquals($font, $oText->getFontStyle()); } /** @@ -77,8 +77,8 @@ public function testFontObject() */ public function testParagraph() { - $oText = new Text('text', 'fontStyle', 'paragraphStyle'); - $this->assertEquals($oText->getParagraphStyle(), 'paragraphStyle'); + $oText = new Text(htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), 'fontStyle', 'paragraphStyle'); + $this->assertEquals('paragraphStyle', $oText->getParagraphStyle()); $oText->setParagraphStyle(array('align' => 'center', 'spaceAfter' => 100)); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Paragraph', $oText->getParagraphStyle()); diff --git a/tests/PhpWord/Tests/Element/TitleTest.php b/tests/PhpWord/Tests/Element/TitleTest.php index ca65c8eb94..ee72f7fc43 100644 --- a/tests/PhpWord/Tests/Element/TitleTest.php +++ b/tests/PhpWord/Tests/Element/TitleTest.php @@ -32,10 +32,10 @@ class TitleTest extends \PHPUnit_Framework_TestCase */ public function testConstruct() { - $oTitle = new Title('text'); + $oTitle = new Title(htmlspecialchars('text', ENT_COMPAT, 'UTF-8')); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Title', $oTitle); - $this->assertEquals($oTitle->getText(), 'text'); + $this->assertEquals(htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), $oTitle->getText()); } /** @@ -43,8 +43,8 @@ public function testConstruct() */ public function testStyleNull() { - $oTitle = new Title('text'); + $oTitle = new Title(htmlspecialchars('text', ENT_COMPAT, 'UTF-8')); - $this->assertEquals($oTitle->getStyle(), null); + $this->assertNull($oTitle->getStyle()); } } diff --git a/tests/PhpWord/Tests/IOFactoryTest.php b/tests/PhpWord/Tests/IOFactoryTest.php index 60db16d050..1f293b0e98 100644 --- a/tests/PhpWord/Tests/IOFactoryTest.php +++ b/tests/PhpWord/Tests/IOFactoryTest.php @@ -74,7 +74,7 @@ public function testNonexistentReaderCanNotBeCreated() */ public function testLoad() { - $file = __DIR__ . "/_files/templates/blank.docx"; + $file = __DIR__ . '/_files/templates/blank.docx'; $this->assertInstanceOf( 'PhpOffice\\PhpWord\\PhpWord', IOFactory::load($file) diff --git a/tests/PhpWord/Tests/MediaTest.php b/tests/PhpWord/Tests/MediaTest.php index 0196a7e1a2..8eef6469b2 100644 --- a/tests/PhpWord/Tests/MediaTest.php +++ b/tests/PhpWord/Tests/MediaTest.php @@ -32,7 +32,7 @@ class MediaTest extends \PHPUnit_Framework_TestCase */ public function testGetSectionMediaElementsWithNull() { - $this->assertEquals(Media::getElements('section'), array()); + $this->assertEquals(array(), Media::getElements('section')); } /** @@ -48,8 +48,8 @@ public function testCountSectionMediaElementsWithNull() */ public function testAddSectionMediaElement() { - $local = __DIR__ . "/_files/images/mars.jpg"; - $object = __DIR__ . "/_files/documents/sheet.xls"; + $local = __DIR__ . '/_files/images/mars.jpg'; + $object = __DIR__ . '/_files/documents/sheet.xls'; $remote = 'http://php.net/images/logos/php-med-trans-light.gif'; Media::addElement('section', 'image', $local, new Image($local)); Media::addElement('section', 'image', $local, new Image($local)); @@ -77,7 +77,7 @@ public function testAddSectionLinkElement() */ public function testAddHeaderMediaElement() { - $local = __DIR__ . "/_files/images/mars.jpg"; + $local = __DIR__ . '/_files/images/mars.jpg'; $remote = 'http://php.net/images/logos/php-med-trans-light.gif'; Media::addElement('header1', 'image', $local, new Image($local)); Media::addElement('header1', 'image', $local, new Image($local)); @@ -92,7 +92,7 @@ public function testAddHeaderMediaElement() */ public function testAddFooterMediaElement() { - $local = __DIR__ . "/_files/images/mars.jpg"; + $local = __DIR__ . '/_files/images/mars.jpg'; $remote = 'http://php.net/images/logos/php-med-trans-light.gif'; Media::addElement('footer1', 'image', $local, new Image($local)); Media::addElement('footer1', 'image', $local, new Image($local)); @@ -112,6 +112,6 @@ public function testAddFooterMediaElement() */ public function testAddElementImageException() { - Media::addElement('section', 'image', __DIR__ . "/_files/images/mars.jpg"); + Media::addElement('section', 'image', __DIR__ . '/_files/images/mars.jpg'); } } diff --git a/tests/PhpWord/Tests/Metadata/DocInfoTest.php b/tests/PhpWord/Tests/Metadata/DocInfoTest.php index c860a0d9a9..d9472eb269 100644 --- a/tests/PhpWord/Tests/Metadata/DocInfoTest.php +++ b/tests/PhpWord/Tests/Metadata/DocInfoTest.php @@ -182,42 +182,22 @@ public function testCustomProperty() $oProperties->setCustomProperty('key3', 3); $oProperties->setCustomProperty('key4', 4.4); $oProperties->setCustomProperty('key5', 'value5'); - $this->assertEquals( - DocInfo::PROPERTY_TYPE_STRING, - $oProperties->getCustomPropertyType('key1') - ); - $this->assertEquals( - DocInfo::PROPERTY_TYPE_BOOLEAN, - $oProperties->getCustomPropertyType('key2') - ); - $this->assertEquals( - DocInfo::PROPERTY_TYPE_INTEGER, - $oProperties->getCustomPropertyType('key3') - ); - $this->assertEquals( - DocInfo::PROPERTY_TYPE_FLOAT, - $oProperties->getCustomPropertyType('key4') - ); - $this->assertEquals( - DocInfo::PROPERTY_TYPE_STRING, - $oProperties->getCustomPropertyType('key5') - ); - $this->assertEquals(null, $oProperties->getCustomPropertyType('key6')); - $this->assertEquals(null, $oProperties->getCustomPropertyValue('key1')); - $this->assertEquals(true, $oProperties->getCustomPropertyValue('key2')); + $this->assertEquals(DocInfo::PROPERTY_TYPE_STRING, $oProperties->getCustomPropertyType('key1')); + $this->assertEquals(DocInfo::PROPERTY_TYPE_BOOLEAN, $oProperties->getCustomPropertyType('key2')); + $this->assertEquals(DocInfo::PROPERTY_TYPE_INTEGER, $oProperties->getCustomPropertyType('key3')); + $this->assertEquals(DocInfo::PROPERTY_TYPE_FLOAT, $oProperties->getCustomPropertyType('key4')); + $this->assertEquals(DocInfo::PROPERTY_TYPE_STRING, $oProperties->getCustomPropertyType('key5')); + $this->assertNull($oProperties->getCustomPropertyType('key6')); + $this->assertNull($oProperties->getCustomPropertyValue('key1')); + $this->assertTrue($oProperties->getCustomPropertyValue('key2')); $this->assertEquals(3, $oProperties->getCustomPropertyValue('key3')); $this->assertEquals(4.4, $oProperties->getCustomPropertyValue('key4')); $this->assertEquals('value5', $oProperties->getCustomPropertyValue('key5')); - $this->assertEquals(null, $oProperties->getCustomPropertyValue('key6')); - $this->assertEquals(true, $oProperties->isCustomPropertySet('key5')); + $this->assertNull($oProperties->getCustomPropertyValue('key6')); + $this->assertTrue($oProperties->isCustomPropertySet('key5')); + // todo: change to assertNotTrue when got upgraded to PHPUnit 4.x $this->assertEquals(false, $oProperties->isCustomPropertySet('key6')); - $this->assertEquals(array( - 'key1', - 'key2', - 'key3', - 'key4', - 'key5' - ), $oProperties->getCustomProperties()); + $this->assertEquals(array('key1', 'key2', 'key3', 'key4', 'key5'), $oProperties->getCustomProperties()); } /** @@ -226,49 +206,25 @@ public function testCustomProperty() public function testConvertProperty() { $this->assertEquals('', DocInfo::convertProperty('a', 'empty')); - $this->assertEquals(null, DocInfo::convertProperty('a', 'null')); + $this->assertNull(DocInfo::convertProperty('a', 'null')); $this->assertEquals(8, DocInfo::convertProperty('8', 'int')); $this->assertEquals(8, DocInfo::convertProperty('8.3', 'uint')); $this->assertEquals(8.3, DocInfo::convertProperty('8.3', 'decimal')); $this->assertEquals('8.3', DocInfo::convertProperty('8.3', 'lpstr')); $this->assertEquals(strtotime('10/11/2013'), DocInfo::convertProperty('10/11/2013', 'date')); - $this->assertEquals(true, DocInfo::convertProperty('true', 'bool')); + $this->assertTrue(DocInfo::convertProperty('true', 'bool')); + // todo: change to assertNotTrue when got upgraded to PHPUnit 4.x $this->assertEquals(false, DocInfo::convertProperty('1', 'bool')); $this->assertEquals('1', DocInfo::convertProperty('1', 'array')); $this->assertEquals('1', DocInfo::convertProperty('1', '')); - - $this->assertEquals( - DocInfo::PROPERTY_TYPE_INTEGER, - DocInfo::convertPropertyType('int') - ); - $this->assertEquals( - DocInfo::PROPERTY_TYPE_INTEGER, - DocInfo::convertPropertyType('uint') - ); - $this->assertEquals( - DocInfo::PROPERTY_TYPE_FLOAT, - DocInfo::convertPropertyType('decimal') - ); - $this->assertEquals( - DocInfo::PROPERTY_TYPE_STRING, - DocInfo::convertPropertyType('lpstr') - ); - $this->assertEquals( - DocInfo::PROPERTY_TYPE_DATE, - DocInfo::convertPropertyType('date') - ); - $this->assertEquals( - DocInfo::PROPERTY_TYPE_BOOLEAN, - DocInfo::convertPropertyType('bool') - ); - $this->assertEquals( - DocInfo::PROPERTY_TYPE_UNKNOWN, - DocInfo::convertPropertyType('array') - ); - $this->assertEquals( - DocInfo::PROPERTY_TYPE_UNKNOWN, - DocInfo::convertPropertyType('') - ); + $this->assertEquals(DocInfo::PROPERTY_TYPE_INTEGER, DocInfo::convertPropertyType('int')); + $this->assertEquals(DocInfo::PROPERTY_TYPE_INTEGER, DocInfo::convertPropertyType('uint')); + $this->assertEquals(DocInfo::PROPERTY_TYPE_FLOAT, DocInfo::convertPropertyType('decimal')); + $this->assertEquals(DocInfo::PROPERTY_TYPE_STRING, DocInfo::convertPropertyType('lpstr')); + $this->assertEquals(DocInfo::PROPERTY_TYPE_DATE, DocInfo::convertPropertyType('date')); + $this->assertEquals(DocInfo::PROPERTY_TYPE_BOOLEAN, DocInfo::convertPropertyType('bool')); + $this->assertEquals(DocInfo::PROPERTY_TYPE_UNKNOWN, DocInfo::convertPropertyType('array')); + $this->assertEquals(DocInfo::PROPERTY_TYPE_UNKNOWN, DocInfo::convertPropertyType('')); } } diff --git a/tests/PhpWord/Tests/PhpWordTest.php b/tests/PhpWord/Tests/PhpWordTest.php index 85c6a7f291..7fdbd689a6 100644 --- a/tests/PhpWord/Tests/PhpWordTest.php +++ b/tests/PhpWord/Tests/PhpWordTest.php @@ -124,7 +124,7 @@ public function testAddTitleStyle() */ public function testLoadTemplate() { - $templateFqfn = __DIR__ . "/_files/templates/blank.docx"; + $templateFqfn = __DIR__ . '/_files/templates/blank.docx'; $phpWord = new PhpWord(); $this->assertInstanceOf( diff --git a/tests/PhpWord/Tests/SettingsTest.php b/tests/PhpWord/Tests/SettingsTest.php index 0d3d66aecc..fb9b602354 100644 --- a/tests/PhpWord/Tests/SettingsTest.php +++ b/tests/PhpWord/Tests/SettingsTest.php @@ -122,8 +122,8 @@ public function testSetGetDefaultFontSize() public function testLoadConfig() { $expected = array( - 'compatibility' => true, - 'zipClass' => 'ZipArchive', + 'compatibility' => true, + 'zipClass' => 'ZipArchive', 'pdfRendererName' => 'DomPDF', 'pdfRendererPath' => '', 'defaultFontName' => 'Arial', diff --git a/tests/PhpWord/Tests/Shared/HtmlTest.php b/tests/PhpWord/Tests/Shared/HtmlTest.php index c4c0fc9d5a..de746e8200 100644 --- a/tests/PhpWord/Tests/Shared/HtmlTest.php +++ b/tests/PhpWord/Tests/Shared/HtmlTest.php @@ -43,8 +43,8 @@ public function testAddHtml() } // Styles - $content .= '

'; + $content .= '

'; foreach ($styles as $style) { $content .= "<{$style}>{$style}"; } diff --git a/tests/PhpWord/Tests/Shared/XMLReaderTest.php b/tests/PhpWord/Tests/Shared/XMLReaderTest.php index 2bb6ef658d..e82f475af6 100644 --- a/tests/PhpWord/Tests/Shared/XMLReaderTest.php +++ b/tests/PhpWord/Tests/Shared/XMLReaderTest.php @@ -35,7 +35,7 @@ class XMLReaderTest extends \PHPUnit_Framework_TestCase */ public function testGetDomFromZipException() { - $filename = __DIR__ . "/../_files/documents/foo.zip"; + $filename = __DIR__ . '/../_files/documents/foo.zip'; $object = new XMLReader(); $object->getDomFromZip($filename, 'yadayadaya'); } @@ -45,7 +45,7 @@ public function testGetDomFromZipException() */ public function testGetDomFromZipReturnsFalse() { - $filename = __DIR__ . "/../_files/documents/reader.docx.zip"; + $filename = __DIR__ . '/../_files/documents/reader.docx.zip'; $object = new XMLReader(); $this->assertFalse($object->getDomFromZip($filename, 'yadayadaya')); } @@ -64,7 +64,7 @@ public function testGetElementsReturnsEmpty() */ public function testGetElementReturnsNull() { - $filename = __DIR__ . "/../_files/documents/reader.docx.zip"; + $filename = __DIR__ . '/../_files/documents/reader.docx.zip'; $object = new XMLReader(); $object->getDomFromZip($filename, '[Content_Types].xml'); diff --git a/tests/PhpWord/Tests/Shared/ZipArchiveTest.php b/tests/PhpWord/Tests/Shared/ZipArchiveTest.php index 11a0d9a33c..fa407c2ac1 100644 --- a/tests/PhpWord/Tests/Shared/ZipArchiveTest.php +++ b/tests/PhpWord/Tests/Shared/ZipArchiveTest.php @@ -67,10 +67,10 @@ public function testCloseException() public function testZipArchive($zipClass = 'ZipArchive') { // Preparation - $existingFile = __DIR__ . "/../_files/documents/sheet.xls"; - $zipFile = __DIR__ . "/../_files/documents/ziptest.zip"; - $destination1 = __DIR__ . "/../_files/documents/extract1"; - $destination2 = __DIR__ . "/../_files/documents/extract2"; + $existingFile = __DIR__ . '/../_files/documents/sheet.xls'; + $zipFile = __DIR__ . '/../_files/documents/ziptest.zip'; + $destination1 = __DIR__ . '/../_files/documents/extract1'; + $destination2 = __DIR__ . '/../_files/documents/extract2'; @mkdir($destination1); @mkdir($destination2); @@ -122,12 +122,12 @@ public function testPCLZip() private function deleteDir($dir) { foreach (scandir($dir) as $file) { - if ($file === '.' || $file === '..') { + if ('.' === $file || '..' === $file) { continue; - } elseif (is_file($dir . "/" . $file)) { - unlink($dir . "/" . $file); - } elseif (is_dir($dir . "/" . $file)) { - $this->deleteDir($dir . "/" . $file); + } elseif (is_file($dir . '/' . $file)) { + unlink($dir . '/' . $file); + } elseif (is_dir($dir . '/' . $file)) { + $this->deleteDir($dir . '/' . $file); } } diff --git a/tests/PhpWord/Tests/Style/AbstractStyleTest.php b/tests/PhpWord/Tests/Style/AbstractStyleTest.php index d35e109076..946e1f1539 100644 --- a/tests/PhpWord/Tests/Style/AbstractStyleTest.php +++ b/tests/PhpWord/Tests/Style/AbstractStyleTest.php @@ -42,7 +42,7 @@ public function testSetValNormal() { $stub = $this->getMockForAbstractClass('\PhpOffice\PhpWord\Style\AbstractStyle'); - $this->assertEquals(true, self::callProtectedMethod($stub, 'setBoolVal', array(true, false))); + $this->assertTrue(self::callProtectedMethod($stub, 'setBoolVal', array(true, false))); $this->assertEquals(12, self::callProtectedMethod($stub, 'setIntVal', array(12, 200))); $this->assertEquals(871.1, self::callProtectedMethod($stub, 'setFloatVal', array(871.1, 2.1))); $this->assertEquals(871.1, self::callProtectedMethod($stub, 'setFloatVal', array('871.1', 2.1))); @@ -56,6 +56,7 @@ public function testSetValDefault() { $stub = $this->getMockForAbstractClass('\PhpOffice\PhpWord\Style\AbstractStyle'); + // todo: change to assertNotTrue when got upgraded to PHPUnit 4.x $this->assertEquals(false, self::callProtectedMethod($stub, 'setBoolVal', array('a', false))); $this->assertEquals(200, self::callProtectedMethod($stub, 'setIntVal', array('foo', 200))); $this->assertEquals(2.1, self::callProtectedMethod($stub, 'setFloatVal', array('foo', 2.1))); diff --git a/tests/PhpWord/Tests/Style/CellTest.php b/tests/PhpWord/Tests/Style/CellTest.php index f913172806..4f058f0cd1 100644 --- a/tests/PhpWord/Tests/Style/CellTest.php +++ b/tests/PhpWord/Tests/Style/CellTest.php @@ -35,19 +35,19 @@ public function testSetGetNormal() $object = new Cell(); $attributes = array( - 'valign' => Cell::VALIGN_TOP, - 'textDirection' => Cell::TEXT_DIR_BTLR, - 'bgColor' => 'FFFF00', - 'borderTopSize' => 120, - 'borderTopColor' => 'FFFF00', - 'borderLeftSize' => 120, - 'borderLeftColor' => 'FFFF00', - 'borderRightSize' => 120, - 'borderRightColor' => 'FFFF00', - 'borderBottomSize' => 120, + 'valign' => Cell::VALIGN_TOP, + 'textDirection' => Cell::TEXT_DIR_BTLR, + 'bgColor' => 'FFFF00', + 'borderTopSize' => 120, + 'borderTopColor' => 'FFFF00', + 'borderLeftSize' => 120, + 'borderLeftColor' => 'FFFF00', + 'borderRightSize' => 120, + 'borderRightColor' => 'FFFF00', + 'borderBottomSize' => 120, 'borderBottomColor' => 'FFFF00', - 'gridSpan' => 2, - 'vMerge' => Cell::VMERGE_RESTART, + 'gridSpan' => 2, + 'vMerge' => Cell::VMERGE_RESTART, ); foreach ($attributes as $key => $value) { $set = "set{$key}"; diff --git a/tests/PhpWord/Tests/Style/FontTest.php b/tests/PhpWord/Tests/Style/FontTest.php index c21ea4ce3e..23b2eae4de 100644 --- a/tests/PhpWord/Tests/Style/FontTest.php +++ b/tests/PhpWord/Tests/Style/FontTest.php @@ -18,7 +18,6 @@ namespace PhpOffice\PhpWord\Tests\Style; use PhpOffice\PhpWord\PhpWord; -use PhpOffice\PhpWord\Settings; use PhpOffice\PhpWord\Style\Font; use PhpOffice\PhpWord\Tests\TestHelperDOCX; @@ -42,9 +41,9 @@ public function tearDown() */ public function testInitiation() { - $object = new Font('text', array('align' => 'both')); + $object = new Font(htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), array('align' => 'both')); - $this->assertEquals('text', $object->getStyleType()); + $this->assertEquals(htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), $object->getStyleType()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Paragraph', $object->getParagraphStyle()); $this->assertTrue(is_array($object->getStyleValues())); } @@ -57,31 +56,31 @@ public function testSetStyleValueWithNullOrEmpty() $object = new Font(); $attributes = array( - 'name' => null, - 'size' => null, - 'hint' => null, - 'color' => null, - 'bold' => false, - 'italic' => false, - 'underline' => Font::UNDERLINE_NONE, - 'superScript' => false, - 'subScript' => false, - 'strikethrough' => false, + 'name' => null, + 'size' => null, + 'hint' => null, + 'color' => null, + 'bold' => false, + 'italic' => false, + 'underline' => Font::UNDERLINE_NONE, + 'superScript' => false, + 'subScript' => false, + 'strikethrough' => false, 'doubleStrikethrough' => false, - 'smallCaps' => false, - 'allCaps' => false, - 'fgColor' => null, - 'bgColor' => null, - 'scale' => null, - 'spacing' => null, - 'kerning' => null, + 'smallCaps' => false, + 'allCaps' => false, + 'fgColor' => null, + 'bgColor' => null, + 'scale' => null, + 'spacing' => null, + 'kerning' => null, ); foreach ($attributes as $key => $default) { $get = is_bool($default) ? "is{$key}" : "get{$key}"; $this->assertEquals($default, $object->$get()); - $object->setStyleValue("$key", null); + $object->setStyleValue($key, null); $this->assertEquals($default, $object->$get()); - $object->setStyleValue("$key", ''); + $object->setStyleValue($key, ''); $this->assertEquals($default, $object->$get()); } } @@ -94,25 +93,25 @@ public function testSetStyleValueNormal() $object = new Font(); $attributes = array( - 'name' => 'Times New Roman', - 'size' => 9, - 'color' => '999999', - 'hint' => 'eastAsia', - 'bold' => true, - 'italic' => true, - 'underline' => Font::UNDERLINE_HEAVY, - 'superScript' => true, - 'subScript' => false, - 'strikethrough' => true, + 'name' => 'Times New Roman', + 'size' => 9, + 'color' => '999999', + 'hint' => 'eastAsia', + 'bold' => true, + 'italic' => true, + 'underline' => Font::UNDERLINE_HEAVY, + 'superScript' => true, + 'subScript' => false, + 'strikethrough' => true, 'doubleStrikethrough' => false, - 'smallCaps' => true, - 'allCaps' => false, - 'fgColor' => Font::FGCOLOR_YELLOW, - 'bgColor' => 'FFFF00', - 'lineHeight' => 2, - 'scale' => 150, - 'spacing' => 240, - 'kerning' => 10, + 'smallCaps' => true, + 'allCaps' => false, + 'fgColor' => Font::FGCOLOR_YELLOW, + 'bgColor' => 'FFFF00', + 'lineHeight' => 2, + 'scale' => 150, + 'spacing' => 240, + 'kerning' => 10, ); $object->setStyleByArray($attributes); foreach ($attributes as $key => $value) { @@ -130,9 +129,7 @@ public function testLineHeight() $section = $phpWord->addSection(); // Test style array - $text = $section->addText('This is a test', array( - 'line-height' => 2.0 - )); + $text = $section->addText(htmlspecialchars('This is a test', ENT_COMPAT, 'UTF-8'), array('line-height' => 2.0)); $doc = TestHelperDOCX::getDocument($phpWord); $element = $doc->getElement('/w:document/w:body/w:p/w:pPr/w:spacing'); diff --git a/tests/PhpWord/Tests/Style/ImageTest.php b/tests/PhpWord/Tests/Style/ImageTest.php index 1a679da3a2..08ec9a99c5 100644 --- a/tests/PhpWord/Tests/Style/ImageTest.php +++ b/tests/PhpWord/Tests/Style/ImageTest.php @@ -35,12 +35,12 @@ public function testSetGetNormal() $object = new Image(); $properties = array( - 'width' => 200, - 'height' => 200, - 'align' => 'left', - 'marginTop' => 240, - 'marginLeft' => 240, - 'wrappingStyle' => 'inline' + 'width' => 200, + 'height' => 200, + 'align' => 'left', + 'marginTop' => 240, + 'marginLeft' => 240, + 'wrappingStyle' => 'inline', ); foreach ($properties as $key => $value) { $set = "set{$key}"; @@ -58,16 +58,16 @@ public function testSetStyleValue() $object = new Image(); $properties = array( - 'width' => 200, - 'height' => 200, - 'align' => 'left', - 'marginTop' => 240, - 'marginLeft' => 240, - 'positioning' => \PhpOffice\PhpWord\Style\Image::POSITION_ABSOLUTE, - 'posHorizontal' => \PhpOffice\PhpWord\Style\Image::POSITION_HORIZONTAL_CENTER, - 'posVertical' => \PhpOffice\PhpWord\Style\Image::POSITION_VERTICAL_TOP, + 'width' => 200, + 'height' => 200, + 'align' => 'left', + 'marginTop' => 240, + 'marginLeft' => 240, + 'positioning' => \PhpOffice\PhpWord\Style\Image::POSITION_ABSOLUTE, + 'posHorizontal' => \PhpOffice\PhpWord\Style\Image::POSITION_HORIZONTAL_CENTER, + 'posVertical' => \PhpOffice\PhpWord\Style\Image::POSITION_VERTICAL_TOP, 'posHorizontalRel' => \PhpOffice\PhpWord\Style\Image::POSITION_RELATIVE_TO_COLUMN, - 'posVerticalRel' => \PhpOffice\PhpWord\Style\Image::POSITION_RELATIVE_TO_IMARGIN + 'posVerticalRel' => \PhpOffice\PhpWord\Style\Image::POSITION_RELATIVE_TO_IMARGIN, ); foreach ($properties as $key => $value) { $get = "get{$key}"; diff --git a/tests/PhpWord/Tests/Style/IndentationTest.php b/tests/PhpWord/Tests/Style/IndentationTest.php index d0e88f2cb2..9c997c3876 100644 --- a/tests/PhpWord/Tests/Style/IndentationTest.php +++ b/tests/PhpWord/Tests/Style/IndentationTest.php @@ -33,10 +33,10 @@ public function testGetSetProperties() { $object = new Indentation(); $properties = array( - 'left' => array(0, 10), - 'right' => array(0, 10), + 'left' => array(0, 10), + 'right' => array(0, 10), 'firstLine' => array(null, 20), - 'hanging' => array(null, 20), + 'hanging' => array(null, 20), ); foreach ($properties as $property => $value) { list($default, $expected) = $value; diff --git a/tests/PhpWord/Tests/Style/LineNumberingTest.php b/tests/PhpWord/Tests/Style/LineNumberingTest.php index bc4dc603f3..5b8e3f9e94 100644 --- a/tests/PhpWord/Tests/Style/LineNumberingTest.php +++ b/tests/PhpWord/Tests/Style/LineNumberingTest.php @@ -33,10 +33,10 @@ public function testGetSetProperties() { $object = new LineNumbering(); $properties = array( - 'start' => array(1, 2), + 'start' => array(1, 2), 'increment' => array(1, 10), - 'distance' => array(null, 10), - 'restart' => array(null, 'continuous'), + 'distance' => array(null, 10), + 'restart' => array(null, 'continuous'), ); foreach ($properties as $property => $value) { list($default, $expected) = $value; diff --git a/tests/PhpWord/Tests/Style/LineTest.php b/tests/PhpWord/Tests/Style/LineTest.php index 02d5ba16a2..a574120dc0 100644 --- a/tests/PhpWord/Tests/Style/LineTest.php +++ b/tests/PhpWord/Tests/Style/LineTest.php @@ -36,11 +36,11 @@ public function testSetGetNormal() $properties = array( 'connectorType' => \PhpOffice\PhpWord\Style\Line::CONNECTOR_TYPE_STRAIGHT, - 'beginArrow' => \PhpOffice\PhpWord\Style\Line::ARROW_STYLE_BLOCK, - 'endArrow' => \PhpOffice\PhpWord\Style\Line::ARROW_STYLE_OVAL, - 'dash' => \PhpOffice\PhpWord\Style\Line::DASH_STYLE_LONG_DASH_DOT_DOT, - 'weight' => 10, - 'color' => 'red' + 'beginArrow' => \PhpOffice\PhpWord\Style\Line::ARROW_STYLE_BLOCK, + 'endArrow' => \PhpOffice\PhpWord\Style\Line::ARROW_STYLE_OVAL, + 'dash' => \PhpOffice\PhpWord\Style\Line::DASH_STYLE_LONG_DASH_DOT_DOT, + 'weight' => 10, + 'color' => 'red', ); foreach ($properties as $key => $value) { $set = "set{$key}"; @@ -59,11 +59,11 @@ public function testSetStyleValue() $properties = array( 'connectorType' => \PhpOffice\PhpWord\Style\Line::CONNECTOR_TYPE_STRAIGHT, - 'beginArrow' => \PhpOffice\PhpWord\Style\Line::ARROW_STYLE_BLOCK, - 'endArrow' => \PhpOffice\PhpWord\Style\Line::ARROW_STYLE_OVAL, - 'dash' => \PhpOffice\PhpWord\Style\Line::DASH_STYLE_LONG_DASH_DOT_DOT, - 'weight' => 10, - 'color' => 'red' + 'beginArrow' => \PhpOffice\PhpWord\Style\Line::ARROW_STYLE_BLOCK, + 'endArrow' => \PhpOffice\PhpWord\Style\Line::ARROW_STYLE_OVAL, + 'dash' => \PhpOffice\PhpWord\Style\Line::DASH_STYLE_LONG_DASH_DOT_DOT, + 'weight' => 10, + 'color' => 'red', ); foreach ($properties as $key => $value) { $get = "get{$key}"; @@ -71,13 +71,13 @@ public function testSetStyleValue() $this->assertEquals($value, $object->$get()); } } - + /** * Test set/get flip */ public function testSetGetFlip() { - $expected=true; + $expected = true; $object = new Line(); $object->setFlip($expected); $this->assertEquals($expected, $object->isFlip()); @@ -88,18 +88,18 @@ public function testSetGetFlip() */ public function testSetGetConnectorType() { - $expected=\PhpOffice\PhpWord\Style\Line::CONNECTOR_TYPE_STRAIGHT; + $expected = \PhpOffice\PhpWord\Style\Line::CONNECTOR_TYPE_STRAIGHT; $object = new Line(); $object->setConnectorType($expected); $this->assertEquals($expected, $object->getConnectorType()); } - + /** * Test set/get weight */ public function testSetGetWeight() { - $expected=10; + $expected = 10; $object = new Line(); $object->setWeight($expected); $this->assertEquals($expected, $object->getWeight()); @@ -110,7 +110,7 @@ public function testSetGetWeight() */ public function testSetGetColor() { - $expected='red'; + $expected = 'red'; $object = new Line(); $object->setColor($expected); $this->assertEquals($expected, $object->getColor()); @@ -121,7 +121,7 @@ public function testSetGetColor() */ public function testSetGetDash() { - $expected=\PhpOffice\PhpWord\Style\Line::DASH_STYLE_LONG_DASH_DOT_DOT; + $expected = \PhpOffice\PhpWord\Style\Line::DASH_STYLE_LONG_DASH_DOT_DOT; $object = new Line(); $object->setDash($expected); $this->assertEquals($expected, $object->getDash()); @@ -132,7 +132,7 @@ public function testSetGetDash() */ public function testSetGetBeginArrow() { - $expected=\PhpOffice\PhpWord\Style\Line::ARROW_STYLE_BLOCK; + $expected = \PhpOffice\PhpWord\Style\Line::ARROW_STYLE_BLOCK; $object = new Line(); $object->setBeginArrow($expected); $this->assertEquals($expected, $object->getBeginArrow()); @@ -143,7 +143,7 @@ public function testSetGetBeginArrow() */ public function testSetGetEndArrow() { - $expected=\PhpOffice\PhpWord\Style\Line::ARROW_STYLE_CLASSIC; + $expected = \PhpOffice\PhpWord\Style\Line::ARROW_STYLE_CLASSIC; $object = new Line(); $object->setEndArrow($expected); $this->assertEquals($expected, $object->getEndArrow()); diff --git a/tests/PhpWord/Tests/Style/NumberingLevelTest.php b/tests/PhpWord/Tests/Style/NumberingLevelTest.php index 8959a98317..69864bdcfd 100644 --- a/tests/PhpWord/Tests/Style/NumberingLevelTest.php +++ b/tests/PhpWord/Tests/Style/NumberingLevelTest.php @@ -34,19 +34,19 @@ public function testSetGetNormal() $object = new NumberingLevel(); $attributes = array( - 'level' => 1, - 'start' => 1, - 'format' => 'decimal', + 'level' => 1, + 'start' => 1, + 'format' => 'decimal', 'restart' => 1, - 'pStyle' => 'pStyle', - 'suffix' => 'space', - 'text' => '%1.', - 'align' => 'left', - 'left' => 360, + 'pStyle' => 'pStyle', + 'suffix' => 'space', + 'text' => '%1.', + 'align' => 'left', + 'left' => 360, 'hanging' => 360, - 'tabPos' => 360, - 'font' => 'Arial', - 'hint' => 'default', + 'tabPos' => 360, + 'font' => 'Arial', + 'hint' => 'default', ); foreach ($attributes as $key => $value) { $set = "set{$key}"; diff --git a/tests/PhpWord/Tests/Style/NumberingTest.php b/tests/PhpWord/Tests/Style/NumberingTest.php index e15753576b..ca7f0cb013 100644 --- a/tests/PhpWord/Tests/Style/NumberingTest.php +++ b/tests/PhpWord/Tests/Style/NumberingTest.php @@ -33,8 +33,8 @@ public function testGetSetProperties() { $this->object = new Numbering(); $this->properties = array( - 'numId' => array(null, 1), - 'type' => array(null, 'singleLevel'), + 'numId' => array(null, 1), + 'type' => array(null, 'singleLevel'), ); foreach ($this->properties as $property => $value) { list($default, $expected) = $value; diff --git a/tests/PhpWord/Tests/Style/ParagraphTest.php b/tests/PhpWord/Tests/Style/ParagraphTest.php index 73540b0c7b..48d4717202 100644 --- a/tests/PhpWord/Tests/Style/ParagraphTest.php +++ b/tests/PhpWord/Tests/Style/ParagraphTest.php @@ -45,16 +45,16 @@ public function testSetStyleValueWithNullOrEmpty() $object = new Paragraph(); $attributes = array( - 'widowControl' => true, - 'keepNext' => false, - 'keepLines' => false, + 'widowControl' => true, + 'keepNext' => false, + 'keepLines' => false, 'pageBreakBefore' => false, ); foreach ($attributes as $key => $default) { $get = "get{$key}"; - $object->setStyleValue("$key", null); + $object->setStyleValue($key, null); $this->assertEquals($default, $object->$get()); - $object->setStyleValue("$key", ''); + $object->setStyleValue($key, ''); $this->assertEquals($default, $object->$get()); } } @@ -67,31 +67,31 @@ public function testSetStyleValueNormal() $object = new Paragraph(); $attributes = array( - 'align' => 'justify', - 'spaceAfter' => 240, - 'spaceBefore' => 240, - 'indent' => 1, - 'hanging' => 1, - 'spacing' => 120, - 'basedOn' => 'Normal', - 'next' => 'Normal', - 'numStyle' => 'numStyle', - 'numLevel' => 1, - 'widowControl' => false, - 'keepNext' => true, - 'keepLines' => true, + 'align' => 'justify', + 'spaceAfter' => 240, + 'spaceBefore' => 240, + 'indent' => 1, + 'hanging' => 1, + 'spacing' => 120, + 'basedOn' => 'Normal', + 'next' => 'Normal', + 'numStyle' => 'numStyle', + 'numLevel' => 1, + 'widowControl' => false, + 'keepNext' => true, + 'keepLines' => true, 'pageBreakBefore' => true, ); foreach ($attributes as $key => $value) { $get = "get{$key}"; $object->setStyleValue("$key", $value); - if ($key == 'align') { - if ($value == 'justify') { + if ('align' == $key) { + if ('justify' == $value) { $value = 'both'; } - } elseif ($key == 'indent' || $key == 'hanging') { + } elseif ('indent' == $key || 'hanging' == $key) { $value = $value * 720; - } elseif ($key == 'spacing') { + } elseif ('spacing' == $key) { $value += 240; } $this->assertEquals($value, $object->$get()); @@ -131,9 +131,7 @@ public function testLineHeight() $section = $phpWord->addSection(); // Test style array - $text = $section->addText('This is a test', array(), array( - 'line-height' => 2.0 - )); + $text = $section->addText(htmlspecialchars('This is a test', ENT_COMPAT, 'UTF-8'), array(), array('line-height' => 2.0)); $doc = TestHelperDOCX::getDocument($phpWord); $element = $doc->getElement('/w:document/w:body/w:p/w:pPr/w:spacing'); diff --git a/tests/PhpWord/Tests/Style/RowTest.php b/tests/PhpWord/Tests/Style/RowTest.php index 679e9982a3..757dbadbb6 100644 --- a/tests/PhpWord/Tests/Style/RowTest.php +++ b/tests/PhpWord/Tests/Style/RowTest.php @@ -35,8 +35,8 @@ public function testBooleanValue() $object = new Row(); $properties = array( - 'tblHeader' => true, - 'cantSplit' => false, + 'tblHeader' => true, + 'cantSplit' => false, 'exactHeight' => true, ); foreach ($properties as $key => $value) { @@ -63,8 +63,8 @@ public function testNonBooleanValue() $object = new Row(); $properties = array( - 'tblHeader' => 'a', - 'cantSplit' => 'b', + 'tblHeader' => 'a', + 'cantSplit' => 'b', 'exactHeight' => 'c', ); foreach ($properties as $key => $value) { diff --git a/tests/PhpWord/Tests/Style/SectionTest.php b/tests/PhpWord/Tests/Style/SectionTest.php index e5becd7296..10e406051b 100644 --- a/tests/PhpWord/Tests/Style/SectionTest.php +++ b/tests/PhpWord/Tests/Style/SectionTest.php @@ -64,8 +64,15 @@ public function testSettingValue() $this->assertEquals($iVal, $oSettings->getHeaderHeight()); $oSettings->setSettingValue('lineNumbering', array()); - $oSettings->setSettingValue('lineNumbering', array('start' => 1, 'increment' => 1, - 'distance' => 240, 'restart' => 'newPage')); + $oSettings->setSettingValue( + 'lineNumbering', + array( + 'start' => 1, + 'increment' => 1, + 'distance' => 240, + 'restart' => 'newPage', + ) + ); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\LineNumbering', $oSettings->getLineNumbering()); $oSettings->setSettingValue('lineNumbering', null); diff --git a/tests/PhpWord/Tests/Style/SpacingTest.php b/tests/PhpWord/Tests/Style/SpacingTest.php index a4022b74bd..30b1ccce1e 100644 --- a/tests/PhpWord/Tests/Style/SpacingTest.php +++ b/tests/PhpWord/Tests/Style/SpacingTest.php @@ -34,9 +34,9 @@ public function testGetSetProperties() $object = new Spacing(); $properties = array( 'before' => array(null, 10), - 'after' => array(null, 10), - 'line' => array(null, 10), - 'rule' => array('auto', 'exact'), + 'after' => array(null, 10), + 'line' => array(null, 10), + 'rule' => array('auto', 'exact'), ); foreach ($properties as $property => $value) { list($default, $expected) = $value; diff --git a/tests/PhpWord/Tests/Style/TableTest.php b/tests/PhpWord/Tests/Style/TableTest.php index 2afbab744a..e63d86786e 100644 --- a/tests/PhpWord/Tests/Style/TableTest.php +++ b/tests/PhpWord/Tests/Style/TableTest.php @@ -57,26 +57,26 @@ public function testSetGetNormal() $object = new Table(); $attributes = array( - 'bgColor' => 'FF0000', - 'borderTopSize' => 4, - 'borderTopColor' => 'FF0000', - 'borderLeftSize' => 4, - 'borderLeftColor' => 'FF0000', - 'borderRightSize' => 4, - 'borderRightColor' => 'FF0000', - 'borderBottomSize' => 4, - 'borderBottomColor' => 'FF0000', - 'borderInsideHSize' => 4, + 'bgColor' => 'FF0000', + 'borderTopSize' => 4, + 'borderTopColor' => 'FF0000', + 'borderLeftSize' => 4, + 'borderLeftColor' => 'FF0000', + 'borderRightSize' => 4, + 'borderRightColor' => 'FF0000', + 'borderBottomSize' => 4, + 'borderBottomColor' => 'FF0000', + 'borderInsideHSize' => 4, 'borderInsideHColor' => 'FF0000', - 'borderInsideVSize' => 4, + 'borderInsideVSize' => 4, 'borderInsideVColor' => 'FF0000', - 'cellMarginTop' => 240, - 'cellMarginLeft' => 240, - 'cellMarginRight' => 240, - 'cellMarginBottom' => 240, - 'align' => 'center', - 'width' => 100, - 'unit' => 'pct', + 'cellMarginTop' => 240, + 'cellMarginLeft' => 240, + 'cellMarginRight' => 240, + 'cellMarginBottom' => 240, + 'align' => 'center', + 'width' => 100, + 'unit' => 'pct', ); foreach ($attributes as $key => $value) { $set = "set{$key}"; @@ -162,14 +162,8 @@ public function testSetStyleValue() $object->setStyleValue('cellMargin', 240); $object->setStyleValue('borderColor', '999999'); - $this->assertEquals( - array(120, 120, 120, 120, 120, 120), - $object->getBorderSize() - ); - $this->assertEquals( - array(240, 240, 240, 240), - $object->getCellMargin() - ); + $this->assertEquals(array(120, 120, 120, 120, 120, 120), $object->getBorderSize()); + $this->assertEquals(array(240, 240, 240, 240), $object->getCellMargin()); $this->assertEquals( array('999999', '999999', '999999', '999999', '999999', '999999'), $object->getBorderColor() diff --git a/tests/PhpWord/Tests/Style/TextBoxTest.php b/tests/PhpWord/Tests/Style/TextBoxTest.php index cd2d86958d..eb1a31a4d3 100644 --- a/tests/PhpWord/Tests/Style/TextBoxTest.php +++ b/tests/PhpWord/Tests/Style/TextBoxTest.php @@ -33,25 +33,25 @@ class TextBoxTest extends \PHPUnit_Framework_TestCase public function testSetGetNormal() { $object = new TextBox(); - + $properties = array( - 'width' => 200, - 'height' => 200, - 'align' => 'left', - 'marginTop' => 240, - 'marginLeft' => 240, - 'wrappingStyle' => 'inline', - 'positioning' => 'absolute', - 'posHorizontal' => 'center', - 'posVertical' => 'top', - 'posHorizontalRel' => 'margin', - 'posVerticalRel' => 'page', - 'innerMarginTop' => '5', - 'innerMarginRight' => '5', + 'width' => 200, + 'height' => 200, + 'align' => 'left', + 'marginTop' => 240, + 'marginLeft' => 240, + 'wrappingStyle' => 'inline', + 'positioning' => 'absolute', + 'posHorizontal' => 'center', + 'posVertical' => 'top', + 'posHorizontalRel' => 'margin', + 'posVerticalRel' => 'page', + 'innerMarginTop' => '5', + 'innerMarginRight' => '5', 'innerMarginBottom' => '5', - 'innerMarginLeft' => '5', - 'borderSize' => '2', - 'borderColor' => 'red' + 'innerMarginLeft' => '5', + 'borderSize' => '2', + 'borderColor' => 'red', ); foreach ($properties as $key => $value) { $set = "set{$key}"; @@ -60,32 +60,32 @@ public function testSetGetNormal() $this->assertEquals($value, $object->$get()); } } - + /** * Test setStyleValue method */ public function testSetStyleValue() { $object = new TextBox(); - + $properties = array( - 'width' => 200, - 'height' => 200, - 'align' => 'left', - 'marginTop' => 240, - 'marginLeft' => 240, - 'wrappingStyle' => 'inline', - 'positioning' => 'absolute', - 'posHorizontal' => 'center', - 'posVertical' => 'top', - 'posHorizontalRel' => 'margin', - 'posVerticalRel' => 'page', - 'innerMarginTop' => '5', - 'innerMarginRight' => '5', + 'width' => 200, + 'height' => 200, + 'align' => 'left', + 'marginTop' => 240, + 'marginLeft' => 240, + 'wrappingStyle' => 'inline', + 'positioning' => 'absolute', + 'posHorizontal' => 'center', + 'posVertical' => 'top', + 'posHorizontalRel' => 'margin', + 'posVerticalRel' => 'page', + 'innerMarginTop' => '5', + 'innerMarginRight' => '5', 'innerMarginBottom' => '5', - 'innerMarginLeft' => '5', - 'borderSize' => '2', - 'borderColor' => 'red' + 'innerMarginLeft' => '5', + 'borderSize' => '2', + 'borderColor' => 'red', ); foreach ($properties as $key => $value) { $get = "get{$key}"; @@ -93,7 +93,7 @@ public function testSetStyleValue() $this->assertEquals($value, $object->$get()); } } - + /** * Test setWrappingStyle exception * @@ -104,35 +104,35 @@ public function testSetWrappingStyleException() $object = new TextBox(); $object->setWrappingStyle('foo'); } - + /** * Test set/get width */ public function testSetGetWidth() { - $expected=200; + $expected = 200; $object = new TextBox(); $object->setWidth($expected); $this->assertEquals($expected, $object->getWidth()); } - + /** * Test set/get height */ public function testSetGetHeight() { - $expected=200; + $expected = 200; $object = new TextBox(); $object->setHeight($expected); $this->assertEquals($expected, $object->getHeight()); } - + /** * Test set/get height */ public function testSetGetAlign() { - $expected='left'; + $expected = 'left'; $object = new TextBox(); $object->setAlign($expected); $this->assertEquals($expected, $object->getAlign()); @@ -143,28 +143,29 @@ public function testSetGetAlign() */ public function testSetGetMarginTop() { - $expected=5; + $expected = 5; $object = new TextBox(); $object->setMarginTop($expected); $this->assertEquals($expected, $object->getMarginTop()); } - + /** * Test set/get marginLeft */ public function testSetGetMarginLeft() { - $expected=5; + $expected = 5; $object = new TextBox(); $object->setMarginLeft($expected); $this->assertEquals($expected, $object->getMarginLeft()); } + /** * Test set/get innerMarginTop */ public function testSetGetInnerMarginTop() { - $expected=5; + $expected = 5; $object = new TextBox(); $object->setInnerMarginTop($expected); $this->assertEquals($expected, $object->getInnerMarginTop()); @@ -175,96 +176,96 @@ public function testSetGetInnerMarginTop() */ public function testSetGetWrappingStyle() { - $expected='inline'; + $expected = 'inline'; $object = new TextBox(); $object->setWrappingStyle($expected); $this->assertEquals($expected, $object->getWrappingStyle()); } - + /** * Test set/get positioning */ public function testSetGetPositioning() { - $expected='absolute'; + $expected = 'absolute'; $object = new TextBox(); $object->setPositioning($expected); $this->assertEquals($expected, $object->getPositioning()); } - + /** * Test set/get posHorizontal */ public function testSetGetPosHorizontal() { - $expected='center'; + $expected = 'center'; $object = new TextBox(); $object->setPosHorizontal($expected); $this->assertEquals($expected, $object->getPosHorizontal()); } - + /** * Test set/get posVertical */ public function testSetGetPosVertical() { - $expected='top'; + $expected = 'top'; $object = new TextBox(); $object->setPosVertical($expected); $this->assertEquals($expected, $object->getPosVertical()); } - + /** * Test set/get posHorizontalRel */ public function testSetGetPosHorizontalRel() { - $expected='margin'; + $expected = 'margin'; $object = new TextBox(); $object->setPosHorizontalRel($expected); $this->assertEquals($expected, $object->getPosHorizontalRel()); } - + /** * Test set/get posVerticalRel */ public function testSetGetPosVerticalRel() { - $expected='page'; + $expected = 'page'; $object = new TextBox(); $object->setPosVerticalRel($expected); $this->assertEquals($expected, $object->getPosVerticalRel()); } - - + + /** * Test set/get innerMarginRight */ public function testSetGetInnerMarginRight() { - $expected=5; + $expected = 5; $object = new TextBox(); $object->setInnerMarginRight($expected); $this->assertEquals($expected, $object->getInnerMarginRight()); } - + /** * Test set/get innerMarginBottom */ public function testSetGetInnerMarginBottom() { - $expected=5; + $expected = 5; $object = new TextBox(); $object->setInnerMarginBottom($expected); $this->assertEquals($expected, $object->getInnerMarginBottom()); } - + /** * Test set/get innerMarginLeft */ public function testSetGetInnerMarginLeft() { - $expected=5; + $expected = 5; $object = new TextBox(); $object->setInnerMarginLeft($expected); $this->assertEquals($expected, $object->getInnerMarginLeft()); @@ -275,7 +276,7 @@ public function testSetGetInnerMarginLeft() */ public function testSetGetInnerMargin() { - $expected=5; + $expected = 5; $object = new TextBox(); $object->setInnerMargin($expected); $this->assertEquals(array($expected, $expected, $expected, $expected), $object->getInnerMargin()); @@ -286,18 +287,18 @@ public function testSetGetInnerMargin() */ public function testSetGetBorderSize() { - $expected=2; + $expected = 2; $object = new TextBox(); $object->setBorderSize($expected); $this->assertEquals($expected, $object->getBorderSize()); } - + /** * Test set/get borderColor */ public function testSetGetBorderColor() { - $expected='red'; + $expected = 'red'; $object = new TextBox(); $object->setBorderColor($expected); $this->assertEquals($expected, $object->getBorderColor()); diff --git a/tests/PhpWord/Tests/StyleTest.php b/tests/PhpWord/Tests/StyleTest.php index 6165e4fd3b..261de31cb2 100644 --- a/tests/PhpWord/Tests/StyleTest.php +++ b/tests/PhpWord/Tests/StyleTest.php @@ -86,6 +86,6 @@ public function testDefaultParagraphStyle() Style::setDefaultParagraphStyle($paragraph); - $this->assertInstanceOf("PhpOffice\\PhpWord\\Style\\Paragraph", Style::getStyle('Normal')); + $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Paragraph', Style::getStyle('Normal')); } } diff --git a/tests/PhpWord/Tests/TemplateProcessorTest.php b/tests/PhpWord/Tests/TemplateProcessorTest.php index 04d1e77715..69b4f99821 100644 --- a/tests/PhpWord/Tests/TemplateProcessorTest.php +++ b/tests/PhpWord/Tests/TemplateProcessorTest.php @@ -51,14 +51,14 @@ final public function testTemplateCanBeSavedInTemporaryLocation() $templateZip = new \ZipArchive(); $templateZip->open($templateFqfn); $templateXml = $templateZip->getFromName('word/document.xml'); - if ($templateZip->close() === false) { + if (false === $templateZip->close()) { throw new \Exception("Could not close zip file \"{$templateZip}\"."); } $documentZip = new \ZipArchive(); $documentZip->open($documentFqfn); $documentXml = $documentZip->getFromName('word/document.xml'); - if ($documentZip->close() === false) { + if (false === $documentZip->close()) { throw new \Exception("Could not close zip file \"{$documentZip}\"."); } @@ -78,19 +78,19 @@ final public function testTemplateCanBeSavedInTemporaryLocation() */ final public function testXslStyleSheetCanBeApplied($actualDocumentFqfn) { - $expectedDocumentFqfn = __DIR__ . "/_files/documents/without_table_macros.docx"; + $expectedDocumentFqfn = __DIR__ . '/_files/documents/without_table_macros.docx'; $actualDocumentZip = new \ZipArchive(); $actualDocumentZip->open($actualDocumentFqfn); $actualDocumentXml = $actualDocumentZip->getFromName('word/document.xml'); - if ($actualDocumentZip->close() === false) { + if (false === $actualDocumentZip->close()) { throw new \Exception("Could not close zip file \"{$actualDocumentFqfn}\"."); } $expectedDocumentZip = new \ZipArchive(); $expectedDocumentZip->open($expectedDocumentFqfn); $expectedDocumentXml = $expectedDocumentZip->getFromName('word/document.xml'); - if ($expectedDocumentZip->close() === false) { + if (false === $expectedDocumentZip->close()) { throw new \Exception("Could not close zip file \"{$expectedDocumentFqfn}\"."); } @@ -116,7 +116,7 @@ final public function testXslStyleSheetCanNotBeAppliedOnFailureOfSettingParamete * We have to use error control below, because \XSLTProcessor::setParameter omits warning on failure. * This warning fails the test. */ - @$templateProcessor->applyXslStyleSheet($xslDOMDocument, array(1 => 'somevalue')); + @$templateProcessor->applyXslStyleSheet($xslDOMDocument, array(1 => htmlspecialchars('somevalue', ENT_COMPAT, 'UTF-8'))); } /** @@ -157,9 +157,9 @@ public function testCloneRow() ); $docName = 'clone-test-result.docx'; - $templateProcessor->setValue('tableHeader', utf8_decode('ééé')); + $templateProcessor->setValue('tableHeader', utf8_decode(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8'))); $templateProcessor->cloneRow('userId', 1); - $templateProcessor->setValue('userId#1', 'Test'); + $templateProcessor->setValue('userId#1', htmlspecialchars('Test', ENT_COMPAT, 'UTF-8')); $templateProcessor->saveAs($docName); $docFound = file_exists($docName); unlink($docName); @@ -181,9 +181,9 @@ public function testVariablesCanBeReplacedInHeaderAndFooter() ); $docName = 'header-footer-test-result.docx'; - $templateProcessor->setValue('headerValue', 'Header Value'); - $templateProcessor->setValue('documentContent', 'Document text.'); - $templateProcessor->setValue('footerValue', 'Footer Value'); + $templateProcessor->setValue('headerValue', htmlspecialchars('Header Value', ENT_COMPAT, 'UTF-8')); + $templateProcessor->setValue('documentContent', htmlspecialchars('Document text.', ENT_COMPAT, 'UTF-8')); + $templateProcessor->setValue('footerValue', htmlspecialchars('Footer Value', ENT_COMPAT, 'UTF-8')); $templateProcessor->saveAs($docName); $docFound = file_exists($docName); unlink($docName); diff --git a/tests/PhpWord/Tests/Writer/HTML/ElementTest.php b/tests/PhpWord/Tests/Writer/HTML/ElementTest.php index ae136d34d7..0c8dfa3e2a 100644 --- a/tests/PhpWord/Tests/Writer/HTML/ElementTest.php +++ b/tests/PhpWord/Tests/Writer/HTML/ElementTest.php @@ -17,8 +17,8 @@ namespace PhpOffice\PhpWord\Tests\Writer\HTML; use PhpOffice\PhpWord\Element\Text as TextElement; -use PhpOffice\PhpWord\Writer\HTML; use PhpOffice\PhpWord\Writer\HTML\Element\Text; +use PhpOffice\PhpWord\Writer\HTML; /** * Test class for PhpOffice\PhpWord\Writer\HTML\Element subnamespace @@ -46,11 +46,11 @@ public function testUnmatchedElements() */ public function testWriteTextElement() { - $object = new Text(new HTML(), new TextElement('A')); - $object->setOpeningText('-'); - $object->setClosingText('-'); + $object = new Text(new HTML(), new TextElement(htmlspecialchars('A', ENT_COMPAT, 'UTF-8'))); + $object->setOpeningText(htmlspecialchars('-', ENT_COMPAT, 'UTF-8')); + $object->setClosingText(htmlspecialchars('-', ENT_COMPAT, 'UTF-8')); $object->setWithoutP(true); - $this->assertEquals('-A-', $object->write()); + $this->assertEquals(htmlspecialchars('-A-', ENT_COMPAT, 'UTF-8'), $object->write()); } } diff --git a/tests/PhpWord/Tests/Writer/HTMLTest.php b/tests/PhpWord/Tests/Writer/HTMLTest.php index c3339d1a4f..7bdfc71085 100644 --- a/tests/PhpWord/Tests/Writer/HTMLTest.php +++ b/tests/PhpWord/Tests/Writer/HTMLTest.php @@ -53,29 +53,34 @@ public function testConstructWithNull() */ public function testSave() { - $localImage = __DIR__ . "/../_files/images/PhpWord.png"; + $localImage = __DIR__ . '/../_files/images/PhpWord.png'; $archiveImage = 'zip://' . __DIR__ . '/../_files/documents/reader.docx#word/media/image1.jpeg'; $gdImage = 'http://php.net/images/logos/php-med-trans-light.gif'; - $objectSrc = __DIR__ . "/../_files/documents/sheet.xls"; - $file = __DIR__ . "/../_files/temp.html"; + $objectSrc = __DIR__ . '/../_files/documents/sheet.xls'; + $file = __DIR__ . '/../_files/temp.html'; $phpWord = new PhpWord(); $docProps = $phpWord->getDocInfo(); - $docProps->setTitle('HTML Test'); + $docProps->setTitle(htmlspecialchars('HTML Test', ENT_COMPAT, 'UTF-8')); $phpWord->addTitleStyle(1, array('bold' => true)); - $phpWord->addFontStyle('Font', array('name' => 'Verdana', 'size' => 11, - 'color' => 'FF0000', 'fgColor' => 'FF0000')); + $phpWord->addFontStyle( + 'Font', + array('name' => 'Verdana', 'size' => 11, 'color' => 'FF0000', 'fgColor' => 'FF0000') + ); $phpWord->addParagraphStyle('Paragraph', array('align' => 'center', 'spaceAfter' => 20, 'spaceBefore' => 20)); $section = $phpWord->addSection(); - $section->addText('Test 1', 'Font', 'Paragraph'); + $section->addText(htmlspecialchars('Test 1', ENT_COMPAT, 'UTF-8'), 'Font', 'Paragraph'); $section->addTextBreak(); - $section->addText('Test 2', array('name' => 'Tahoma', 'bold' => true, 'italic' => true, 'subscript' => true)); - $section->addLink('http://test.com'); - $section->addTitle('Test', 1); + $section->addText( + htmlspecialchars('Test 2', ENT_COMPAT, 'UTF-8'), + array('name' => 'Tahoma', 'bold' => true, 'italic' => true, 'subscript' => true) + ); + $section->addLink('https://github.com/PHPOffice/PHPWord'); + $section->addTitle(htmlspecialchars('Test', ENT_COMPAT, 'UTF-8'), 1); $section->addPageBreak(); - $section->addListItem('Test'); + $section->addListItem(htmlspecialchars('Test', ENT_COMPAT, 'UTF-8')); $section->addImage($localImage); $section->addImage($archiveImage); $section->addImage($gdImage); @@ -86,24 +91,27 @@ public function testSave() $section = $phpWord->addSection(); $textrun = $section->addTextRun(array('align' => 'center')); - $textrun->addText('Test 3'); + $textrun->addText(htmlspecialchars('Test 3', ENT_COMPAT, 'UTF-8')); $textrun->addTextBreak(); $textrun = $section->addTextRun('Paragraph'); - $textrun->addLink('http://test.com'); + $textrun->addLink('https://github.com/PHPOffice/PHPWord'); $textrun->addImage($localImage); - $textrun->addFootnote()->addText('Footnote'); - $textrun->addEndnote()->addText('Endnote'); + $textrun->addFootnote()->addText(htmlspecialchars('Footnote', ENT_COMPAT, 'UTF-8')); + $textrun->addEndnote()->addText(htmlspecialchars('Endnote', ENT_COMPAT, 'UTF-8')); $section = $phpWord->addSection(); $table = $section->addTable(); $cell = $table->addRow()->addCell(); - $cell->addText('Test 1', array('superscript' => true, 'underline' => 'dash', 'strikethrough' => true)); + $cell->addText( + htmlspecialchars('Test 1', ENT_COMPAT, 'UTF-8'), + array('superscript' => true, 'underline' => 'dash', 'strikethrough' => true) + ); $cell->addTextRun(); - $cell->addLink('http://test.com'); + $cell->addLink('https://github.com/PHPOffice/PHPWord'); $cell->addTextBreak(); - $cell->addListItem('Test'); + $cell->addListItem(htmlspecialchars('Test', ENT_COMPAT, 'UTF-8')); $cell->addImage($localImage); $cell->addObject($objectSrc); $cell->addFootnote(); diff --git a/tests/PhpWord/Tests/Writer/ODText/Part/AbstractPartTest.php b/tests/PhpWord/Tests/Writer/ODText/Part/AbstractPartTest.php index 92fab26fdc..add4a3fbe2 100644 --- a/tests/PhpWord/Tests/Writer/ODText/Part/AbstractPartTest.php +++ b/tests/PhpWord/Tests/Writer/ODText/Part/AbstractPartTest.php @@ -33,26 +33,20 @@ class AbstractPartTest extends \PHPUnit_Framework_TestCase */ public function testSetGetParentWriter() { - $object = $this->getMockForAbstractClass( - 'PhpOffice\\PhpWord\\Writer\\ODText\\Part\\AbstractPart' - ); + $object = $this->getMockForAbstractClass('PhpOffice\\PhpWord\\Writer\\ODText\\Part\\AbstractPart'); $object->setParentWriter(new ODText()); - $this->assertEquals( - new ODText(), - $object->getParentWriter() - ); + $this->assertEquals(new ODText(), $object->getParentWriter()); } /** * covers ::getParentWriter + * * @expectedException Exception * @expectedExceptionMessage No parent WriterInterface assigned. */ public function testSetGetParentWriterNull() { - $object = $this->getMockForAbstractClass( - 'PhpOffice\\PhpWord\\Writer\\ODText\\Part\\AbstractPart' - ); + $object = $this->getMockForAbstractClass('PhpOffice\\PhpWord\\Writer\\ODText\\Part\\AbstractPart'); $object->getParentWriter(); } } diff --git a/tests/PhpWord/Tests/Writer/ODText/Part/ContentTest.php b/tests/PhpWord/Tests/Writer/ODText/Part/ContentTest.php index 85ddada6ba..33ffd176b4 100644 --- a/tests/PhpWord/Tests/Writer/ODText/Part/ContentTest.php +++ b/tests/PhpWord/Tests/Writer/ODText/Part/ContentTest.php @@ -18,7 +18,6 @@ use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\Tests\TestHelperDOCX; -use PhpOffice\PhpWord\Writer\ODText\Part\Content; /** * Test class for PhpOffice\PhpWord\Writer\ODText\Part\Content @@ -41,8 +40,8 @@ public function tearDown() */ public function testWriteContent() { - $imageSrc = __DIR__ . "/../../../_files/images/PhpWord.png"; - $objectSrc = __DIR__ . "/../../../_files/documents/sheet.xls"; + $imageSrc = __DIR__ . '/../../../_files/images/PhpWord.png'; + $objectSrc = __DIR__ . '/../../../_files/documents/sheet.xls'; $expected = 'Expected'; $phpWord = new PhpWord(); @@ -56,41 +55,41 @@ public function testWriteContent() $phpWord->addTableStyle('tblStyle', array('width' => 100)); $section = $phpWord->addSection(array('colsNum' => 2)); - $section->addText($expected); - $section->addText('Test font style', 'Font'); - $section->addText('Test paragraph style', null, 'Paragraph'); - $section->addLink('http://test.com', 'Test link'); - $section->addTitle('Test title', 1); + $section->addText(htmlspecialchars($expected, ENT_COMPAT, 'UTF-8')); + $section->addText(htmlspecialchars('Test font style', ENT_COMPAT, 'UTF-8'), 'Font'); + $section->addText(htmlspecialchars('Test paragraph style', ENT_COMPAT, 'UTF-8'), null, 'Paragraph'); + $section->addLink('https://github.com/PHPOffice/PHPWord', htmlspecialchars('PHPWord on GitHub', ENT_COMPAT, 'UTF-8')); + $section->addTitle(htmlspecialchars('Test title', ENT_COMPAT, 'UTF-8'), 1); $section->addTextBreak(); $section->addPageBreak(); - $section->addListItem('Test list item'); + $section->addListItem(htmlspecialchars('Test list item', ENT_COMPAT, 'UTF-8')); $section->addImage($imageSrc, array('width' => 50)); $section->addObject($objectSrc); $section->addTOC(); $textrun = $section->addTextRun(); - $textrun->addText('Test text run'); + $textrun->addText(htmlspecialchars('Test text run', ENT_COMPAT, 'UTF-8')); $table = $section->addTable(array('width' => 50)); $cell = $table->addRow()->addCell(); $cell = $table->addRow()->addCell(); - $cell->addText('Test'); - $cell->addLink('http://test.com', 'Test link'); + $cell->addText(htmlspecialchars('Test', ENT_COMPAT, 'UTF-8')); + $cell->addLink('https://github.com/PHPOffice/PHPWord', htmlspecialchars('PHPWord on GitHub', ENT_COMPAT, 'UTF-8')); $cell->addTextBreak(); - $cell->addListItem('Test list item'); + $cell->addListItem(htmlspecialchars('Test list item', ENT_COMPAT, 'UTF-8')); $cell->addImage($imageSrc); $cell->addObject($objectSrc); $textrun = $cell->addTextRun(); - $textrun->addText('Test text run'); + $textrun->addText(htmlspecialchars('Test text run', ENT_COMPAT, 'UTF-8')); $footer = $section->addFooter(); - $footer->addPreserveText('{PAGE}'); + $footer->addPreserveText(htmlspecialchars('{PAGE}', ENT_COMPAT, 'UTF-8')); $table = $section->addTable('tblStyle')->addRow()->addCell(); $doc = TestHelperDOCX::getDocument($phpWord, 'ODText'); - $element = "/office:document-content/office:body/office:text/text:section/text:p"; + $element = '/office:document-content/office:body/office:text/text:section/text:p'; $this->assertEquals($expected, $doc->getElement($element, 'content.xml')->nodeValue); } @@ -104,7 +103,7 @@ public function testWriteNoStyle() $doc = TestHelperDOCX::getDocument($phpWord, 'ODText'); - $element = "/office:document-content/office:automatic-styles/style:style"; + $element = '/office:document-content/office:automatic-styles/style:style'; $this->assertTrue($doc->elementExists($element, 'content.xml')); } } diff --git a/tests/PhpWord/Tests/Writer/ODTextTest.php b/tests/PhpWord/Tests/Writer/ODTextTest.php index 25b8095b10..8bf8eb020b 100644 --- a/tests/PhpWord/Tests/Writer/ODTextTest.php +++ b/tests/PhpWord/Tests/Writer/ODTextTest.php @@ -65,28 +65,28 @@ public function testConstructWithNull() */ public function testSave() { - $imageSrc = __DIR__ . "/../_files/images/PhpWord.png"; - $objectSrc = __DIR__ . "/../_files/documents/sheet.xls"; - $file = __DIR__ . "/../_files/temp.odt"; + $imageSrc = __DIR__ . '/../_files/images/PhpWord.png'; + $objectSrc = __DIR__ . '/../_files/documents/sheet.xls'; + $file = __DIR__ . '/../_files/temp.odt'; $phpWord = new PhpWord(); $phpWord->addFontStyle('Font', array('size' => 11)); $phpWord->addParagraphStyle('Paragraph', array('align' => 'center')); $section = $phpWord->addSection(); - $section->addText('Test 1', 'Font'); + $section->addText(htmlspecialchars('Test 1', ENT_COMPAT, 'UTF-8'), 'Font'); $section->addTextBreak(); - $section->addText('Test 2', null, 'Paragraph'); - $section->addLink('http://test.com'); - $section->addTitle('Test', 1); + $section->addText(htmlspecialchars('Test 2', ENT_COMPAT, 'UTF-8'), null, 'Paragraph'); + $section->addLink('https://github.com/PHPOffice/PHPWord'); + $section->addTitle(htmlspecialchars('Test', ENT_COMPAT, 'UTF-8'), 1); $section->addPageBreak(); - $section->addTable()->addRow()->addCell()->addText('Test'); - $section->addListItem('Test'); + $section->addTable()->addRow()->addCell()->addText(htmlspecialchars('Test', ENT_COMPAT, 'UTF-8')); + $section->addListItem(htmlspecialchars('Test', ENT_COMPAT, 'UTF-8')); $section->addImage($imageSrc); $section->addObject($objectSrc); $section->addTOC(); $section = $phpWord->addSection(); $textrun = $section->addTextRun(); - $textrun->addText('Test 3'); + $textrun->addText(htmlspecialchars('Test 3', ENT_COMPAT, 'UTF-8')); $writer = new ODText($phpWord); $writer->save($file); @@ -104,7 +104,7 @@ public function testSavePhpOutput() { $phpWord = new PhpWord(); $section = $phpWord->addSection(); - $section->addText('Test'); + $section->addText(htmlspecialchars('Test', ENT_COMPAT, 'UTF-8')); $writer = new ODText($phpWord); $writer->save('php://output'); } @@ -136,10 +136,7 @@ public function testSetGetUseDiskCaching() */ public function testSetUseDiskCachingException() { - $dir = join( - DIRECTORY_SEPARATOR, - array(PHPWORD_TESTS_BASE_DIR, 'foo') - ); + $dir = join(DIRECTORY_SEPARATOR, array(PHPWORD_TESTS_BASE_DIR, 'foo')); $object = new ODText(); $object->setUseDiskCaching(true, $dir); diff --git a/tests/PhpWord/Tests/Writer/PDF/DomPDFTest.php b/tests/PhpWord/Tests/Writer/PDF/DomPDFTest.php index 476c9011dc..71d157231c 100644 --- a/tests/PhpWord/Tests/Writer/PDF/DomPDFTest.php +++ b/tests/PhpWord/Tests/Writer/PDF/DomPDFTest.php @@ -33,11 +33,11 @@ class DomPDFTest extends \PHPUnit_Framework_TestCase public function testConstruct() { define('DOMPDF_ENABLE_AUTOLOAD', false); - $file = __DIR__ . "/../../_files/dompdf.pdf"; + $file = __DIR__ . '/../../_files/dompdf.pdf'; $phpWord = new PhpWord(); $section = $phpWord->addSection(); - $section->addText('Test 1'); + $section->addText(htmlspecialchars('Test 1', ENT_COMPAT, 'UTF-8')); $rendererName = Settings::PDF_RENDERER_DOMPDF; $rendererLibraryPath = realpath(PHPWORD_TESTS_BASE_DIR . '/../vendor/dompdf/dompdf'); diff --git a/tests/PhpWord/Tests/Writer/PDF/MPDFTest.php b/tests/PhpWord/Tests/Writer/PDF/MPDFTest.php index 4728b7f148..fbf6d1d40b 100644 --- a/tests/PhpWord/Tests/Writer/PDF/MPDFTest.php +++ b/tests/PhpWord/Tests/Writer/PDF/MPDFTest.php @@ -32,11 +32,11 @@ class MPDFTest extends \PHPUnit_Framework_TestCase */ public function testConstruct() { - $file = __DIR__ . "/../../_files/mpdf.pdf"; + $file = __DIR__ . '/../../_files/mpdf.pdf'; $phpWord = new PhpWord(); $section = $phpWord->addSection(); - $section->addText('Test 1'); + $section->addText(htmlspecialchars('Test 1', ENT_COMPAT, 'UTF-8')); $rendererName = Settings::PDF_RENDERER_MPDF; $rendererLibraryPath = realpath(PHPWORD_TESTS_BASE_DIR . '/../vendor/mpdf/mpdf'); diff --git a/tests/PhpWord/Tests/Writer/PDF/TCPDFTest.php b/tests/PhpWord/Tests/Writer/PDF/TCPDFTest.php index c73f004352..c6d2a99f37 100644 --- a/tests/PhpWord/Tests/Writer/PDF/TCPDFTest.php +++ b/tests/PhpWord/Tests/Writer/PDF/TCPDFTest.php @@ -32,11 +32,11 @@ class TCPDFTest extends \PHPUnit_Framework_TestCase */ public function testConstruct() { - $file = __DIR__ . "/../../_files/tcpdf.pdf"; + $file = __DIR__ . '/../../_files/tcpdf.pdf'; $phpWord = new PhpWord(); $section = $phpWord->addSection(); - $section->addText('Test 1'); + $section->addText(htmlspecialchars('Test 1', ENT_COMPAT, 'UTF-8')); $rendererName = Settings::PDF_RENDERER_TCPDF; $rendererLibraryPath = realpath(PHPWORD_TESTS_BASE_DIR . '/../vendor/tecnick.com/tcpdf'); diff --git a/tests/PhpWord/Tests/Writer/PDFTest.php b/tests/PhpWord/Tests/Writer/PDFTest.php index 87814b411f..8e1149cda7 100644 --- a/tests/PhpWord/Tests/Writer/PDFTest.php +++ b/tests/PhpWord/Tests/Writer/PDFTest.php @@ -33,7 +33,7 @@ class PDFTest extends \PHPUnit_Framework_TestCase public function testConstruct() { define('DOMPDF_ENABLE_AUTOLOAD', false); - $file = __DIR__ . "/../_files/temp.pdf"; + $file = __DIR__ . '/../_files/temp.pdf'; $rendererName = Settings::PDF_RENDERER_DOMPDF; $rendererLibraryPath = realpath(PHPWORD_TESTS_BASE_DIR . '/../vendor/dompdf/dompdf'); diff --git a/tests/PhpWord/Tests/Writer/RTFTest.php b/tests/PhpWord/Tests/Writer/RTFTest.php index 5b983b3578..a469e9360d 100644 --- a/tests/PhpWord/Tests/Writer/RTFTest.php +++ b/tests/PhpWord/Tests/Writer/RTFTest.php @@ -53,20 +53,22 @@ public function testConstructWithNull() */ public function testSave() { - $imageSrc = __DIR__ . "/../_files/images/PhpWord.png"; - $objectSrc = __DIR__ . "/../_files/documents/sheet.xls"; - $file = __DIR__ . "/../_files/temp.rtf"; + $imageSrc = __DIR__ . '/../_files/images/PhpWord.png'; + $objectSrc = __DIR__ . '/../_files/documents/sheet.xls'; + $file = __DIR__ . '/../_files/temp.rtf'; $phpWord = new PhpWord(); - $phpWord->addFontStyle('Font', array('name' => 'Verdana', 'size' => 11, - 'color' => 'FF0000', 'fgColor' => '00FF00')); + $phpWord->addFontStyle( + 'Font', + array('name' => 'Verdana', 'size' => 11, 'color' => 'FF0000', 'fgColor' => '00FF00') + ); $phpWord->addParagraphStyle('Paragraph', array('align' => 'center')); $section = $phpWord->addSection(); - $section->addText('Test 1', 'Font', 'Paragraph'); + $section->addText(htmlspecialchars('Test 1', ENT_COMPAT, 'UTF-8'), 'Font', 'Paragraph'); $section->addTextBreak(); - $section->addText('Test 2', array('name' => 'Tahoma', 'bold' => true, 'italic' => true)); - $section->addLink('http://test.com'); - $section->addTitle('Test', 1); + $section->addText(htmlspecialchars('Test 2', ENT_COMPAT, 'UTF-8'), array('name' => 'Tahoma', 'bold' => true, 'italic' => true)); + $section->addLink('https://github.com/PHPOffice/PHPWord'); + $section->addTitle(htmlspecialchars('Test', ENT_COMPAT, 'UTF-8'), 1); $section->addPageBreak(); // Rowspan @@ -78,13 +80,13 @@ public function testSave() $cell = $section->addTable()->addRow()->addCell(); $cell->addTable()->addRow()->addCell(); - $section->addListItem('Test'); + $section->addListItem(htmlspecialchars('Test', ENT_COMPAT, 'UTF-8')); $section->addImage($imageSrc); $section->addObject($objectSrc); $section->addTOC(); $section = $phpWord->addSection(); $textrun = $section->addTextRun(); - $textrun->addText('Test 3'); + $textrun->addText(htmlspecialchars('Test 3', ENT_COMPAT, 'UTF-8')); $textrun->addTextBreak(); $writer = new RTF($phpWord); $writer->save($file); @@ -103,7 +105,7 @@ public function testSavePhpOutput() { $phpWord = new PhpWord(); $section = $phpWord->addSection(); - $section->addText('Test'); + $section->addText(htmlspecialchars('Test', ENT_COMPAT, 'UTF-8')); $writer = new RTF($phpWord); $writer->save('php://output'); } diff --git a/tests/PhpWord/Tests/Writer/Word2007/ElementTest.php b/tests/PhpWord/Tests/Writer/Word2007/ElementTest.php index 92a74c1544..da95ee026b 100644 --- a/tests/PhpWord/Tests/Writer/Word2007/ElementTest.php +++ b/tests/PhpWord/Tests/Writer/Word2007/ElementTest.php @@ -41,7 +41,7 @@ public function testUnmatchedElements() $elements = array( 'CheckBox', 'Container', 'Footnote', 'Image', 'Link', 'ListItem', 'ListItemRun', 'Object', 'PreserveText', 'Table', 'Text', 'TextBox', 'TextBreak', 'Title', 'TOC', - 'Field', 'Line', 'Shape', 'Chart', 'FormField', 'SDT' + 'Field', 'Line', 'Shape', 'Chart', 'FormField', 'SDT', ); foreach ($elements as $element) { $objectClass = 'PhpOffice\\PhpWord\\Writer\\Word2007\\Element\\' . $element; @@ -65,7 +65,7 @@ public function testLineElement() $section->addLine(array('width' => 1000, 'height' => 1000, 'positioning' => 'absolute', 'flip' => true)); $doc = TestHelperDOCX::getDocument($phpWord); - $element = "/w:document/w:body/w:p/w:r/w:pict/v:shapetype"; + $element = '/w:document/w:body/w:p/w:r/w:pict/v:shapetype'; $this->assertTrue($doc->elementExists($element)); } @@ -81,8 +81,8 @@ public function testShapeElements() $section->addShape( 'arc', array( - 'points' => '-90 20', - 'frame' => array('width' => 120, 'height' => 120), + 'points' => '-90 20', + 'frame' => array('width' => 120, 'height' => 120), 'outline' => array('color' => '#333333', 'weight' => 2, 'startArrow' => 'oval', 'endArrow' => 'open'), ) ); @@ -91,9 +91,14 @@ public function testShapeElements() $section->addShape( 'curve', array( - 'points' => '1,100 200,1 1,50 200,50', 'connector' => 'elbow', - 'outline' => array('color' => '#66cc00', 'weight' => 2, 'dash' => 'dash', - 'startArrow' => 'diamond', 'endArrow' => 'block'), + 'points' => '1,100 200,1 1,50 200,50', 'connector' => 'elbow', + 'outline' => array( + 'color' => '#66cc00', + 'weight' => 2, + 'dash' => 'dash', + 'startArrow' => 'diamond', + 'endArrow' => 'block', + ), ) ); @@ -101,9 +106,15 @@ public function testShapeElements() $section->addShape( 'line', array( - 'points' => '1,1 150,30', - 'outline' => array('color' => '#cc00ff', 'line' => 'thickThin', 'weight' => 3, - 'startArrow' => 'oval', 'endArrow' => 'classic', 'endCap' => 'round'), + 'points' => '1,1 150,30', + 'outline' => array( + 'color' => '#cc00ff', + 'line' => 'thickThin', + 'weight' => 3, + 'startArrow' => 'oval', + 'endArrow' => 'classic', + 'endCap' => 'round', + ), ) ); @@ -111,9 +122,13 @@ public function testShapeElements() $section->addShape( 'polyline', array( - 'points' => '1,30 20,10 55,20 75,10 100,40 115,50, 120,15 200,50', - 'outline' => array('color' => '#cc6666', 'weight' => 2, - 'startArrow' => 'none', 'endArrow' => 'classic'), + 'points' => '1,30 20,10 55,20 75,10 100,40 115,50, 120,15 200,50', + 'outline' => array( + 'color' => '#cc6666', + 'weight' => 2, + 'startArrow' => 'none', + 'endArrow' => 'classic', + ), ) ); @@ -122,10 +137,10 @@ public function testShapeElements() 'rect', array( 'roundness' => 0.2, - 'frame' => array('width' => 100, 'height' => 100, 'left' => 1, 'top' => 1), - 'fill' => array('color' => '#FFCC33'), - 'outline' => array('color' => '#990000', 'weight' => 1), - 'shadow' => array('color' => '#EEEEEE', 'offset' => '3pt,3pt'), + 'frame' => array('width' => 100, 'height' => 100, 'left' => 1, 'top' => 1), + 'fill' => array('color' => '#FFCC33'), + 'outline' => array('color' => '#990000', 'weight' => 1), + 'shadow' => array('color' => '#EEEEEE', 'offset' => '3pt,3pt'), ) ); @@ -133,9 +148,9 @@ public function testShapeElements() $section->addShape( 'oval', array( - 'frame' => array('width' => 100, 'height' => 70, 'left' => 1, 'top' => 1), - 'fill' => array('color' => '#33CC99'), - 'outline' => array('color' => '#333333', 'weight' => 2), + 'frame' => array('width' => 100, 'height' => 70, 'left' => 1, 'top' => 1), + 'fill' => array('color' => '#33CC99'), + 'outline' => array('color' => '#333333', 'weight' => 2), 'extrusion' => array('type' => 'perspective', 'color' => '#EEEEEE'), ) ); @@ -187,11 +202,13 @@ public function testFormFieldElements() $section->addFormField('textinput')->setName('MyTextBox'); $section->addFormField('checkbox')->setDefault(true)->setValue('Your name'); - $section->addFormField('dropdown')->setEntries(array('Choice 1', 'Choice 2', 'Choice 3')); + $section->addFormField('dropdown')->setEntries( + array(htmlspecialchars('Choice 1', ENT_COMPAT, 'UTF-8'), htmlspecialchars('Choice 2', ENT_COMPAT, 'UTF-8'), htmlspecialchars('Choice 3', ENT_COMPAT, 'UTF-8')) + ); $doc = TestHelperDOCX::getDocument($phpWord); - $path = "/w:document/w:body/w:p/w:r/w:fldChar/w:ffData"; + $path = '/w:document/w:body/w:p/w:r/w:fldChar/w:ffData'; $this->assertTrue($doc->elementExists($path . '/w:textInput')); $this->assertTrue($doc->elementExists($path . '/w:checkBox')); $this->assertTrue($doc->elementExists($path . '/w:ddList')); @@ -211,7 +228,7 @@ public function testSDTElements() $doc = TestHelperDOCX::getDocument($phpWord); - $path = "/w:document/w:body/w:p/w:sdt/w:sdtPr"; + $path = '/w:document/w:body/w:p/w:sdt/w:sdtPr'; $this->assertTrue($doc->elementExists($path . '/w:comboBox')); $this->assertTrue($doc->elementExists($path . '/w:dropDownList')); $this->assertTrue($doc->elementExists($path . '/w:date')); diff --git a/tests/PhpWord/Tests/Writer/Word2007/Part/AbstractPartTest.php b/tests/PhpWord/Tests/Writer/Word2007/Part/AbstractPartTest.php index 2ff80ab83c..37a5ece691 100644 --- a/tests/PhpWord/Tests/Writer/Word2007/Part/AbstractPartTest.php +++ b/tests/PhpWord/Tests/Writer/Word2007/Part/AbstractPartTest.php @@ -34,26 +34,20 @@ class AbstractWriterPartTest extends \PHPUnit_Framework_TestCase */ public function testSetGetParentWriter() { - $object = $this->getMockForAbstractClass( - 'PhpOffice\\PhpWord\\Writer\\Word2007\\Part\\AbstractPart' - ); + $object = $this->getMockForAbstractClass('PhpOffice\\PhpWord\\Writer\\Word2007\\Part\\AbstractPart'); $object->setParentWriter(new Word2007()); - $this->assertEquals( - new Word2007(), - $object->getParentWriter() - ); + $this->assertEquals(new Word2007(), $object->getParentWriter()); } /** * covers ::getParentWriter + * * @expectedException Exception * @expectedExceptionMessage No parent WriterInterface assigned. */ public function testSetGetParentWriterNull() { - $object = $this->getMockForAbstractClass( - 'PhpOffice\\PhpWord\\Writer\\Word2007\\Part\\AbstractPart' - ); + $object = $this->getMockForAbstractClass('PhpOffice\\PhpWord\\Writer\\Word2007\\Part\\AbstractPart'); $object->getParentWriter(); } } diff --git a/tests/PhpWord/Tests/Writer/Word2007/Part/DocumentTest.php b/tests/PhpWord/Tests/Writer/Word2007/Part/DocumentTest.php index ef36e0dd72..e5c41f09dc 100644 --- a/tests/PhpWord/Tests/Writer/Word2007/Part/DocumentTest.php +++ b/tests/PhpWord/Tests/Writer/Word2007/Part/DocumentTest.php @@ -19,7 +19,6 @@ use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\Style\Font; use PhpOffice\PhpWord\Tests\TestHelperDOCX; -use PhpOffice\PhpWord\Writer\Word2007\Part\Document; /** * Test class for PhpOffice\PhpWord\Writer\Word2007\Part\Document @@ -62,42 +61,62 @@ public function testWriteEndSectionPageNumbering() */ public function testElements() { - $objectSrc = __DIR__ . "/../../../_files/documents/sheet.xls"; + $objectSrc = __DIR__ . '/../../../_files/documents/sheet.xls'; $phpWord = new PhpWord(); - $phpWord->addTitleStyle(1, array('color' => '333333', 'bold'=>true)); - $phpWord->addTitleStyle(2, array('color'=>'666666')); + $phpWord->addTitleStyle(1, array('color' => '333333', 'bold' => true)); + $phpWord->addTitleStyle(2, array('color' => '666666')); $section = $phpWord->addSection(); $section->addTOC(); $section->addPageBreak(); - $section->addText('After page break.'); - $section->addTitle('Title 1', 1); - $section->addListItem('List Item 1', 0); - $section->addListItem('List Item 2', 0); - $section->addListItem('List Item 3', 0); + $section->addText(htmlspecialchars('After page break.', ENT_COMPAT, 'UTF-8')); + $section->addTitle(htmlspecialchars('Title 1', ENT_COMPAT, 'UTF-8'), 1); + $section->addListItem(htmlspecialchars('List Item 1', ENT_COMPAT, 'UTF-8'), 0); + $section->addListItem(htmlspecialchars('List Item 2', ENT_COMPAT, 'UTF-8'), 0); + $section->addListItem(htmlspecialchars('List Item 3', ENT_COMPAT, 'UTF-8'), 0); $section = $phpWord->addSection(); - $section->addTitle('Title 2', 2); + $section->addTitle(htmlspecialchars('Title 2', ENT_COMPAT, 'UTF-8'), 2); $section->addObject($objectSrc); $section->addTextBox(array()); - $section->addTextBox(array('wrappingStyle' => 'square', 'positioning' => 'relative', - 'posHorizontalRel' => 'margin', 'posVerticalRel' => 'margin', - 'innerMargin' => 10, 'borderSize' => 1, 'borderColor' => '#FF0')); + $section->addTextBox( + array( + 'wrappingStyle' => 'square', + 'positioning' => 'relative', + 'posHorizontalRel' => 'margin', + 'posVerticalRel' => 'margin', + 'innerMargin' => 10, + 'borderSize' => 1, + 'borderColor' => '#FF0', + ) + ); $section->addTextBox(array('wrappingStyle' => 'tight', 'positioning' => 'absolute', 'align' => 'center')); - $section->addListItemRun()->addText('List item run 1'); - $section->addField('DATE', array('dateformat'=>'dddd d MMMM yyyy H:mm:ss'), array('PreserveFormat', 'LunarCalendar')); - $section->addField('DATE', array('dateformat'=>'dddd d MMMM yyyy H:mm:ss'), array('PreserveFormat', 'SakaEraCalendar')); - $section->addField('DATE', array('dateformat'=>'dddd d MMMM yyyy H:mm:ss'), array('PreserveFormat', 'LastUsedFormat')); - $section->addField('PAGE', array('format'=>'ArabicDash')); + $section->addListItemRun()->addText(htmlspecialchars('List item run 1', ENT_COMPAT, 'UTF-8')); + $section->addField( + 'DATE', + array('dateformat' => 'dddd d MMMM yyyy H:mm:ss'), + array('PreserveFormat', 'LunarCalendar') + ); + $section->addField( + 'DATE', + array('dateformat' => 'dddd d MMMM yyyy H:mm:ss'), + array('PreserveFormat', 'SakaEraCalendar') + ); + $section->addField( + 'DATE', + array('dateformat' => 'dddd d MMMM yyyy H:mm:ss'), + array('PreserveFormat', 'LastUsedFormat') + ); + $section->addField('PAGE', array('format' => 'ArabicDash')); $section->addLine( array( - 'width' => 10, - 'height' => 10, + 'width' => 10, + 'height' => 10, 'positioning' => 'absolute', - 'beginArrow' => 'block', - 'endArrow' => 'open', - 'dash' => 'rounddot', - 'weight' => 10 + 'beginArrow' => 'block', + 'endArrow' => 'open', + 'dash' => 'rounddot', + 'weight' => 10, ) ); @@ -131,27 +150,39 @@ public function testElements() */ public function testElementStyles() { - $objectSrc = __DIR__ . "/../../../_files/documents/sheet.xls"; + $objectSrc = __DIR__ . '/../../../_files/documents/sheet.xls'; $tabs = array(new \PhpOffice\PhpWord\Style\Tab('right', 9090)); $phpWord = new PhpWord(); - $phpWord->addParagraphStyle('pStyle', array( - 'align' => 'center', - 'tabs' => $tabs, - 'shading' => array('fill' => 'FFFF99'), - 'borderSize' => 4, - )); // Style #1 - $phpWord->addFontStyle('fStyle', array('size' => '20', 'bold' => true, 'allCaps' => true, - 'scale' => 200, 'spacing' => 240, 'kerning' => 10)); // Style #2 + $phpWord->addParagraphStyle( + 'pStyle', + array( + 'align' => 'center', + 'tabs' => $tabs, + 'shading' => array('fill' => 'FFFF99'), + 'borderSize' => 4, + ) + ); // Style #1 + $phpWord->addFontStyle( + 'fStyle', + array( + 'size' => '20', + 'bold' => true, + 'allCaps' => true, + 'scale' => 200, + 'spacing' => 240, + 'kerning' => 10, + ) + ); // Style #2 $phpWord->addTitleStyle(1, array('color' => '333333', 'doubleStrikethrough' => true)); // Style #3 $phpWord->addTableStyle('tStyle', array('borderSize' => 1)); $fontStyle = new Font('text', array('align' => 'center')); $section = $phpWord->addSection(); - $section->addListItem('List Item', 0, null, null, 'pStyle'); // Style #5 + $section->addListItem(htmlspecialchars('List Item', ENT_COMPAT, 'UTF-8'), 0, null, null, 'pStyle'); // Style #5 $section->addObject($objectSrc, array('align' => 'center')); $section->addTOC($fontStyle); - $section->addTitle('Title 1', 1); + $section->addTitle(htmlspecialchars('Title 1', ENT_COMPAT, 'UTF-8'), 1); $section->addTOC('fStyle'); $table = $section->addTable('tStyle'); $table->setWidth(100); @@ -184,12 +215,12 @@ public function testWriteText() $phpWord->addFontStyle($rStyle, array('bold' => true)); $phpWord->addParagraphStyle($pStyle, array('hanging' => 120, 'indent' => 120)); $section = $phpWord->addSection(); - $section->addText('Test', $rStyle, $pStyle); + $section->addText(htmlspecialchars('Test', ENT_COMPAT, 'UTF-8'), $rStyle, $pStyle); $doc = TestHelperDOCX::getDocument($phpWord); - $element = "/w:document/w:body/w:p/w:r/w:rPr/w:rStyle"; + $element = '/w:document/w:body/w:p/w:r/w:rPr/w:rStyle'; $this->assertEquals($rStyle, $doc->getElementAttribute($element, 'w:val')); - $element = "/w:document/w:body/w:p/w:pPr/w:pStyle"; + $element = '/w:document/w:body/w:p/w:pPr/w:pStyle'; $this->assertEquals($pStyle, $doc->getElementAttribute($element, 'w:val')); } @@ -200,21 +231,21 @@ public function testWriteTextRun() { $pStyle = 'pStyle'; $aStyle = array('align' => 'justify', 'spaceBefore' => 120, 'spaceAfter' => 120); - $imageSrc = __DIR__ . "/../../../_files/images/earth.jpg"; + $imageSrc = __DIR__ . '/../../../_files/images/earth.jpg'; $phpWord = new PhpWord(); $phpWord->addParagraphStyle($pStyle, $aStyle); - $section = $phpWord->addSection('Test'); + $section = $phpWord->addSection(htmlspecialchars('Test', ENT_COMPAT, 'UTF-8')); $textrun = $section->addTextRun($pStyle); - $textrun->addText('Test'); + $textrun->addText(htmlspecialchars('Test', ENT_COMPAT, 'UTF-8')); $textrun->addTextBreak(); $textrun = $section->addTextRun($aStyle); - $textrun->addLink('http://test.com'); + $textrun->addLink('https://github.com/PHPOffice/PHPWord'); $textrun->addImage($imageSrc, array('align' => 'center')); $textrun->addFootnote(); $doc = TestHelperDOCX::getDocument($phpWord); - $parent = "/w:document/w:body/w:p"; + $parent = '/w:document/w:body/w:p'; $this->assertTrue($doc->elementExists("{$parent}/w:pPr/w:pStyle[@w:val='{$pStyle}']")); } @@ -230,15 +261,25 @@ public function testWriteLink() $paragraphStyleArray = array('align' => 'center'); $paragraphStyleName = 'Paragraph Style'; - $expected = 'PhpWord'; - $section->addLink('http://github.com/phpoffice/phpword', $expected); - $section->addLink('http://github.com/phpoffice/phpword', 'Test', $fontStyleArray, $paragraphStyleArray); - $section->addLink('http://github.com/phpoffice/phpword', 'Test', $fontStyleName, $paragraphStyleName); + $expected = 'PHPWord on GitHub'; + $section->addLink('https://github.com/PHPOffice/PHPWord', htmlspecialchars($expected, ENT_COMPAT, 'UTF-8')); + $section->addLink( + 'https://github.com/PHPOffice/PHPWord', + htmlspecialchars('Test', ENT_COMPAT, 'UTF-8'), + $fontStyleArray, + $paragraphStyleArray + ); + $section->addLink( + 'https://github.com/PHPOffice/PHPWord', + htmlspecialchars('Test', ENT_COMPAT, 'UTF-8'), + $fontStyleName, + $paragraphStyleName + ); $doc = TestHelperDOCX::getDocument($phpWord); $element = $doc->getElement('/w:document/w:body/w:p/w:hyperlink/w:r/w:t'); - $this->assertEquals($expected, $element->nodeValue); + $this->assertEquals(htmlspecialchars($expected, ENT_COMPAT, 'UTF-8'), $element->nodeValue); } /** @@ -254,12 +295,12 @@ public function testWritePreserveText() $paragraphStyleArray = array('align' => 'right'); $paragraphStyleName = 'Paragraph'; - $footer->addPreserveText('Page {PAGE}'); - $footer->addPreserveText('{PAGE}', $fontStyleArray, $paragraphStyleArray); - $footer->addPreserveText('{PAGE}', $fontStyleName, $paragraphStyleName); + $footer->addPreserveText(htmlspecialchars('Page {PAGE}', ENT_COMPAT, 'UTF-8')); + $footer->addPreserveText(htmlspecialchars('{PAGE}', ENT_COMPAT, 'UTF-8'), $fontStyleArray, $paragraphStyleArray); + $footer->addPreserveText(htmlspecialchars('{PAGE}', ENT_COMPAT, 'UTF-8'), $fontStyleName, $paragraphStyleName); $doc = TestHelperDOCX::getDocument($phpWord); - $preserve = $doc->getElement("w:p/w:r[2]/w:instrText", 'word/footer1.xml'); + $preserve = $doc->getElement('w:p/w:r[2]/w:instrText', 'word/footer1.xml'); $this->assertEquals('PAGE', $preserve->nodeValue); $this->assertEquals('preserve', $preserve->getAttribute('xml:space')); @@ -301,7 +342,7 @@ public function testWriteImage() $section = $phpWord->addSection(); foreach ($wraps as $wrap) { $styles['wrappingStyle'] = $wrap; - $section->addImage(__DIR__ . "/../../../_files/images/earth.jpg", $styles); + $section->addImage(__DIR__ . '/../../../_files/images/earth.jpg', $styles); } $archiveFile = realpath(__DIR__ . '/../../../_files/documents/reader.docx'); @@ -326,7 +367,7 @@ public function testWriteImage() */ public function testWriteWatermark() { - $imageSrc = __DIR__ . "/../../../_files/images/earth.jpg"; + $imageSrc = __DIR__ . '/../../../_files/images/earth.jpg'; $phpWord = new PhpWord(); $section = $phpWord->addSection(); @@ -334,8 +375,8 @@ public function testWriteWatermark() $header->addWatermark($imageSrc); $doc = TestHelperDOCX::getDocument($phpWord); - $element = $doc->getElement("/w:document/w:body/w:sectPr/w:headerReference"); - $this->assertStringStartsWith("rId", $element->getAttribute('r:id')); + $element = $doc->getElement('/w:document/w:body/w:sectPr/w:headerReference'); + $this->assertStringStartsWith('rId', $element->getAttribute('r:id')); } /** @@ -345,10 +386,10 @@ public function testWriteTitle() { $phpWord = new PhpWord(); $phpWord->addTitleStyle(1, array('bold' => true), array('spaceAfter' => 240)); - $phpWord->addSection()->addTitle('Test', 1); + $phpWord->addSection()->addTitle(htmlspecialchars('Test', ENT_COMPAT, 'UTF-8'), 1); $doc = TestHelperDOCX::getDocument($phpWord); - $element = "/w:document/w:body/w:p/w:pPr/w:pStyle"; + $element = '/w:document/w:body/w:p/w:pPr/w:pStyle'; $this->assertEquals('Heading1', $doc->getElementAttribute($element, 'w:val')); } @@ -364,11 +405,11 @@ public function testWriteCheckbox() // $phpWord->addFontStyle($rStyle, array('bold' => true)); // $phpWord->addParagraphStyle($pStyle, array('hanging' => 120, 'indent' => 120)); $section = $phpWord->addSection(); - $section->addCheckBox('Check1', 'Test', $rStyle, $pStyle); + $section->addCheckBox(htmlspecialchars('Check1', ENT_COMPAT, 'UTF-8'), htmlspecialchars('Test', ENT_COMPAT, 'UTF-8'), $rStyle, $pStyle); $doc = TestHelperDOCX::getDocument($phpWord); $element = '/w:document/w:body/w:p/w:r/w:fldChar/w:ffData/w:name'; - $this->assertEquals('Check1', $doc->getElementAttribute($element, 'w:val')); + $this->assertEquals(htmlspecialchars('Check1', ENT_COMPAT, 'UTF-8'), $doc->getElementAttribute($element, 'w:val')); } /** @@ -380,14 +421,14 @@ public function testWriteParagraphStyle() $phpWord = new PhpWord(); $section = $phpWord->addSection(); $attributes = array( - 'align' => 'right', - 'widowControl' => false, - 'keepNext' => true, - 'keepLines' => true, + 'align' => 'right', + 'widowControl' => false, + 'keepNext' => true, + 'keepLines' => true, 'pageBreakBefore' => true, ); foreach ($attributes as $attribute => $value) { - $section->addText('Test', null, array($attribute => $value)); + $section->addText(htmlspecialchars('Test', ENT_COMPAT, 'UTF-8'), null, array($attribute => $value)); } $doc = TestHelperDOCX::getDocument($phpWord); @@ -397,7 +438,7 @@ public function testWriteParagraphStyle() $attributeCount++; $nodeName = ($key == 'align') ? 'jc' : $key; $path = "/w:document/w:body/w:p[{$attributeCount}]/w:pPr/w:{$nodeName}"; - if ($key != 'align') { + if ('align' != $key) { $value = $value ? 1 : 0; } $element = $doc->getElement($path); @@ -425,7 +466,7 @@ public function testWriteFontStyle() $styles['smallCaps'] = true; $section = $phpWord->addSection(); - $section->addText('Test', $styles); + $section->addText(htmlspecialchars('Test', ENT_COMPAT, 'UTF-8'), $styles); $doc = TestHelperDOCX::getDocument($phpWord); $parent = '/w:document/w:body/w:p/w:r/w:rPr'; @@ -449,50 +490,46 @@ public function testWriteTableStyle() $phpWord = new PhpWord(); $rHeight = 120; $cWidth = 120; - $imageSrc = __DIR__ . "/../../../_files/images/earth.jpg"; - $objectSrc = __DIR__ . "/../../../_files/documents/sheet.xls"; - - $tStyles["width"] = 50; - $tStyles["cellMarginTop"] = 120; - $tStyles["cellMarginRight"] = 120; - $tStyles["cellMarginBottom"] = 120; - $tStyles["cellMarginLeft"] = 120; - $rStyles["tblHeader"] = true; - $rStyles["cantSplit"] = true; - $cStyles["valign"] = 'top'; - $cStyles["textDirection"] = 'btLr'; - $cStyles["bgColor"] = 'FF0000'; - $cStyles["borderTopSize"] = 120; - $cStyles["borderBottomSize"] = 120; - $cStyles["borderLeftSize"] = 120; - $cStyles["borderRightSize"] = 120; - $cStyles["borderTopColor"] = 'FF0000'; - $cStyles["borderBottomColor"] = 'FF0000'; - $cStyles["borderLeftColor"] = 'FF0000'; - $cStyles["borderRightColor"] = 'FF0000'; - $cStyles["vMerge"] = 'restart'; + $imageSrc = __DIR__ . '/../../../_files/images/earth.jpg'; + $objectSrc = __DIR__ . '/../../../_files/documents/sheet.xls'; + + $tStyles['width'] = 50; + $tStyles['cellMarginTop'] = 120; + $tStyles['cellMarginRight'] = 120; + $tStyles['cellMarginBottom'] = 120; + $tStyles['cellMarginLeft'] = 120; + $rStyles['tblHeader'] = true; + $rStyles['cantSplit'] = true; + $cStyles['valign'] = 'top'; + $cStyles['textDirection'] = 'btLr'; + $cStyles['bgColor'] = 'FF0000'; + $cStyles['borderTopSize'] = 120; + $cStyles['borderBottomSize'] = 120; + $cStyles['borderLeftSize'] = 120; + $cStyles['borderRightSize'] = 120; + $cStyles['borderTopColor'] = 'FF0000'; + $cStyles['borderBottomColor'] = 'FF0000'; + $cStyles['borderLeftColor'] = 'FF0000'; + $cStyles['borderRightColor'] = 'FF0000'; + $cStyles['vMerge'] = 'restart'; $section = $phpWord->addSection(); $table = $section->addTable($tStyles); $table->setWidth = 100; $table->addRow($rHeight, $rStyles); $cell = $table->addCell($cWidth, $cStyles); - $cell->addText('Test'); + $cell->addText(htmlspecialchars('Test', ENT_COMPAT, 'UTF-8')); $cell->addTextBreak(); - $cell->addLink('http://google.com'); - $cell->addListItem('Test'); + $cell->addLink('https://github.com/PHPOffice/PHPWord'); + $cell->addListItem(htmlspecialchars('Test', ENT_COMPAT, 'UTF-8')); $cell->addImage($imageSrc); $cell->addObject($objectSrc); $textrun = $cell->addTextRun(); - $textrun->addText('Test'); + $textrun->addText(htmlspecialchars('Test', ENT_COMPAT, 'UTF-8')); $doc = TestHelperDOCX::getDocument($phpWord); $parent = '/w:document/w:body/w:tbl/w:tblPr/w:tblCellMar'; - // $this->assertEquals($tStyles['cellMarginTop'], $doc->getElementAttribute("{$parent}/w:top", 'w:w')); - // $this->assertEquals($tStyles['cellMarginRight'], $doc->getElementAttribute("{$parent}/w:right", 'w:w')); - // $this->assertEquals($tStyles['cellMarginBottom'], $doc->getElementAttribute("{$parent}/w:bottom", 'w:w')); - // $this->assertEquals($tStyles['cellMarginLeft'], $doc->getElementAttribute("{$parent}/w:right", 'w:w')); $parent = '/w:document/w:body/w:tbl/w:tr/w:trPr'; $this->assertEquals($rHeight, $doc->getElementAttribute("{$parent}/w:trHeight", 'w:val')); diff --git a/tests/PhpWord/Tests/Writer/Word2007/Part/FooterTest.php b/tests/PhpWord/Tests/Writer/Word2007/Part/FooterTest.php index 5c9d2d3081..068b2e25be 100644 --- a/tests/PhpWord/Tests/Writer/Word2007/Part/FooterTest.php +++ b/tests/PhpWord/Tests/Writer/Word2007/Part/FooterTest.php @@ -32,13 +32,13 @@ class FooterTest extends \PHPUnit_Framework_TestCase */ public function testWriteFooter() { - $imageSrc = __DIR__ . "/../../../_files/images/PhpWord.png"; + $imageSrc = __DIR__ . '/../../../_files/images/PhpWord.png'; $container = new \PhpOffice\PhpWord\Element\Footer(1); - $container->addText(''); - $container->addPreserveText(''); + $container->addText(htmlspecialchars('', ENT_COMPAT, 'UTF-8')); + $container->addPreserveText(htmlspecialchars('', ENT_COMPAT, 'UTF-8')); $container->addTextBreak(); $container->addTextRun(); - $container->addTable()->addRow()->addCell()->addText(''); + $container->addTable()->addRow()->addCell()->addText(htmlspecialchars('', ENT_COMPAT, 'UTF-8')); $container->addImage($imageSrc); $writer = new Word2007(); diff --git a/tests/PhpWord/Tests/Writer/Word2007/Part/FootnotesTest.php b/tests/PhpWord/Tests/Writer/Word2007/Part/FootnotesTest.php index d7a3d667cf..86e87dd123 100644 --- a/tests/PhpWord/Tests/Writer/Word2007/Part/FootnotesTest.php +++ b/tests/PhpWord/Tests/Writer/Word2007/Part/FootnotesTest.php @@ -42,16 +42,16 @@ public function testWriteFootnotes() $phpWord = new PhpWord(); $phpWord->addParagraphStyle('pStyle', array('align' => 'left')); $section = $phpWord->addSection(); - $section->addText('Text'); + $section->addText(htmlspecialchars('Text', ENT_COMPAT, 'UTF-8')); $footnote1 = $section->addFootnote('pStyle'); - $footnote1->addText('Footnote'); + $footnote1->addText(htmlspecialchars('Footnote', ENT_COMPAT, 'UTF-8')); $footnote1->addTextBreak(); - $footnote1->addLink('http://google.com'); + $footnote1->addLink('https://github.com/PHPOffice/PHPWord'); $footnote2 = $section->addEndnote(array('align' => 'left')); - $footnote2->addText('Endnote'); + $footnote2->addText(htmlspecialchars('Endnote', ENT_COMPAT, 'UTF-8')); $doc = TestHelperDOCX::getDocument($phpWord); - $this->assertTrue($doc->elementExists("/w:document/w:body/w:p/w:r/w:footnoteReference")); - $this->assertTrue($doc->elementExists("/w:document/w:body/w:p/w:r/w:endnoteReference")); + $this->assertTrue($doc->elementExists('/w:document/w:body/w:p/w:r/w:footnoteReference')); + $this->assertTrue($doc->elementExists('/w:document/w:body/w:p/w:r/w:endnoteReference')); } } diff --git a/tests/PhpWord/Tests/Writer/Word2007/Part/HeaderTest.php b/tests/PhpWord/Tests/Writer/Word2007/Part/HeaderTest.php index e8c31ecfb0..e8f77845dc 100644 --- a/tests/PhpWord/Tests/Writer/Word2007/Part/HeaderTest.php +++ b/tests/PhpWord/Tests/Writer/Word2007/Part/HeaderTest.php @@ -31,14 +31,14 @@ class HeaderTest extends \PHPUnit_Framework_TestCase */ public function testWriteHeader() { - $imageSrc = __DIR__ . "/../../../_files/images/PhpWord.png"; + $imageSrc = __DIR__ . '/../../../_files/images/PhpWord.png'; $container = new \PhpOffice\PhpWord\Element\Header(1); - $container->addText('Test'); - $container->addPreserveText(''); + $container->addText(htmlspecialchars('Test', ENT_COMPAT, 'UTF-8')); + $container->addPreserveText(htmlspecialchars('', ENT_COMPAT, 'UTF-8')); $container->addTextBreak(); $container->addTextRun(); - $container->addTable()->addRow()->addCell()->addText(''); + $container->addTable()->addRow()->addCell()->addText(htmlspecialchars('', ENT_COMPAT, 'UTF-8')); $container->addImage($imageSrc); $container->addWatermark($imageSrc); diff --git a/tests/PhpWord/Tests/Writer/Word2007/Part/NumberingTest.php b/tests/PhpWord/Tests/Writer/Word2007/Part/NumberingTest.php index ebc3aa2e88..4f67571b42 100644 --- a/tests/PhpWord/Tests/Writer/Word2007/Part/NumberingTest.php +++ b/tests/PhpWord/Tests/Writer/Word2007/Part/NumberingTest.php @@ -47,20 +47,20 @@ public function testWriteNumbering() $phpWord->addNumberingStyle( 'numStyle', array( - 'type' => 'multilevel', + 'type' => 'multilevel', 'levels' => array( array( - 'start' => 1, - 'format' => 'decimal', + 'start' => 1, + 'format' => 'decimal', 'restart' => 1, - 'suffix' => 'space', - 'text' => '%1.', - 'align' => 'left', - 'left' => 360, + 'suffix' => 'space', + 'text' => '%1.', + 'align' => 'left', + 'left' => 360, 'hanging' => 360, - 'tabPos' => 360, - 'font' => 'Arial', - 'hint' => 'default', + 'tabPos' => 360, + 'font' => 'Arial', + 'hint' => 'default', ), ) ) diff --git a/tests/PhpWord/Tests/Writer/Word2007/Part/StylesTest.php b/tests/PhpWord/Tests/Writer/Word2007/Part/StylesTest.php index 103caa81b5..36d65af615 100644 --- a/tests/PhpWord/Tests/Writer/Word2007/Part/StylesTest.php +++ b/tests/PhpWord/Tests/Writer/Word2007/Part/StylesTest.php @@ -18,7 +18,6 @@ use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\Tests\TestHelperDOCX; -use PhpOffice\PhpWord\Writer\Word2007\Part\Styles; /** * Test class for PhpOffice\PhpWord\Writer\Word2007\Part\Styles @@ -48,13 +47,13 @@ public function testWriteStyles() $pNew = array('basedOn' => 'Base Style', 'next' => 'Normal'); $rStyle = array('size' => 20); $tStyle = array( - 'bgColor' => 'FF0000', + 'bgColor' => 'FF0000', 'cellMargin' => 120, 'borderSize' => 120, ); $firstRowStyle = array( - 'bgColor' => '0000FF', - 'borderSize' => 120, + 'bgColor' => '0000FF', + 'borderSize' => 120, 'borderColor' => '00FF00', ); $phpWord->setDefaultParagraphStyle($pStyle); diff --git a/tests/PhpWord/Tests/Writer/Word2007/Style/FontTest.php b/tests/PhpWord/Tests/Writer/Word2007/Style/FontTest.php index af11c054ff..f3f6badb49 100644 --- a/tests/PhpWord/Tests/Writer/Word2007/Style/FontTest.php +++ b/tests/PhpWord/Tests/Writer/Word2007/Style/FontTest.php @@ -17,8 +17,6 @@ namespace PhpOffice\PhpWord\Tests\Writer\Word2007\Part; use PhpOffice\PhpWord\Tests\TestHelperDOCX; -use PhpOffice\PhpWord\Writer\Word2007; -use PhpOffice\PhpWord\Writer\Word2007\Style\Font; /** * Test class for PhpOffice\PhpWord\Writer\Word2007\Style\Font @@ -44,7 +42,7 @@ public function testFontRTL() $phpWord = new \PhpOffice\PhpWord\PhpWord(); $section = $phpWord->addSection(); $textrun = $section->addTextRun(); - $textrun->addText('سلام این یک پاراگراف راست به چپ است', array('rtl' => true)); + $textrun->addText(htmlspecialchars('سلام این یک پاراگراف راست به چپ است', ENT_COMPAT, 'UTF-8'), array('rtl' => true)); $doc = TestHelperDOCX::getDocument($phpWord, 'Word2007'); $file = 'word/document.xml'; diff --git a/tests/PhpWord/Tests/Writer/Word2007Test.php b/tests/PhpWord/Tests/Writer/Word2007Test.php index db6e5cadd2..c08f279f5f 100644 --- a/tests/PhpWord/Tests/Writer/Word2007Test.php +++ b/tests/PhpWord/Tests/Writer/Word2007Test.php @@ -44,17 +44,17 @@ public function testConstruct() $writerParts = array( 'ContentTypes' => 'ContentTypes', - 'Rels' => 'Rels', - 'DocPropsApp' => 'DocPropsApp', - 'Document' => 'Document', - 'Styles' => 'Styles', - 'Numbering' => 'Numbering', - 'Settings' => 'Settings', - 'WebSettings' => 'WebSettings', - 'Header' => 'Header', - 'Footer' => 'Footer', - 'Footnotes' => 'Footnotes', - 'Endnotes' => 'Footnotes', + 'Rels' => 'Rels', + 'DocPropsApp' => 'DocPropsApp', + 'Document' => 'Document', + 'Styles' => 'Styles', + 'Numbering' => 'Numbering', + 'Settings' => 'Settings', + 'WebSettings' => 'WebSettings', + 'Header' => 'Header', + 'Footer' => 'Footer', + 'Footnotes' => 'Footnotes', + 'Endnotes' => 'Footnotes', ); foreach ($writerParts as $part => $type) { $this->assertInstanceOf( @@ -79,21 +79,21 @@ public function testSave() $phpWord->addFontStyle('Font', array('size' => 11)); $phpWord->addParagraphStyle('Paragraph', array('align' => 'center')); $section = $phpWord->addSection(); - $section->addText('Test 1', 'Font', 'Paragraph'); + $section->addText(htmlspecialchars('Test 1', ENT_COMPAT, 'UTF-8'), 'Font', 'Paragraph'); $section->addTextBreak(); - $section->addText('Test 2'); + $section->addText(htmlspecialchars('Test 2', ENT_COMPAT, 'UTF-8')); $section = $phpWord->addSection(); $textrun = $section->addTextRun(); - $textrun->addText('Test 3'); + $textrun->addText(htmlspecialchars('Test 3', ENT_COMPAT, 'UTF-8')); $footnote = $textrun->addFootnote(); - $footnote->addLink('http://test.com'); + $footnote->addLink('https://github.com/PHPOffice/PHPWord'); $header = $section->addHeader(); $header->addImage($localImage); $footer = $section->addFooter(); $footer->addImage($remoteImage); $writer = new Word2007($phpWord); - $file = __DIR__ . "/../_files/temp.docx"; + $file = __DIR__ . '/../_files/temp.docx'; $writer->save($file); $this->assertTrue(file_exists($file)); @@ -108,13 +108,13 @@ public function testSaveUseDiskCaching() { $phpWord = new PhpWord(); $section = $phpWord->addSection(); - $section->addText('Test'); + $section->addText(htmlspecialchars('Test', ENT_COMPAT, 'UTF-8')); $footnote = $section->addFootnote(); - $footnote->addText('Test'); + $footnote->addText(htmlspecialchars('Test', ENT_COMPAT, 'UTF-8')); $writer = new Word2007($phpWord); $writer->setUseDiskCaching(true); - $file = __DIR__ . "/../_files/temp.docx"; + $file = __DIR__ . '/../_files/temp.docx'; $writer->save($file); $this->assertTrue(file_exists($file)); @@ -142,7 +142,7 @@ public function testCheckContentTypes() } $doc = TestHelperDOCX::getDocument($phpWord); - $mediaPath = $doc->getPath() . "/word/media"; + $mediaPath = $doc->getPath() . '/word/media'; foreach ($images as $source => $target) { $this->assertFileEquals( @@ -183,10 +183,7 @@ public function testSetGetUseDiskCaching() */ public function testSetUseDiskCachingException() { - $dir = join( - DIRECTORY_SEPARATOR, - array(PHPWORD_TESTS_BASE_DIR, 'foo') - ); + $dir = join(DIRECTORY_SEPARATOR, array(PHPWORD_TESTS_BASE_DIR, 'foo')); $object = new Word2007(); $object->setUseDiskCaching(true, $dir); diff --git a/tests/PhpWord/Tests/_files/documents/reader.rtf b/tests/PhpWord/Tests/_files/documents/reader.rtf index 400f43a5d9..4cecadeabd 100644 --- a/tests/PhpWord/Tests/_files/documents/reader.rtf +++ b/tests/PhpWord/Tests/_files/documents/reader.rtf @@ -16,6 +16,6 @@ \pard\nowidctlpar\qc\sa100{\cf0\f0\fs32\b\i I am styled by both font and paragraph style.}\par \pard\nowidctlpar{\cf1\f1\fs40\b\i\ul\strike\super I am inline styled.}\par \par -{\field {\*\fldinst {HYPERLINK "http://www.google.com"}}{\fldrslt {Google}}}\par +{\field {\*\fldinst {HYPERLINK "https://github.com/PHPOffice/PHPWord"}}{\fldrslt {PHPWord on GitHub}}}\par \par } \ No newline at end of file diff --git a/tests/PhpWord/Tests/_includes/TestHelperDOCX.php b/tests/PhpWord/Tests/_includes/TestHelperDOCX.php index 2a0043d5c8..49a7e716e4 100644 --- a/tests/PhpWord/Tests/_includes/TestHelperDOCX.php +++ b/tests/PhpWord/Tests/_includes/TestHelperDOCX.php @@ -60,7 +60,7 @@ public static function getDocument(PhpWord $phpWord, $writerName = 'Word2007') $zip = new \ZipArchive; $res = $zip->open(self::$file); - if ($res === true) { + if (true === $res) { $zip->extractTo(Settings::getTempDir() . '/PhpWord_Unit_Test/'); $zip->close(); } @@ -89,12 +89,12 @@ public static function clear() public static function deleteDir($dir) { foreach (scandir($dir) as $file) { - if ($file === '.' || $file === '..') { + if ('.' === $file || '..' === $file) { continue; - } elseif (is_file($dir . "/" . $file)) { - unlink($dir . "/" . $file); - } elseif (is_dir($dir . "/" . $file)) { - self::deleteDir($dir . "/" . $file); + } elseif (is_file($dir . '/' . $file)) { + unlink($dir . '/' . $file); + } elseif (is_dir($dir . '/' . $file)) { + self::deleteDir($dir . '/' . $file); } } diff --git a/tests/PhpWord/Tests/_includes/XmlDocument.php b/tests/PhpWord/Tests/_includes/XmlDocument.php index 2e161bb1a5..0a70c5f22f 100644 --- a/tests/PhpWord/Tests/_includes/XmlDocument.php +++ b/tests/PhpWord/Tests/_includes/XmlDocument.php @@ -90,7 +90,7 @@ public function getFileDom($file = 'word/document.xml') */ public function getNodeList($path, $file = 'word/document.xml') { - if ($this->dom === null || $file !== $this->file) { + if (null === $this->dom || $file !== $this->file) { $this->getFileDom($file); } From 8bb4573534c6d071dc4b00746754ed905ca88d14 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Fri, 6 Feb 2015 22:48:45 +0400 Subject: [PATCH 02/99] #51 (updated tests, refactored a little). --- tests/PhpWord/Tests/AutoloaderTest.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/PhpWord/Tests/AutoloaderTest.php b/tests/PhpWord/Tests/AutoloaderTest.php index 9d3cd2001a..7847aa05ff 100644 --- a/tests/PhpWord/Tests/AutoloaderTest.php +++ b/tests/PhpWord/Tests/AutoloaderTest.php @@ -48,15 +48,13 @@ public function testAutoload() $this->assertCount( $declaredCount, get_declared_classes(), - 'PhpOffice\\PhpWord\\Autoloader::autoload() is trying to load ' - . 'classes outside of the PhpOffice\\PhpWord namespace' + 'PhpOffice\\PhpWord\\Autoloader::autoload() is trying to load classes outside of the PhpOffice\\PhpWord namespace' ); // TODO change this class to the main PhpWord class when it is namespaced Autoloader::autoload('PhpOffice\\PhpWord\\Exception\\InvalidStyleException'); $this->assertTrue( in_array('PhpOffice\\PhpWord\\Exception\\InvalidStyleException', get_declared_classes()), - 'PhpOffice\\PhpWord\\Autoloader::autoload() failed to autoload the ' - . 'PhpOffice\\PhpWord\\Exception\\InvalidStyleException class' + 'PhpOffice\\PhpWord\\Autoloader::autoload() failed to autoload the PhpOffice\\PhpWord\\Exception\\InvalidStyleException class' ); } } From cc305bcb1122ef85b724c11c56fabe52666881c9 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 21 Feb 2015 17:43:46 +0400 Subject: [PATCH 03/99] Fixed broken paragraph alignment for OpenXml. --- src/PhpWord/Style/Paragraph.php | 21 +++++++------------ src/PhpWord/Writer/HTML/Style/Paragraph.php | 7 +++++-- src/PhpWord/Writer/ODText/Style/Paragraph.php | 2 +- .../Writer/Word2007/Style/Paragraph.php | 10 +++------ 4 files changed, 16 insertions(+), 24 deletions(-) diff --git a/src/PhpWord/Style/Paragraph.php b/src/PhpWord/Style/Paragraph.php index 964a4ec960..ff89b9d5c9 100644 --- a/src/PhpWord/Style/Paragraph.php +++ b/src/PhpWord/Style/Paragraph.php @@ -25,6 +25,7 @@ * * OOXML: * - General: alignment, outline level + * - Alignment: left, right, center, both * - Indentation: left, right, firstline, hanging * - Spacing: before, after, line spacing * - Pagination: widow control, keep next, keep line, page break before @@ -159,14 +160,6 @@ class Paragraph extends Border */ private $shading; - /** - * Create new instance - */ - public function __construct() - { - $this->alignment = new Alignment(); - } - /** * Set Style value * @@ -202,7 +195,7 @@ public function getStyleValues() 'name' => $this->getStyleName(), 'basedOn' => $this->getBasedOn(), 'next' => $this->getNext(), - 'alignment' => $this->getAlign(), + 'alignment' => $this->getAlignment(), 'indentation' => $this->getIndentation(), 'spacing' => $this->getSpace(), 'pagination' => array( @@ -225,11 +218,11 @@ public function getStyleValues() /** * Get alignment * - * @return string + * @return \PhpOffice\PhpWord\Style\Alignment */ - public function getAlign() + public function getAlignment() { - return $this->alignment->getValue(); + return $this->alignment; } /** @@ -238,9 +231,9 @@ public function getAlign() * @param string $value * @return self */ - public function setAlign($value = null) + public function setAlignment($value = null) { - $this->alignment->setValue($value); + $this->setObjectVal(array('value' => $value), 'Alignment', $this->alignment); return $this; } diff --git a/src/PhpWord/Writer/HTML/Style/Paragraph.php b/src/PhpWord/Writer/HTML/Style/Paragraph.php index 8b326a5cfa..0d7df22d4e 100644 --- a/src/PhpWord/Writer/HTML/Style/Paragraph.php +++ b/src/PhpWord/Writer/HTML/Style/Paragraph.php @@ -38,8 +38,11 @@ public function write() $css = array(); // Alignment - $align = $style->getAlign(); - $css['text-align'] = $this->getValueIf(!is_null($align), $align); + $alignment = $style->getAlignment(); + if (!is_null($alignment)) { + $alignmentValue = $alignment->getValue(); + $css['text-align'] = $this->getValueIf(!is_null($alignmentValue), $alignmentValue); + } // Spacing $spacing = $style->getSpace(); diff --git a/src/PhpWord/Writer/ODText/Style/Paragraph.php b/src/PhpWord/Writer/ODText/Style/Paragraph.php index 03e605a196..f7bb47ad56 100644 --- a/src/PhpWord/Writer/ODText/Style/Paragraph.php +++ b/src/PhpWord/Writer/ODText/Style/Paragraph.php @@ -54,7 +54,7 @@ public function write() } else { $xmlWriter->writeAttribute('fo:margin-top', $marginTop . 'cm'); $xmlWriter->writeAttribute('fo:margin-bottom', $marginBottom . 'cm'); - $xmlWriter->writeAttribute('fo:text-align', $style->getAlign()); + $xmlWriter->writeAttribute('fo:text-align', $style->getAlignment()); } $xmlWriter->endElement(); //style:paragraph-properties diff --git a/src/PhpWord/Writer/Word2007/Style/Paragraph.php b/src/PhpWord/Writer/Word2007/Style/Paragraph.php index 039b78bfad..f9a49bba2e 100644 --- a/src/PhpWord/Writer/Word2007/Style/Paragraph.php +++ b/src/PhpWord/Writer/Word2007/Style/Paragraph.php @@ -18,9 +18,8 @@ namespace PhpOffice\PhpWord\Writer\Word2007\Style; use PhpOffice\PhpWord\Shared\XMLWriter; -use PhpOffice\PhpWord\Style\Alignment as AlignmentStyle; -use PhpOffice\PhpWord\Style\Paragraph as ParagraphStyle; use PhpOffice\PhpWord\Style; +use PhpOffice\PhpWord\Style\Paragraph as ParagraphStyle; /** * Paragraph style writer @@ -91,17 +90,14 @@ private function writeStyle() $xmlWriter->writeElementIf($styles['name'] !== null, 'w:pStyle', 'w:val', $styles['name']); } - // Alignment - $styleWriter = new Alignment($xmlWriter, new AlignmentStyle(array('value' => $styles['alignment']))); - $styleWriter->write(); - // Pagination $xmlWriter->writeElementIf($styles['pagination']['widowControl'] === false, 'w:widowControl', 'w:val', '0'); $xmlWriter->writeElementIf($styles['pagination']['keepNext'] === true, 'w:keepNext', 'w:val', '1'); $xmlWriter->writeElementIf($styles['pagination']['keepLines'] === true, 'w:keepLines', 'w:val', '1'); $xmlWriter->writeElementIf($styles['pagination']['pageBreak'] === true, 'w:pageBreakBefore', 'w:val', '1'); - // Child style: indentation, spacing, and shading + // Child style: alignment, indentation, spacing, and shading + $this->writeChildStyle($xmlWriter, 'Alignment', $styles['alignment']); $this->writeChildStyle($xmlWriter, 'Indentation', $styles['indentation']); $this->writeChildStyle($xmlWriter, 'Spacing', $styles['spacing']); $this->writeChildStyle($xmlWriter, 'Shading', $styles['shading']); From 4eefb60362c365fb7c970e5dc33faad4322f5e59 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 21 Feb 2015 18:30:00 +0400 Subject: [PATCH 04/99] #51 (updated tests, refactored a little). --- CHANGELOG.md | 8 ++++++++ src/PhpWord/Writer/RTF/Style/Paragraph.php | 7 +++---- tests/PhpWord/Tests/Style/ParagraphTest.php | 6 +++--- tests/PhpWord/Tests/Writer/Word2007/Part/DocumentTest.php | 6 +++--- 4 files changed, 17 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 93ab0127a9..e545ce1702 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ This is the changelog between releases of PHPWord. Releases are listed in reverse chronological order with the latest version listed on top, while additions/changes in each release are listed in chronological order. Changes in each release are divided into three parts: added or change features, bugfixes, and miscellaneous improvements. Each line contains short information about the change made, the person who made it, and the related issue number(s) in GitHub. +## 0.13.0 - TBD + +Place announcement text here. + +### Bugfixes + +- It was discovered that ``alignment`` option value doesn't affect paragraph alignment at all. This was fixed. Note: ``getAlign()`` and ``setAlign()`` methods of ``Paragraph`` style are renamed. - @RomanSyroeshko + ## 0.12.0 - 3 January 2015 This release added form fields (textinput, checkbox, and dropdown), drawing shapes (arc, curve, line, polyline, rect, oval), and basic 2D chart (pie, doughnut, bar, line, area, scatter, radar) elements along with some new styles. Basic MsDoc reader is introduced. diff --git a/src/PhpWord/Writer/RTF/Style/Paragraph.php b/src/PhpWord/Writer/RTF/Style/Paragraph.php index 1a7de0a35b..fc74b1dd9d 100644 --- a/src/PhpWord/Writer/RTF/Style/Paragraph.php +++ b/src/PhpWord/Writer/RTF/Style/Paragraph.php @@ -26,7 +26,6 @@ */ class Paragraph extends AbstractStyle { - /** * Depth of table container nested level; Primarily used for RTF writer/reader * @@ -55,7 +54,7 @@ public function write() Alignment::ALIGN_BOTH => '\qj', ); - $align = $style->getAlign(); + $alignment = $style->getAlignment(); $spaceAfter = $style->getSpaceAfter(); $spaceBefore = $style->getSpaceBefore(); @@ -63,8 +62,8 @@ public function write() if ($this->nestedLevel == 0) { $content .= '\pard\nowidctlpar '; } - if (isset($alignments[$align])) { - $content .= $alignments[$align]; + if (!is_null($alignment) && isset($alignments[$alignment->getValue()])) { + $content .= $alignments[$alignment->getValue()]; } $content .= $this->getValueIf($spaceBefore !== null, '\sb' . $spaceBefore); $content .= $this->getValueIf($spaceAfter !== null, '\sa' . $spaceAfter); diff --git a/tests/PhpWord/Tests/Style/ParagraphTest.php b/tests/PhpWord/Tests/Style/ParagraphTest.php index 48d4717202..e3550819e9 100644 --- a/tests/PhpWord/Tests/Style/ParagraphTest.php +++ b/tests/PhpWord/Tests/Style/ParagraphTest.php @@ -67,7 +67,7 @@ public function testSetStyleValueNormal() $object = new Paragraph(); $attributes = array( - 'align' => 'justify', +// 'align' => 'justify', 'spaceAfter' => 240, 'spaceBefore' => 240, 'indent' => 1, @@ -85,11 +85,11 @@ public function testSetStyleValueNormal() foreach ($attributes as $key => $value) { $get = "get{$key}"; $object->setStyleValue("$key", $value); - if ('align' == $key) { + /*if ('align' == $key) { if ('justify' == $value) { $value = 'both'; } - } elseif ('indent' == $key || 'hanging' == $key) { + } else*/if ('indent' == $key || 'hanging' == $key) { $value = $value * 720; } elseif ('spacing' == $key) { $value += 240; diff --git a/tests/PhpWord/Tests/Writer/Word2007/Part/DocumentTest.php b/tests/PhpWord/Tests/Writer/Word2007/Part/DocumentTest.php index e5c41f09dc..6c68ec7594 100644 --- a/tests/PhpWord/Tests/Writer/Word2007/Part/DocumentTest.php +++ b/tests/PhpWord/Tests/Writer/Word2007/Part/DocumentTest.php @@ -421,7 +421,7 @@ public function testWriteParagraphStyle() $phpWord = new PhpWord(); $section = $phpWord->addSection(); $attributes = array( - 'align' => 'right', + 'alignment' => 'right', 'widowControl' => false, 'keepNext' => true, 'keepLines' => true, @@ -436,9 +436,9 @@ public function testWriteParagraphStyle() $attributeCount = 0; foreach ($attributes as $key => $value) { $attributeCount++; - $nodeName = ($key == 'align') ? 'jc' : $key; + $nodeName = ($key == 'alignment') ? 'jc' : $key; $path = "/w:document/w:body/w:p[{$attributeCount}]/w:pPr/w:{$nodeName}"; - if ('align' != $key) { + if ('alignment' != $key) { $value = $value ? 1 : 0; } $element = $doc->getElement($path); From f90254961406d1501243dbf591406389f9865691 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 21 Feb 2015 18:34:36 +0400 Subject: [PATCH 05/99] Minor refactoring. --- CHANGELOG.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e545ce1702..24b5c6dc4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ Place announcement text here. - It was discovered that ``alignment`` option value doesn't affect paragraph alignment at all. This was fixed. Note: ``getAlign()`` and ``setAlign()`` methods of ``Paragraph`` style are renamed. - @RomanSyroeshko + ## 0.12.0 - 3 January 2015 This release added form fields (textinput, checkbox, and dropdown), drawing shapes (arc, curve, line, polyline, rect, oval), and basic 2D chart (pie, doughnut, bar, line, area, scatter, radar) elements along with some new styles. Basic MsDoc reader is introduced. @@ -71,12 +72,14 @@ This release added form fields (textinput, checkbox, and dropdown), drawing shap - Renamed `Template` into `TemplateProcessor` - @RomanSyroeshko #216 - Reverted #51. All text escaping must be performed out of the library - @RomanSyroeshko #51 + ## 0.11.1 - 2 June 2014 This is an immediate bugfix release for HTML reader. - HTML Reader: `

` and header tags puts no output - @canyildiz @ivanlanin #257 + ## 0.11.0 - 1 June 2014 This release marked the change of PHPWord license from LGPL 2.1 to LGPL 3. Four new elements were added: TextBox, ListItemRun, Field, and Line. Relative and absolute positioning for images and textboxes were added. Writer classes were refactored into parts, elements, and styles. ODT and RTF features were enhanced. Ability to add elements to PHPWord object via HTML were implemented. RTF and HTML reader were initiated. @@ -150,6 +153,7 @@ This is a bugfix release for `php-zip` requirement in Composer. - Change Composer requirements for php-zip from `require` to `suggest` - @bskrtich #246 + ## 0.10.0 - 4 May 2014 This release marked heavy refactorings on internal code structure with the creation of some abstract classes to reduce code duplication. `Element` subnamespace is introduced in this release to replace `Section`. Word2007 reader capability is greatly enhanced. Endnote is introduced. List numbering is now customizable. Basic HTML and PDF writing support is enabled. Basic ODText reader is introduced. @@ -236,12 +240,14 @@ This release marked heavy refactorings on internal code structure with the creat - Refactor: Split `AbstractContainer` from `AbstractElement` - @ivanlanin - Refactor: Apply composite pattern for Word2007 reader - @ivanlanin + ## 0.9.1 - 27 Mar 2014 This is a bugfix release for PSR-4 compatibility. - Fixed PSR-4 composer autoloader - @AntonTyutin + ## 0.9.0 - 26 Mar 2014 This release marked the transformation to namespaces (PHP 5.3+). @@ -265,12 +271,14 @@ This release marked the transformation to namespaces (PHP 5.3+). - Merge Style\TableFull into Style\Table. Style\TableFull is deprecated - @ivanlanin #160 - Merge Section\MemoryImage into Section\Image. Section\Image is deprecated - @ivanlanin #160 + ## 0.8.1 - 17 Mar 2014 This is a bugfix release for image detection functionality. - Added fallback for computers that do not have exif_imagetype - @bskrtich, @gabrielbull + ## 0.8.0 - 15 Mar 2014 This release merged a lot of improvements from the community. Unit tests introduced in this release and has reached 90% code coverage. @@ -320,6 +328,7 @@ This release merged a lot of improvements from the community. Unit tests introdu - UnitTests - @Progi1984 + ## 0.7.0 - 28 Jan 2014 This is the first release after a long development hiatus in [CodePlex](https://phpword.codeplex.com/). This release initialized ODT and RTF Writer, along with some other new features for the existing Word2007 Writer, e.g. tab, multiple header, rowspan and colspan. [Composer](https://packagist.org/packages/phpoffice/phpword) and [Travis](https://travis-ci.org/PHPOffice/PHPWord) were added. @@ -348,4 +357,4 @@ This is the first release after a long development hiatus in [CodePlex](https:// - Basic CI with Travis - @Progi1984 - Added PHPWord_Exception and exception when could not copy the template - @Progi1984 - IMPROVED: Moved examples out of Classes directory - @Progi1984 -- IMPROVED: Advanced string replace in setValue for Template - @Esmeraldo [#49](http://phpword.codeplex.com/workitem/49) +- IMPROVED: Advanced string replace in setValue for Template - @Esmeraldo [#49](http://phpword.codeplex.com/workitem/49) \ No newline at end of file From 2c040d2d330c642ee479e2128c22739484a0de2a Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 21 Feb 2015 18:41:15 +0400 Subject: [PATCH 06/99] Minor refactoring. --- CHANGELOG.md | 48 +++++++++++++++++++++++++++++++++++------------- 1 file changed, 35 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 24b5c6dc4e..fcd547bb00 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,17 +1,21 @@ -# Changelog +Changelog +========= This is the changelog between releases of PHPWord. Releases are listed in reverse chronological order with the latest version listed on top, while additions/changes in each release are listed in chronological order. Changes in each release are divided into three parts: added or change features, bugfixes, and miscellaneous improvements. Each line contains short information about the change made, the person who made it, and the related issue number(s) in GitHub. -## 0.13.0 - TBD +0.13.0 - TBD +------------ Place announcement text here. ### Bugfixes -- It was discovered that ``alignment`` option value doesn't affect paragraph alignment at all. This was fixed. Note: ``getAlign()`` and ``setAlign()`` methods of ``Paragraph`` style are renamed. - @RomanSyroeshko +- Discovered that ``alignment`` option value doesn't affect paragraph alignment at all. This is fixed now. Note: ``getAlign()`` and ``setAlign()`` methods of ``Paragraph`` style are renamed. - @RomanSyroeshko -## 0.12.0 - 3 January 2015 + +0.12.0 - 3 January 2015 +----------------------- This release added form fields (textinput, checkbox, and dropdown), drawing shapes (arc, curve, line, polyline, rect, oval), and basic 2D chart (pie, doughnut, bar, line, area, scatter, radar) elements along with some new styles. Basic MsDoc reader is introduced. @@ -73,14 +77,18 @@ This release added form fields (textinput, checkbox, and dropdown), drawing shap - Reverted #51. All text escaping must be performed out of the library - @RomanSyroeshko #51 -## 0.11.1 - 2 June 2014 + +0.11.1 - 2 June 2014 +-------------------- This is an immediate bugfix release for HTML reader. - HTML Reader: `

` and header tags puts no output - @canyildiz @ivanlanin #257 -## 0.11.0 - 1 June 2014 + +0.11.0 - 1 June 2014 +-------------------- This release marked the change of PHPWord license from LGPL 2.1 to LGPL 3. Four new elements were added: TextBox, ListItemRun, Field, and Line. Relative and absolute positioning for images and textboxes were added. Writer classes were refactored into parts, elements, and styles. ODT and RTF features were enhanced. Ability to add elements to PHPWord object via HTML were implemented. RTF and HTML reader were initiated. @@ -147,14 +155,18 @@ This release marked the change of PHPWord license from LGPL 2.1 to LGPL 3. Four - QA: Improve dan update requirement check in `samples` folder - @ivanlanin -## 0.10.1 - 21 May 2014 + +0.10.1 - 21 May 2014 +-------------------- This is a bugfix release for `php-zip` requirement in Composer. - Change Composer requirements for php-zip from `require` to `suggest` - @bskrtich #246 -## 0.10.0 - 4 May 2014 + +0.10.0 - 4 May 2014 +------------------- This release marked heavy refactorings on internal code structure with the creation of some abstract classes to reduce code duplication. `Element` subnamespace is introduced in this release to replace `Section`. Word2007 reader capability is greatly enhanced. Endnote is introduced. List numbering is now customizable. Basic HTML and PDF writing support is enabled. Basic ODText reader is introduced. @@ -241,14 +253,18 @@ This release marked heavy refactorings on internal code structure with the creat - Refactor: Apply composite pattern for Word2007 reader - @ivanlanin -## 0.9.1 - 27 Mar 2014 + +0.9.1 - 27 Mar 2014 +------------------- This is a bugfix release for PSR-4 compatibility. - Fixed PSR-4 composer autoloader - @AntonTyutin -## 0.9.0 - 26 Mar 2014 + +0.9.0 - 26 Mar 2014 +------------------- This release marked the transformation to namespaces (PHP 5.3+). @@ -272,14 +288,18 @@ This release marked the transformation to namespaces (PHP 5.3+). - Merge Section\MemoryImage into Section\Image. Section\Image is deprecated - @ivanlanin #160 -## 0.8.1 - 17 Mar 2014 + +0.8.1 - 17 Mar 2014 +------------------- This is a bugfix release for image detection functionality. - Added fallback for computers that do not have exif_imagetype - @bskrtich, @gabrielbull -## 0.8.0 - 15 Mar 2014 + +0.8.0 - 15 Mar 2014 +------------------- This release merged a lot of improvements from the community. Unit tests introduced in this release and has reached 90% code coverage. @@ -329,7 +349,9 @@ This release merged a lot of improvements from the community. Unit tests introdu - UnitTests - @Progi1984 -## 0.7.0 - 28 Jan 2014 + +0.7.0 - 28 Jan 2014 +------------------- This is the first release after a long development hiatus in [CodePlex](https://phpword.codeplex.com/). This release initialized ODT and RTF Writer, along with some other new features for the existing Word2007 Writer, e.g. tab, multiple header, rowspan and colspan. [Composer](https://packagist.org/packages/phpoffice/phpword) and [Travis](https://travis-ci.org/PHPOffice/PHPWord) were added. From 25a5ba2b4c33e2786dd56851db0e603d6ff6626f Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 21 Feb 2015 18:44:56 +0400 Subject: [PATCH 07/99] Minor refactoring. --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fcd547bb00..6ba8f990b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -Changelog +CHANGELOG ========= This is the changelog between releases of PHPWord. Releases are listed in reverse chronological order with the latest version listed on top, while additions/changes in each release are listed in chronological order. Changes in each release are divided into three parts: added or change features, bugfixes, and miscellaneous improvements. Each line contains short information about the change made, the person who made it, and the related issue number(s) in GitHub. From fbdd5f15bbf37cf1a2a58980f6ca90dfa1d08be3 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 21 Feb 2015 18:47:10 +0400 Subject: [PATCH 08/99] Minor refactoring. --- CHANGELOG.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ba8f990b7..af94e4e453 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ CHANGELOG This is the changelog between releases of PHPWord. Releases are listed in reverse chronological order with the latest version listed on top, while additions/changes in each release are listed in chronological order. Changes in each release are divided into three parts: added or change features, bugfixes, and miscellaneous improvements. Each line contains short information about the change made, the person who made it, and the related issue number(s) in GitHub. -0.13.0 - TBD +0.13.0 (TBD) ------------ Place announcement text here. @@ -14,7 +14,7 @@ Place announcement text here. -0.12.0 - 3 January 2015 +0.12.0 (3 January 2015) ----------------------- This release added form fields (textinput, checkbox, and dropdown), drawing shapes (arc, curve, line, polyline, rect, oval), and basic 2D chart (pie, doughnut, bar, line, area, scatter, radar) elements along with some new styles. Basic MsDoc reader is introduced. @@ -78,7 +78,7 @@ This release added form fields (textinput, checkbox, and dropdown), drawing shap -0.11.1 - 2 June 2014 +0.11.1 (2 June 2014) -------------------- This is an immediate bugfix release for HTML reader. @@ -87,7 +87,7 @@ This is an immediate bugfix release for HTML reader. -0.11.0 - 1 June 2014 +0.11.0 (1 June 2014) -------------------- This release marked the change of PHPWord license from LGPL 2.1 to LGPL 3. Four new elements were added: TextBox, ListItemRun, Field, and Line. Relative and absolute positioning for images and textboxes were added. Writer classes were refactored into parts, elements, and styles. ODT and RTF features were enhanced. Ability to add elements to PHPWord object via HTML were implemented. RTF and HTML reader were initiated. @@ -156,7 +156,7 @@ This release marked the change of PHPWord license from LGPL 2.1 to LGPL 3. Four -0.10.1 - 21 May 2014 +0.10.1 (21 May 2014) -------------------- This is a bugfix release for `php-zip` requirement in Composer. @@ -165,7 +165,7 @@ This is a bugfix release for `php-zip` requirement in Composer. -0.10.0 - 4 May 2014 +0.10.0 (4 May 2014) ------------------- This release marked heavy refactorings on internal code structure with the creation of some abstract classes to reduce code duplication. `Element` subnamespace is introduced in this release to replace `Section`. Word2007 reader capability is greatly enhanced. Endnote is introduced. List numbering is now customizable. Basic HTML and PDF writing support is enabled. Basic ODText reader is introduced. @@ -254,7 +254,7 @@ This release marked heavy refactorings on internal code structure with the creat -0.9.1 - 27 Mar 2014 +0.9.1 (27 Mar 2014) ------------------- This is a bugfix release for PSR-4 compatibility. @@ -263,7 +263,7 @@ This is a bugfix release for PSR-4 compatibility. -0.9.0 - 26 Mar 2014 +0.9.0 (26 Mar 2014) ------------------- This release marked the transformation to namespaces (PHP 5.3+). @@ -289,7 +289,7 @@ This release marked the transformation to namespaces (PHP 5.3+). -0.8.1 - 17 Mar 2014 +0.8.1 (17 Mar 2014) ------------------- This is a bugfix release for image detection functionality. @@ -298,7 +298,7 @@ This is a bugfix release for image detection functionality. -0.8.0 - 15 Mar 2014 +0.8.0 (15 Mar 2014) ------------------- This release merged a lot of improvements from the community. Unit tests introduced in this release and has reached 90% code coverage. @@ -350,7 +350,7 @@ This release merged a lot of improvements from the community. Unit tests introdu -0.7.0 - 28 Jan 2014 +0.7.0 (28 Jan 2014) ------------------- This is the first release after a long development hiatus in [CodePlex](https://phpword.codeplex.com/). This release initialized ODT and RTF Writer, along with some other new features for the existing Word2007 Writer, e.g. tab, multiple header, rowspan and colspan. [Composer](https://packagist.org/packages/phpoffice/phpword) and [Travis](https://travis-ci.org/PHPOffice/PHPWord) were added. From e0dea8e95c7466a4830841d621d66b91d3eea35a Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 21 Feb 2015 18:51:12 +0400 Subject: [PATCH 09/99] Fixed broken paragraph alignment for OpenXml. --- tests/PhpWord/Tests/Style/ParagraphTest.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tests/PhpWord/Tests/Style/ParagraphTest.php b/tests/PhpWord/Tests/Style/ParagraphTest.php index e3550819e9..55e6e395a9 100644 --- a/tests/PhpWord/Tests/Style/ParagraphTest.php +++ b/tests/PhpWord/Tests/Style/ParagraphTest.php @@ -67,7 +67,6 @@ public function testSetStyleValueNormal() $object = new Paragraph(); $attributes = array( -// 'align' => 'justify', 'spaceAfter' => 240, 'spaceBefore' => 240, 'indent' => 1, @@ -85,11 +84,7 @@ public function testSetStyleValueNormal() foreach ($attributes as $key => $value) { $get = "get{$key}"; $object->setStyleValue("$key", $value); - /*if ('align' == $key) { - if ('justify' == $value) { - $value = 'both'; - } - } else*/if ('indent' == $key || 'hanging' == $key) { + if ('indent' == $key || 'hanging' == $key) { $value = $value * 720; } elseif ('spacing' == $key) { $value += 240; From cb6ad0e9d30fef998b40570c3e3752f3e75fe8ae Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 21 Feb 2015 20:11:57 +0400 Subject: [PATCH 10/99] Fixed broken paragraph alignment for OpenXml. --- CHANGELOG.md | 4 ++-- docs/elements.rst | 6 +++--- docs/src/documentation.md | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index af94e4e453..9dff9feda4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,9 +8,9 @@ This is the changelog between releases of PHPWord. Releases are listed in revers Place announcement text here. -### Bugfixes +### Changes -- Discovered that ``alignment`` option value doesn't affect paragraph alignment at all. This is fixed now. Note: ``getAlign()`` and ``setAlign()`` methods of ``Paragraph`` style are renamed. - @RomanSyroeshko +- Renamed ``align`` option of ``Paragraph`` style into ``alignment``. Note: accessor and mutator methods are renamed too. - @RomanSyroeshko diff --git a/docs/elements.rst b/docs/elements.rst index eb70f9ad9b..0b4eb08cee 100644 --- a/docs/elements.rst +++ b/docs/elements.rst @@ -84,7 +84,7 @@ Inline style examples: .. code-block:: php $fontStyle = array('name' => 'Times New Roman', 'size' => 9); - $paragraphStyle = array('align' => 'both'); + $paragraphStyle = array('alignment' => 'both'); $section->addText('I am simple paragraph', $fontStyle, $paragraphStyle); $textrun = $section->addTextRun(); @@ -100,7 +100,7 @@ Defined style examples: $phpWord->addFontStyle('fStyle', $fontStyle); $text = $section->addText('Hello world!', 'fStyle'); - $paragraphStyle = array('align' => 'center'); + $paragraphStyle = array('alignment' => 'center'); $phpWord->addParagraphStyle('pStyle', $paragraphStyle); $text = $section->addText('Hello world!', 'pStyle'); @@ -130,7 +130,7 @@ Paragraph style Available paragraph styles: -- ``align`` Paragraph alignment, *left*, *right* or *center* +- ``alignment`` Paragraph alignment, *left*, *right* or *center* - ``spaceBefore`` Space before paragraph - ``spaceAfter`` Space after paragraph - ``indent`` Indent by how much diff --git a/docs/src/documentation.md b/docs/src/documentation.md index 36c8ad6b67..d4c640518d 100644 --- a/docs/src/documentation.md +++ b/docs/src/documentation.md @@ -517,7 +517,7 @@ Inline style examples: ```php $fontStyle = array('name' => 'Times New Roman', 'size' => 9); -$paragraphStyle = array('align' => 'both'); +$paragraphStyle = array('alignment' => 'both'); $section->addText('I am simple paragraph', $fontStyle, $paragraphStyle); $textrun = $section->addTextRun(); @@ -533,7 +533,7 @@ $fontStyle = array('color' => '006699', 'size' => 18, 'bold' => true); $phpWord->addFontStyle('fStyle', $fontStyle); $text = $section->addText('Hello world!', 'fStyle'); -$paragraphStyle = array('align' => 'center'); +$paragraphStyle = array('alignment' => 'center'); $phpWord->addParagraphStyle('pStyle', $paragraphStyle); $text = $section->addText('Hello world!', 'pStyle'); ``` @@ -853,7 +853,7 @@ Available font styles: Available paragraph styles: -- `align` Paragraph alignment, *left*, *right* or *center* +- `alignment` Paragraph alignment, *left*, *right* or *center* - `spaceBefore` Space before paragraph - `spaceAfter` Space after paragraph - `indent` Indent by how much From 17ee9e1bf8df43307ca510709158895fc74ba237 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sun, 1 Mar 2015 21:02:49 +0400 Subject: [PATCH 11/99] Fixed broken paragraph alignment for OpenXml. --- docs/styles.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/styles.rst b/docs/styles.rst index f4c1e8ebd4..ffb9e08782 100644 --- a/docs/styles.rst +++ b/docs/styles.rst @@ -59,7 +59,7 @@ Paragraph Available paragraph styles: -- ``align`` Paragraph alignment, *left*, *right* or *center* +- ``alignment`` Paragraph alignment, *left*, *right* or *center* - ``spaceBefore`` Space before paragraph - ``spaceAfter`` Space after paragraph - ``indent`` Indent by how much From 18c54623b0037f16de936863c2e02f491169a5c6 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sun, 1 Mar 2015 21:13:03 +0400 Subject: [PATCH 12/99] Fixed broken paragraph alignment for OpenXml. --- samples/Sample_01_SimpleText.php | 2 +- samples/Sample_08_ParagraphPagination.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/Sample_01_SimpleText.php b/samples/Sample_01_SimpleText.php index 391622b821..67276b6abe 100644 --- a/samples/Sample_01_SimpleText.php +++ b/samples/Sample_01_SimpleText.php @@ -5,7 +5,7 @@ echo date('H:i:s') , ' Create new PhpWord object' , EOL; $phpWord = new \PhpOffice\PhpWord\PhpWord(); $phpWord->addFontStyle('rStyle', array('bold' => true, 'italic' => true, 'size' => 16, 'allCaps' => true, 'doubleStrikethrough' => true)); -$phpWord->addParagraphStyle('pStyle', array('align' => 'center', 'spaceAfter' => 100)); +$phpWord->addParagraphStyle('pStyle', array('alignment' => 'center', 'spaceAfter' => 100)); $phpWord->addTitleStyle(1, array('bold' => true), array('spaceAfter' => 240)); // New portrait section diff --git a/samples/Sample_08_ParagraphPagination.php b/samples/Sample_08_ParagraphPagination.php index 979d6c0f01..4b6338d7f7 100644 --- a/samples/Sample_08_ParagraphPagination.php +++ b/samples/Sample_08_ParagraphPagination.php @@ -6,7 +6,7 @@ $phpWord = new \PhpOffice\PhpWord\PhpWord(); $phpWord->setDefaultParagraphStyle( array( - 'align' => 'both', + 'alignment' => 'both', 'spaceAfter' => \PhpOffice\PhpWord\Shared\Converter::pointToTwip(12), 'spacing' => 120, ) From f2cd42fecf6af3a8ab538e2ad5dc4f475127bd8a Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sun, 22 Mar 2015 11:40:14 +0400 Subject: [PATCH 13/99] #495. --- samples/Sample_12_HeaderFooter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/Sample_12_HeaderFooter.php b/samples/Sample_12_HeaderFooter.php index b759121c60..df06453abf 100644 --- a/samples/Sample_12_HeaderFooter.php +++ b/samples/Sample_12_HeaderFooter.php @@ -26,7 +26,7 @@ // Add footer $footer = $section->addFooter(); -$footer->addPreserveText(htmlspecialchars('Page {PAGE} of {NUMPAGES}.', ENT_COMPAT, 'UTF-8'), array('align' => 'center')); +$footer->addPreserveText(htmlspecialchars('Page {PAGE} of {NUMPAGES}.', ENT_COMPAT, 'UTF-8'), null, array('alignment' => 'center')); $footer->addLink('https://github.com/PHPOffice/PHPWord', htmlspecialchars('PHPWord on GitHub', ENT_COMPAT, 'UTF-8')); // Write some text From 0198aec0d1c4200f7fef70d4ed129374b95735de Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sun, 22 Mar 2015 11:49:16 +0400 Subject: [PATCH 14/99] #495. --- tests/PhpWord/Tests/Element/PreserveTextTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/PhpWord/Tests/Element/PreserveTextTest.php b/tests/PhpWord/Tests/Element/PreserveTextTest.php index 51679939e7..dbecc45d2b 100644 --- a/tests/PhpWord/Tests/Element/PreserveTextTest.php +++ b/tests/PhpWord/Tests/Element/PreserveTextTest.php @@ -57,8 +57,8 @@ public function testConstructWithArray() { $oPreserveText = new PreserveText( htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), - array('align' => 'center'), - array('marginLeft' => 600, 'marginRight' => 600, 'marginTop' => 600, 'marginBottom' => 600) + null, + array('alignment' => 'center') ); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Font', $oPreserveText->getFontStyle()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Paragraph', $oPreserveText->getParagraphStyle()); From a38ec77afe63b48ef65fb2c4446910757cf4d8bd Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sun, 22 Mar 2015 11:53:35 +0400 Subject: [PATCH 15/99] #495. --- CHANGELOG.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9dff9feda4..8c2b02a392 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,8 @@ Place announcement text here. - Renamed ``align`` option of ``Paragraph`` style into ``alignment``. Note: accessor and mutator methods are renamed too. - @RomanSyroeshko - +### Bugfixes +- Fixed PreserveText element alignment in footer (see ``Sample_12_HeaderFooter.php``). - @RomanSyroeshko, @SSchwaiger #495 0.12.0 (3 January 2015) ----------------------- @@ -379,4 +380,4 @@ This is the first release after a long development hiatus in [CodePlex](https:// - Basic CI with Travis - @Progi1984 - Added PHPWord_Exception and exception when could not copy the template - @Progi1984 - IMPROVED: Moved examples out of Classes directory - @Progi1984 -- IMPROVED: Advanced string replace in setValue for Template - @Esmeraldo [#49](http://phpword.codeplex.com/workitem/49) \ No newline at end of file +- IMPROVED: Advanced string replace in setValue for Template - @Esmeraldo [#49](http://phpword.codeplex.com/workitem/49) From 8e9f86564dca8d04eaa4774b6fd5160104c8141f Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sun, 22 Mar 2015 11:54:46 +0400 Subject: [PATCH 16/99] Removed typo. --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c2b02a392..6026e7e341 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,7 @@ Place announcement text here. - Renamed ``align`` option of ``Paragraph`` style into ``alignment``. Note: accessor and mutator methods are renamed too. - @RomanSyroeshko ### Bugfixes -- Fixed PreserveText element alignment in footer (see ``Sample_12_HeaderFooter.php``). - @RomanSyroeshko, @SSchwaiger #495 +- Fixed PreserveText element alignment in footer (see ``Sample_12_HeaderFooter.php``). - @RomanSyroeshko @SSchwaiger #495 0.12.0 (3 January 2015) ----------------------- From 75022c5526adc5b83f72ab200b15c57e3b94df57 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sun, 22 Mar 2015 12:12:32 +0400 Subject: [PATCH 17/99] #495. --- tests/PhpWord/Tests/Element/PreserveTextTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/PhpWord/Tests/Element/PreserveTextTest.php b/tests/PhpWord/Tests/Element/PreserveTextTest.php index dbecc45d2b..05cfded377 100644 --- a/tests/PhpWord/Tests/Element/PreserveTextTest.php +++ b/tests/PhpWord/Tests/Element/PreserveTextTest.php @@ -57,7 +57,7 @@ public function testConstructWithArray() { $oPreserveText = new PreserveText( htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), - null, + array('size' => 16, 'color' => '1B2232'), array('alignment' => 'center') ); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Font', $oPreserveText->getFontStyle()); From f33abcdcc4568c7e1b297f551b4c4245391064f2 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 11 Apr 2015 21:25:40 +0400 Subject: [PATCH 18/99] Performance improvement for #513. --- src/PhpWord/TemplateProcessor.php | 48 ++++++++++++++++++++++--------- 1 file changed, 34 insertions(+), 14 deletions(-) diff --git a/src/PhpWord/TemplateProcessor.php b/src/PhpWord/TemplateProcessor.php index cbed973011..624ef8977c 100644 --- a/src/PhpWord/TemplateProcessor.php +++ b/src/PhpWord/TemplateProcessor.php @@ -82,16 +82,20 @@ public function __construct($documentTemplate) $this->zipClass = new ZipArchive(); $this->zipClass->open($this->temporaryDocumentFilename); $index = 1; - while ($this->zipClass->locateName($this->getHeaderName($index)) !== false) { - $this->temporaryDocumentHeaders[$index] = $this->zipClass->getFromName($this->getHeaderName($index)); + while (false !== $this->zipClass->locateName($this->getHeaderName($index))) { + $this->temporaryDocumentHeaders[$index] = $this->fixBrokenMacros( + $this->zipClass->getFromName($this->getHeaderName($index)) + ); $index++; } $index = 1; - while ($this->zipClass->locateName($this->getFooterName($index)) !== false) { - $this->temporaryDocumentFooters[$index] = $this->zipClass->getFromName($this->getFooterName($index)); + while (false !== $this->zipClass->locateName($this->getFooterName($index))) { + $this->temporaryDocumentFooters[$index] = $this->fixBrokenMacros( + $this->zipClass->getFromName($this->getFooterName($index)) + ); $index++; } - $this->temporaryDocumentMainPart = $this->zipClass->getFromName('word/document.xml'); + $this->temporaryDocumentMainPart = $this->fixBrokenMacros($this->zipClass->getFromName('word/document.xml')); } /** @@ -175,7 +179,7 @@ public function getVariables() */ public function cloneRow($search, $numberOfClones) { - if (substr($search, 0, 2) !== '${' && substr($search, -1) !== '}') { + if ('${' !== substr($search, 0, 2) && '}' !== substr($search, -1)) { $search = '${' . $search . '}'; } @@ -338,6 +342,30 @@ public function saveAs($fileName) rename($tempFileName, $fileName); } + /** + * Finds parts of broken macros and sticks them together. + * Macros, while being edited, could be implicitly broken by some of the word processors. + * + * @since 0.13.0 + * + * @param string $documentPart The document part in XML representation. + * + * @return string + */ + protected function fixBrokenMacros($documentPart) { + $fixedDocumentPart = $documentPart; + + $pattern = '|\$\{([^\}]+)\}|U'; + preg_match_all($pattern, $fixedDocumentPart, $matches); + foreach ($matches[0] as $value) { + $valueCleaned = preg_replace('/<[^>]+>/', '', $value); + $valueCleaned = preg_replace('/<\/[^>]+>/', '', $valueCleaned); + $fixedDocumentPart = str_replace($value, $valueCleaned, $fixedDocumentPart); + } + + return $fixedDocumentPart; + } + /** * Find and replace placeholders in the given XML section. * @@ -349,14 +377,6 @@ public function saveAs($fileName) */ protected function setValueForPart($documentPartXML, $search, $replace, $limit) { - $pattern = '|\$\{([^\}]+)\}|U'; - preg_match_all($pattern, $documentPartXML, $matches); - foreach ($matches[0] as $value) { - $valueCleaned = preg_replace('/<[^>]+>/', '', $value); - $valueCleaned = preg_replace('/<\/[^>]+>/', '', $valueCleaned); - $documentPartXML = str_replace($value, $valueCleaned, $documentPartXML); - } - if (substr($search, 0, 2) !== '${' && substr($search, -1) !== '}') { $search = '${' . $search . '}'; } From 520a7a8bc68aa8f009b9815d6e871b1b960b00a6 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 11 Apr 2015 21:26:46 +0400 Subject: [PATCH 19/99] Performance improvement for #513. --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6026e7e341..3ef4794e06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ This is the changelog between releases of PHPWord. Releases are listed in revers Place announcement text here. ### Changes - +- Improved performance of ``TemplateProcessor::setValue()``. - @RomanSyroeshko #513 - Renamed ``align`` option of ``Paragraph`` style into ``alignment``. Note: accessor and mutator methods are renamed too. - @RomanSyroeshko ### Bugfixes From a5c3645717f0ab2905426cb28ac5310047e251c7 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 11 Apr 2015 21:41:58 +0400 Subject: [PATCH 20/99] Performance improvement for #513. --- src/PhpWord/TemplateProcessor.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PhpWord/TemplateProcessor.php b/src/PhpWord/TemplateProcessor.php index 624ef8977c..321abe7e09 100644 --- a/src/PhpWord/TemplateProcessor.php +++ b/src/PhpWord/TemplateProcessor.php @@ -352,7 +352,8 @@ public function saveAs($fileName) * * @return string */ - protected function fixBrokenMacros($documentPart) { + protected function fixBrokenMacros($documentPart) + { $fixedDocumentPart = $documentPart; $pattern = '|\$\{([^\}]+)\}|U'; From b7387be3fd24021016c88b17eb5c74f5e4ce7fb6 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Tue, 14 Apr 2015 22:47:41 +0300 Subject: [PATCH 21/99] Reimplemented #498. --- CHANGELOG.md | 1 + src/PhpWord/TemplateProcessor.php | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ef4794e06..717d657148 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ This is the changelog between releases of PHPWord. Releases are listed in revers Place announcement text here. ### Changes +- Changed visibility of all private properties and methods of ``TemplateProcessor`` to ``protected``. - RomanSyroeshko #498 - Improved performance of ``TemplateProcessor::setValue()``. - @RomanSyroeshko #513 - Renamed ``align`` option of ``Paragraph`` style into ``alignment``. Note: accessor and mutator methods are renamed too. - @RomanSyroeshko diff --git a/src/PhpWord/TemplateProcessor.php b/src/PhpWord/TemplateProcessor.php index 321abe7e09..77018f3d40 100644 --- a/src/PhpWord/TemplateProcessor.php +++ b/src/PhpWord/TemplateProcessor.php @@ -30,33 +30,33 @@ class TemplateProcessor * * @var mixed */ - private $zipClass; + protected $zipClass; /** * @var string Temporary document filename (with path). */ - private $temporaryDocumentFilename; + protected $temporaryDocumentFilename; /** * Content of main document part (in XML format) of the temporary document. * * @var string */ - private $temporaryDocumentMainPart; + protected $temporaryDocumentMainPart; /** * Content of headers (in XML format) of the temporary document. * * @var string[] */ - private $temporaryDocumentHeaders = array(); + protected $temporaryDocumentHeaders = array(); /** * Content of footers (in XML format) of the temporary document. * * @var string[] */ - private $temporaryDocumentFooters = array(); + protected $temporaryDocumentFooters = array(); /** * @since 0.12.0 Throws CreateTemporaryFileException and CopyFileException instead of Exception. @@ -410,7 +410,7 @@ protected function getVariablesForPart($documentPartXML) * @param integer $index * @return string */ - private function getFooterName($index) + protected function getFooterName($index) { return sprintf('word/footer%d.xml', $index); } @@ -421,7 +421,7 @@ private function getFooterName($index) * @param integer $index * @return string */ - private function getHeaderName($index) + protected function getHeaderName($index) { return sprintf('word/header%d.xml', $index); } @@ -433,7 +433,7 @@ private function getHeaderName($index) * @return integer * @throws \PhpOffice\PhpWord\Exception\Exception */ - private function findRowStart($offset) + protected function findRowStart($offset) { $rowStart = strrpos($this->temporaryDocumentMainPart, 'temporaryDocumentMainPart) - $offset) * -1)); @@ -453,7 +453,7 @@ private function findRowStart($offset) * @param integer $offset * @return integer */ - private function findRowEnd($offset) + protected function findRowEnd($offset) { return strpos($this->temporaryDocumentMainPart, '', $offset) + 7; } @@ -465,7 +465,7 @@ private function findRowEnd($offset) * @param integer $endPosition * @return string */ - private function getSlice($startPosition, $endPosition = 0) + protected function getSlice($startPosition, $endPosition = 0) { if (!$endPosition) { $endPosition = strlen($this->temporaryDocumentMainPart); From d5e276ac628dfdcbdedc3f25c82c1455c4393c77 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Tue, 14 Apr 2015 22:56:39 +0300 Subject: [PATCH 22/99] Reimplemented #498. --- CHANGELOG.md | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 717d657148..f4e1c29498 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ This is the changelog between releases of PHPWord. Releases are listed in revers Place announcement text here. ### Changes -- Changed visibility of all private properties and methods of ``TemplateProcessor`` to ``protected``. - RomanSyroeshko #498 +- Changed visibility of all private properties and methods of ``TemplateProcessor`` to ``protected``. - @RomanSyroeshko #498 - Improved performance of ``TemplateProcessor::setValue()``. - @RomanSyroeshko #513 - Renamed ``align`` option of ``Paragraph`` style into ``alignment``. Note: accessor and mutator methods are renamed too. - @RomanSyroeshko @@ -22,7 +22,6 @@ Place announcement text here. This release added form fields (textinput, checkbox, and dropdown), drawing shapes (arc, curve, line, polyline, rect, oval), and basic 2D chart (pie, doughnut, bar, line, area, scatter, radar) elements along with some new styles. Basic MsDoc reader is introduced. ### Features - - Element: Ability to add drawing shapes (arc, curve, line, polyline, rect, oval) using new `Shape` element - @ivanlanin #123 - Font: New `scale`, `spacing`, and `kerning` property of font style - @ivanlanin - Paragraph: Added shading to the paragraph style for full width shading - @lrobert #264 @@ -44,7 +43,6 @@ This release added form fields (textinput, checkbox, and dropdown), drawing shap - Report style options enumerated when style unknown - @h6w ### Bugfixes - - Fix rare PclZip/realpath/PHP version problem - @andrew-kzoo #261 - `addHTML` encoding and ampersand fixes for PHP 5.3 - @bskrtich #270 - Page breaks on titles and tables - @ivanlanin #274 @@ -58,7 +56,6 @@ This release added form fields (textinput, checkbox, and dropdown), drawing shap - `` tag is closed with `` tag: - @franzholz #438 ### Deprecated - - `Element\Link::getTarget()` replaced by `Element\Link::getSource()` - `Element\Section::getSettings()` and `Element\Section::setSettings()` replaced by `Element\Section::getStyle()` and `Element\Section::setStyle()` - `Shared\Drawing` and `Shared\Font` merged into `Shared\Converter` @@ -67,7 +64,6 @@ This release added form fields (textinput, checkbox, and dropdown), drawing shap - `PhpWord->loadTemplate($filename)` ### Miscellaneous - - Docs: Add known issue on `README` about requirement for temporary folder to be writable and update `samples/index.php` for this requirement check - @ivanlanin #238 - Docs: Correct elements.rst about Line - @chrissharkman #292 - PclZip: Remove temporary file after used - @andrew-kzoo #265 @@ -95,7 +91,6 @@ This is an immediate bugfix release for HTML reader. This release marked the change of PHPWord license from LGPL 2.1 to LGPL 3. Four new elements were added: TextBox, ListItemRun, Field, and Line. Relative and absolute positioning for images and textboxes were added. Writer classes were refactored into parts, elements, and styles. ODT and RTF features were enhanced. Ability to add elements to PHPWord object via HTML were implemented. RTF and HTML reader were initiated. ### Features - - Image: Ability to define relative and absolute positioning - @basjan #217 - Footer: Conform footer with header by adding firstPage, evenPage and by inheritance - @basjan @ivanlanin #219 - Element: New `TextBox` element - @basjan @ivanlanin #228, #229, #231 @@ -125,7 +120,6 @@ This release marked the change of PHPWord license from LGPL 2.1 to LGPL 3. Four - RTF Writer: Basic table writing - @ivanlanin #245 ### Bugfixes - - Header: All images added to the second header were assigned to the first header - @basjan #222 - Conversion: Fix conversion from cm to pixel, pixel to cm, and pixel to point - @basjan #233, #234 - PageBreak: Page break adds new line in the beginning of the new page - @ivanlanin #150 @@ -133,7 +127,6 @@ This release marked the change of PHPWord license from LGPL 2.1 to LGPL 3. Four - Title: Orphan `w:fldChar` caused OpenOffice to crash when opening DOCX - @ivanlanin #236 ### Deprecated - - Static classes `Footnotes`, `Endnotes`, and `TOC` - `Writer\Word2007\Part`: `Numbering::writeNumbering()`, `Settings::writeSettings()`, `WebSettings::writeWebSettings()`, `ContentTypes::writeContentTypes()`, `Styles::writeStyles()`, `Document::writeDocument()` all changed into `write()` - `Writer\Word2007\Part\DocProps`: Split into `Writer\Word2007\Part\DocPropsCore` and `Writer\Word2007\Part\DocPropsApp` @@ -141,7 +134,6 @@ This release marked the change of PHPWord license from LGPL 2.1 to LGPL 3. Four - `Writer\HTML::writeDocument`: Replaced by `Writer\HTML::getContent` ### Miscellaneous - - License: Change the project license from LGPL 2.1 into LGPL 3.0 - #211 - Word2007 Writer: New `Style\Image` class - @ivanlanin - Refactor: Replace static classes `Footnotes`, `Endnotes`, and `TOC` with `Collections` - @ivanlanin #206 @@ -173,7 +165,6 @@ This is a bugfix release for `php-zip` requirement in Composer. This release marked heavy refactorings on internal code structure with the creation of some abstract classes to reduce code duplication. `Element` subnamespace is introduced in this release to replace `Section`. Word2007 reader capability is greatly enhanced. Endnote is introduced. List numbering is now customizable. Basic HTML and PDF writing support is enabled. Basic ODText reader is introduced. ### Features - - Image: Get image dimensions without EXIF extension - @andrew-kzoo #184 - Table: Add `tblGrid` element for Libre/Open Office table sizing - @gianis6 #183 - Footnote: Ability to insert textbreak in footnote `$footnote->addTextBreak()` - @ivanlanin @@ -213,12 +204,10 @@ This release marked heavy refactorings on internal code structure with the creat - Paragraph: Ability to define first line and right indentation - @ivanlanin ### Bugfixes - - Footnote: Footnote content doesn't show footnote reference number - @ivanlanin #170 - Documentation: Error in a function - @theBeerNut #195 ### Deprecated - - `createTextRun` replaced by `addTextRun` - `createFootnote` replaced by `addFootnote` - `createHeader` replaced by `addHeader` @@ -234,7 +223,6 @@ This release marked heavy refactorings on internal code structure with the creat - `Style\Cell::getDefaultBorderColor` ### Miscellaneous - - Documentation: Simplify page level docblock - @ivanlanin #179 - Writer: Refactor writer classes and create a new `Write\AbstractWriter` abstract class - @ivanlanin #160 - General: Refactor folders: `Element` and `Exception` - @ivanlanin #187 @@ -271,16 +259,13 @@ This is a bugfix release for PSR-4 compatibility. This release marked the transformation to namespaces (PHP 5.3+). ### Features - - Image: Ability to use remote or GD images using `addImage()` on sections, headers, footer, cells, and textruns - @ivanlanin - Header: Ability to use remote or GD images using `addWatermark()` - @ivanlanin ### Bugfixes - - Preserve text doesn't render correctly when the text is not the first word, e.g. 'Page {PAGE}' - @ivanlanin ### Miscellaneous - - Move documentation to [Read The Docs](http://phpword.readthedocs.org/en/develop/) - @Progi1984 @ivanlanin #82 - Reorganize and redesign samples folder - @ivanlanin #137 - Use `PhpOffice\PhpWord` namespace for PSR compliance - @RomanSyroeshko @gabrielbull #159, #58 @@ -306,7 +291,6 @@ This is a bugfix release for image detection functionality. This release merged a lot of improvements from the community. Unit tests introduced in this release and has reached 90% code coverage. ### Features - - Template: Permit to save a template generated as a file (PHPWord_Template::saveAs()) - @RomanSyroeshko #56, #57 - Word2007: Support sections page numbering - @gabrielbull - Word2007: Added line height methods to mirror the line height settings in Word in the paragraph styling - @gabrielbull @@ -338,7 +322,6 @@ This release merged a lot of improvements from the community. Unit tests introdu - TextBreak: Allow font and paragraph style for text break - @ivanlanin #18 ### Bugfixes - - Fixed bug with cell styling - @gabrielbull - Fixed bug list items inside of cells - @gabrielbull - Adding a value that contains "&" in a template breaks it - @SiebelsTim #51 @@ -347,7 +330,6 @@ This release merged a lot of improvements from the community. Unit tests introdu - Footnote: Corrupt DOCX reported by MS Word when sections > 1 and not every sections have footnote - @ivanlanin #125 ### Miscellaneous - - UnitTests - @Progi1984 @@ -358,7 +340,6 @@ This release merged a lot of improvements from the community. Unit tests introdu This is the first release after a long development hiatus in [CodePlex](https://phpword.codeplex.com/). This release initialized ODT and RTF Writer, along with some other new features for the existing Word2007 Writer, e.g. tab, multiple header, rowspan and colspan. [Composer](https://packagist.org/packages/phpoffice/phpword) and [Travis](https://travis-ci.org/PHPOffice/PHPWord) were added. ### Features - - Implement RTF Writer - @Progi1984 #1 - Implement ODT Writer - @Progi1984 #2 - Word2007: Add rowspan and colspan to cells - @kaystrobach @@ -368,13 +349,11 @@ This is the first release after a long development hiatus in [CodePlex](https:// - Added support for image wrapping style - @gabrielbull ### Bugfixes - - "Warning: Invalid error type specified in ...\PHPWord.php on line 226" is thrown when the specified template file is not found - @RomanSyroeshko #32 - PHPWord_Shared_String.IsUTF8 returns FALSE for Cyrillic UTF-8 input - @RomanSyroeshko #34 - Temporary files naming logic in PHPWord_Template can lead to a collision - @RomanSyroeshko #38 ### Miscellaneous - - Add superscript/subscript styling in Excel2007 Writer - @MarkBaker - add indentation support to paragraphs - @deds - Support for Composer - @Progi1984 #27 From fef4a367fee8b4cf86cb4f0151c2ad52fd4b0c3f Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Tue, 14 Apr 2015 23:41:11 +0300 Subject: [PATCH 23/99] Implementation for #371. --- CHANGELOG.md | 1 + tests/bootstrap.php | 13 +++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 717d657148..15474c0194 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ This is the changelog between releases of PHPWord. Releases are listed in revers Place announcement text here. ### Changes +- Improved error message for the case when ``autoload.php`` is not found. - @RomanSyroeshko #371 - Changed visibility of all private properties and methods of ``TemplateProcessor`` to ``protected``. - RomanSyroeshko #498 - Improved performance of ``TemplateProcessor::setValue()``. - @RomanSyroeshko #513 - Renamed ``align`` option of ``Paragraph`` style into ``alignment``. Note: accessor and mutator methods are renamed too. - @RomanSyroeshko diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 4932a21b26..6a1398a4db 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -22,11 +22,16 @@ define('PHPWORD_TESTS_BASE_DIR', realpath(__DIR__)); } -$vendor = realpath(__DIR__ . '/../vendor'); -if (file_exists($vendor . '/autoload.php')) { - require $vendor . '/autoload.php'; +$vendorDirPath = realpath(__DIR__ . '/../vendor'); +if (file_exists($vendorDirPath . '/autoload.php')) { + require $vendorDirPath . '/autoload.php'; } else { - throw new Exception('Unable to load dependencies'); + throw new Exception( + sprintf( + 'Could not find file \'%s\'. It is generated by Composer. Use \'install\' or \'update\' Composer commands to move forward.', + $vendorDirPath . '/autoload.php' + ) + ); } spl_autoload_register(function ($class) { From 9770f44877ab4d3a74a0488d2f0cd2f2de8e31de Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Wed, 15 Apr 2015 00:12:37 +0300 Subject: [PATCH 24/99] Shortened names of ``TemplateProcessor`` properties. --- src/PhpWord/TemplateProcessor.php | 82 +++++++++++++++---------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/src/PhpWord/TemplateProcessor.php b/src/PhpWord/TemplateProcessor.php index 77018f3d40..e33ef68223 100644 --- a/src/PhpWord/TemplateProcessor.php +++ b/src/PhpWord/TemplateProcessor.php @@ -35,28 +35,28 @@ class TemplateProcessor /** * @var string Temporary document filename (with path). */ - protected $temporaryDocumentFilename; + protected $tempDocumentFilename; /** * Content of main document part (in XML format) of the temporary document. * * @var string */ - protected $temporaryDocumentMainPart; + protected $tempDocumentMainPart; /** * Content of headers (in XML format) of the temporary document. * * @var string[] */ - protected $temporaryDocumentHeaders = array(); + protected $tempDocumentHeaders = array(); /** * Content of footers (in XML format) of the temporary document. * * @var string[] */ - protected $temporaryDocumentFooters = array(); + protected $tempDocumentFooters = array(); /** * @since 0.12.0 Throws CreateTemporaryFileException and CopyFileException instead of Exception. @@ -68,34 +68,34 @@ class TemplateProcessor public function __construct($documentTemplate) { // Temporary document filename initialization - $this->temporaryDocumentFilename = tempnam(Settings::getTempDir(), 'PhpWord'); - if (false === $this->temporaryDocumentFilename) { + $this->tempDocumentFilename = tempnam(Settings::getTempDir(), 'PhpWord'); + if (false === $this->tempDocumentFilename) { throw new CreateTemporaryFileException(); } // Template file cloning - if (false === copy($documentTemplate, $this->temporaryDocumentFilename)) { - throw new CopyFileException($documentTemplate, $this->temporaryDocumentFilename); + if (false === copy($documentTemplate, $this->tempDocumentFilename)) { + throw new CopyFileException($documentTemplate, $this->tempDocumentFilename); } // Temporary document content extraction $this->zipClass = new ZipArchive(); - $this->zipClass->open($this->temporaryDocumentFilename); + $this->zipClass->open($this->tempDocumentFilename); $index = 1; while (false !== $this->zipClass->locateName($this->getHeaderName($index))) { - $this->temporaryDocumentHeaders[$index] = $this->fixBrokenMacros( + $this->tempDocumentHeaders[$index] = $this->fixBrokenMacros( $this->zipClass->getFromName($this->getHeaderName($index)) ); $index++; } $index = 1; while (false !== $this->zipClass->locateName($this->getFooterName($index))) { - $this->temporaryDocumentFooters[$index] = $this->fixBrokenMacros( + $this->tempDocumentFooters[$index] = $this->fixBrokenMacros( $this->zipClass->getFromName($this->getFooterName($index)) ); $index++; } - $this->temporaryDocumentMainPart = $this->fixBrokenMacros($this->zipClass->getFromName('word/document.xml')); + $this->tempDocumentMainPart = $this->fixBrokenMacros($this->zipClass->getFromName('word/document.xml')); } /** @@ -118,7 +118,7 @@ public function applyXslStyleSheet($xslDOMDocument, $xslOptions = array(), $xslO } $xmlDOMDocument = new \DOMDocument(); - if (false === $xmlDOMDocument->loadXML($this->temporaryDocumentMainPart)) { + if (false === $xmlDOMDocument->loadXML($this->tempDocumentMainPart)) { throw new Exception('Could not load XML from the given template.'); } @@ -127,7 +127,7 @@ public function applyXslStyleSheet($xslDOMDocument, $xslOptions = array(), $xslO throw new Exception('Could not transform the given XML document.'); } - $this->temporaryDocumentMainPart = $xmlTransformed; + $this->tempDocumentMainPart = $xmlTransformed; } /** @@ -138,14 +138,14 @@ public function applyXslStyleSheet($xslDOMDocument, $xslOptions = array(), $xslO */ public function setValue($search, $replace, $limit = -1) { - foreach ($this->temporaryDocumentHeaders as $index => $headerXML) { - $this->temporaryDocumentHeaders[$index] = $this->setValueForPart($this->temporaryDocumentHeaders[$index], $search, $replace, $limit); + foreach ($this->tempDocumentHeaders as $index => $headerXML) { + $this->tempDocumentHeaders[$index] = $this->setValueForPart($this->tempDocumentHeaders[$index], $search, $replace, $limit); } - $this->temporaryDocumentMainPart = $this->setValueForPart($this->temporaryDocumentMainPart, $search, $replace, $limit); + $this->tempDocumentMainPart = $this->setValueForPart($this->tempDocumentMainPart, $search, $replace, $limit); - foreach ($this->temporaryDocumentFooters as $index => $headerXML) { - $this->temporaryDocumentFooters[$index] = $this->setValueForPart($this->temporaryDocumentFooters[$index], $search, $replace, $limit); + foreach ($this->tempDocumentFooters as $index => $headerXML) { + $this->tempDocumentFooters[$index] = $this->setValueForPart($this->tempDocumentFooters[$index], $search, $replace, $limit); } } @@ -156,13 +156,13 @@ public function setValue($search, $replace, $limit = -1) */ public function getVariables() { - $variables = $this->getVariablesForPart($this->temporaryDocumentMainPart); + $variables = $this->getVariablesForPart($this->tempDocumentMainPart); - foreach ($this->temporaryDocumentHeaders as $headerXML) { + foreach ($this->tempDocumentHeaders as $headerXML) { $variables = array_merge($variables, $this->getVariablesForPart($headerXML)); } - foreach ($this->temporaryDocumentFooters as $footerXML) { + foreach ($this->tempDocumentFooters as $footerXML) { $variables = array_merge($variables, $this->getVariablesForPart($footerXML)); } @@ -183,7 +183,7 @@ public function cloneRow($search, $numberOfClones) $search = '${' . $search . '}'; } - $tagPos = strpos($this->temporaryDocumentMainPart, $search); + $tagPos = strpos($this->tempDocumentMainPart, $search); if (!$tagPos) { throw new Exception("Can not clone row, template variable not found or variable contains markup."); } @@ -223,7 +223,7 @@ public function cloneRow($search, $numberOfClones) } $result .= $this->getSlice($rowEnd); - $this->temporaryDocumentMainPart = $result; + $this->tempDocumentMainPart = $result; } /** @@ -239,7 +239,7 @@ public function cloneBlock($blockname, $clones = 1, $replace = true) $xmlBlock = null; preg_match( '/(<\?xml.*)(\${' . $blockname . '}<\/w:.*?p>)(.*)()/is', - $this->temporaryDocumentMainPart, + $this->tempDocumentMainPart, $matches ); @@ -251,10 +251,10 @@ public function cloneBlock($blockname, $clones = 1, $replace = true) } if ($replace) { - $this->temporaryDocumentMainPart = str_replace( + $this->tempDocumentMainPart = str_replace( $matches[2] . $matches[3] . $matches[4], implode('', $cloned), - $this->temporaryDocumentMainPart + $this->tempDocumentMainPart ); } } @@ -273,15 +273,15 @@ public function replaceBlock($blockname, $replacement) { preg_match( '/(<\?xml.*)(\${' . $blockname . '}<\/w:.*?p>)(.*)()/is', - $this->temporaryDocumentMainPart, + $this->tempDocumentMainPart, $matches ); if (isset($matches[3])) { - $this->temporaryDocumentMainPart = str_replace( + $this->tempDocumentMainPart = str_replace( $matches[2] . $matches[3] . $matches[4], $replacement, - $this->temporaryDocumentMainPart + $this->tempDocumentMainPart ); } } @@ -305,14 +305,14 @@ public function deleteBlock($blockname) */ public function save() { - foreach ($this->temporaryDocumentHeaders as $index => $headerXML) { - $this->zipClass->addFromString($this->getHeaderName($index), $this->temporaryDocumentHeaders[$index]); + foreach ($this->tempDocumentHeaders as $index => $headerXML) { + $this->zipClass->addFromString($this->getHeaderName($index), $this->tempDocumentHeaders[$index]); } - $this->zipClass->addFromString('word/document.xml', $this->temporaryDocumentMainPart); + $this->zipClass->addFromString('word/document.xml', $this->tempDocumentMainPart); - foreach ($this->temporaryDocumentFooters as $index => $headerXML) { - $this->zipClass->addFromString($this->getFooterName($index), $this->temporaryDocumentFooters[$index]); + foreach ($this->tempDocumentFooters as $index => $headerXML) { + $this->zipClass->addFromString($this->getFooterName($index), $this->tempDocumentFooters[$index]); } // Close zip file @@ -320,7 +320,7 @@ public function save() throw new Exception('Could not close zip file.'); } - return $this->temporaryDocumentFilename; + return $this->tempDocumentFilename; } /** @@ -435,10 +435,10 @@ protected function getHeaderName($index) */ protected function findRowStart($offset) { - $rowStart = strrpos($this->temporaryDocumentMainPart, 'temporaryDocumentMainPart) - $offset) * -1)); + $rowStart = strrpos($this->tempDocumentMainPart, 'tempDocumentMainPart) - $offset) * -1)); if (!$rowStart) { - $rowStart = strrpos($this->temporaryDocumentMainPart, '', ((strlen($this->temporaryDocumentMainPart) - $offset) * -1)); + $rowStart = strrpos($this->tempDocumentMainPart, '', ((strlen($this->tempDocumentMainPart) - $offset) * -1)); } if (!$rowStart) { throw new Exception('Can not find the start position of the row to clone.'); @@ -455,7 +455,7 @@ protected function findRowStart($offset) */ protected function findRowEnd($offset) { - return strpos($this->temporaryDocumentMainPart, '', $offset) + 7; + return strpos($this->tempDocumentMainPart, '', $offset) + 7; } /** @@ -468,9 +468,9 @@ protected function findRowEnd($offset) protected function getSlice($startPosition, $endPosition = 0) { if (!$endPosition) { - $endPosition = strlen($this->temporaryDocumentMainPart); + $endPosition = strlen($this->tempDocumentMainPart); } - return substr($this->temporaryDocumentMainPart, $startPosition, ($endPosition - $startPosition)); + return substr($this->tempDocumentMainPart, $startPosition, ($endPosition - $startPosition)); } } From 4212c7e32ae86d3d9849bc60ef6adfd267e59b51 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Tue, 26 May 2015 21:58:52 +0400 Subject: [PATCH 25/99] Added Gitter badge. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 8f499a8ebb..7f85659dec 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # ![PHPWord](https://rawgit.com/PHPOffice/PHPWord/develop/docs/images/phpword.svg "PHPWord") +[![Join the chat at https://gitter.im/PHPOffice/PHPWord](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/PHPOffice/PHPWord?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) + [![Latest Stable Version](https://poser.pugx.org/phpoffice/phpword/v/stable.png)](https://packagist.org/packages/phpoffice/phpword) [![Build Status](https://travis-ci.org/PHPOffice/PHPWord.svg?branch=master)](https://travis-ci.org/PHPOffice/PHPWord) [![Code Quality](https://scrutinizer-ci.com/g/PHPOffice/PHPWord/badges/quality-score.png?s=b5997ce59ac2816b4514f3a38de9900f6d492c1d)](https://scrutinizer-ci.com/g/PHPOffice/PHPWord/) From 7fdc50b6b84035847004158b7117f5f1dbd7acbe Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Tue, 26 May 2015 22:23:19 +0400 Subject: [PATCH 26/99] Changed Gitter badge to the Shields version. --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 7f85659dec..5f0f00cd41 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,12 @@ # ![PHPWord](https://rawgit.com/PHPOffice/PHPWord/develop/docs/images/phpword.svg "PHPWord") -[![Join the chat at https://gitter.im/PHPOffice/PHPWord](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/PHPOffice/PHPWord?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) - [![Latest Stable Version](https://poser.pugx.org/phpoffice/phpword/v/stable.png)](https://packagist.org/packages/phpoffice/phpword) [![Build Status](https://travis-ci.org/PHPOffice/PHPWord.svg?branch=master)](https://travis-ci.org/PHPOffice/PHPWord) [![Code Quality](https://scrutinizer-ci.com/g/PHPOffice/PHPWord/badges/quality-score.png?s=b5997ce59ac2816b4514f3a38de9900f6d492c1d)](https://scrutinizer-ci.com/g/PHPOffice/PHPWord/) [![Code Coverage](https://scrutinizer-ci.com/g/PHPOffice/PHPWord/badges/coverage.png?s=742a98745725c562955440edc8d2c39d7ff5ae25)](https://scrutinizer-ci.com/g/PHPOffice/PHPWord/) [![Total Downloads](https://poser.pugx.org/phpoffice/phpword/downloads.png)](https://packagist.org/packages/phpoffice/phpword) [![License](https://poser.pugx.org/phpoffice/phpword/license.png)](https://packagist.org/packages/phpoffice/phpword) +[![Join the chat at https://gitter.im/PHPOffice/PHPWord](https://img.shields.io/badge/GITTER-join%20chat-green.svg)](https://gitter.im/PHPOffice/PHPWord) PHPWord is a library written in pure PHP that provides a set of classes to write to and read from different document file formats. The current version of PHPWord supports Microsoft [Office Open XML](http://en.wikipedia.org/wiki/Office_Open_XML) (OOXML or OpenXML), OASIS [Open Document Format for Office Applications](http://en.wikipedia.org/wiki/OpenDocument) (OpenDocument or ODF), [Rich Text Format](http://en.wikipedia.org/wiki/Rich_Text_Format) (RTF), HTML, and PDF. From 1cd4fbf5aeb138fcff93bf456f2ecc9d7acbf8a2 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Tue, 2 Jun 2015 22:15:58 +0300 Subject: [PATCH 27/99] Performance improvement for #513. --- src/PhpWord/TemplateProcessor.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/PhpWord/TemplateProcessor.php b/src/PhpWord/TemplateProcessor.php index e33ef68223..827ece0984 100644 --- a/src/PhpWord/TemplateProcessor.php +++ b/src/PhpWord/TemplateProcessor.php @@ -356,13 +356,13 @@ protected function fixBrokenMacros($documentPart) { $fixedDocumentPart = $documentPart; - $pattern = '|\$\{([^\}]+)\}|U'; - preg_match_all($pattern, $fixedDocumentPart, $matches); - foreach ($matches[0] as $value) { - $valueCleaned = preg_replace('/<[^>]+>/', '', $value); - $valueCleaned = preg_replace('/<\/[^>]+>/', '', $valueCleaned); - $fixedDocumentPart = str_replace($value, $valueCleaned, $fixedDocumentPart); - } + $fixedDocumentPart = preg_replace_callback( + '|\$\{([^\}]+)\}|U', + function ($match) { + return strip_tags($match[0]); + }, + $fixedDocumentPart + ); return $fixedDocumentPart; } From 1383cefec63f7938c333c64aa87a617835028ae3 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Tue, 2 Jun 2015 22:18:07 +0300 Subject: [PATCH 28/99] Performance improvement for #513. --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 027e4af068..ea8096a24f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,7 @@ Place announcement text here. ### Changes - Improved error message for the case when ``autoload.php`` is not found. - @RomanSyroeshko #371 - Changed visibility of all private properties and methods of ``TemplateProcessor`` to ``protected``. - RomanSyroeshko #498 -- Improved performance of ``TemplateProcessor::setValue()``. - @RomanSyroeshko #513 +- Improved performance of ``TemplateProcessor::setValue()``. - @RomanSyroeshko @nicoSWD #513 - Renamed ``align`` option of ``Paragraph`` style into ``alignment``. Note: accessor and mutator methods are renamed too. - @RomanSyroeshko ### Bugfixes From 26b0eaca2abe7ce2e61eba67a36c55a27db519d6 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Tue, 23 Jun 2015 21:03:04 +0400 Subject: [PATCH 29/99] `.travis.yml` clanup. --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 22f45d9b2e..9978419c00 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,6 @@ php: matrix: allow_failures: - - php: 5.2 - php: hhvm env: From 858ab18919986b5c56ae9183062251c1c94b3d02 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Tue, 23 Jun 2015 21:12:14 +0400 Subject: [PATCH 30/99] `.travis.yml` cleanup. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9978419c00..7698eb755a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,7 @@ before_script: - sudo apt-get -qq install graphviz > /dev/null ## Composer - composer self-update - - composer install --prefer-source --dev + - composer install --prefer-source ## PHPDocumentor - mkdir -p build/docs - mkdir -p build/coverage From 1b56db21dcc353abd138246b46824184b2d7c358 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Tue, 23 Jun 2015 21:23:51 +0400 Subject: [PATCH 31/99] `.travis.yml` cleanup. --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7698eb755a..70796ffd9b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,10 +15,12 @@ env: global: - secure: "Sq+6bVtnPsu0mWX8DWQ+9bGAjxMcGorksUiHc4YIXEJsuDfVmVlH8tTD547IeCjDAx9MxXerZ2Z4HSjxTB70VEnJPvZMHI/EZn4Ny31YLHEthdZbV5Gd1h0TGp8VOzPKGShvGrtGBX6MvMfgpK4zuieVWbSfdKeecm8ZNLMpUd4=" -before_script: +before_install: ## Packages - sudo apt-get -qq update > /dev/null - sudo apt-get -qq install graphviz > /dev/null + +before_script: ## Composer - composer self-update - composer install --prefer-source From 7a2125c7e9b18ee32faa6ca3338fcb7b46a1734b Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Tue, 23 Jun 2015 21:34:31 +0400 Subject: [PATCH 32/99] `.travis.yml` cleanup. --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 70796ffd9b..4d52286ae5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,8 +17,8 @@ env: before_install: ## Packages - - sudo apt-get -qq update > /dev/null - - sudo apt-get -qq install graphviz > /dev/null + - sudo apt-get update -qq + - sudo apt-get install -y graphviz before_script: ## Composer From 988eaca87e7d820d6e69a28334f859aba005158b Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Thu, 2 Jul 2015 21:39:54 +0300 Subject: [PATCH 33/99] Fix for #532. --- src/PhpWord/TemplateProcessor.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/PhpWord/TemplateProcessor.php b/src/PhpWord/TemplateProcessor.php index 827ece0984..65819727dd 100644 --- a/src/PhpWord/TemplateProcessor.php +++ b/src/PhpWord/TemplateProcessor.php @@ -339,7 +339,13 @@ public function saveAs($fileName) unlink($fileName); } - rename($tempFileName, $fileName); + /* + * Note: we do not use ``rename`` funcion here, because it looses file ownership data on Windows, and the file may not open. + * + * @see https://github.com/PHPOffice/PHPWord/issues/532 + */ + copy($tempFileName, $fileName); + unlink($tempFileName); } /** From db8221d303dd003363690628f065b88c82972cb6 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Thu, 2 Jul 2015 21:46:29 +0300 Subject: [PATCH 34/99] Fix for #532. --- src/PhpWord/TemplateProcessor.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PhpWord/TemplateProcessor.php b/src/PhpWord/TemplateProcessor.php index 65819727dd..b240ef71a2 100644 --- a/src/PhpWord/TemplateProcessor.php +++ b/src/PhpWord/TemplateProcessor.php @@ -340,7 +340,8 @@ public function saveAs($fileName) } /* - * Note: we do not use ``rename`` funcion here, because it looses file ownership data on Windows, and the file may not open. + * Note: we do not use ``rename`` funcion here, because it looses file ownership data on Windows platform. + * As a result, user cannot open the file directly getting "Access denied" message. * * @see https://github.com/PHPOffice/PHPWord/issues/532 */ From 07e0d4cd6de685a306fec80dd67d6fbd61fbfe00 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Thu, 2 Jul 2015 21:52:05 +0300 Subject: [PATCH 35/99] Fix for #532. --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ea8096a24f..8d7433b91b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ CHANGELOG This is the changelog between releases of PHPWord. Releases are listed in reverse chronological order with the latest version listed on top, while additions/changes in each release are listed in chronological order. Changes in each release are divided into three parts: added or change features, bugfixes, and miscellaneous improvements. Each line contains short information about the change made, the person who made it, and the related issue number(s) in GitHub. -0.13.0 (TBD) +0.13.0 (unreleased) ------------ Place announcement text here. @@ -15,6 +15,7 @@ Place announcement text here. - Renamed ``align`` option of ``Paragraph`` style into ``alignment``. Note: accessor and mutator methods are renamed too. - @RomanSyroeshko ### Bugfixes +- Fixed issue with "Access denied" message while opening ``Sample_07_TemplateCloneRow.docx`` and ``Sample_23_TemplateBlock.docx`` result files on Windows platform. - @RomanSyroeshko @AshSat #532 - Fixed PreserveText element alignment in footer (see ``Sample_12_HeaderFooter.php``). - @RomanSyroeshko @SSchwaiger #495 0.12.0 (3 January 2015) From 637c2bce790926d0087c2b74661a11b95b7d267b Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Thu, 2 Jul 2015 22:24:12 +0300 Subject: [PATCH 36/99] Playing with Travis CI. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4d52286ae5..0f2a8641d3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,7 +23,7 @@ before_install: before_script: ## Composer - composer self-update - - composer install --prefer-source + - composer install --prefer-dist ## PHPDocumentor - mkdir -p build/docs - mkdir -p build/coverage From c1cfd503a5fe904bceb44a6a57bd297751561892 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Thu, 2 Jul 2015 22:30:48 +0300 Subject: [PATCH 37/99] Playing with Travis CI. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0f2a8641d3..4d52286ae5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,7 +23,7 @@ before_install: before_script: ## Composer - composer self-update - - composer install --prefer-dist + - composer install --prefer-source ## PHPDocumentor - mkdir -p build/docs - mkdir -p build/coverage From b0ff13c0757309bff96f59ef31ebd14ddd27dab4 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Thu, 2 Jul 2015 22:40:06 +0300 Subject: [PATCH 38/99] Playing with Travis CI. --- composer.lock => _composer.lock | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename composer.lock => _composer.lock (100%) diff --git a/composer.lock b/_composer.lock similarity index 100% rename from composer.lock rename to _composer.lock From cd2e7f7347c018fd1388a4434e489e2304fbf52e Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 4 Jul 2015 12:07:40 +0400 Subject: [PATCH 39/99] Playing with Travis CI. --- _composer.lock | 3879 ------------------------------------------------ 1 file changed, 3879 deletions(-) delete mode 100644 _composer.lock diff --git a/_composer.lock b/_composer.lock deleted file mode 100644 index 47351b0efd..0000000000 --- a/_composer.lock +++ /dev/null @@ -1,3879 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", - "This file is @generated automatically" - ], - "hash": "1a31c30080e1b0b550cdb47b7f764ca6", - "packages": [], - "packages-dev": [ - { - "name": "cilex/cilex", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/Cilex/Cilex.git", - "reference": "7acd965a609a56d0345e8b6071c261fbdb926cb5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Cilex/Cilex/zipball/7acd965a609a56d0345e8b6071c261fbdb926cb5", - "reference": "7acd965a609a56d0345e8b6071c261fbdb926cb5", - "shasum": "" - }, - "require": { - "cilex/console-service-provider": "1.*", - "php": ">=5.3.3", - "pimple/pimple": "~1.0", - "symfony/finder": "~2.1", - "symfony/process": "~2.1" - }, - "require-dev": { - "phpunit/phpunit": "3.7.*", - "symfony/validator": "~2.1" - }, - "suggest": { - "monolog/monolog": ">=1.0.0", - "symfony/validator": ">=1.0.0", - "symfony/yaml": ">=1.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-0": { - "Cilex": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "mike.vanriel@naenius.com" - } - ], - "description": "The PHP micro-framework for Command line tools based on the Symfony2 Components", - "homepage": "http://cilex.github.com", - "keywords": [ - "cli", - "microframework" - ], - "time": "2014-03-29 14:03:13" - }, - { - "name": "cilex/console-service-provider", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/Cilex/console-service-provider.git", - "reference": "25ee3d1875243d38e1a3448ff94bdf944f70d24e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Cilex/console-service-provider/zipball/25ee3d1875243d38e1a3448ff94bdf944f70d24e", - "reference": "25ee3d1875243d38e1a3448ff94bdf944f70d24e", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "pimple/pimple": "1.*@dev", - "symfony/console": "~2.1" - }, - "require-dev": { - "cilex/cilex": "1.*@dev", - "silex/silex": "1.*@dev" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-0": { - "Cilex\\Provider\\Console": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Beau Simensen", - "email": "beau@dflydev.com", - "homepage": "http://beausimensen.com" - }, - { - "name": "Mike van Riel", - "email": "mike.vanriel@naenius.com" - } - ], - "description": "Console Service Provider", - "keywords": [ - "cilex", - "console", - "pimple", - "service-provider", - "silex" - ], - "time": "2012-12-19 10:50:58" - }, - { - "name": "doctrine/annotations", - "version": "v1.2.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "6a6bec0670bb6e71a263b08bc1b98ea242928633" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/6a6bec0670bb6e71a263b08bc1b98ea242928633", - "reference": "6a6bec0670bb6e71a263b08bc1b98ea242928633", - "shasum": "" - }, - "require": { - "doctrine/lexer": "1.*", - "php": ">=5.3.2" - }, - "require-dev": { - "doctrine/cache": "1.*", - "phpunit/phpunit": "4.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "psr-0": { - "Doctrine\\Common\\Annotations\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Docblock Annotations Parser", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "time": "2014-09-25 16:45:30" - }, - { - "name": "doctrine/lexer", - "version": "v1.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "2f708a85bb3aab5d99dab8be435abd73e0b18acb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/2f708a85bb3aab5d99dab8be435abd73e0b18acb", - "reference": "2f708a85bb3aab5d99dab8be435abd73e0b18acb", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "type": "library", - "autoload": { - "psr-0": { - "Doctrine\\Common\\Lexer\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com", - "homepage": "http://www.instaclick.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "http://jmsyst.com", - "role": "Developer of wrapped JMSSerializerBundle" - } - ], - "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "lexer", - "parser" - ], - "time": "2013-01-12 18:59:04" - }, - { - "name": "dompdf/dompdf", - "version": "v0.6.1", - "source": { - "type": "git", - "url": "https://github.com/dompdf/dompdf.git", - "reference": "cf7d8a0a27270418850cc7d7ea532159e5eeb3eb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/dompdf/dompdf/zipball/cf7d8a0a27270418850cc7d7ea532159e5eeb3eb", - "reference": "cf7d8a0a27270418850cc7d7ea532159e5eeb3eb", - "shasum": "" - }, - "require": { - "phenx/php-font-lib": "0.2.*" - }, - "type": "library", - "autoload": { - "classmap": [ - "include/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL" - ], - "authors": [ - { - "name": "Fabien Ménager", - "email": "fabien.menager@gmail.com" - }, - { - "name": "Brian Sweeney", - "email": "eclecticgeek@gmail.com" - } - ], - "description": "DOMPDF is a CSS 2.1 compliant HTML to PDF converter", - "homepage": "https://github.com/dompdf/dompdf", - "time": "2014-03-11 01:59:52" - }, - { - "name": "erusev/parsedown", - "version": "1.1.4", - "source": { - "type": "git", - "url": "https://github.com/erusev/parsedown.git", - "reference": "495e7ac73bb5fde6b857b88ff2bb1b5e79a4263a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/erusev/parsedown/zipball/495e7ac73bb5fde6b857b88ff2bb1b5e79a4263a", - "reference": "495e7ac73bb5fde6b857b88ff2bb1b5e79a4263a", - "shasum": "" - }, - "type": "library", - "autoload": { - "psr-0": { - "Parsedown": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Emanuil Rusev", - "email": "hello@erusev.com", - "homepage": "http://erusev.com" - } - ], - "description": "Parser for Markdown.", - "homepage": "http://parsedown.org", - "keywords": [ - "markdown", - "parser" - ], - "time": "2014-11-29 02:29:14" - }, - { - "name": "herrera-io/json", - "version": "1.0.3", - "source": { - "type": "git", - "url": "https://github.com/herrera-io/php-json.git", - "reference": "60c696c9370a1e5136816ca557c17f82a6fa83f1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/herrera-io/php-json/zipball/60c696c9370a1e5136816ca557c17f82a6fa83f1", - "reference": "60c696c9370a1e5136816ca557c17f82a6fa83f1", - "shasum": "" - }, - "require": { - "ext-json": "*", - "justinrainbow/json-schema": ">=1.0,<2.0-dev", - "php": ">=5.3.3", - "seld/jsonlint": ">=1.0,<2.0-dev" - }, - "require-dev": { - "herrera-io/phpunit-test-case": "1.*", - "mikey179/vfsstream": "1.1.0", - "phpunit/phpunit": "3.7.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "files": [ - "src/lib/json_version.php" - ], - "psr-0": { - "Herrera\\Json": "src/lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kevin Herrera", - "email": "kevin@herrera.io", - "homepage": "http://kevin.herrera.io/", - "role": "Developer" - } - ], - "description": "A library for simplifying JSON linting and validation.", - "homepage": "http://herrera-io.github.com/php-json", - "keywords": [ - "json", - "lint", - "schema", - "validate" - ], - "time": "2013-10-30 16:51:34" - }, - { - "name": "herrera-io/phar-update", - "version": "1.0.3", - "source": { - "type": "git", - "url": "https://github.com/herrera-io/php-phar-update.git", - "reference": "00a79e1d5b8cf3c080a2e3becf1ddf7a7fea025b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/herrera-io/php-phar-update/zipball/00a79e1d5b8cf3c080a2e3becf1ddf7a7fea025b", - "reference": "00a79e1d5b8cf3c080a2e3becf1ddf7a7fea025b", - "shasum": "" - }, - "require": { - "herrera-io/json": "1.*", - "kherge/version": "1.*", - "php": ">=5.3.3" - }, - "require-dev": { - "herrera-io/phpunit-test-case": "1.*", - "mikey179/vfsstream": "1.1.0", - "phpunit/phpunit": "3.7.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "files": [ - "src/lib/constants.php" - ], - "psr-0": { - "Herrera\\Phar\\Update": "src/lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kevin Herrera", - "email": "kevin@herrera.io", - "homepage": "http://kevin.herrera.io/", - "role": "Developer" - } - ], - "description": "A library for self-updating Phars.", - "homepage": "http://herrera-io.github.com/php-phar-update", - "keywords": [ - "phar", - "update" - ], - "time": "2013-10-30 17:23:01" - }, - { - "name": "jms/metadata", - "version": "1.5.1", - "source": { - "type": "git", - "url": "https://github.com/schmittjoh/metadata.git", - "reference": "22b72455559a25777cfd28c4ffda81ff7639f353" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/metadata/zipball/22b72455559a25777cfd28c4ffda81ff7639f353", - "reference": "22b72455559a25777cfd28c4ffda81ff7639f353", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "doctrine/cache": "~1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.5.x-dev" - } - }, - "autoload": { - "psr-0": { - "Metadata\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache" - ], - "authors": [ - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "https://github.com/schmittjoh", - "role": "Developer of wrapped JMSSerializerBundle" - } - ], - "description": "Class/method/property metadata management in PHP", - "keywords": [ - "annotations", - "metadata", - "xml", - "yaml" - ], - "time": "2014-07-12 07:13:19" - }, - { - "name": "jms/parser-lib", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/schmittjoh/parser-lib.git", - "reference": "c509473bc1b4866415627af0e1c6cc8ac97fa51d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/parser-lib/zipball/c509473bc1b4866415627af0e1c6cc8ac97fa51d", - "reference": "c509473bc1b4866415627af0e1c6cc8ac97fa51d", - "shasum": "" - }, - "require": { - "phpoption/phpoption": ">=0.9,<2.0-dev" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-0": { - "JMS\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache2" - ], - "description": "A library for easily creating recursive-descent parsers.", - "time": "2012-11-18 18:08:43" - }, - { - "name": "jms/serializer", - "version": "0.16.0", - "source": { - "type": "git", - "url": "https://github.com/schmittjoh/serializer.git", - "reference": "c8a171357ca92b6706e395c757f334902d430ea9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/c8a171357ca92b6706e395c757f334902d430ea9", - "reference": "c8a171357ca92b6706e395c757f334902d430ea9", - "shasum": "" - }, - "require": { - "doctrine/annotations": "1.*", - "jms/metadata": "~1.1", - "jms/parser-lib": "1.*", - "php": ">=5.3.2", - "phpcollection/phpcollection": "~0.1" - }, - "require-dev": { - "doctrine/orm": "~2.1", - "doctrine/phpcr-odm": "~1.0.1", - "jackalope/jackalope-doctrine-dbal": "1.0.*", - "propel/propel1": "~1.7", - "symfony/filesystem": "2.*", - "symfony/form": "~2.1", - "symfony/translation": "~2.0", - "symfony/validator": "~2.0", - "symfony/yaml": "2.*", - "twig/twig": ">=1.8,<2.0-dev" - }, - "suggest": { - "symfony/yaml": "Required if you'd like to serialize data to YAML format." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.15-dev" - } - }, - "autoload": { - "psr-0": { - "JMS\\Serializer": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache2" - ], - "authors": [ - { - "name": "Johannes M. Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "http://jmsyst.com", - "role": "Developer of wrapped JMSSerializerBundle" - } - ], - "description": "Library for (de-)serializing data of any complexity; supports XML, JSON, and YAML.", - "homepage": "http://jmsyst.com/libs/serializer", - "keywords": [ - "deserialization", - "jaxb", - "json", - "serialization", - "xml" - ], - "time": "2014-03-18 08:39:00" - }, - { - "name": "justinrainbow/json-schema", - "version": "1.3.7", - "source": { - "type": "git", - "url": "https://github.com/justinrainbow/json-schema.git", - "reference": "87b54b460febed69726c781ab67462084e97a105" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/87b54b460febed69726c781ab67462084e97a105", - "reference": "87b54b460febed69726c781ab67462084e97a105", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "json-schema/json-schema-test-suite": "1.1.0", - "phpdocumentor/phpdocumentor": "~2", - "phpunit/phpunit": "~3.7" - }, - "bin": [ - "bin/validate-json" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, - "autoload": { - "psr-0": { - "JsonSchema": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Bruno Prieto Reis", - "email": "bruno.p.reis@gmail.com" - }, - { - "name": "Justin Rainbow", - "email": "justin.rainbow@gmail.com" - }, - { - "name": "Igor Wiedler", - "email": "igor@wiedler.ch" - }, - { - "name": "Robert Schönthal", - "email": "seroscho@googlemail.com" - } - ], - "description": "A library to validate a json schema.", - "homepage": "https://github.com/justinrainbow/json-schema", - "keywords": [ - "json", - "schema" - ], - "time": "2014-08-25 02:48:14" - }, - { - "name": "kherge/version", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/kherge-unmaintained/Version.git", - "reference": "f07cf83f8ce533be8f93d2893d96d674bbeb7e30" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/kherge-unmaintained/Version/zipball/f07cf83f8ce533be8f93d2893d96d674bbeb7e30", - "reference": "f07cf83f8ce533be8f93d2893d96d674bbeb7e30", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-0": { - "KevinGH\\Version": "src/lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kevin Herrera", - "email": "me@kevingh.com", - "homepage": "http://www.kevingh.com/" - } - ], - "description": "A parsing and comparison library for semantic versioning.", - "homepage": "http://github.com/kherge/Version", - "time": "2012-08-16 17:13:03" - }, - { - "name": "monolog/monolog", - "version": "1.11.0", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/monolog.git", - "reference": "ec3961874c43840e96da3a8a1ed20d8c73d7e5aa" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/ec3961874c43840e96da3a8a1ed20d8c73d7e5aa", - "reference": "ec3961874c43840e96da3a8a1ed20d8c73d7e5aa", - "shasum": "" - }, - "require": { - "php": ">=5.3.0", - "psr/log": "~1.0" - }, - "provide": { - "psr/log-implementation": "1.0.0" - }, - "require-dev": { - "aws/aws-sdk-php": "~2.4, >2.4.8", - "doctrine/couchdb": "~1.0@dev", - "graylog2/gelf-php": "~1.0", - "phpunit/phpunit": "~3.7.0", - "raven/raven": "~0.5", - "ruflin/elastica": "0.90.*", - "videlalvaro/php-amqplib": "~2.4" - }, - "suggest": { - "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", - "doctrine/couchdb": "Allow sending log messages to a CouchDB server", - "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", - "ext-mongo": "Allow sending log messages to a MongoDB server", - "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", - "raven/raven": "Allow sending log messages to a Sentry server", - "rollbar/rollbar": "Allow sending log messages to Rollbar", - "ruflin/elastica": "Allow sending log messages to an Elastic Search server", - "videlalvaro/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.11.x-dev" - } - }, - "autoload": { - "psr-4": { - "Monolog\\": "src/Monolog" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "Sends your logs to files, sockets, inboxes, databases and various web services", - "homepage": "http://github.com/Seldaek/monolog", - "keywords": [ - "log", - "logging", - "psr-3" - ], - "time": "2014-09-30 13:30:58" - }, - { - "name": "mpdf/mpdf", - "version": "v5.7.3", - "source": { - "type": "git", - "url": "https://github.com/finwe/mpdf.git", - "reference": "ace190986978df40b9c416cf7ba8761945fc1758" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/finwe/mpdf/zipball/ace190986978df40b9c416cf7ba8761945fc1758", - "reference": "ace190986978df40b9c416cf7ba8761945fc1758", - "shasum": "" - }, - "require": { - "ext-mbstring": "*", - "php": ">=4.3.10" - }, - "type": "library", - "autoload": { - "classmap": [ - "mpdf.php", - "classes" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-1.0+" - ], - "authors": [ - { - "name": "Ian Back" - } - ], - "description": "A PHP class to generate PDF files from HTML with Unicode/UTF-8 and CJK support", - "homepage": "http://www.mpdf1.com/mpdf/index.php", - "keywords": [ - "pdf", - "php", - "utf-8" - ], - "time": "2014-08-24 08:33:20" - }, - { - "name": "nikic/php-parser", - "version": "v0.9.5", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "ef70767475434bdb3615b43c327e2cae17ef12eb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/ef70767475434bdb3615b43c327e2cae17ef12eb", - "reference": "ef70767475434bdb3615b43c327e2cae17ef12eb", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=5.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.9-dev" - } - }, - "autoload": { - "psr-0": { - "PHPParser": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], - "time": "2014-07-23 18:24:17" - }, - { - "name": "pdepend/pdepend", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/pdepend/pdepend.git", - "reference": "1b0acf162da4f30237987e61e177a57f78e3d87e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/pdepend/pdepend/zipball/1b0acf162da4f30237987e61e177a57f78e3d87e", - "reference": "1b0acf162da4f30237987e61e177a57f78e3d87e", - "shasum": "" - }, - "require": { - "symfony/config": ">=2.4", - "symfony/dependency-injection": ">=2.4", - "symfony/filesystem": ">=2.4" - }, - "require-dev": { - "phpunit/phpunit": "4.*@stable", - "squizlabs/php_codesniffer": "@stable" - }, - "bin": [ - "src/bin/pdepend" - ], - "type": "library", - "autoload": { - "psr-0": { - "PDepend\\": "src/main/php/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Official version of pdepend to be handled with Composer", - "time": "2014-12-04 12:38:39" - }, - { - "name": "phenx/php-font-lib", - "version": "0.2.2", - "source": { - "type": "git", - "url": "https://github.com/PhenX/php-font-lib.git", - "reference": "c30c7fc00a6b0d863e9bb4c5d5dd015298b2dc82" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PhenX/php-font-lib/zipball/c30c7fc00a6b0d863e9bb4c5d5dd015298b2dc82", - "reference": "c30c7fc00a6b0d863e9bb4c5d5dd015298b2dc82", - "shasum": "" - }, - "type": "library", - "autoload": { - "classmap": [ - "classes/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL" - ], - "authors": [ - { - "name": "Fabien Ménager", - "email": "fabien.menager@gmail.com" - } - ], - "description": "A library to read, parse, export and make subsets of different types of font files.", - "homepage": "https://github.com/PhenX/php-font-lib", - "time": "2014-02-01 15:22:28" - }, - { - "name": "phpcollection/phpcollection", - "version": "0.4.0", - "source": { - "type": "git", - "url": "https://github.com/schmittjoh/php-collection.git", - "reference": "b8bf55a0a929ca43b01232b36719f176f86c7e83" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-collection/zipball/b8bf55a0a929ca43b01232b36719f176f86c7e83", - "reference": "b8bf55a0a929ca43b01232b36719f176f86c7e83", - "shasum": "" - }, - "require": { - "phpoption/phpoption": "1.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.3-dev" - } - }, - "autoload": { - "psr-0": { - "PhpCollection": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache2" - ], - "authors": [ - { - "name": "Johannes M. Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "http://jmsyst.com", - "role": "Developer of wrapped JMSSerializerBundle" - } - ], - "description": "General-Purpose Collection Library for PHP", - "keywords": [ - "collection", - "list", - "map", - "sequence", - "set" - ], - "time": "2014-03-11 13:46:42" - }, - { - "name": "phpdocumentor/fileset", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/Fileset.git", - "reference": "bfa78d8fa9763dfce6d0e5d3730c1d8ab25d34b0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/Fileset/zipball/bfa78d8fa9763dfce6d0e5d3730c1d8ab25d34b0", - "reference": "bfa78d8fa9763dfce6d0e5d3730c1d8ab25d34b0", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "symfony/finder": "~2.1" - }, - "require-dev": { - "phpunit/phpunit": "~3.7" - }, - "type": "library", - "autoload": { - "psr-0": { - "phpDocumentor": [ - "src/", - "tests/unit/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Fileset component for collecting a set of files given directories and file paths", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "files", - "fileset", - "phpdoc" - ], - "time": "2013-08-06 21:07:42" - }, - { - "name": "phpdocumentor/graphviz", - "version": "1.0.3", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/GraphViz.git", - "reference": "aa243118c8a055fc853c02802e8503c5435862f7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/GraphViz/zipball/aa243118c8a055fc853c02802e8503c5435862f7", - "reference": "aa243118c8a055fc853c02802e8503c5435862f7", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~3.7" - }, - "type": "library", - "autoload": { - "psr-0": { - "phpDocumentor": [ - "src/", - "tests/unit" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "mike.vanriel@naenius.com" - } - ], - "time": "2014-07-19 06:52:59" - }, - { - "name": "phpdocumentor/phpdocumentor", - "version": "v2.8.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/phpDocumentor2.git", - "reference": "5920dd42a5a92e4486f342ba8ded979db149ceb2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/phpDocumentor2/zipball/5920dd42a5a92e4486f342ba8ded979db149ceb2", - "reference": "5920dd42a5a92e4486f342ba8ded979db149ceb2", - "shasum": "" - }, - "require": { - "cilex/cilex": "~1.0", - "dompdf/dompdf": "~0.6", - "erusev/parsedown": "~1.0", - "herrera-io/phar-update": "1.0.3", - "jms/serializer": "~0.12", - "monolog/monolog": "~1.6", - "php": ">=5.3.3", - "phpdocumentor/fileset": "~1.0", - "phpdocumentor/graphviz": "~1.0", - "phpdocumentor/reflection": "~1.0", - "phpdocumentor/reflection-docblock": "~2.0", - "phpdocumentor/template-abstract": "~1.2", - "phpdocumentor/template-checkstyle": "~1.2", - "phpdocumentor/template-clean": "~1.0", - "phpdocumentor/template-new-black": "~1.3", - "phpdocumentor/template-old-ocean": "~1.3", - "phpdocumentor/template-responsive": "~1.3", - "phpdocumentor/template-responsive-twig": "~1.2", - "phpdocumentor/template-xml": "~1.0", - "phpdocumentor/template-zend": "~1.3", - "symfony/config": "~2.3", - "symfony/console": "~2.3", - "symfony/event-dispatcher": "~2.1", - "symfony/process": "~2.0", - "symfony/stopwatch": "~2.3", - "symfony/validator": "~2.2", - "twig/twig": "~1.3", - "zendframework/zend-cache": "~2.1", - "zendframework/zend-config": "~2.1", - "zendframework/zend-filter": "~2.1", - "zendframework/zend-i18n": "~2.1", - "zendframework/zend-serializer": "~2.1", - "zendframework/zend-servicemanager": "~2.1", - "zendframework/zend-stdlib": "~2.1", - "zetacomponents/document": ">=1.3.1" - }, - "require-dev": { - "behat/behat": "~2.4", - "mikey179/vfsstream": "~1.2", - "mockery/mockery": "~0.9@dev", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~1.4", - "symfony/expression-language": "~2.4" - }, - "suggest": { - "ext-twig": "Enabling the twig extension improves the generation of twig based templates.", - "ext-xslcache": "Enabling the XSLCache extension improves the generation of xml based templates." - }, - "bin": [ - "bin/phpdoc.php", - "bin/phpdoc" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-develop": "2.9-dev" - } - }, - "autoload": { - "psr-0": { - "phpDocumentor": [ - "src/", - "tests/unit/" - ], - "Cilex\\Provider": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Documentation Generator for PHP", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "api", - "application", - "dga", - "documentation", - "phpdoc" - ], - "time": "2014-11-11 14:08:43" - }, - { - "name": "phpdocumentor/reflection", - "version": "1.0.7", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/Reflection.git", - "reference": "fc40c3f604ac2287eb5c314174d5109b2c699372" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/Reflection/zipball/fc40c3f604ac2287eb5c314174d5109b2c699372", - "reference": "fc40c3f604ac2287eb5c314174d5109b2c699372", - "shasum": "" - }, - "require": { - "nikic/php-parser": "~0.9.4", - "php": ">=5.3.3", - "phpdocumentor/reflection-docblock": "~2.0", - "psr/log": "~1.0" - }, - "require-dev": { - "behat/behat": "~2.4", - "mockery/mockery": "~0.8", - "phpunit/phpunit": "~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "phpDocumentor": [ - "src/", - "tests/unit/", - "tests/mocks/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Reflection library to do Static Analysis for PHP Projects", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "time": "2014-11-14 11:43:04" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "38743b677965c48a637097b2746a281264ae2347" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/38743b677965c48a637097b2746a281264ae2347", - "reference": "38743b677965c48a637097b2746a281264ae2347", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "3.7.*@stable" - }, - "suggest": { - "dflydev/markdown": "1.0.*", - "erusev/parsedown": "~0.7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "phpDocumentor": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "mike.vanriel@naenius.com" - } - ], - "time": "2014-08-09 10:27:07" - }, - { - "name": "phpdocumentor/template-abstract", - "version": "1.2.2", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/template.abstract.git", - "reference": "df1d11cf11cf5da433789e2be07f4d2d6e51aaca" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/template.abstract/zipball/df1d11cf11cf5da433789e2be07f4d2d6e51aaca", - "reference": "df1d11cf11cf5da433789e2be07f4d2d6e51aaca", - "shasum": "" - }, - "require": { - "phpdocumentor/unified-asset-installer": "~1.1" - }, - "type": "phpdocumentor-template", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Simple bright template for phpDocumentor", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "documentation", - "phpdoc", - "template" - ], - "time": "2014-06-04 19:32:56" - }, - { - "name": "phpdocumentor/template-checkstyle", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/template.checkstyle.git", - "reference": "cfa86d19327b0d762332787ff2dda0d55226a2e2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/template.checkstyle/zipball/cfa86d19327b0d762332787ff2dda0d55226a2e2", - "reference": "cfa86d19327b0d762332787ff2dda0d55226a2e2", - "shasum": "" - }, - "require": { - "phpdocumentor/unified-asset-installer": "~1.1" - }, - "type": "phpdocumentor-template", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Checkstyle XML output template for phpDocumentor2", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "documentation", - "phpdoc", - "template" - ], - "time": "2014-08-17 19:32:38" - }, - { - "name": "phpdocumentor/template-clean", - "version": "1.0.6", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/template.clean.git", - "reference": "6fc0f7f6c55c1f94ac5b1c6fccde7aac77755e45" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/template.clean/zipball/6fc0f7f6c55c1f94ac5b1c6fccde7aac77755e45", - "reference": "6fc0f7f6c55c1f94ac5b1c6fccde7aac77755e45", - "shasum": "" - }, - "require": { - "phpdocumentor/unified-asset-installer": "~1.1" - }, - "type": "phpdocumentor-template", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A clean, responsive modern template for phpDocumentor for Twig aimed at usability", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "documentation", - "phpdoc", - "responsive", - "template" - ], - "time": "2014-08-15 21:45:34" - }, - { - "name": "phpdocumentor/template-new-black", - "version": "1.3.2", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/template.new_black.git", - "reference": "d98f84633b94b279582735aecd91015c1e191d98" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/template.new_black/zipball/d98f84633b94b279582735aecd91015c1e191d98", - "reference": "d98f84633b94b279582735aecd91015c1e191d98", - "shasum": "" - }, - "require": { - "phpdocumentor/template-abstract": "1.*", - "phpdocumentor/unified-asset-installer": "~1.1" - }, - "type": "phpdocumentor-template", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Web 2.0 template with dark sidebar for phpDocumentor", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "documentation", - "phpdoc", - "template" - ], - "time": "2014-06-27 17:00:31" - }, - { - "name": "phpdocumentor/template-old-ocean", - "version": "1.3.2", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/template.old_ocean.git", - "reference": "2fdb786038351c0ec88633d4e2aa103e4bbb8655" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/template.old_ocean/zipball/2fdb786038351c0ec88633d4e2aa103e4bbb8655", - "reference": "2fdb786038351c0ec88633d4e2aa103e4bbb8655", - "shasum": "" - }, - "require": { - "phpdocumentor/unified-asset-installer": "~1.1" - }, - "type": "phpdocumentor-template", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Blue template with high contrast for the foreground", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "documentation", - "phpdoc", - "template" - ], - "time": "2014-06-27 16:59:35" - }, - { - "name": "phpdocumentor/template-responsive", - "version": "1.3.5", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/template.responsive.git", - "reference": "949e742f350f70fc8ec7c945b3cf0070a4e1825e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/template.responsive/zipball/949e742f350f70fc8ec7c945b3cf0070a4e1825e", - "reference": "949e742f350f70fc8ec7c945b3cf0070a4e1825e", - "shasum": "" - }, - "require": { - "phpdocumentor/unified-asset-installer": "~1.1" - }, - "type": "phpdocumentor-template", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Responsive modern template for phpDocumentor", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "documentation", - "phpdoc", - "template" - ], - "time": "2014-08-05 20:47:53" - }, - { - "name": "phpdocumentor/template-responsive-twig", - "version": "1.2.5", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/template.responsive-twig.git", - "reference": "493e204be607583efd2d75f1728cd5210e23cf96" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/template.responsive-twig/zipball/493e204be607583efd2d75f1728cd5210e23cf96", - "reference": "493e204be607583efd2d75f1728cd5210e23cf96", - "shasum": "" - }, - "require": { - "phpdocumentor/unified-asset-installer": "~1.1" - }, - "type": "phpdocumentor-template", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Responsive modern template for phpDocumentor for Twig", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "documentation", - "phpdoc", - "template" - ], - "time": "2014-07-30 20:00:37" - }, - { - "name": "phpdocumentor/template-xml", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/mvriel/template.xml.git", - "reference": "a372713be8ee99b16497e2580592e474ff51190c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mvriel/template.xml/zipball/a372713be8ee99b16497e2580592e474ff51190c", - "reference": "a372713be8ee99b16497e2580592e474ff51190c", - "shasum": "" - }, - "require": { - "phpdocumentor/unified-asset-installer": "~1.1" - }, - "type": "phpdocumentor-template", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Generates an XML representation of the project's structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "documentation", - "phpdoc", - "template" - ], - "time": "2013-08-01 20:23:32" - }, - { - "name": "phpdocumentor/template-zend", - "version": "1.3.2", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/template.zend.git", - "reference": "75913288bfd73d3bf4c1b1179c3963f3431e7a9d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/template.zend/zipball/75913288bfd73d3bf4c1b1179c3963f3431e7a9d", - "reference": "75913288bfd73d3bf4c1b1179c3963f3431e7a9d", - "shasum": "" - }, - "require": { - "ext-xsl": "*", - "phpdocumentor/template-abstract": "1.*", - "phpdocumentor/unified-asset-installer": "~1.1" - }, - "type": "phpdocumentor-template", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Official Zend Framework Template for phpDocumentor2", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "ZendFramework", - "documentation", - "phpdoc", - "template", - "zend", - "zf" - ], - "time": "2013-12-05 08:51:57" - }, - { - "name": "phpdocumentor/unified-asset-installer", - "version": "1.1.2", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/UnifiedAssetInstaller.git", - "reference": "241fb036268cd9da7d76da3db66e3eda66259c52" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/UnifiedAssetInstaller/zipball/241fb036268cd9da7d76da3db66e3eda66259c52", - "reference": "241fb036268cd9da7d76da3db66e3eda66259c52", - "shasum": "" - }, - "require": { - "composer-plugin-api": "1.0.0" - }, - "require-dev": { - "composer/composer": "~1.0@dev", - "phpunit/phpunit": "~3.7" - }, - "type": "composer-installer", - "extra": { - "class": "\\phpDocumentor\\Composer\\UnifiedAssetInstaller" - }, - "autoload": { - "psr-0": { - "phpDocumentor\\Composer": [ - "src/", - "test/unit/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Asset installer for phpDocumentor", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "assets", - "installer", - "plugins", - "templates" - ], - "time": "2013-09-09 06:13:02" - }, - { - "name": "phploc/phploc", - "version": "2.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phploc.git", - "reference": "322ad07c112d5c6832abed4269d648cacff5959b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phploc/zipball/322ad07c112d5c6832abed4269d648cacff5959b", - "reference": "322ad07c112d5c6832abed4269d648cacff5959b", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/finder-facade": "~1.1", - "sebastian/git": "~1.0", - "sebastian/version": "~1.0", - "symfony/console": "~2.2" - }, - "bin": [ - "phploc" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "A tool for quickly measuring the size of a PHP project.", - "homepage": "https://github.com/sebastianbergmann/phploc", - "time": "2014-06-25 08:11:02" - }, - { - "name": "phpmd/phpmd", - "version": "2.1.3", - "source": { - "type": "git", - "url": "https://github.com/phpmd/phpmd.git", - "reference": "1a485d9db869137af5e9678bd844568c92998b25" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpmd/phpmd/zipball/1a485d9db869137af5e9678bd844568c92998b25", - "reference": "1a485d9db869137af5e9678bd844568c92998b25", - "shasum": "" - }, - "require": { - "pdepend/pdepend": "2.0.*", - "php": ">=5.3.0", - "symfony/config": "2.5.*", - "symfony/dependency-injection": "2.5.*", - "symfony/filesystem": "2.5.*" - }, - "bin": [ - "src/bin/phpmd" - ], - "type": "library", - "autoload": { - "psr-0": { - "PHPMD\\": "src/main/php" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Official version of PHPMD handled with Composer.", - "time": "2014-09-25 15:56:22" - }, - { - "name": "phpoption/phpoption", - "version": "1.4.0", - "source": { - "type": "git", - "url": "https://github.com/schmittjoh/php-option.git", - "reference": "5d099bcf0393908bf4ad69cc47dafb785d51f7f5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/5d099bcf0393908bf4ad69cc47dafb785d51f7f5", - "reference": "5d099bcf0393908bf4ad69cc47dafb785d51f7f5", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "autoload": { - "psr-0": { - "PhpOption\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache2" - ], - "authors": [ - { - "name": "Johannes M. Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "http://jmsyst.com", - "role": "Developer of wrapped JMSSerializerBundle" - } - ], - "description": "Option Type for PHP", - "keywords": [ - "language", - "option", - "php", - "type" - ], - "time": "2014-01-09 22:37:17" - }, - { - "name": "phpunit/php-code-coverage", - "version": "1.2.18", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "fe2466802556d3fe4e4d1d58ffd3ccfd0a19be0b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/fe2466802556d3fe4e4d1d58ffd3ccfd0a19be0b", - "reference": "fe2466802556d3fe4e4d1d58ffd3ccfd0a19be0b", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "phpunit/php-file-iterator": ">=1.3.0@stable", - "phpunit/php-text-template": ">=1.2.0@stable", - "phpunit/php-token-stream": ">=1.1.3,<1.3.0" - }, - "require-dev": { - "phpunit/phpunit": "3.7.*@dev" - }, - "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.0.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "classmap": [ - "PHP/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "time": "2014-09-02 10:13:14" - }, - { - "name": "phpunit/php-file-iterator", - "version": "1.3.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/acd690379117b042d1c8af1fafd61bde001bf6bb", - "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "File/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "time": "2013-10-10 15:34:57" - }, - { - "name": "phpunit/php-text-template", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/206dfefc0ffe9cebf65c413e3d0e809c82fbf00a", - "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "Text/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "time": "2014-01-30 17:20:04" - }, - { - "name": "phpunit/php-timer", - "version": "1.0.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/19689d4354b295ee3d8c54b4f42c3efb69cbc17c", - "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "PHP/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "time": "2013-08-02 07:42:54" - }, - { - "name": "phpunit/php-token-stream", - "version": "1.2.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "ad4e1e23ae01b483c16f600ff1bebec184588e32" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/ad4e1e23ae01b483c16f600ff1bebec184588e32", - "reference": "ad4e1e23ae01b483c16f600ff1bebec184588e32", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2-dev" - } - }, - "autoload": { - "classmap": [ - "PHP/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "keywords": [ - "tokenizer" - ], - "time": "2014-03-03 05:10:30" - }, - { - "name": "phpunit/phpunit", - "version": "3.7.38", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "38709dc22d519a3d1be46849868aa2ddf822bcf6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/38709dc22d519a3d1be46849868aa2ddf822bcf6", - "reference": "38709dc22d519a3d1be46849868aa2ddf822bcf6", - "shasum": "" - }, - "require": { - "ext-ctype": "*", - "ext-dom": "*", - "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "php": ">=5.3.3", - "phpunit/php-code-coverage": "~1.2", - "phpunit/php-file-iterator": "~1.3", - "phpunit/php-text-template": "~1.1", - "phpunit/php-timer": "~1.0", - "phpunit/phpunit-mock-objects": "~1.2", - "symfony/yaml": "~2.0" - }, - "require-dev": { - "pear-pear.php.net/pear": "1.9.4" - }, - "suggest": { - "phpunit/php-invoker": "~1.1" - }, - "bin": [ - "composer/bin/phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.7.x-dev" - } - }, - "autoload": { - "classmap": [ - "PHPUnit/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "", - "../../symfony/yaml/" - ], - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "http://www.phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "time": "2014-10-17 09:04:17" - }, - { - "name": "phpunit/phpunit-mock-objects", - "version": "1.2.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "5794e3c5c5ba0fb037b11d8151add2a07fa82875" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/5794e3c5c5ba0fb037b11d8151add2a07fa82875", - "reference": "5794e3c5c5ba0fb037b11d8151add2a07fa82875", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "phpunit/php-text-template": ">=1.1.1@stable" - }, - "suggest": { - "ext-soap": "*" - }, - "type": "library", - "autoload": { - "classmap": [ - "PHPUnit/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", - "keywords": [ - "mock", - "xunit" - ], - "time": "2013-01-13 10:24:48" - }, - { - "name": "pimple/pimple", - "version": "v1.1.1", - "source": { - "type": "git", - "url": "https://github.com/fabpot/Pimple.git", - "reference": "2019c145fe393923f3441b23f29bbdfaa5c58c4d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/fabpot/Pimple/zipball/2019c145fe393923f3441b23f29bbdfaa5c58c4d", - "reference": "2019c145fe393923f3441b23f29bbdfaa5c58c4d", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "autoload": { - "psr-0": { - "Pimple": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - } - ], - "description": "Pimple is a simple Dependency Injection Container for PHP 5.3", - "homepage": "http://pimple.sensiolabs.org", - "keywords": [ - "container", - "dependency injection" - ], - "time": "2013-11-22 08:30:29" - }, - { - "name": "psr/log", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b", - "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b", - "shasum": "" - }, - "type": "library", - "autoload": { - "psr-0": { - "Psr\\Log\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "time": "2012-12-21 11:40:51" - }, - { - "name": "sebastian/finder-facade", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/finder-facade.git", - "reference": "1e396fda3449fce9df032749fa4fa2619e0347e0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/finder-facade/zipball/1e396fda3449fce9df032749fa4fa2619e0347e0", - "reference": "1e396fda3449fce9df032749fa4fa2619e0347e0", - "shasum": "" - }, - "require": { - "symfony/finder": ">=2.2.0", - "theseer/fdomdocument": ">=1.3.1" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "FinderFacade is a convenience wrapper for Symfony's Finder component.", - "homepage": "https://github.com/sebastianbergmann/finder-facade", - "time": "2013-05-28 06:10:03" - }, - { - "name": "sebastian/git", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/git.git", - "reference": "a99fbc102e982c1404041ef3e4d431562b29bcba" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/git/zipball/a99fbc102e982c1404041ef3e4d431562b29bcba", - "reference": "a99fbc102e982c1404041ef3e4d431562b29bcba", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple wrapper for Git", - "homepage": "http://www.github.com/sebastianbergmann/git", - "keywords": [ - "git" - ], - "time": "2013-08-04 09:35:29" - }, - { - "name": "sebastian/phpcpd", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpcpd.git", - "reference": "a9462153f2dd90466a010179901d31fbff598365" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpcpd/zipball/a9462153f2dd90466a010179901d31fbff598365", - "reference": "a9462153f2dd90466a010179901d31fbff598365", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "phpunit/php-timer": ">=1.0.4", - "sebastian/finder-facade": ">=1.1.0", - "sebastian/version": ">=1.0.3", - "symfony/console": ">=2.2.0", - "theseer/fdomdocument": "~1.4" - }, - "bin": [ - "phpcpd" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Copy/Paste Detector (CPD) for PHP code.", - "homepage": "https://github.com/sebastianbergmann/phpcpd", - "time": "2014-03-31 09:25:30" - }, - { - "name": "sebastian/version", - "version": "1.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43", - "reference": "b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43", - "shasum": "" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "time": "2014-03-07 15:35:33" - }, - { - "name": "seld/jsonlint", - "version": "1.3.0", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/jsonlint.git", - "reference": "a7bc2ec9520ad15382292591b617c43bdb1fec35" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/a7bc2ec9520ad15382292591b617c43bdb1fec35", - "reference": "a7bc2ec9520ad15382292591b617c43bdb1fec35", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "bin": [ - "bin/jsonlint" - ], - "type": "library", - "autoload": { - "psr-4": { - "Seld\\JsonLint\\": "src/Seld/JsonLint/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "JSON Linter", - "keywords": [ - "json", - "linter", - "parser", - "validator" - ], - "time": "2014-09-05 15:36:20" - }, - { - "name": "squizlabs/php_codesniffer", - "version": "1.5.6", - "source": { - "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "6f3e42d311b882b25b4d409d23a289f4d3b803d5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/6f3e42d311b882b25b4d409d23a289f4d3b803d5", - "reference": "6f3e42d311b882b25b4d409d23a289f4d3b803d5", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=5.1.2" - }, - "suggest": { - "phpunit/php-timer": "dev-master" - }, - "bin": [ - "scripts/phpcs" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-phpcs-fixer": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "CodeSniffer.php", - "CodeSniffer/CLI.php", - "CodeSniffer/Exception.php", - "CodeSniffer/File.php", - "CodeSniffer/Report.php", - "CodeSniffer/Reporting.php", - "CodeSniffer/Sniff.php", - "CodeSniffer/Tokens.php", - "CodeSniffer/Reports/", - "CodeSniffer/CommentParser/", - "CodeSniffer/Tokenizers/", - "CodeSniffer/DocGenerators/", - "CodeSniffer/Standards/AbstractPatternSniff.php", - "CodeSniffer/Standards/AbstractScopeSniff.php", - "CodeSniffer/Standards/AbstractVariableSniff.php", - "CodeSniffer/Standards/IncorrectPatternException.php", - "CodeSniffer/Standards/Generic/Sniffs/", - "CodeSniffer/Standards/MySource/Sniffs/", - "CodeSniffer/Standards/PEAR/Sniffs/", - "CodeSniffer/Standards/PSR1/Sniffs/", - "CodeSniffer/Standards/PSR2/Sniffs/", - "CodeSniffer/Standards/Squiz/Sniffs/", - "CodeSniffer/Standards/Zend/Sniffs/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Greg Sherwood", - "role": "lead" - } - ], - "description": "PHP_CodeSniffer tokenises PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "http://www.squizlabs.com/php-codesniffer", - "keywords": [ - "phpcs", - "standards" - ], - "time": "2014-12-04 22:32:15" - }, - { - "name": "symfony/config", - "version": "v2.5.8", - "target-dir": "Symfony/Component/Config", - "source": { - "type": "git", - "url": "https://github.com/symfony/Config.git", - "reference": "92f0b4c625b8c42d394b53f879d2795d84bb8c4f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Config/zipball/92f0b4c625b8c42d394b53f879d2795d84bb8c4f", - "reference": "92f0b4c625b8c42d394b53f879d2795d84bb8c4f", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "symfony/filesystem": "~2.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Config\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Config Component", - "homepage": "http://symfony.com", - "time": "2014-12-02 20:15:53" - }, - { - "name": "symfony/console", - "version": "v2.6.1", - "target-dir": "Symfony/Component/Console", - "source": { - "type": "git", - "url": "https://github.com/symfony/Console.git", - "reference": "ef825fd9f809d275926547c9e57cbf14968793e8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Console/zipball/ef825fd9f809d275926547c9e57cbf14968793e8", - "reference": "ef825fd9f809d275926547c9e57cbf14968793e8", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/event-dispatcher": "~2.1", - "symfony/process": "~2.1" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/process": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Console\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Console Component", - "homepage": "http://symfony.com", - "time": "2014-12-02 20:19:20" - }, - { - "name": "symfony/dependency-injection", - "version": "v2.5.8", - "target-dir": "Symfony/Component/DependencyInjection", - "source": { - "type": "git", - "url": "https://github.com/symfony/DependencyInjection.git", - "reference": "b4afda3c24867a17f93237ac1fcce917cc9d7695" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/DependencyInjection/zipball/b4afda3c24867a17f93237ac1fcce917cc9d7695", - "reference": "b4afda3c24867a17f93237ac1fcce917cc9d7695", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "symfony/config": "~2.2", - "symfony/expression-language": "~2.4", - "symfony/yaml": "~2.0" - }, - "suggest": { - "symfony/config": "", - "symfony/proxy-manager-bridge": "Generate service proxies to lazy load them", - "symfony/yaml": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\DependencyInjection\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony DependencyInjection Component", - "homepage": "http://symfony.com", - "time": "2014-12-02 21:48:32" - }, - { - "name": "symfony/event-dispatcher", - "version": "v2.6.1", - "target-dir": "Symfony/Component/EventDispatcher", - "source": { - "type": "git", - "url": "https://github.com/symfony/EventDispatcher.git", - "reference": "720fe9bca893df7ad1b4546649473b5afddf0216" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/720fe9bca893df7ad1b4546649473b5afddf0216", - "reference": "720fe9bca893df7ad1b4546649473b5afddf0216", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~2.0", - "symfony/dependency-injection": "~2.6", - "symfony/expression-language": "~2.6", - "symfony/stopwatch": "~2.2" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\EventDispatcher\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony EventDispatcher Component", - "homepage": "http://symfony.com", - "time": "2014-12-02 20:19:20" - }, - { - "name": "symfony/filesystem", - "version": "v2.5.8", - "target-dir": "Symfony/Component/Filesystem", - "source": { - "type": "git", - "url": "https://github.com/symfony/Filesystem.git", - "reference": "e5fc05a3a1dbb4ea0bed80fe7bd21ba3cab88c42" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Filesystem/zipball/e5fc05a3a1dbb4ea0bed80fe7bd21ba3cab88c42", - "reference": "e5fc05a3a1dbb4ea0bed80fe7bd21ba3cab88c42", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Filesystem\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Filesystem Component", - "homepage": "http://symfony.com", - "time": "2014-12-02 20:15:53" - }, - { - "name": "symfony/finder", - "version": "v2.6.1", - "target-dir": "Symfony/Component/Finder", - "source": { - "type": "git", - "url": "https://github.com/symfony/Finder.git", - "reference": "0d3ef7f6ec55a7af5eca7914eaa0dacc04ccc721" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Finder/zipball/0d3ef7f6ec55a7af5eca7914eaa0dacc04ccc721", - "reference": "0d3ef7f6ec55a7af5eca7914eaa0dacc04ccc721", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Finder\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Finder Component", - "homepage": "http://symfony.com", - "time": "2014-12-02 20:19:20" - }, - { - "name": "symfony/process", - "version": "v2.6.1", - "target-dir": "Symfony/Component/Process", - "source": { - "type": "git", - "url": "https://github.com/symfony/Process.git", - "reference": "bf0c9bd625f13b0b0bbe39919225cf145dfb935a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Process/zipball/bf0c9bd625f13b0b0bbe39919225cf145dfb935a", - "reference": "bf0c9bd625f13b0b0bbe39919225cf145dfb935a", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Process\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Process Component", - "homepage": "http://symfony.com", - "time": "2014-12-02 20:19:20" - }, - { - "name": "symfony/stopwatch", - "version": "v2.6.1", - "target-dir": "Symfony/Component/Stopwatch", - "source": { - "type": "git", - "url": "https://github.com/symfony/Stopwatch.git", - "reference": "261abd360cfb6ac65ea93ffd82073e2011d034fc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Stopwatch/zipball/261abd360cfb6ac65ea93ffd82073e2011d034fc", - "reference": "261abd360cfb6ac65ea93ffd82073e2011d034fc", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Stopwatch\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Stopwatch Component", - "homepage": "http://symfony.com", - "time": "2014-12-02 20:19:20" - }, - { - "name": "symfony/translation", - "version": "v2.6.1", - "target-dir": "Symfony/Component/Translation", - "source": { - "type": "git", - "url": "https://github.com/symfony/Translation.git", - "reference": "5b8bf84a43317021849813f556f26dc35968156b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Translation/zipball/5b8bf84a43317021849813f556f26dc35968156b", - "reference": "5b8bf84a43317021849813f556f26dc35968156b", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~2.0", - "symfony/intl": "~2.3", - "symfony/yaml": "~2.2" - }, - "suggest": { - "psr/log": "To use logging capability in translator", - "symfony/config": "", - "symfony/yaml": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Translation\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Translation Component", - "homepage": "http://symfony.com", - "time": "2014-12-02 20:19:20" - }, - { - "name": "symfony/validator", - "version": "v2.6.1", - "target-dir": "Symfony/Component/Validator", - "source": { - "type": "git", - "url": "https://github.com/symfony/Validator.git", - "reference": "4583e0321f1bcdad14d93e265eaca1001035b5c4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Validator/zipball/4583e0321f1bcdad14d93e265eaca1001035b5c4", - "reference": "4583e0321f1bcdad14d93e265eaca1001035b5c4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "symfony/translation": "~2.0" - }, - "require-dev": { - "doctrine/annotations": "~1.0", - "doctrine/cache": "~1.0", - "egulias/email-validator": "~1.0", - "symfony/config": "~2.2", - "symfony/expression-language": "~2.4", - "symfony/http-foundation": "~2.1", - "symfony/intl": "~2.3", - "symfony/property-access": "~2.2", - "symfony/yaml": "~2.0" - }, - "suggest": { - "doctrine/annotations": "For using the annotation mapping. You will also need doctrine/cache.", - "doctrine/cache": "For using the default cached annotation reader and metadata cache.", - "egulias/email-validator": "Strict (RFC compliant) email validation", - "symfony/config": "", - "symfony/expression-language": "For using the 2.4 Expression validator", - "symfony/http-foundation": "", - "symfony/intl": "", - "symfony/property-access": "For using the 2.4 Validator API", - "symfony/yaml": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Validator\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Validator Component", - "homepage": "http://symfony.com", - "time": "2014-12-02 20:19:20" - }, - { - "name": "symfony/yaml", - "version": "v2.6.1", - "target-dir": "Symfony/Component/Yaml", - "source": { - "type": "git", - "url": "https://github.com/symfony/Yaml.git", - "reference": "3346fc090a3eb6b53d408db2903b241af51dcb20" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Yaml/zipball/3346fc090a3eb6b53d408db2903b241af51dcb20", - "reference": "3346fc090a3eb6b53d408db2903b241af51dcb20", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Yaml\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Yaml Component", - "homepage": "http://symfony.com", - "time": "2014-12-02 20:19:20" - }, - { - "name": "tecnick.com/tcpdf", - "version": "6.2.0", - "source": { - "type": "git", - "url": "https://github.com/tecnickcom/TCPDF.git", - "reference": "40662daa766bd3a6b5eafa44dfde680ee6661716" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/40662daa766bd3a6b5eafa44dfde680ee6661716", - "reference": "40662daa766bd3a6b5eafa44dfde680ee6661716", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "fonts", - "config", - "include", - "tcpdf.php", - "tcpdf_parser.php", - "tcpdf_import.php", - "tcpdf_barcodes_1d.php", - "tcpdf_barcodes_2d.php", - "include/tcpdf_colors.php", - "include/tcpdf_filters.php", - "include/tcpdf_font_data.php", - "include/tcpdf_fonts.php", - "include/tcpdf_images.php", - "include/tcpdf_static.php", - "include/barcodes/datamatrix.php", - "include/barcodes/pdf417.php", - "include/barcodes/qrcode.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPLv3" - ], - "authors": [ - { - "name": "Nicola Asuni", - "email": "info@tecnick.com", - "homepage": "http://nicolaasuni.tecnick.com" - } - ], - "description": "TCPDF is a PHP class for generating PDF documents and barcodes.", - "homepage": "http://www.tcpdf.org/", - "keywords": [ - "PDFD32000-2008", - "TCPDF", - "barcodes", - "datamatrix", - "pdf", - "pdf417", - "qrcode" - ], - "time": "2014-12-10 18:53:49" - }, - { - "name": "theseer/fdomdocument", - "version": "1.6.0", - "source": { - "type": "git", - "url": "https://github.com/theseer/fDOMDocument.git", - "reference": "d08cf070350f884c63fc9078d27893c2ab6c7cef" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/theseer/fDOMDocument/zipball/d08cf070350f884c63fc9078d27893c2ab6c7cef", - "reference": "d08cf070350f884c63fc9078d27893c2ab6c7cef", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "lib-libxml": "*", - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "lead" - } - ], - "description": "The classes contained within this repository extend the standard DOM to use exceptions at all occasions of errors instead of PHP warnings or notices. They also add various custom methods and shortcuts for convenience and to simplify the usage of DOM.", - "homepage": "https://github.com/theseer/fDOMDocument", - "time": "2014-09-13 10:57:19" - }, - { - "name": "twig/twig", - "version": "v1.16.2", - "source": { - "type": "git", - "url": "https://github.com/twigphp/Twig.git", - "reference": "42f758d9fe2146d1f0470604fc05ee43580873fc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/42f758d9fe2146d1f0470604fc05ee43580873fc", - "reference": "42f758d9fe2146d1f0470604fc05ee43580873fc", - "shasum": "" - }, - "require": { - "php": ">=5.2.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.16-dev" - } - }, - "autoload": { - "psr-0": { - "Twig_": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, - { - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", - "role": "Project Founder" - }, - { - "name": "Twig Team", - "homepage": "https://github.com/fabpot/Twig/graphs/contributors", - "role": "Contributors" - } - ], - "description": "Twig, the flexible, fast, and secure template language for PHP", - "homepage": "http://twig.sensiolabs.org", - "keywords": [ - "templating" - ], - "time": "2014-10-17 12:53:44" - }, - { - "name": "zendframework/zend-cache", - "version": "2.3.3", - "target-dir": "Zend/Cache", - "source": { - "type": "git", - "url": "https://github.com/zendframework/Component_ZendCache.git", - "reference": "1966038a1568ebeaeeeaa78ce27bc7b340e30747" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/Component_ZendCache/zipball/1966038a1568ebeaeeeaa78ce27bc7b340e30747", - "reference": "1966038a1568ebeaeeeaa78ce27bc7b340e30747", - "shasum": "" - }, - "require": { - "php": ">=5.3.23", - "zendframework/zend-eventmanager": "self.version", - "zendframework/zend-servicemanager": "self.version", - "zendframework/zend-stdlib": "self.version" - }, - "require-dev": { - "zendframework/zend-serializer": "self.version", - "zendframework/zend-session": "self.version" - }, - "suggest": { - "ext-apc": "APC >= 3.1.6 to use the APC storage adapter", - "ext-dba": "DBA, to use the DBA storage adapter", - "ext-memcached": "Memcached >= 1.0.0 to use the Memcached storage adapter", - "ext-wincache": "WinCache, to use the WinCache storage adapter", - "zendframework/zend-serializer": "Zend\\Serializer component", - "zendframework/zend-session": "Zend\\Session component" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev", - "dev-develop": "2.4-dev" - } - }, - "autoload": { - "psr-0": { - "Zend\\Cache\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "provides a generic way to cache any data", - "homepage": "https://github.com/zendframework/zf2", - "keywords": [ - "cache", - "zf2" - ], - "time": "2014-09-16 22:58:11" - }, - { - "name": "zendframework/zend-config", - "version": "2.3.3", - "target-dir": "Zend/Config", - "source": { - "type": "git", - "url": "https://github.com/zendframework/Component_ZendConfig.git", - "reference": "a9ad512e1482461a5b500ee3fcf2d06ec9c7c7e8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/Component_ZendConfig/zipball/a9ad512e1482461a5b500ee3fcf2d06ec9c7c7e8", - "reference": "a9ad512e1482461a5b500ee3fcf2d06ec9c7c7e8", - "shasum": "" - }, - "require": { - "php": ">=5.3.23", - "zendframework/zend-stdlib": "self.version" - }, - "require-dev": { - "zendframework/zend-filter": "self.version", - "zendframework/zend-i18n": "self.version", - "zendframework/zend-json": "self.version", - "zendframework/zend-servicemanager": "self.version" - }, - "suggest": { - "zendframework/zend-filter": "Zend\\Filter component", - "zendframework/zend-i18n": "Zend\\I18n component", - "zendframework/zend-json": "Zend\\Json to use the Json reader or writer classes", - "zendframework/zend-servicemanager": "Zend\\ServiceManager for use with the Config Factory to retrieve reader and writer instances" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev", - "dev-develop": "2.4-dev" - } - }, - "autoload": { - "psr-0": { - "Zend\\Config\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "provides a nested object property based user interface for accessing this configuration data within application code", - "homepage": "https://github.com/zendframework/zf2", - "keywords": [ - "config", - "zf2" - ], - "time": "2014-09-16 22:58:11" - }, - { - "name": "zendframework/zend-eventmanager", - "version": "2.3.3", - "target-dir": "Zend/EventManager", - "source": { - "type": "git", - "url": "https://github.com/zendframework/Component_ZendEventManager.git", - "reference": "4110fe64b10616b9bb71429a206d8e9e6d99e3ba" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/Component_ZendEventManager/zipball/4110fe64b10616b9bb71429a206d8e9e6d99e3ba", - "reference": "4110fe64b10616b9bb71429a206d8e9e6d99e3ba", - "shasum": "" - }, - "require": { - "php": ">=5.3.23", - "zendframework/zend-stdlib": "self.version" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev", - "dev-develop": "2.4-dev" - } - }, - "autoload": { - "psr-0": { - "Zend\\EventManager\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "homepage": "https://github.com/zendframework/zf2", - "keywords": [ - "eventmanager", - "zf2" - ], - "time": "2014-09-16 22:58:11" - }, - { - "name": "zendframework/zend-filter", - "version": "2.3.3", - "target-dir": "Zend/Filter", - "source": { - "type": "git", - "url": "https://github.com/zendframework/Component_ZendFilter.git", - "reference": "98b8c2abfdc9009e4c0157e78c9f22bf2cebb693" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/Component_ZendFilter/zipball/98b8c2abfdc9009e4c0157e78c9f22bf2cebb693", - "reference": "98b8c2abfdc9009e4c0157e78c9f22bf2cebb693", - "shasum": "" - }, - "require": { - "php": ">=5.3.23", - "zendframework/zend-stdlib": "self.version" - }, - "require-dev": { - "zendframework/zend-crypt": "self.version", - "zendframework/zend-servicemanager": "self.version", - "zendframework/zend-uri": "self.version" - }, - "suggest": { - "zendframework/zend-crypt": "Zend\\Crypt component", - "zendframework/zend-i18n": "Zend\\I18n component", - "zendframework/zend-servicemanager": "Zend\\ServiceManager component", - "zendframework/zend-uri": "Zend\\Uri component for UriNormalize filter" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev", - "dev-develop": "2.4-dev" - } - }, - "autoload": { - "psr-0": { - "Zend\\Filter\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "provides a set of commonly needed data filters", - "homepage": "https://github.com/zendframework/zf2", - "keywords": [ - "filter", - "zf2" - ], - "time": "2014-09-16 22:58:11" - }, - { - "name": "zendframework/zend-i18n", - "version": "2.3.3", - "target-dir": "Zend/I18n", - "source": { - "type": "git", - "url": "https://github.com/zendframework/Component_ZendI18n.git", - "reference": "7939bd8eaa573f10fe33a799714199ed7c1fad5c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/Component_ZendI18n/zipball/7939bd8eaa573f10fe33a799714199ed7c1fad5c", - "reference": "7939bd8eaa573f10fe33a799714199ed7c1fad5c", - "shasum": "" - }, - "require": { - "php": ">=5.3.23", - "zendframework/zend-stdlib": "self.version" - }, - "require-dev": { - "zendframework/zend-cache": "self.version", - "zendframework/zend-config": "self.version", - "zendframework/zend-eventmanager": "self.version", - "zendframework/zend-filter": "self.version", - "zendframework/zend-servicemanager": "self.version", - "zendframework/zend-validator": "self.version", - "zendframework/zend-view": "self.version" - }, - "suggest": { - "ext-intl": "Required for most features of Zend\\I18n; included in default builds of PHP", - "zendframework/zend-cache": "Zend\\Cache component", - "zendframework/zend-config": "Zend\\Config component", - "zendframework/zend-eventmanager": "You should install this package to use the events in the translator", - "zendframework/zend-filter": "You should install this package to use the provided filters", - "zendframework/zend-resources": "Translation resources", - "zendframework/zend-servicemanager": "Zend\\ServiceManager component", - "zendframework/zend-validator": "You should install this package to use the provided validators", - "zendframework/zend-view": "You should install this package to use the provided view helpers" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev", - "dev-develop": "2.4-dev" - } - }, - "autoload": { - "psr-0": { - "Zend\\I18n\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "homepage": "https://github.com/zendframework/zf2", - "keywords": [ - "i18n", - "zf2" - ], - "time": "2014-09-16 22:58:11" - }, - { - "name": "zendframework/zend-json", - "version": "2.3.3", - "target-dir": "Zend/Json", - "source": { - "type": "git", - "url": "https://github.com/zendframework/Component_ZendJson.git", - "reference": "4093e5a0a166a5d02532bac6e5671a7b21d203b5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/Component_ZendJson/zipball/4093e5a0a166a5d02532bac6e5671a7b21d203b5", - "reference": "4093e5a0a166a5d02532bac6e5671a7b21d203b5", - "shasum": "" - }, - "require": { - "php": ">=5.3.23", - "zendframework/zend-stdlib": "self.version" - }, - "require-dev": { - "zendframework/zend-http": "self.version", - "zendframework/zend-server": "self.version" - }, - "suggest": { - "zendframework/zend-http": "Zend\\Http component", - "zendframework/zend-server": "Zend\\Server component" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev", - "dev-develop": "2.4-dev" - } - }, - "autoload": { - "psr-0": { - "Zend\\Json\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "provides convenience methods for serializing native PHP to JSON and decoding JSON to native PHP", - "homepage": "https://github.com/zendframework/zf2", - "keywords": [ - "json", - "zf2" - ], - "time": "2014-09-16 22:58:11" - }, - { - "name": "zendframework/zend-math", - "version": "2.3.3", - "target-dir": "Zend/Math", - "source": { - "type": "git", - "url": "https://github.com/zendframework/Component_ZendMath.git", - "reference": "a197ee44ade44a289f0f250c2aedb321b3618573" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/Component_ZendMath/zipball/a197ee44ade44a289f0f250c2aedb321b3618573", - "reference": "a197ee44ade44a289f0f250c2aedb321b3618573", - "shasum": "" - }, - "require": { - "php": ">=5.3.23" - }, - "suggest": { - "ext-bcmath": "If using the bcmath functionality", - "ext-gmp": "If using the gmp functionality", - "ircmaxell/random-lib": "Fallback random byte generator for Zend\\Math\\Rand if OpenSSL/Mcrypt extensions are unavailable", - "zendframework/zend-servicemanager": ">= current version, if using the BigInteger::factory functionality" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev", - "dev-develop": "2.4-dev" - } - }, - "autoload": { - "psr-0": { - "Zend\\Math\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "homepage": "https://github.com/zendframework/zf2", - "keywords": [ - "math", - "zf2" - ], - "time": "2014-09-16 22:58:11" - }, - { - "name": "zendframework/zend-serializer", - "version": "2.3.3", - "target-dir": "Zend/Serializer", - "source": { - "type": "git", - "url": "https://github.com/zendframework/Component_ZendSerializer.git", - "reference": "34ee4925e7e256bfa80c4c3dcc8e764d02a51edd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/Component_ZendSerializer/zipball/34ee4925e7e256bfa80c4c3dcc8e764d02a51edd", - "reference": "34ee4925e7e256bfa80c4c3dcc8e764d02a51edd", - "shasum": "" - }, - "require": { - "php": ">=5.3.23", - "zendframework/zend-json": "self.version", - "zendframework/zend-math": "self.version", - "zendframework/zend-stdlib": "self.version" - }, - "require-dev": { - "zendframework/zend-servicemanager": "self.version" - }, - "suggest": { - "zendframework/zend-servicemanager": "To support plugin manager support" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev", - "dev-develop": "2.4-dev" - } - }, - "autoload": { - "psr-0": { - "Zend\\Serializer\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "provides an adapter based interface to simply generate storable representation of PHP types by different facilities, and recover", - "homepage": "https://github.com/zendframework/zf2", - "keywords": [ - "serializer", - "zf2" - ], - "time": "2014-09-16 22:58:11" - }, - { - "name": "zendframework/zend-servicemanager", - "version": "2.3.3", - "target-dir": "Zend/ServiceManager", - "source": { - "type": "git", - "url": "https://github.com/zendframework/Component_ZendServiceManager.git", - "reference": "559403e4fd10db2516641f20f129a568d7e6a993" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/Component_ZendServiceManager/zipball/559403e4fd10db2516641f20f129a568d7e6a993", - "reference": "559403e4fd10db2516641f20f129a568d7e6a993", - "shasum": "" - }, - "require": { - "php": ">=5.3.23" - }, - "require-dev": { - "zendframework/zend-di": "self.version" - }, - "suggest": { - "zendframework/zend-di": "Zend\\Di component" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev", - "dev-develop": "2.4-dev" - } - }, - "autoload": { - "psr-0": { - "Zend\\ServiceManager\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "homepage": "https://github.com/zendframework/zf2", - "keywords": [ - "servicemanager", - "zf2" - ], - "time": "2014-09-16 22:58:11" - }, - { - "name": "zendframework/zend-stdlib", - "version": "2.3.3", - "target-dir": "Zend/Stdlib", - "source": { - "type": "git", - "url": "https://github.com/zendframework/Component_ZendStdlib.git", - "reference": "fa33e6647f830d0d2a1cb451efcdfe1bb9a66c33" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/Component_ZendStdlib/zipball/fa33e6647f830d0d2a1cb451efcdfe1bb9a66c33", - "reference": "fa33e6647f830d0d2a1cb451efcdfe1bb9a66c33", - "shasum": "" - }, - "require": { - "php": ">=5.3.23" - }, - "require-dev": { - "zendframework/zend-eventmanager": "self.version", - "zendframework/zend-serializer": "self.version", - "zendframework/zend-servicemanager": "self.version" - }, - "suggest": { - "zendframework/zend-eventmanager": "To support aggregate hydrator usage", - "zendframework/zend-serializer": "Zend\\Serializer component", - "zendframework/zend-servicemanager": "To support hydrator plugin manager usage" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev", - "dev-develop": "2.4-dev" - } - }, - "autoload": { - "psr-0": { - "Zend\\Stdlib\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "homepage": "https://github.com/zendframework/zf2", - "keywords": [ - "stdlib", - "zf2" - ], - "time": "2014-09-16 22:58:11" - }, - { - "name": "zetacomponents/base", - "version": "1.9", - "source": { - "type": "git", - "url": "https://github.com/zetacomponents/Base.git", - "reference": "f20df24e8de3e48b6b69b2503f917e457281e687" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zetacomponents/Base/zipball/f20df24e8de3e48b6b69b2503f917e457281e687", - "reference": "f20df24e8de3e48b6b69b2503f917e457281e687", - "shasum": "" - }, - "require-dev": { - "zetacomponents/unit-test": "*" - }, - "type": "library", - "autoload": { - "classmap": [ - "src" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Sergey Alexeev" - }, - { - "name": "Sebastian Bergmann" - }, - { - "name": "Jan Borsodi" - }, - { - "name": "Raymond Bosman" - }, - { - "name": "Frederik Holljen" - }, - { - "name": "Kore Nordmann" - }, - { - "name": "Derick Rethans" - }, - { - "name": "Vadym Savchuk" - }, - { - "name": "Tobias Schlitt" - }, - { - "name": "Alexandru Stanoi" - } - ], - "description": "The Base package provides the basic infrastructure that all packages rely on. Therefore every component relies on this package.", - "homepage": "https://github.com/zetacomponents", - "time": "2014-09-19 03:28:34" - }, - { - "name": "zetacomponents/document", - "version": "1.3.1", - "source": { - "type": "git", - "url": "https://github.com/zetacomponents/Document.git", - "reference": "688abfde573cf3fe0730f82538fbd7aa9fc95bc8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zetacomponents/Document/zipball/688abfde573cf3fe0730f82538fbd7aa9fc95bc8", - "reference": "688abfde573cf3fe0730f82538fbd7aa9fc95bc8", - "shasum": "" - }, - "require": { - "zetacomponents/base": "*" - }, - "require-dev": { - "zetacomponents/unit-test": "dev-master" - }, - "type": "library", - "autoload": { - "classmap": [ - "src" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Sebastian Bergmann" - }, - { - "name": "Kore Nordmann" - }, - { - "name": "Derick Rethans" - }, - { - "name": "Tobias Schlitt" - }, - { - "name": "Alexandru Stanoi" - } - ], - "description": "The Document components provides a general conversion framework for different semantic document markup languages like XHTML, Docbook, RST and similar.", - "homepage": "https://github.com/zetacomponents", - "time": "2013-12-19 11:40:00" - } - ], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "platform": { - "php": ">=5.3.3", - "ext-xml": "*" - }, - "platform-dev": [] -} From 75b479fa23bb82493f64e9fd48741e25a07a8dd6 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 8 Aug 2015 22:12:13 +0400 Subject: [PATCH 40/99] Removed redundant *.md documentation. --- docs/src/documentation.md | 1140 ------------------------------------- 1 file changed, 1140 deletions(-) delete mode 100644 docs/src/documentation.md diff --git a/docs/src/documentation.md b/docs/src/documentation.md deleted file mode 100644 index d4c640518d..0000000000 --- a/docs/src/documentation.md +++ /dev/null @@ -1,1140 +0,0 @@ - -# Contents - -- [Introduction](#introduction) - - [Features](#features) - - [File formats](#file-formats) -- [Installing/configuring](#installing-configuring) - - [Requirements](#requirements) - - [Installation](#installation) - - [Using samples](#using-samples) -- [General usage](#general-usage) - - [Basic example](#basic-example) - - [Settings](#settings) - - [Default font](#default-font) - - [Document properties](#document-properties) - - [Measurement units](#measurement-units) -- [Containers](#containers) - - [Sections](#sections) - - [Headers](#headers) - - [Footers](#footers) - - [Other containers](#other-containers) -- [Elements](#elements) - - [Texts](#texts) - - [Breaks](#breaks) - - [Lists](#lists) - - [Tables](#tables) - - [Images](#images) - - [Objects](#objects) - - [Table of contents](#table-of-contents) - - [Footnotes & endnotes](#footnotes-endnotes) - - [Checkboxes](#checkboxes) - - [Textboxes](#textboxes) - - [Fields](#fields) - - [Lines](#lines) - - [Shapes](#shapes) - - [Charts](#charts) - - [FormFields](#form-fields) -- [Styles](#styles) - - [Section](#section) - - [Font](#font) - - [Paragraph](#paragraph) - - [Table](#table) -- [Templates processing](#templates-processing) -- [Writers & readers](#writers-readers) - - [OOXML](#ooxml) - - [OpenDocument](#opendocument) - - [RTF](#rtf) - - [HTML](#html) - - [PDF](#pdf) -- [Recipes](#recipes) -- [Frequently asked questions](#frequently-asked-questions) -- [References](#references) - -# Introduction - -PHPWord is a library written in pure PHP that provides a set of classes to write to and read from different document file formats. The current version of PHPWord supports Microsoft [Office Open XML](http://en.wikipedia.org/wiki/Office_Open_XML) (OOXML or OpenXML), OASIS [Open Document Format for Office Applications](http://en.wikipedia.org/wiki/OpenDocument) (OpenDocument or ODF), and [Rich Text Format](http://en.wikipedia.org/wiki/Rich_Text_Format) (RTF). - -PHPWord is an open source project licensed under the terms of [LGPL version 3](https://github.com/PHPOffice/PHPWord/blob/develop/COPYING.LESSER). PHPWord is aimed to be a high quality software product by incorporating [continuous integration](https://travis-ci.org/PHPOffice/PHPWord) and [unit testing](http://phpoffice.github.io/PHPWord/coverage/develop/). You can learn more about PHPWord by reading this Developers' Documentation and the [API Documentation](http://phpoffice.github.io/PHPWord/docs/develop/). - -## Features - -- Set document properties, e.g. title, subject, and creator. -- Create document sections with different settings, e.g. portrait/landscape, page size, and page numbering -- Create header and footer for each sections -- Set default font type, font size, and paragraph style -- Use UTF-8 and East Asia fonts/characters -- Define custom font styles (e.g. bold, italic, color) and paragraph styles (e.g. centered, multicolumns, spacing) either as named style or inline in text -- Insert paragraphs, either as a simple text or complex one (a text run) that contains other elements -- Insert titles (headers) and table of contents -- Insert text breaks and page breaks -- Insert and format images, either local, remote, or as page watermarks -- Insert binary OLE Objects such as Excel or Visio -- Insert and format table with customized properties for each rows (e.g. repeat as header row) and cells (e.g. background color, rowspan, colspan) -- Insert list items as bulleted, numbered, or multilevel -- Insert hyperlinks -- Insert footnotes and endnotes -- Insert drawing shapes (arc, curve, line, polyline, rect, oval) -- Insert charts (pie, doughnut, bar, line, area, scatter, radar) -- Insert form fields (textinput, checkbox, and dropdown) -- Create document from templates -- Use XSL 1.0 style sheets to transform main document part of OOXML template -- ... and many more features on progress - -## File formats - -Below are the supported features for each file formats. - -### Writers - -| Features | | DOCX | ODT | RTF | HTML | PDF | -|-------------------------|--------------------|------|-----|-----|------|-----| -| **Document Properties** | Standard | ✓ | ✓ | ✓ | ✓ | | -| | Custom | ✓ | ✓ | | | | -| **Element Type** | Text | ✓ | ✓ | ✓ | ✓ | ✓ | -| | Text Run | ✓ | ✓ | ✓ | ✓ | ✓ | -| | Title | ✓ | ✓ | | ✓ | ✓ | -| | Link | ✓ | ✓ | ✓ | ✓ | ✓ | -| | Preserve Text | ✓ | | | | | -| | Text Break | ✓ | ✓ | ✓ | ✓ | ✓ | -| | Page Break | ✓ | | ✓ | | | -| | List | ✓ | | | | | -| | Table | ✓ | ✓ | ✓ | ✓ | ✓ | -| | Image | ✓ | ✓ | ✓ | ✓ | | -| | Object | ✓ | | | | | -| | Watermark | ✓ | | | | | -| | Table of Contents | ✓ | | | | | -| | Header | ✓ | | | | | -| | Footer | ✓ | | | | | -| | Footnote | ✓ | | | ✓ | | -| | Endnote | ✓ | | | ✓ | | -| **Graphs** | 2D basic graphs | ✓ | | | | | -| | 2D advanced graphs | | | | | | -| | 3D graphs | ✓ | | | | | -| **Math** | OMML support | | | | | | -| | MathML support | | | | | | -| **Bonus** | Encryption | | | | | | -| | Protection | | | | | | - -### Readers - -| Features | | DOCX | ODT | RTF | HTML| -|-------------------------|--------------------|------|-----|-----|-----| -| **Document Properties** | Standard | ✓ | | | | -| | Custom | ✓ | | | | -| **Element Type** | Text | ✓ | ✓ | ✓ | ✓ | -| | Text Run | ✓ | | | | -| | Title | ✓ | ✓ | | | -| | Link | ✓ | | | | -| | Preserve Text | ✓ | | | | -| | Text Break | ✓ | | | | -| | Page Break | ✓ | | | | -| | List | ✓ | ✓ | | ✓ | -| | Table | ✓ | | | ✓ | -| | Image | ✓ | | | | -| | Object | | | | | -| | Watermark | | | | | -| | Table of Contents | | | | | -| | Header | ✓ | | | | -| | Footer | ✓ | | | | -| | Footnote | ✓ | | | | -| | Endnote | ✓ | | | | -| **Graphs** | 2D basic graphs | | | | | -| | 2D advanced graphs | | | | | -| | 3D graphs | | | | | -| **Math** | OMML support | | | | | -| | MathML support | | | | | -| **Bonus** | Encryption | | | | | -| | Protection | | | | | - -## Contributing - -We welcome everyone to contribute to PHPWord. Below are some of the things that you can do to contribute: - -- Read [our contributing guide](https://github.com/PHPOffice/PHPWord/blob/master/CONTRIBUTING.md) -- [Fork us](https://github.com/PHPOffice/PHPWord/fork) and [request a pull](https://github.com/PHPOffice/PHPWord/pulls) to the [develop](https://github.com/PHPOffice/PHPWord/tree/develop) branch -- Submit [bug reports or feature requests](https://github.com/PHPOffice/PHPWord/issues) to GitHub -- Follow [@PHPWord](https://twitter.com/PHPWord) and [@PHPOffice](https://twitter.com/PHPOffice) on Twitter - -# Installing/configuring - -## Requirements - -Mandatory: - -- PHP 5.3+ -- PHP [Zip](http://php.net/manual/en/book.zip.php) extension -- PHP [XML Parser](http://www.php.net/manual/en/xml.installation.php) extension - -Optional PHP extensions: - -- [GD](http://php.net/manual/en/book.image.php) -- [XMLWriter](http://php.net/manual/en/book.xmlwriter.php) -- [XSL](http://php.net/manual/en/book.xsl.php) - -## Installation - -There are two ways to install PHPWord, i.e. via [Composer](http://getcomposer.org/) or manually by downloading the library. - -### Using Composer - -To install via Composer, add the following lines to your `composer.json`: - -```json -{ - "require": { - "phpoffice/phpword": "dev-master" - } -} -``` - -### Manual install - -To install manually, [download PHPWord package from github](https://github.com/PHPOffice/PHPWord/archive/master.zip). Extract the package and put the contents to your machine. To use the library, include `src/PhpWord/Autoloader.php` in your script and invoke `Autoloader::register`. - -```php -require_once '/path/to/src/PhpWord/Autoloader.php'; -\PhpOffice\PhpWord\Autoloader::register(); -``` - -## Using samples - -After installation, you can browse and use the samples that we've provided, either by command line or using browser. If you can access your PHPWord library folder using browser, point your browser to the `samples` folder, e.g. `http://localhost/PhpWord/samples/`. - -# General usage - -## Basic example - -The following is a basic example of the PHPWord library. More examples are provided in the [samples folder](https://github.com/PHPOffice/PHPWord/tree/master/samples/). - -```php -addSection(); -// Adding Text element to the Section having font styled by default... -$section->addText( - htmlspecialchars( - '"Learn from yesterday, live for today, hope for tomorrow. ' - . 'The important thing is not to stop questioning." ' - . '(Albert Einstein)', - ENT_COMPAT, - 'UTF-8' - ) -); - -/* - * Note: it's possible to customize font style of the Text element you add in three ways: - * - inline; - * - using named font style (new font style object will be implicitly created); - * - using explicitly created font style object. - */ - -// Adding Text element with font customized inline... -$section->addText( - htmlspecialchars( - '"Great achievement is usually born of great sacrifice, ' - . 'and is never the result of selfishness." ' - . '(Napoleon Hill)', - ENT_COMPAT, - 'UTF-8' - ), - array('name' => 'Tahoma', 'size' => 10) -); - -// Adding Text element with font customized using named font style... -$fontStyleName = 'oneUserDefinedStyle'; -$phpWord->addFontStyle( - $fontStyleName, - array('name' => 'Tahoma', 'size' => 10, 'color' => '1B2232', 'bold' => true) -); -$section->addText( - htmlspecialchars( - '"The greatest accomplishment is not in never falling, ' - . 'but in rising again after you fall." ' - . '(Vince Lombardi)', - ENT_COMPAT, - 'UTF-8' - ), - $fontStyleName -); - -// Adding Text element with font customized using explicitly created font style object... -$fontStyle = new \PhpOffice\PhpWord\Style\Font(); -$fontStyle->setBold(true); -$fontStyle->setName('Tahoma'); -$fontStyle->setSize(13); -$myTextElement = $section->addText( - htmlspecialchars('"Believe you can and you\'re halfway there." (Theodor Roosevelt)', ENT_COMPAT, 'UTF-8') -); -$myTextElement->setFontStyle($fontStyle); - -// Saving the document as OOXML file... -$objWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord, 'Word2007'); -$objWriter->save('helloWorld.docx'); - -// Saving the document as ODF file... -$objWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord, 'ODText'); -$objWriter->save('helloWorld.odt'); - -// Saving the document as HTML file... -$objWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord, 'HTML'); -$objWriter->save('helloWorld.html'); - -/* Note: we skip RTF, because it's not XML-based and requires a different example. */ -/* Note: we skip PDF, because "HTML-to-PDF" approach is used to create PDF documents. */ -``` - -## Settings - -The `PhpOffice\PhpWord\Settings` class provides some options that will affect the behavior of PHPWord. Below are the options. - -### XML Writer compatibility - -This option sets [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). 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` during development to make the resulting XML file easier to read. - -```php -\PhpOffice\PhpWord\Settings::setCompatibility(false); -``` - -### Zip class - -By default, PHPWord uses PHP [ZipArchive](http://php.net/manual/en/book.zip.php) to read or write ZIP compressed archive and the files inside them. If you can't have ZipArchive installed on your server, you can use pure PHP library alternative, [PCLZip](http://www.phpconcept.net/pclzip/), which included with PHPWord. - -```php -\PhpOffice\PhpWord\Settings::setZipClass(\PhpOffice\PhpWord\Settings::PCLZIP); -``` - -## Default font - -By default, every text appears in Arial 10 point. You can alter the default font by using the following two functions: - -```php -$phpWord->setDefaultFontName('Times New Roman'); -$phpWord->setDefaultFontSize(12); -``` - -## Document information - -You can set the document information such as title, creator, and company name. Use the following functions: - -```php -$properties = $phpWord->getDocInfo(); -$properties->setCreator('My name'); -$properties->setCompany('My factory'); -$properties->setTitle('My title'); -$properties->setDescription('My description'); -$properties->setCategory('My category'); -$properties->setLastModifiedBy('My name'); -$properties->setCreated(mktime(0, 0, 0, 3, 12, 2014)); -$properties->setModified(mktime(0, 0, 0, 3, 14, 2014)); -$properties->setSubject('My subject'); -$properties->setKeywords('my, key, word'); -``` - -## Measurement units - -The base length unit in Open Office XML is twip. Twip means "TWentieth of an Inch Point", i.e. 1 twip = 1/1440 inch. - -You can use PHPWord helper functions to convert inches, centimeters, or points to twips. - -```php -// Paragraph with 6 points space after -$phpWord->addParagraphStyle('My Style', array( - 'spaceAfter' => \PhpOffice\PhpWord\Shared\Converter::pointToTwip(6)) -); - -$section = $phpWord->addSection(); -$sectionStyle = $section->getStyle(); -// half inch left margin -$sectionStyle->setMarginLeft(\PhpOffice\PhpWord\Shared\Converter::inchToTwip(.5)); -// 2 cm right margin -$sectionStyle->setMarginRight(\PhpOffice\PhpWord\Shared\Converter::cmToTwip(2)); -``` - -# Containers - -Containers are objects where you can put elements (texts, lists, tables, etc). There are 3 main containers, i.e. sections, headers, and footers. There are 3 elements that can also act as containers, i.e. textruns, table cells, and footnotes. - -## Sections - -Every visible element in word is placed inside of a section. To create a section, use the following code: - -```php -$section = $phpWord->addSection($sectionStyle); -``` - -The `$sectionStyle` is an optional associative array that sets the section. Example: - -```php -$sectionStyle = array( - 'orientation' => 'landscape', - 'marginTop' => 600, - 'colsNum' => 2, -); -``` - - -### Page number - -You can change a section page number by using the `pageNumberingStart` style of the section. - -```php -// Method 1 -$section = $phpWord->addSection(array('pageNumberingStart' => 1)); - -// Method 2 -$section = $phpWord->addSection(); -$section->getStyle()->setPageNumberingStart(1); -``` - -### Multicolumn - -You can change a section layout to multicolumn (like in a newspaper) by using the `breakType` and `colsNum` style of the section. - -```php -// Method 1 -$section = $phpWord->addSection(array('breakType' => 'continuous', 'colsNum' => 2)); - -// Method 2 -$section = $phpWord->addSection(); -$section->getStyle()->setBreakType('continuous'); -$section->getStyle()->setColsNum(2); -``` - -### Line numbering - -You can apply line numbering to a section by using the `lineNumbering` style of the section. - -```php -// Method 1 -$section = $phpWord->addSection(array('lineNumbering' => array())); - -// Method 2 -$section = $phpWord->addSection(); -$section->getStyle()->setLineNumbering(array()); -``` - -Below are the properties of the line numbering style. - -- `start` Line numbering starting value -- `increment` Line number increments -- `distance` Distance between text and line numbering in twip -- `restart` Line numbering restart setting continuous|newPage|newSection - -## Headers - -Each section can have its own header reference. To create a header use the `addHeader` method: - -```php -$header = $section->addHeader(); -``` - -Be sure to save the result in a local object. You can use all elements that are available for the footer. See "Footer" section for detail. Additionally, only inside of the header reference you can add watermarks or background pictures. See "Watermarks" section. - -## Footers - -Each section can have its own footer reference. To create a footer, use the `addFooter` method: - -```php -$footer = $section->addFooter(); -``` - -Be sure to save the result in a local object to add elements to a footer. You can add the following elements to footers: - -- Texts `addText` and `createTextrun` -- Text breaks -- Images -- Tables -- Preserve text - -See the "Elements" section for the detail of each elements. - -## Other containers - -Textruns, table cells, and footnotes are elements that can also act as containers. See the corresponding "Elements" section for the detail of each elements. - -# Elements - -Below are the matrix of element availability in each container. The column shows the containers while the rows lists the elements. - -| Num | Element | Section | Header | Footer | Cell | Text Run | Footnote | -|-----|---------------|---------|--------|--------|------|----------|----------| -| 1 | Text | v | v | v | v | v | v | -| 2 | Text Run | v | v | v | v | - | - | -| 3 | Link | v | v | v | v | v | v | -| 4 | Title | v | ? | ? | ? | ? | ? | -| 5 | Preserve Text | ? | v | v | v* | - | - | -| 6 | Text Break | v | v | v | v | v | v | -| 7 | Page Break | v | - | - | - | - | - | -| 8 | List | v | v | v | v | - | - | -| 9 | Table | v | v | v | v | - | - | -| 10 | Image | v | v | v | v | v | v | -| 11 | Watermark | - | v | - | - | - | - | -| 12 | Object | v | v | v | v | v | v | -| 13 | TOC | v | - | - | - | - | - | -| 14 | Footnote | v | - | - | v** | v** | - | -| 15 | Endnote | v | - | - | v** | v** | - | -| 16 | CheckBox | v | v | v | v | - | - | -| 17 | TextBox | v | v | v | v | - | - | -| 18 | Field | v | v | v | v | v | v | -| 19 | Line | v | v | v | v | v | v | -| 20 | Shape | v | v | v | v | v | v | -| 21 | Chart | v | - | - | - | - | - | -| 22 | Form Fields | v | v | v | v | v | v | - -Legend: - -- `v` Available -- `v*` Available only when inside header/footer -- `v**` Available only when inside section -- `-` Not available -- `?` Should be available - -## Texts - -Text can be added by using `addText` and `addTextRun` method. `addText` is used for creating simple paragraphs that only contain texts with the same style. `addTextRun` is used for creating complex paragraphs that contain text with different style (some bold, other italics, etc) or other elements, e.g. images or links. The syntaxes are as follow: - -```php -$section->addText($text, [$fontStyle], [$paragraphStyle]); -$textrun = $section->addTextRun([$paragraphStyle]); -``` - -You can use the `$fontStyle` and `$paragraphStyle` variable to define text formatting. There are 2 options to style the inserted text elements, i.e. inline style by using array or defined style by adding style definition. - -Inline style examples: - -```php -$fontStyle = array('name' => 'Times New Roman', 'size' => 9); -$paragraphStyle = array('alignment' => 'both'); -$section->addText('I am simple paragraph', $fontStyle, $paragraphStyle); - -$textrun = $section->addTextRun(); -$textrun->addText('I am bold', array('bold' => true)); -$textrun->addText('I am italic', array('italic' => true)); -$textrun->addText('I am colored', array('color' => 'AACC00')); -``` - -Defined style examples: - -```php -$fontStyle = array('color' => '006699', 'size' => 18, 'bold' => true); -$phpWord->addFontStyle('fStyle', $fontStyle); -$text = $section->addText('Hello world!', 'fStyle'); - -$paragraphStyle = array('alignment' => 'center'); -$phpWord->addParagraphStyle('pStyle', $paragraphStyle); -$text = $section->addText('Hello world!', 'pStyle'); -``` - -### Titles - -If you want to structure your document or build table of contents, you need titles or headings. To add a title to the document, use the `addTitleStyle` and `addTitle` method. - -```php -$phpWord->addTitleStyle($depth, [$fontStyle], [$paragraphStyle]); -$section->addTitle($text, [$depth]); -``` - -Its necessary to add a title style to your document because otherwise the title won't be detected as a real title. - -### Links - -You can add Hyperlinks to the document by using the function addLink: - -```php -$section->addLink($linkSrc, [$linkName], [$fontStyle], [$paragraphStyle]); -``` - -- `$linkSrc` The URL of the link. -- `$linkName` Placeholder of the URL that appears in the document. -- `$fontStyle` See "Font style" section. -- `$paragraphStyle` See "Paragraph style" section. - -### Preserve texts - -The `addPreserveText` method is used to add a page number or page count to headers or footers. - -```php -$footer->addPreserveText('Page {PAGE} of {NUMPAGES}.'); -``` - -## Breaks - -### Text breaks - -Text breaks are empty new lines. To add text breaks, use the following syntax. All paramaters are optional. - -```php -$section->addTextBreak([$breakCount], [$fontStyle], [$paragraphStyle]); -``` - -- `$breakCount` How many lines -- `$fontStyle` See "Font style" section. -- `$paragraphStyle` See "Paragraph style" section. - -### Page breaks - -There are two ways to insert a page breaks, using the `addPageBreak` method or using the `pageBreakBefore` style of paragraph. - -```php -$section->addPageBreak(); -``` - -## Lists - -To add a list item use the function `addListItem`. - -Basic usage: - -```php -$section->addListItem($text, [$depth], [$fontStyle], [$listStyle], [$paragraphStyle]); -``` - -Parameters: - -- `$text` Text that appears in the document. -- `$depth` Depth of list item. -- `$fontStyle` See "Font style" section. -- `$listStyle` List style of the current element TYPE\_NUMBER, TYPE\_ALPHANUM, TYPE\_BULLET\_FILLED, etc. See list of constants in PHPWord\_Style\_ListItem. -- `$paragraphStyle` See "Paragraph style" section. - -Advanced usage: - -You can also create your own numbering style by changing the `$listStyle` parameter with the name of your numbering style. - -```php -$phpWord->addNumberingStyle( - 'multilevel', - array('type' => 'multilevel', 'levels' => array( - array('format' => 'decimal', 'text' => '%1.', 'left' => 360, 'hanging' => 360, 'tabPos' => 360), - array('format' => 'upperLetter', 'text' => '%2.', 'left' => 720, 'hanging' => 360, 'tabPos' => 720), - ) - ) -); -$section->addListItem('List Item I', 0, null, 'multilevel'); -$section->addListItem('List Item I.a', 1, null, 'multilevel'); -$section->addListItem('List Item I.b', 1, null, 'multilevel'); -$section->addListItem('List Item II', 0, null, 'multilevel'); -``` - -## Tables - -To add tables, rows, and cells, use the `addTable`, `addRow`, and `addCell` methods: - -```php -$table = $section->addTable([$tableStyle]); -$table->addRow([$height], [$rowStyle]); -$cell = $table->addCell($width, [$cellStyle]); -``` - -Table style can be defined with `addTableStyle`: - -```php -$tableStyle = array( - 'borderColor' => '006699', - 'borderSize' => 6, - 'cellMargin' => 50 -); -$firstRowStyle = array('bgColor' => '66BBFF'); -$phpWord->addTableStyle('myTable', $tableStyle, $firstRowStyle); -$table = $section->addTable('myTable'); -``` - -### Cell span - -You can span a cell on multiple columns by using `gridSpan` or multiple rows by using `vMerge`. - -```php -$cell = $table->addCell(200); -$cell->getStyle()->setGridSpan(5); -``` - -See `Sample_09_Tables.php` for more code sample. - -## Images - -To add an image, use the `addImage` method to sections, headers, footers, textruns, or table cells. - -```php -$section->addImage($src, [$style]); -``` - -- source String path to a local image or URL of a remote image -- styles Array fo styles for the image. See below. - -Examples: - -```php -$section = $phpWord->addSection(); -$section->addImage( - 'mars.jpg', - array( - 'width' => 100, - 'height' => 100, - 'marginTop' => -1, - 'marginLeft' => -1, - 'wrappingStyle' => 'behind' - ) -); -$footer = $section->addFooter(); -$footer->addImage('http://example.com/image.php'); -$textrun = $section->addTextRun(); -$textrun->addImage('http://php.net/logo.jpg'); -``` - -### Watermarks - -To add a watermark (or page background image), your section needs a header reference. After creating a header, you can use the `addWatermark` method to add a watermark. - -```php -$section = $phpWord->addSection(); -$header = $section->addHeader(); -$header->addWatermark('resources/_earth.jpg', array('marginTop' => 200, 'marginLeft' => 55)); -``` - -## Objects - -You can add OLE embeddings, such as Excel spreadsheets or PowerPoint presentations to the document by using `addObject` method. - -```php -$section->addObject($src, [$style]); -``` - -## Table of contents - -To add a table of contents (TOC), you can use the `addTOC` method. Your TOC can only be generated if you have add at least one title (See "Titles"). - -```php -$section->addTOC([$fontStyle], [$tocStyle], [$minDepth], [$maxDepth]); -``` - -- `$fontStyle`: See font style section -- `$tocStyle`: See available options below -- `$minDepth`: Minimum depth of header to be shown. Default 1 -- `$maxDepth`: Maximum depth of header to be shown. Default 9 - -Options for `$tocStyle`: - -- `tabLeader` Fill type between the title text and the page number. Use the defined constants in PHPWord\_Style\_TOC. -- `tabPos` The position of the tab where the page number appears in twips. -- `indent` The indent factor of the titles in twips. - -## Footnotes & endnotes - -You can create footnotes with `addFootnote` and endnotes with `addEndnote` in texts or textruns, but it's recommended to use textrun to have better layout. You can use `addText`, `addLink`, `addTextBreak`, `addImage`, `addObject` on footnotes and endnotes. - -On textrun: - -```php -$textrun = $section->addTextRun(); -$textrun->addText('Lead text.'); -$footnote = $textrun->addFootnote(); -$footnote->addText('Footnote text can have '); -$footnote->addLink('http://test.com', 'links'); -$footnote->addText('.'); -$footnote->addTextBreak(); -$footnote->addText('And text break.'); -$textrun->addText('Trailing text.'); -$endnote = $textrun->addEndnote(); -$endnote->addText('Endnote put at the end'); -``` - -On text: - -```php -$section->addText('Lead text.'); -$footnote = $section->addFootnote(); -$footnote->addText('Footnote text.'); -``` - -The footnote reference number will be displayed with decimal number starting from 1. This number use `FooterReference` style which you can redefine by `addFontStyle` method. Default value for this style is `array('superScript' => true)`; - -## Checkboxes - -Checkbox elements can be added to sections or table cells by using `addCheckBox`. - -```php -$section->addCheckBox($name, $text, [$fontStyle], [$paragraphStyle]) -``` - -- `$name` Name of the check box. -- `$text` Text following the check box -- `$fontStyle` See "Font style" section. -- `$paragraphStyle` See "Paragraph style" section. - -## Textboxes - -To be completed. - -## Fields - -To be completed. - -## Lines - -To be completed. - -## Shapes - -To be completed. - -## Charts - -To be completed. - -## Form fields - -To be completed. - -# Styles - -## Section - -Below are the available styles for section: - -- `orientation` Page orientation, i.e. 'portrait' (default) or 'landscape' -- `marginTop` Page margin top in twips -- `marginLeft` Page margin left in twips -- `marginRight` Page margin right in twips -- `marginBottom` Page margin bottom in twips -- `borderTopSize` Border top size in twips -- `borderTopColor` Border top color -- `borderLeftSize` Border left size in twips -- `borderLeftColor` Border left color -- `borderRightSize` Border right size in twips -- `borderRightColor` Border right color -- `borderBottomSize` Border bottom size in twips -- `borderBottomColor` Border bottom color -- `headerHeight` Spacing to top of header -- `footerHeight` Spacing to bottom of footer -- `gutter` Page gutter spacing -- `colsNum` Number of columns -- `colsSpace` Spacing between columns -- `breakType` Section break type (nextPage, nextColumn, continuous, evenPage, oddPage) - -The following two styles are automatically set by the use of the `orientation` style. You can alter them but that's not recommended. - -- `pageSizeW` Page width in twips -- `pageSizeH` Page height in twips - -## Font - -Available font styles: - -- `name` Font name, e.g. *Arial* -- `size` Font size, e.g. *20*, *22*, -- `hint` Font content type, *default*, *eastAsia*, or *cs* -- `bold` Bold, *true* or *false* -- `italic` Italic, *true* or *false* -- `superScript` Superscript, *true* or *false* -- `subScript` Subscript, *true* or *false* -- `underline` Underline, *dash*, *dotted*, etc. -- `strikethrough` Strikethrough, *true* or *false* -- `doubleStrikethrough` Double strikethrough, *true* or *false* -- `color` Font color, e.g. *FF0000* -- `fgColor` Font highlight color, e.g. *yellow*, *green*, *blue* -- `bgColor` Font background color, e.g. *FF0000* -- `smallCaps` Small caps, *true* or *false* -- `allCaps` All caps, *true* or *false* - -## Paragraph - -Available paragraph styles: - -- `alignment` Paragraph alignment, *left*, *right* or *center* -- `spaceBefore` Space before paragraph -- `spaceAfter` Space after paragraph -- `indent` Indent by how much -- `hanging` Hanging by how much -- `basedOn` Parent style -- `next` Style for next paragraph -- `widowControl` Allow first/last line to display on a separate page, *true* or *false* -- `keepNext` Keep paragraph with next paragraph, *true* or *false* -- `keepLines` Keep all lines on one page, *true* or *false* -- `pageBreakBefore` Start paragraph on next page, *true* or *false* -- `lineHeight` text line height, e.g. *1.0*, *1.5*, ect... -- `tabs` Set of custom tab stops - -## Table - -Table styles: - -- `width` Table width in percent -- `bgColor` Background color, e.g. '9966CC' -- `border(Top|Right|Bottom|Left)Size` Border size in twips -- `border(Top|Right|Bottom|Left)Color` Border color, e.g. '9966CC' -- `cellMargin(Top|Right|Bottom|Left)` Cell margin in twips - -Row styles: - -- `tblHeader` Repeat table row on every new page, *true* or *false* -- `cantSplit` Table row cannot break across pages, *true* or *false* -- `exactHeight` Row height is exact or at least - -Cell styles: - -- `width` Cell width in twips -- `valign` Vertical alignment, *top*, *center*, *both*, *bottom* -- `textDirection` Direction of text -- `bgColor` Background color, e.g. '9966CC' -- `border(Top|Right|Bottom|Left)Size` Border size in twips -- `border(Top|Right|Bottom|Left)Color` Border color, e.g. '9966CC' -- `gridSpan` Number of columns spanned -- `vMerge` *restart* or *continue* - -## Image - -Available image styles: - -- `width` Width in pixels -- `height` Height in pixels -- `align` Image alignment, *left*, *right*, or *center* -- `marginTop` Top margin in inches, can be negative -- `marginLeft` Left margin in inches, can be negative -- `wrappingStyle` Wrapping style, *inline*, *square*, *tight*, *behind*, or *infront* - -## Numbering level - -- `start` Starting value -- `format` Numbering format bullet|decimal|upperRoman|lowerRoman|upperLetter|lowerLetter -- `restart` Restart numbering level symbol -- `suffix` Content between numbering symbol and paragraph text tab|space|nothing -- `text` Numbering level text e.g. %1 for nonbullet or bullet character -- `align` Numbering symbol align left|center|right|both -- `left` See paragraph style -- `hanging` See paragraph style -- `tabPos` See paragraph style -- `font` Font name -- `hint` See font style - -# Templates processing - -You can create a .docx document template with included search-patterns which can be replaced by any value you wish. Only single-line values can be replaced. - -To deal with a template file, use `new TemplateProcessor` statement. After TemplateProcessor instance creation the document template is copied into the temporary directory. Then you can use `TemplateProcessor::setValue` method to change the value of a search pattern. The search-pattern model is: `${search-pattern}`. - -Example: - -```php -$templateProcessor = new TemplateProcessor('Template.docx'); -$templateProcessor->setValue('Name', 'Somebody someone'); -$templateProcessor->setValue('Street', 'Coming-Undone-Street 32'); -``` - -It is not possible to directly add new OOXML elements to the template file being processed, but it is possible to transform main document part of the template using XSLT (see `TemplateProcessor::applyXslStyleSheet`). - -See `Sample_07_TemplateCloneRow.php` for example on how to create multirow from a single row in a template by using `TemplateProcessor::cloneRow`. - -See `Sample_23_TemplateBlock.php` for example on how to clone a block of text using `TemplateProcessor::cloneBlock` and delete a block of text using `TemplateProcessor::deleteBlock`. - -# Writers & readers - -## OOXML - -The package of OOXML document consists of the following files. - -- _rels/ - - .rels -- docProps/ - - app.xml - - core.xml - - custom.xml -- word/ - - rels/ - - document.rels.xml - - media/ - - theme/ - - theme1.xml - - document.xml - - fontTable.xml - - numbering.xml - - settings.xml - - styles.xml - - webSettings.xml -- [Content_Types].xml - -## OpenDocument - -### Package - -The package of OpenDocument document consists of the following files. - -- META-INF/ - - manifest.xml -- Pictures/ -- content.xml -- meta.xml -- styles.xml - -### content.xml - -The structure of `content.xml` is described below. - -- office:document-content - - office:font-facedecls - - office:automatic-styles - - office:body - - office:text - - draw:* - - office:forms - - table:table - - text:list - - text:numbered-paragraph - - text:p - - text:table-of-contents - - text:section - - office:chart - - office:image - - office:drawing - -### styles.xml - -The structure of `styles.xml` is described below. - -- office:document-styles - - office:styles - - office:automatic-styles - - office:master-styles - - office:master-page - -## RTF - -To be completed. - -## HTML - -To be completed. - -## PDF - -To be completed. - -# Recipes - -## Create float left image - -Use absolute positioning relative to margin horizontally and to line vertically. - -```php -$imageStyle = array( - 'width' => 40, - 'height' => 40 - 'wrappingStyle' => 'square', - 'positioning' => 'absolute', - 'posHorizontalRel' => 'margin', - 'posVerticalRel' => 'line', -); -$textrun->addImage('resources/_earth.jpg', $imageStyle); -$textrun->addText($lipsumText); -``` - -## Download the produced file automatically - -Use `php://output` as the filename. - -```php -$phpWord = new \PhpOffice\PhpWord\PhpWord(); -$section = $phpWord->createSection(); -$section->addText('Hello World!'); -$file = 'HelloWorld.docx'; -header("Content-Description: File Transfer"); -header('Content-Disposition: attachment; filename="' . $file . '"'); -header('Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document'); -header('Content-Transfer-Encoding: binary'); -header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); -header('Expires: 0'); -$xmlWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord, 'Word2007'); -$xmlWriter->save("php://output"); -``` - -## Create numbered headings - -Define a numbering style and title styles, and match the two styles (with `pStyle` and `numStyle`) like below. - -```php -$phpWord->addNumberingStyle( - 'hNum', - array('type' => 'multilevel', 'levels' => array( - array('pStyle' => 'Heading1', 'format' => 'decimal', 'text' => '%1'), - array('pStyle' => 'Heading2', 'format' => 'decimal', 'text' => '%1.%2'), - array('pStyle' => 'Heading3', 'format' => 'decimal', 'text' => '%1.%2.%3'), - ) - ) -); -$phpWord->addTitleStyle(1, array('size' => 16), array('numStyle' => 'hNum', 'numLevel' => 0)); -$phpWord->addTitleStyle(2, array('size' => 14), array('numStyle' => 'hNum', 'numLevel' => 1)); -$phpWord->addTitleStyle(3, array('size' => 12), array('numStyle' => 'hNum', 'numLevel' => 2)); - -$section->addTitle('Heading 1', 1); -$section->addTitle('Heading 2', 2); -$section->addTitle('Heading 3', 3); -``` - -## Add a link within a title - -Apply 'HeadingN' paragraph style to TextRun or Link. Sample code: - -```php -$phpWord = new \PhpOffice\PhpWord\PhpWord(); -$phpWord->addTitleStyle(1, array('size' => 16, 'bold' => true)); -$phpWord->addTitleStyle(2, array('size' => 14, 'bold' => true)); -$phpWord->addFontStyle('Link', array('color' => '0000FF', 'underline' => 'single')); - -$section = $phpWord->addSection(); - -// Textrun -$textrun = $section->addTextRun('Heading1'); -$textrun->addText('The '); -$textrun->addLink('https://github.com/PHPOffice/PHPWord', 'PHPWord', 'Link'); - -// Link -$section->addLink('https://github.com/', 'GitHub', 'Link', 'Heading2'); -``` - -## Remove [Compatibility Mode] text in the MS Word title bar - -Use the `Metadata\Compatibility\setOoxmlVersion(n)` method with `n` is the version of Office (14 = Office 2010, 15 = Office 2013). - -```php -$phpWord->getCompatibility()->setOoxmlVersion(15); -``` - -# Frequently asked questions - -## Is this the same with PHPWord that I found in CodePlex? - -No. This one is much better with tons of new features that you can’t find in PHPWord 0.6.3. The development in CodePlex is halted and switched to GitHub to allow more participation from the crowd. The more the merrier, right? - -## I’ve been running PHPWord from CodePlex flawlessly, but I can’t use the latest PHPWord from GitHub. Why? - -PHPWord requires PHP 5.3+ since 0.8, while PHPWord 0.6.3 from CodePlex can run with PHP 5.2. There’s a lot of new features that we can get from PHP 5.3 and it’s been around since 2009! You should upgrade your PHP version to use PHPWord 0.8+. - -# References - -## ISO/IEC 29500, Third edition, 2012-09-01 - -- [Part 1: Fundamentals and Markup Language Reference](http://standards.iso.org/ittf/PubliclyAvailableStandards/c061750_ISO_IEC_29500-1_2012.zip) -- [Part 2: Open Packaging Conventions](http://standards.iso.org/ittf/PubliclyAvailableStandards/c061796_ISO_IEC_29500-2_2012.zip) -- [Part 3: Markup Compatibility and Extensibility](http://standards.iso.org/ittf/PubliclyAvailableStandards/c061797_ISO_IEC_29500-3_2012.zip) -- [Part 4: Transitional Migration Features](http://standards.iso.org/ittf/PubliclyAvailableStandards/c061798_ISO_IEC_29500-4_2012.zip) - -## Formal specifications - -- [Oasis OpenDocument Standard Version 1.2](http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os.html) -- [Rich Text Format (RTF) Specification, version 1.9.1](http://www.microsoft.com/en-us/download/details.aspx?id=10725) - -## Other resources - -- [DocumentFormat.OpenXml.Wordprocessing Namespace on MSDN](http://msdn.microsoft.com/en-us/library/documentformat.openxml.wordprocessing%28v=office.14%29.aspx) From 90295fe09c7a3633fef82c2436cb53a71407b2af Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sun, 16 Aug 2015 19:50:47 +0400 Subject: [PATCH 41/99] #532. --- src/PhpWord/TemplateProcessor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PhpWord/TemplateProcessor.php b/src/PhpWord/TemplateProcessor.php index b240ef71a2..52cb90af88 100644 --- a/src/PhpWord/TemplateProcessor.php +++ b/src/PhpWord/TemplateProcessor.php @@ -340,7 +340,7 @@ public function saveAs($fileName) } /* - * Note: we do not use ``rename`` funcion here, because it looses file ownership data on Windows platform. + * Note: we do not use ``rename`` function here, because it looses file ownership data on Windows platform. * As a result, user cannot open the file directly getting "Access denied" message. * * @see https://github.com/PHPOffice/PHPWord/issues/532 From adf20d318f415e2cc3e97a20be8f408504930708 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sun, 30 Aug 2015 18:03:31 +0400 Subject: [PATCH 42/99] #513. --- src/PhpWord/TemplateProcessor.php | 46 +++++++++++++++---- tests/PhpWord/Tests/TemplateProcessorTest.php | 2 +- 2 files changed, 37 insertions(+), 11 deletions(-) diff --git a/src/PhpWord/TemplateProcessor.php b/src/PhpWord/TemplateProcessor.php index 52cb90af88..ce92bacfbe 100644 --- a/src/PhpWord/TemplateProcessor.php +++ b/src/PhpWord/TemplateProcessor.php @@ -25,6 +25,8 @@ class TemplateProcessor { + const MAXIMUM_REPLACEMENTS_DEFAULT = -1; + /** * ZipArchive object. * @@ -62,6 +64,7 @@ class TemplateProcessor * @since 0.12.0 Throws CreateTemporaryFileException and CopyFileException instead of Exception. * * @param string $documentTemplate The fully qualified template filename. + * * @throws \PhpOffice\PhpWord\Exception\CreateTemporaryFileException * @throws \PhpOffice\PhpWord\Exception\CopyFileException */ @@ -104,7 +107,9 @@ public function __construct($documentTemplate) * @param \DOMDocument $xslDOMDocument * @param array $xslOptions * @param string $xslOptionsURI + * * @return void + * * @throws \PhpOffice\PhpWord\Exception\Exception */ public function applyXslStyleSheet($xslDOMDocument, $xslOptions = array(), $xslOptionsURI = '') @@ -131,21 +136,22 @@ public function applyXslStyleSheet($xslDOMDocument, $xslOptions = array(), $xslO } /** - * @param mixed $search + * @param mixed $macro * @param mixed $replace * @param integer $limit + * * @return void */ - public function setValue($search, $replace, $limit = -1) + public function setValue($macro, $replace, $limit = self::MAXIMUM_REPLACEMENTS_DEFAULT) { foreach ($this->tempDocumentHeaders as $index => $headerXML) { - $this->tempDocumentHeaders[$index] = $this->setValueForPart($this->tempDocumentHeaders[$index], $search, $replace, $limit); + $this->tempDocumentHeaders[$index] = $this->setValueForPart($this->tempDocumentHeaders[$index], $macro, $replace, $limit); } - $this->tempDocumentMainPart = $this->setValueForPart($this->tempDocumentMainPart, $search, $replace, $limit); + $this->tempDocumentMainPart = $this->setValueForPart($this->tempDocumentMainPart, $macro, $replace, $limit); foreach ($this->tempDocumentFooters as $index => $headerXML) { - $this->tempDocumentFooters[$index] = $this->setValueForPart($this->tempDocumentFooters[$index], $search, $replace, $limit); + $this->tempDocumentFooters[$index] = $this->setValueForPart($this->tempDocumentFooters[$index], $macro, $replace, $limit); } } @@ -174,7 +180,9 @@ public function getVariables() * * @param string $search * @param integer $numberOfClones + * * @return void + * * @throws \PhpOffice\PhpWord\Exception\Exception */ public function cloneRow($search, $numberOfClones) @@ -232,6 +240,7 @@ public function cloneRow($search, $numberOfClones) * @param string $blockname * @param integer $clones * @param boolean $replace + * * @return string|null */ public function cloneBlock($blockname, $clones = 1, $replace = true) @@ -267,6 +276,7 @@ public function cloneBlock($blockname, $clones = 1, $replace = true) * * @param string $blockname * @param string $replacement + * * @return void */ public function replaceBlock($blockname, $replacement) @@ -290,6 +300,7 @@ public function replaceBlock($blockname, $replacement) * Delete a block of text. * * @param string $blockname + * * @return void */ public function deleteBlock($blockname) @@ -301,6 +312,7 @@ public function deleteBlock($blockname) * Saves the result document. * * @return string + * * @throws \PhpOffice\PhpWord\Exception\Exception */ public function save() @@ -329,6 +341,7 @@ public function save() * @since 0.8.0 * * @param string $fileName + * * @return void */ public function saveAs($fileName) @@ -342,7 +355,7 @@ public function saveAs($fileName) /* * Note: we do not use ``rename`` function here, because it looses file ownership data on Windows platform. * As a result, user cannot open the file directly getting "Access denied" message. - * + * * @see https://github.com/PHPOffice/PHPWord/issues/532 */ copy($tempFileName, $fileName); @@ -375,12 +388,13 @@ function ($match) { } /** - * Find and replace placeholders in the given XML section. + * Find and replace macros in the given XML section. * * @param string $documentPartXML * @param string $search * @param string $replace * @param integer $limit + * * @return string */ protected function setValueForPart($documentPartXML, $search, $replace, $limit) @@ -393,15 +407,21 @@ protected function setValueForPart($documentPartXML, $search, $replace, $limit) $replace = utf8_encode($replace); } - $regExpDelim = '/'; - $escapedSearch = preg_quote($search, $regExpDelim); - return preg_replace("{$regExpDelim}{$escapedSearch}{$regExpDelim}u", $replace, $documentPartXML, $limit); + // Note: we can't use the same function for both cases here, because of performance considerations. + if (self::MAXIMUM_REPLACEMENTS_DEFAULT === $limit) { + return str_replace($search, $replace, $documentPartXML); + } else { + $regExpDelim = '/'; + $escapedSearch = preg_quote($search, $regExpDelim); + return preg_replace("{$regExpDelim}{$escapedSearch}{$regExpDelim}u", $replace, $documentPartXML, $limit); + } } /** * Find all variables in $documentPartXML. * * @param string $documentPartXML + * * @return string[] */ protected function getVariablesForPart($documentPartXML) @@ -415,6 +435,7 @@ protected function getVariablesForPart($documentPartXML) * Get the name of the footer file for $index. * * @param integer $index + * * @return string */ protected function getFooterName($index) @@ -426,6 +447,7 @@ protected function getFooterName($index) * Get the name of the header file for $index. * * @param integer $index + * * @return string */ protected function getHeaderName($index) @@ -437,7 +459,9 @@ protected function getHeaderName($index) * Find the start position of the nearest table row before $offset. * * @param integer $offset + * * @return integer + * * @throws \PhpOffice\PhpWord\Exception\Exception */ protected function findRowStart($offset) @@ -458,6 +482,7 @@ protected function findRowStart($offset) * Find the end position of the nearest table row after $offset. * * @param integer $offset + * * @return integer */ protected function findRowEnd($offset) @@ -470,6 +495,7 @@ protected function findRowEnd($offset) * * @param integer $startPosition * @param integer $endPosition + * * @return string */ protected function getSlice($startPosition, $endPosition = 0) diff --git a/tests/PhpWord/Tests/TemplateProcessorTest.php b/tests/PhpWord/Tests/TemplateProcessorTest.php index 69b4f99821..f75f7d3b05 100644 --- a/tests/PhpWord/Tests/TemplateProcessorTest.php +++ b/tests/PhpWord/Tests/TemplateProcessorTest.php @@ -171,7 +171,7 @@ public function testCloneRow() * @covers ::saveAs * @test */ - public function testVariablesCanBeReplacedInHeaderAndFooter() + public function testMacrosCanBeReplacedInHeaderAndFooter() { $templateProcessor = new TemplateProcessor(__DIR__ . '/_files/templates/header-footer.docx'); From 3a58c818bd10757d019cf7a52339cb6c71518b14 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sun, 30 Aug 2015 18:44:55 +0400 Subject: [PATCH 43/99] Released v0.12.1. --- CHANGELOG.md | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d7433b91b..3cc3ff9939 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,14 +9,27 @@ This is the changelog between releases of PHPWord. Releases are listed in revers Place announcement text here. ### Changes +- Introduced ``\PhpOffice\PhpWord\SimpleType\ST_JcTable`` simple type. - @RomanSyroeshko +- Introduced ``\PhpOffice\PhpWord\SimpleType\ST_Jc`` simple type. - @RomanSyroeshko - Improved error message for the case when ``autoload.php`` is not found. - @RomanSyroeshko #371 -- Changed visibility of all private properties and methods of ``TemplateProcessor`` to ``protected``. - RomanSyroeshko #498 +- Renamed ``align`` option of ``NumberingLevel``, ``Frame``, ``Table``, and ``Paragraph`` styles into ``alignment``. Accessor and mutator methods renamed too. - @RomanSyroeshko + + + +0.12.1 (30 August 2015) +------------------- + +Maintenance release. This release is focused primarily on ``TemplateProcessor``. + +### Changes +- Changed visibility of all private properties and methods of ``TemplateProcessor`` to ``protected``. - @RomanSyroeshko #498 - Improved performance of ``TemplateProcessor::setValue()``. - @RomanSyroeshko @nicoSWD #513 -- Renamed ``align`` option of ``Paragraph`` style into ``alignment``. Note: accessor and mutator methods are renamed too. - @RomanSyroeshko ### Bugfixes - Fixed issue with "Access denied" message while opening ``Sample_07_TemplateCloneRow.docx`` and ``Sample_23_TemplateBlock.docx`` result files on Windows platform. - @RomanSyroeshko @AshSat #532 -- Fixed PreserveText element alignment in footer (see ``Sample_12_HeaderFooter.php``). - @RomanSyroeshko @SSchwaiger #495 +- Fixed ``PreserveText`` element alignment in footer (see ``Sample_12_HeaderFooter.php``). - @RomanSyroeshko @SSchwaiger #495 + + 0.12.0 (3 January 2015) ----------------------- From a123ce41e598f92c6a3d1e5ebc2998d7dd4a0692 Mon Sep 17 00:00:00 2001 From: kazi Tanvir Ahsan Date: Thu, 10 Sep 2015 23:33:02 +1000 Subject: [PATCH 44/99] Template processor setValue() improvements #614 --- src/PhpWord/TemplateProcessor.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/PhpWord/TemplateProcessor.php b/src/PhpWord/TemplateProcessor.php index ce92bacfbe..f5b934bed6 100644 --- a/src/PhpWord/TemplateProcessor.php +++ b/src/PhpWord/TemplateProcessor.php @@ -144,6 +144,10 @@ public function applyXslStyleSheet($xslDOMDocument, $xslOptions = array(), $xslO */ public function setValue($macro, $replace, $limit = self::MAXIMUM_REPLACEMENTS_DEFAULT) { + if (substr($macro, 0, 2) !== '${' && substr($macro, -1) !== '}') { + $macro = '${' . $macro . '}'; + } + foreach ($this->tempDocumentHeaders as $index => $headerXML) { $this->tempDocumentHeaders[$index] = $this->setValueForPart($this->tempDocumentHeaders[$index], $macro, $replace, $limit); } @@ -399,10 +403,7 @@ function ($match) { */ protected function setValueForPart($documentPartXML, $search, $replace, $limit) { - if (substr($search, 0, 2) !== '${' && substr($search, -1) !== '}') { - $search = '${' . $search . '}'; - } - + if (!String::isUTF8($replace)) { $replace = utf8_encode($replace); } From 873d41a8722d0101051c38ee04986100bb28da98 Mon Sep 17 00:00:00 2001 From: kazi Tanvir Ahsan Date: Thu, 10 Sep 2015 23:46:48 +1000 Subject: [PATCH 45/99] Update Template processor setValue() improvements #614 --- src/PhpWord/TemplateProcessor.php | 242 +++++++++++++----------------- 1 file changed, 102 insertions(+), 140 deletions(-) diff --git a/src/PhpWord/TemplateProcessor.php b/src/PhpWord/TemplateProcessor.php index f5b934bed6..8d03201ecb 100644 --- a/src/PhpWord/TemplateProcessor.php +++ b/src/PhpWord/TemplateProcessor.php @@ -1,4 +1,5 @@ tempDocumentFilename = tempnam(Settings::getTempDir(), 'PhpWord'); if (false === $this->tempDocumentFilename) { throw new CreateTemporaryFileException(); } - + // Template file cloning if (false === copy($documentTemplate, $this->tempDocumentFilename)) { throw new CopyFileException($documentTemplate, $this->tempDocumentFilename); } - + // Temporary document content extraction $this->zipClass = new ZipArchive(); $this->zipClass->open($this->tempDocumentFilename); $index = 1; while (false !== $this->zipClass->locateName($this->getHeaderName($index))) { - $this->tempDocumentHeaders[$index] = $this->fixBrokenMacros( - $this->zipClass->getFromName($this->getHeaderName($index)) - ); + $this->tempDocumentHeaders[$index] = $this->fixBrokenMacros($this->zipClass->getFromName($this->getHeaderName($index))); $index++; } $index = 1; while (false !== $this->zipClass->locateName($this->getFooterName($index))) { - $this->tempDocumentFooters[$index] = $this->fixBrokenMacros( - $this->zipClass->getFromName($this->getFooterName($index)) - ); + $this->tempDocumentFooters[$index] = $this->fixBrokenMacros($this->zipClass->getFromName($this->getFooterName($index))); $index++; } $this->tempDocumentMainPart = $this->fixBrokenMacros($this->zipClass->getFromName('word/document.xml')); } - + /** * Applies XSL style sheet to template's parts. * @@ -112,29 +109,28 @@ public function __construct($documentTemplate) * * @throws \PhpOffice\PhpWord\Exception\Exception */ - public function applyXslStyleSheet($xslDOMDocument, $xslOptions = array(), $xslOptionsURI = '') - { + public function applyXslStyleSheet($xslDOMDocument, $xslOptions = array(), $xslOptionsURI = '') { $xsltProcessor = new \XSLTProcessor(); - + $xsltProcessor->importStylesheet($xslDOMDocument); - + if (false === $xsltProcessor->setParameter($xslOptionsURI, $xslOptions)) { throw new Exception('Could not set values for the given XSL style sheet parameters.'); } - + $xmlDOMDocument = new \DOMDocument(); if (false === $xmlDOMDocument->loadXML($this->tempDocumentMainPart)) { throw new Exception('Could not load XML from the given template.'); } - + $xmlTransformed = $xsltProcessor->transformToXml($xmlDOMDocument); if (false === $xmlTransformed) { throw new Exception('Could not transform the given XML document.'); } - + $this->tempDocumentMainPart = $xmlTransformed; } - + /** * @param mixed $macro * @param mixed $replace @@ -142,43 +138,45 @@ public function applyXslStyleSheet($xslDOMDocument, $xslOptions = array(), $xslO * * @return void */ - public function setValue($macro, $replace, $limit = self::MAXIMUM_REPLACEMENTS_DEFAULT) - { + public function setValue($macro, $replace, $limit = self::MAXIMUM_REPLACEMENTS_DEFAULT) { if (substr($macro, 0, 2) !== '${' && substr($macro, -1) !== '}') { $macro = '${' . $macro . '}'; } - + + if (!String::isUTF8($replace)) { + $replace = utf8_encode($replace); + } + foreach ($this->tempDocumentHeaders as $index => $headerXML) { $this->tempDocumentHeaders[$index] = $this->setValueForPart($this->tempDocumentHeaders[$index], $macro, $replace, $limit); } - + $this->tempDocumentMainPart = $this->setValueForPart($this->tempDocumentMainPart, $macro, $replace, $limit); - + foreach ($this->tempDocumentFooters as $index => $headerXML) { $this->tempDocumentFooters[$index] = $this->setValueForPart($this->tempDocumentFooters[$index], $macro, $replace, $limit); } } - + /** * Returns array of all variables in template. * * @return string[] */ - public function getVariables() - { + public function getVariables() { $variables = $this->getVariablesForPart($this->tempDocumentMainPart); - + foreach ($this->tempDocumentHeaders as $headerXML) { $variables = array_merge($variables, $this->getVariablesForPart($headerXML)); } - + foreach ($this->tempDocumentFooters as $footerXML) { $variables = array_merge($variables, $this->getVariablesForPart($footerXML)); } - + return array_unique($variables); } - + /** * Clone a table row in a template document. * @@ -189,55 +187,55 @@ public function getVariables() * * @throws \PhpOffice\PhpWord\Exception\Exception */ - public function cloneRow($search, $numberOfClones) - { + public function cloneRow($search, $numberOfClones) { if ('${' !== substr($search, 0, 2) && '}' !== substr($search, -1)) { $search = '${' . $search . '}'; } - + $tagPos = strpos($this->tempDocumentMainPart, $search); if (!$tagPos) { throw new Exception("Can not clone row, template variable not found or variable contains markup."); } - + $rowStart = $this->findRowStart($tagPos); $rowEnd = $this->findRowEnd($tagPos); $xmlRow = $this->getSlice($rowStart, $rowEnd); - + // Check if there's a cell spanning multiple rows. if (preg_match('##', $xmlRow)) { + // $extraRowStart = $rowEnd; $extraRowEnd = $rowEnd; while (true) { $extraRowStart = $this->findRowStart($extraRowEnd + 1); $extraRowEnd = $this->findRowEnd($extraRowEnd + 1); - + // If extraRowEnd is lower then 7, there was no next row found. if ($extraRowEnd < 7) { break; } - + // If tmpXmlRow doesn't contain continue, this row is no longer part of the spanned row. $tmpXmlRow = $this->getSlice($extraRowStart, $extraRowEnd); - if (!preg_match('##', $tmpXmlRow) && - !preg_match('##', $tmpXmlRow)) { + if (!preg_match('##', $tmpXmlRow) && !preg_match('##', $tmpXmlRow)) { break; } + // This row was a spanned row, update $rowEnd and search for the next row. $rowEnd = $extraRowEnd; } $xmlRow = $this->getSlice($rowStart, $rowEnd); } - + $result = $this->getSlice(0, $rowStart); for ($i = 1; $i <= $numberOfClones; $i++) { - $result .= preg_replace('/\$\{(.*?)\}/', '\${\\1#' . $i . '}', $xmlRow); + $result.= preg_replace('/\$\{(.*?)\}/', '\${\\1#' . $i . '}', $xmlRow); } - $result .= $this->getSlice($rowEnd); - + $result.= $this->getSlice($rowEnd); + $this->tempDocumentMainPart = $result; } - + /** * Clone a block. * @@ -247,34 +245,25 @@ public function cloneRow($search, $numberOfClones) * * @return string|null */ - public function cloneBlock($blockname, $clones = 1, $replace = true) - { + public function cloneBlock($blockname, $clones = 1, $replace = true) { $xmlBlock = null; - preg_match( - '/(<\?xml.*)(\${' . $blockname . '}<\/w:.*?p>)(.*)()/is', - $this->tempDocumentMainPart, - $matches - ); - + preg_match('/(<\?xml.*)(\${' . $blockname . '}<\/w:.*?p>)(.*)()/is', $this->tempDocumentMainPart, $matches); + if (isset($matches[3])) { $xmlBlock = $matches[3]; $cloned = array(); for ($i = 1; $i <= $clones; $i++) { $cloned[] = $xmlBlock; } - + if ($replace) { - $this->tempDocumentMainPart = str_replace( - $matches[2] . $matches[3] . $matches[4], - implode('', $cloned), - $this->tempDocumentMainPart - ); + $this->tempDocumentMainPart = str_replace($matches[2] . $matches[3] . $matches[4], implode('', $cloned), $this->tempDocumentMainPart); } } - + return $xmlBlock; } - + /** * Replace a block. * @@ -283,23 +272,14 @@ public function cloneBlock($blockname, $clones = 1, $replace = true) * * @return void */ - public function replaceBlock($blockname, $replacement) - { - preg_match( - '/(<\?xml.*)(\${' . $blockname . '}<\/w:.*?p>)(.*)()/is', - $this->tempDocumentMainPart, - $matches - ); - + public function replaceBlock($blockname, $replacement) { + preg_match('/(<\?xml.*)(\${' . $blockname . '}<\/w:.*?p>)(.*)()/is', $this->tempDocumentMainPart, $matches); + if (isset($matches[3])) { - $this->tempDocumentMainPart = str_replace( - $matches[2] . $matches[3] . $matches[4], - $replacement, - $this->tempDocumentMainPart - ); + $this->tempDocumentMainPart = str_replace($matches[2] . $matches[3] . $matches[4], $replacement, $this->tempDocumentMainPart); } } - + /** * Delete a block of text. * @@ -307,11 +287,10 @@ public function replaceBlock($blockname, $replacement) * * @return void */ - public function deleteBlock($blockname) - { + public function deleteBlock($blockname) { $this->replaceBlock($blockname, ''); } - + /** * Saves the result document. * @@ -319,26 +298,25 @@ public function deleteBlock($blockname) * * @throws \PhpOffice\PhpWord\Exception\Exception */ - public function save() - { + public function save() { foreach ($this->tempDocumentHeaders as $index => $headerXML) { $this->zipClass->addFromString($this->getHeaderName($index), $this->tempDocumentHeaders[$index]); } - + $this->zipClass->addFromString('word/document.xml', $this->tempDocumentMainPart); - + foreach ($this->tempDocumentFooters as $index => $headerXML) { $this->zipClass->addFromString($this->getFooterName($index), $this->tempDocumentFooters[$index]); } - + // Close zip file if (false === $this->zipClass->close()) { throw new Exception('Could not close zip file.'); } - + return $this->tempDocumentFilename; } - + /** * Saves the result document to the user defined file. * @@ -348,24 +326,23 @@ public function save() * * @return void */ - public function saveAs($fileName) - { + public function saveAs($fileName) { $tempFileName = $this->save(); - + if (file_exists($fileName)) { unlink($fileName); } - + /* * Note: we do not use ``rename`` function here, because it looses file ownership data on Windows platform. * As a result, user cannot open the file directly getting "Access denied" message. * * @see https://github.com/PHPOffice/PHPWord/issues/532 - */ + */ copy($tempFileName, $fileName); unlink($tempFileName); } - + /** * Finds parts of broken macros and sticks them together. * Macros, while being edited, could be implicitly broken by some of the word processors. @@ -376,48 +353,39 @@ public function saveAs($fileName) * * @return string */ - protected function fixBrokenMacros($documentPart) - { + protected function fixBrokenMacros($documentPart) { $fixedDocumentPart = $documentPart; - - $fixedDocumentPart = preg_replace_callback( - '|\$\{([^\}]+)\}|U', - function ($match) { - return strip_tags($match[0]); - }, - $fixedDocumentPart - ); - + + $fixedDocumentPart = preg_replace_callback('|\$\{([^\}]+)\}|U', function ($match) { + return strip_tags($match[0]); + }, $fixedDocumentPart); + return $fixedDocumentPart; } - + /** * Find and replace macros in the given XML section. * * @param string $documentPartXML - * @param string $search + * @param string $searchP * @param string $replace * @param integer $limit * * @return string */ - protected function setValueForPart($documentPartXML, $search, $replace, $limit) - { + protected function setValueForPart($documentPartXML, $search, $replace, $limit) { - if (!String::isUTF8($replace)) { - $replace = utf8_encode($replace); - } - // Note: we can't use the same function for both cases here, because of performance considerations. if (self::MAXIMUM_REPLACEMENTS_DEFAULT === $limit) { return str_replace($search, $replace, $documentPartXML); - } else { + } + else { $regExpDelim = '/'; $escapedSearch = preg_quote($search, $regExpDelim); return preg_replace("{$regExpDelim}{$escapedSearch}{$regExpDelim}u", $replace, $documentPartXML, $limit); } } - + /** * Find all variables in $documentPartXML. * @@ -425,13 +393,12 @@ protected function setValueForPart($documentPartXML, $search, $replace, $limit) * * @return string[] */ - protected function getVariablesForPart($documentPartXML) - { + protected function getVariablesForPart($documentPartXML) { preg_match_all('/\$\{(.*?)}/i', $documentPartXML, $matches); - + return $matches[1]; } - + /** * Get the name of the footer file for $index. * @@ -439,11 +406,10 @@ protected function getVariablesForPart($documentPartXML) * * @return string */ - protected function getFooterName($index) - { + protected function getFooterName($index) { return sprintf('word/footer%d.xml', $index); } - + /** * Get the name of the header file for $index. * @@ -451,11 +417,10 @@ protected function getFooterName($index) * * @return string */ - protected function getHeaderName($index) - { + protected function getHeaderName($index) { return sprintf('word/header%d.xml', $index); } - + /** * Find the start position of the nearest table row before $offset. * @@ -465,20 +430,19 @@ protected function getHeaderName($index) * * @throws \PhpOffice\PhpWord\Exception\Exception */ - protected function findRowStart($offset) - { + protected function findRowStart($offset) { $rowStart = strrpos($this->tempDocumentMainPart, 'tempDocumentMainPart) - $offset) * -1)); - + if (!$rowStart) { $rowStart = strrpos($this->tempDocumentMainPart, '', ((strlen($this->tempDocumentMainPart) - $offset) * -1)); } if (!$rowStart) { throw new Exception('Can not find the start position of the row to clone.'); } - + return $rowStart; } - + /** * Find the end position of the nearest table row after $offset. * @@ -486,11 +450,10 @@ protected function findRowStart($offset) * * @return integer */ - protected function findRowEnd($offset) - { + protected function findRowEnd($offset) { return strpos($this->tempDocumentMainPart, '', $offset) + 7; } - + /** * Get a slice of a string. * @@ -499,12 +462,11 @@ protected function findRowEnd($offset) * * @return string */ - protected function getSlice($startPosition, $endPosition = 0) - { + protected function getSlice($startPosition, $endPosition = 0) { if (!$endPosition) { $endPosition = strlen($this->tempDocumentMainPart); } - + return substr($this->tempDocumentMainPart, $startPosition, ($endPosition - $startPosition)); } } From b446a23b61aa30c7b00e4a3d7a79770280d77474 Mon Sep 17 00:00:00 2001 From: kazi Tanvir Ahsan Date: Thu, 10 Sep 2015 23:50:23 +1000 Subject: [PATCH 46/99] Update 2 Template processor setValue() improvements #614 --- src/PhpWord/TemplateProcessor.php | 237 +++++++++++++++++------------- 1 file changed, 137 insertions(+), 100 deletions(-) diff --git a/src/PhpWord/TemplateProcessor.php b/src/PhpWord/TemplateProcessor.php index 8d03201ecb..5a6ea05f3d 100644 --- a/src/PhpWord/TemplateProcessor.php +++ b/src/PhpWord/TemplateProcessor.php @@ -1,5 +1,4 @@ tempDocumentFilename = tempnam(Settings::getTempDir(), 'PhpWord'); if (false === $this->tempDocumentFilename) { throw new CreateTemporaryFileException(); } - + // Template file cloning if (false === copy($documentTemplate, $this->tempDocumentFilename)) { throw new CopyFileException($documentTemplate, $this->tempDocumentFilename); } - + // Temporary document content extraction $this->zipClass = new ZipArchive(); $this->zipClass->open($this->tempDocumentFilename); $index = 1; while (false !== $this->zipClass->locateName($this->getHeaderName($index))) { - $this->tempDocumentHeaders[$index] = $this->fixBrokenMacros($this->zipClass->getFromName($this->getHeaderName($index))); + $this->tempDocumentHeaders[$index] = $this->fixBrokenMacros( + $this->zipClass->getFromName($this->getHeaderName($index)) + ); $index++; } $index = 1; while (false !== $this->zipClass->locateName($this->getFooterName($index))) { - $this->tempDocumentFooters[$index] = $this->fixBrokenMacros($this->zipClass->getFromName($this->getFooterName($index))); + $this->tempDocumentFooters[$index] = $this->fixBrokenMacros( + $this->zipClass->getFromName($this->getFooterName($index)) + ); $index++; } $this->tempDocumentMainPart = $this->fixBrokenMacros($this->zipClass->getFromName('word/document.xml')); } - + /** * Applies XSL style sheet to template's parts. * @@ -109,28 +112,29 @@ public function __construct($documentTemplate) { * * @throws \PhpOffice\PhpWord\Exception\Exception */ - public function applyXslStyleSheet($xslDOMDocument, $xslOptions = array(), $xslOptionsURI = '') { + public function applyXslStyleSheet($xslDOMDocument, $xslOptions = array(), $xslOptionsURI = '') + { $xsltProcessor = new \XSLTProcessor(); - + $xsltProcessor->importStylesheet($xslDOMDocument); - + if (false === $xsltProcessor->setParameter($xslOptionsURI, $xslOptions)) { throw new Exception('Could not set values for the given XSL style sheet parameters.'); } - + $xmlDOMDocument = new \DOMDocument(); if (false === $xmlDOMDocument->loadXML($this->tempDocumentMainPart)) { throw new Exception('Could not load XML from the given template.'); } - + $xmlTransformed = $xsltProcessor->transformToXml($xmlDOMDocument); if (false === $xmlTransformed) { throw new Exception('Could not transform the given XML document.'); } - + $this->tempDocumentMainPart = $xmlTransformed; } - + /** * @param mixed $macro * @param mixed $replace @@ -138,45 +142,47 @@ public function applyXslStyleSheet($xslDOMDocument, $xslOptions = array(), $xslO * * @return void */ - public function setValue($macro, $replace, $limit = self::MAXIMUM_REPLACEMENTS_DEFAULT) { + public function setValue($macro, $replace, $limit = self::MAXIMUM_REPLACEMENTS_DEFAULT) + { if (substr($macro, 0, 2) !== '${' && substr($macro, -1) !== '}') { $macro = '${' . $macro . '}'; } - + if (!String::isUTF8($replace)) { $replace = utf8_encode($replace); } - + foreach ($this->tempDocumentHeaders as $index => $headerXML) { $this->tempDocumentHeaders[$index] = $this->setValueForPart($this->tempDocumentHeaders[$index], $macro, $replace, $limit); } - + $this->tempDocumentMainPart = $this->setValueForPart($this->tempDocumentMainPart, $macro, $replace, $limit); - + foreach ($this->tempDocumentFooters as $index => $headerXML) { $this->tempDocumentFooters[$index] = $this->setValueForPart($this->tempDocumentFooters[$index], $macro, $replace, $limit); } } - + /** * Returns array of all variables in template. * * @return string[] */ - public function getVariables() { + public function getVariables() + { $variables = $this->getVariablesForPart($this->tempDocumentMainPart); - + foreach ($this->tempDocumentHeaders as $headerXML) { $variables = array_merge($variables, $this->getVariablesForPart($headerXML)); } - + foreach ($this->tempDocumentFooters as $footerXML) { $variables = array_merge($variables, $this->getVariablesForPart($footerXML)); } - + return array_unique($variables); } - + /** * Clone a table row in a template document. * @@ -187,55 +193,55 @@ public function getVariables() { * * @throws \PhpOffice\PhpWord\Exception\Exception */ - public function cloneRow($search, $numberOfClones) { + public function cloneRow($search, $numberOfClones) + { if ('${' !== substr($search, 0, 2) && '}' !== substr($search, -1)) { $search = '${' . $search . '}'; } - + $tagPos = strpos($this->tempDocumentMainPart, $search); if (!$tagPos) { throw new Exception("Can not clone row, template variable not found or variable contains markup."); } - + $rowStart = $this->findRowStart($tagPos); $rowEnd = $this->findRowEnd($tagPos); $xmlRow = $this->getSlice($rowStart, $rowEnd); - + // Check if there's a cell spanning multiple rows. if (preg_match('##', $xmlRow)) { - // $extraRowStart = $rowEnd; $extraRowEnd = $rowEnd; while (true) { $extraRowStart = $this->findRowStart($extraRowEnd + 1); $extraRowEnd = $this->findRowEnd($extraRowEnd + 1); - + // If extraRowEnd is lower then 7, there was no next row found. if ($extraRowEnd < 7) { break; } - + // If tmpXmlRow doesn't contain continue, this row is no longer part of the spanned row. $tmpXmlRow = $this->getSlice($extraRowStart, $extraRowEnd); - if (!preg_match('##', $tmpXmlRow) && !preg_match('##', $tmpXmlRow)) { + if (!preg_match('##', $tmpXmlRow) && + !preg_match('##', $tmpXmlRow)) { break; } - // This row was a spanned row, update $rowEnd and search for the next row. $rowEnd = $extraRowEnd; } $xmlRow = $this->getSlice($rowStart, $rowEnd); } - + $result = $this->getSlice(0, $rowStart); for ($i = 1; $i <= $numberOfClones; $i++) { - $result.= preg_replace('/\$\{(.*?)\}/', '\${\\1#' . $i . '}', $xmlRow); + $result .= preg_replace('/\$\{(.*?)\}/', '\${\\1#' . $i . '}', $xmlRow); } - $result.= $this->getSlice($rowEnd); - + $result .= $this->getSlice($rowEnd); + $this->tempDocumentMainPart = $result; } - + /** * Clone a block. * @@ -245,25 +251,34 @@ public function cloneRow($search, $numberOfClones) { * * @return string|null */ - public function cloneBlock($blockname, $clones = 1, $replace = true) { + public function cloneBlock($blockname, $clones = 1, $replace = true) + { $xmlBlock = null; - preg_match('/(<\?xml.*)(\${' . $blockname . '}<\/w:.*?p>)(.*)()/is', $this->tempDocumentMainPart, $matches); - + preg_match( + '/(<\?xml.*)(\${' . $blockname . '}<\/w:.*?p>)(.*)()/is', + $this->tempDocumentMainPart, + $matches + ); + if (isset($matches[3])) { $xmlBlock = $matches[3]; $cloned = array(); for ($i = 1; $i <= $clones; $i++) { $cloned[] = $xmlBlock; } - + if ($replace) { - $this->tempDocumentMainPart = str_replace($matches[2] . $matches[3] . $matches[4], implode('', $cloned), $this->tempDocumentMainPart); + $this->tempDocumentMainPart = str_replace( + $matches[2] . $matches[3] . $matches[4], + implode('', $cloned), + $this->tempDocumentMainPart + ); } } - + return $xmlBlock; } - + /** * Replace a block. * @@ -272,14 +287,23 @@ public function cloneBlock($blockname, $clones = 1, $replace = true) { * * @return void */ - public function replaceBlock($blockname, $replacement) { - preg_match('/(<\?xml.*)(\${' . $blockname . '}<\/w:.*?p>)(.*)()/is', $this->tempDocumentMainPart, $matches); - + public function replaceBlock($blockname, $replacement) + { + preg_match( + '/(<\?xml.*)(\${' . $blockname . '}<\/w:.*?p>)(.*)()/is', + $this->tempDocumentMainPart, + $matches + ); + if (isset($matches[3])) { - $this->tempDocumentMainPart = str_replace($matches[2] . $matches[3] . $matches[4], $replacement, $this->tempDocumentMainPart); + $this->tempDocumentMainPart = str_replace( + $matches[2] . $matches[3] . $matches[4], + $replacement, + $this->tempDocumentMainPart + ); } } - + /** * Delete a block of text. * @@ -287,10 +311,11 @@ public function replaceBlock($blockname, $replacement) { * * @return void */ - public function deleteBlock($blockname) { + public function deleteBlock($blockname) + { $this->replaceBlock($blockname, ''); } - + /** * Saves the result document. * @@ -298,25 +323,26 @@ public function deleteBlock($blockname) { * * @throws \PhpOffice\PhpWord\Exception\Exception */ - public function save() { + public function save() + { foreach ($this->tempDocumentHeaders as $index => $headerXML) { $this->zipClass->addFromString($this->getHeaderName($index), $this->tempDocumentHeaders[$index]); } - + $this->zipClass->addFromString('word/document.xml', $this->tempDocumentMainPart); - + foreach ($this->tempDocumentFooters as $index => $headerXML) { $this->zipClass->addFromString($this->getFooterName($index), $this->tempDocumentFooters[$index]); } - + // Close zip file if (false === $this->zipClass->close()) { throw new Exception('Could not close zip file.'); } - + return $this->tempDocumentFilename; } - + /** * Saves the result document to the user defined file. * @@ -326,23 +352,24 @@ public function save() { * * @return void */ - public function saveAs($fileName) { + public function saveAs($fileName) + { $tempFileName = $this->save(); - + if (file_exists($fileName)) { unlink($fileName); } - + /* * Note: we do not use ``rename`` function here, because it looses file ownership data on Windows platform. * As a result, user cannot open the file directly getting "Access denied" message. * * @see https://github.com/PHPOffice/PHPWord/issues/532 - */ + */ copy($tempFileName, $fileName); unlink($tempFileName); } - + /** * Finds parts of broken macros and sticks them together. * Macros, while being edited, could be implicitly broken by some of the word processors. @@ -353,39 +380,43 @@ public function saveAs($fileName) { * * @return string */ - protected function fixBrokenMacros($documentPart) { + protected function fixBrokenMacros($documentPart) + { $fixedDocumentPart = $documentPart; - - $fixedDocumentPart = preg_replace_callback('|\$\{([^\}]+)\}|U', function ($match) { - return strip_tags($match[0]); - }, $fixedDocumentPart); - + + $fixedDocumentPart = preg_replace_callback( + '|\$\{([^\}]+)\}|U', + function ($match) { + return strip_tags($match[0]); + }, + $fixedDocumentPart + ); + return $fixedDocumentPart; } - + /** * Find and replace macros in the given XML section. * * @param string $documentPartXML - * @param string $searchP + * @param string $search * @param string $replace * @param integer $limit * * @return string */ - protected function setValueForPart($documentPartXML, $search, $replace, $limit) { - + protected function setValueForPart($documentPartXML, $search, $replace, $limit) + { // Note: we can't use the same function for both cases here, because of performance considerations. if (self::MAXIMUM_REPLACEMENTS_DEFAULT === $limit) { return str_replace($search, $replace, $documentPartXML); - } - else { + } else { $regExpDelim = '/'; $escapedSearch = preg_quote($search, $regExpDelim); return preg_replace("{$regExpDelim}{$escapedSearch}{$regExpDelim}u", $replace, $documentPartXML, $limit); } } - + /** * Find all variables in $documentPartXML. * @@ -393,12 +424,13 @@ protected function setValueForPart($documentPartXML, $search, $replace, $limit) * * @return string[] */ - protected function getVariablesForPart($documentPartXML) { + protected function getVariablesForPart($documentPartXML) + { preg_match_all('/\$\{(.*?)}/i', $documentPartXML, $matches); - + return $matches[1]; } - + /** * Get the name of the footer file for $index. * @@ -406,10 +438,11 @@ protected function getVariablesForPart($documentPartXML) { * * @return string */ - protected function getFooterName($index) { + protected function getFooterName($index) + { return sprintf('word/footer%d.xml', $index); } - + /** * Get the name of the header file for $index. * @@ -417,10 +450,11 @@ protected function getFooterName($index) { * * @return string */ - protected function getHeaderName($index) { + protected function getHeaderName($index) + { return sprintf('word/header%d.xml', $index); } - + /** * Find the start position of the nearest table row before $offset. * @@ -430,19 +464,20 @@ protected function getHeaderName($index) { * * @throws \PhpOffice\PhpWord\Exception\Exception */ - protected function findRowStart($offset) { + protected function findRowStart($offset) + { $rowStart = strrpos($this->tempDocumentMainPart, 'tempDocumentMainPart) - $offset) * -1)); - + if (!$rowStart) { $rowStart = strrpos($this->tempDocumentMainPart, '', ((strlen($this->tempDocumentMainPart) - $offset) * -1)); } if (!$rowStart) { throw new Exception('Can not find the start position of the row to clone.'); } - + return $rowStart; } - + /** * Find the end position of the nearest table row after $offset. * @@ -450,10 +485,11 @@ protected function findRowStart($offset) { * * @return integer */ - protected function findRowEnd($offset) { + protected function findRowEnd($offset) + { return strpos($this->tempDocumentMainPart, '', $offset) + 7; } - + /** * Get a slice of a string. * @@ -462,11 +498,12 @@ protected function findRowEnd($offset) { * * @return string */ - protected function getSlice($startPosition, $endPosition = 0) { + protected function getSlice($startPosition, $endPosition = 0) + { if (!$endPosition) { $endPosition = strlen($this->tempDocumentMainPart); } - + return substr($this->tempDocumentMainPart, $startPosition, ($endPosition - $startPosition)); } } From 94c0d02330e912f400f05465edda1935c0cd11c0 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 10 Oct 2015 19:06:23 +0400 Subject: [PATCH 47/99] Next round of refactoring of alignment-related functionality. --- CHANGELOG.md | 40 ++- VERSION | 2 +- docs/Makefile | 8 +- docs/conf.py | 26 +- docs/elements.rst | 282 +++++------------- docs/faq.rst | 8 +- docs/general.rst | 1 - docs/installing.rst | 19 +- docs/intro.rst | 78 ++--- docs/recipes.rst | 3 +- docs/references.rst | 26 +- docs/styles.rst | 208 ++++++------- docs/writersreaders.rst | 92 +++--- samples/Sample_01_SimpleText.php | 2 +- samples/Sample_08_ParagraphPagination.php | 2 +- samples/Sample_09_Tables.php | 10 +- samples/Sample_12_HeaderFooter.php | 4 +- samples/Sample_13_Images.php | 2 +- samples/Sample_21_TableRowRules.php | 4 +- samples/Sample_25_TextBox.php | 2 +- samples/Sample_27_Field.php | 2 +- samples/Sample_36_RTL.php | 2 +- src/PhpWord/Element/AbstractContainer.php | 17 +- src/PhpWord/Element/AbstractElement.php | 3 + src/PhpWord/Element/Field.php | 6 + src/PhpWord/Element/Footnote.php | 8 +- src/PhpWord/Element/Image.php | 7 + src/PhpWord/Element/Link.php | 12 +- src/PhpWord/Element/Object.php | 9 +- src/PhpWord/Element/Section.php | 25 +- src/PhpWord/IOFactory.php | 6 + src/PhpWord/Media.php | 55 +++- src/PhpWord/PhpWord.php | 28 +- src/PhpWord/Reader/AbstractReader.php | 3 + src/PhpWord/Reader/HTML.php | 2 + src/PhpWord/Reader/RTF.php | 2 + src/PhpWord/Reader/RTF/Document.php | 19 +- src/PhpWord/Reader/Word2007/AbstractPart.php | 37 ++- src/PhpWord/Reader/Word2007/Numbering.php | 2 +- src/PhpWord/Settings.php | 1 + src/PhpWord/Shared/Font.php | 1 + src/PhpWord/Shared/Html.php | 8 +- src/PhpWord/Shared/OLERead.php | 1 + src/PhpWord/Shared/XMLReader.php | 2 + src/PhpWord/Shared/XMLWriter.php | 1 + src/PhpWord/Shared/ZipArchive.php | 2 + src/PhpWord/SimpleType/ST_Jc.php | 57 ++++ .../ST_JcTable.php} | 30 +- src/PhpWord/Style/AbstractStyle.php | 7 +- src/PhpWord/Style/Alignment.php | 78 ----- src/PhpWord/Style/Cell.php | 1 + src/PhpWord/Style/Font.php | 6 + src/PhpWord/Style/Frame.php | 50 +++- src/PhpWord/Style/Image.php | 12 + src/PhpWord/Style/ListItem.php | 2 +- src/PhpWord/Style/NumberingLevel.php | 46 ++- src/PhpWord/Style/Paragraph.php | 57 +++- src/PhpWord/Style/Row.php | 3 + src/PhpWord/Style/Section.php | 14 +- src/PhpWord/Style/TOC.php | 3 +- src/PhpWord/Style/Table.php | 58 +++- src/PhpWord/Template.php | 4 +- src/PhpWord/Writer/AbstractWriter.php | 12 +- src/PhpWord/Writer/HTML.php | 6 +- src/PhpWord/Writer/HTML/Part/AbstractPart.php | 1 + src/PhpWord/Writer/HTML/Style/Paragraph.php | 6 +- src/PhpWord/Writer/PDF.php | 1 + src/PhpWord/Writer/PDF/AbstractRenderer.php | 5 + src/PhpWord/Writer/RTF.php | 2 + src/PhpWord/Writer/RTF/Style/Paragraph.php | 15 +- .../Word2007/Element/ParagraphAlignment.php | 60 ++++ .../Word2007/Element/TableAlignment.php | 60 ++++ .../Writer/Word2007/Part/AbstractPart.php | 1 + .../Writer/Word2007/Part/Numbering.php | 16 +- src/PhpWord/Writer/Word2007/Part/Rels.php | 2 + src/PhpWord/Writer/Word2007/Style/Frame.php | 18 +- .../Writer/Word2007/Style/Paragraph.php | 12 +- src/PhpWord/Writer/Word2007/Style/Table.php | 18 +- tests/PhpWord/Tests/Element/CheckBoxTest.php | 3 +- tests/PhpWord/Tests/Element/ImageTest.php | 5 +- .../Tests/Element/PreserveTextTest.php | 3 +- tests/PhpWord/Tests/Element/TextTest.php | 3 +- tests/PhpWord/Tests/Style/FontTest.php | 5 +- tests/PhpWord/Tests/Style/ImageTest.php | 5 +- .../Tests/Style/NumberingLevelTest.php | 27 +- tests/PhpWord/Tests/Style/TableTest.php | 3 +- tests/PhpWord/Tests/Style/TextBoxTest.php | 14 +- tests/PhpWord/Tests/StyleTest.php | 5 +- tests/PhpWord/Tests/TemplateProcessorTest.php | 8 +- tests/PhpWord/Tests/Writer/HTMLTest.php | 5 +- .../Tests/Writer/ODText/Part/ContentTest.php | 3 +- tests/PhpWord/Tests/Writer/ODTextTest.php | 3 +- tests/PhpWord/Tests/Writer/RTFTest.php | 3 +- .../Writer/Word2007/Part/DocumentTest.php | 21 +- .../Writer/Word2007/Part/FootnotesTest.php | 5 +- .../Writer/Word2007/Part/NumberingTest.php | 23 +- .../Tests/Writer/Word2007/Part/StylesTest.php | 15 +- .../Tests/Writer/Word2007/StyleTest.php | 2 +- tests/PhpWord/Tests/Writer/Word2007Test.php | 3 +- .../Tests/_includes/TestHelperDOCX.php | 2 + 100 files changed, 1097 insertions(+), 812 deletions(-) create mode 100644 src/PhpWord/SimpleType/ST_Jc.php rename src/PhpWord/{Writer/Word2007/Style/Alignment.php => SimpleType/ST_JcTable.php} (54%) delete mode 100644 src/PhpWord/Style/Alignment.php create mode 100644 src/PhpWord/Writer/Word2007/Element/ParagraphAlignment.php create mode 100644 src/PhpWord/Writer/Word2007/Element/TableAlignment.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 3cc3ff9939..3e6385ba93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,24 +1,28 @@ -CHANGELOG -========= - -This is the changelog between releases of PHPWord. Releases are listed in reverse chronological order with the latest version listed on top, while additions/changes in each release are listed in chronological order. Changes in each release are divided into three parts: added or change features, bugfixes, and miscellaneous improvements. Each line contains short information about the change made, the person who made it, and the related issue number(s) in GitHub. +Change Log +========== +All notable changes to this project will be documented in this file. +This project adheres to [Semantic Versioning](http://semver.org/). 0.13.0 (unreleased) ------------- - +------------------- Place announcement text here. -### Changes -- Introduced ``\PhpOffice\PhpWord\SimpleType\ST_JcTable`` simple type. - @RomanSyroeshko -- Introduced ``\PhpOffice\PhpWord\SimpleType\ST_Jc`` simple type. - @RomanSyroeshko +### Added +- Introduced the ``\PhpOffice\PhpWord\SimpleType\ST_JcTable`` simple type. - @RomanSyroeshko +- Introduced the ``\PhpOffice\PhpWord\SimpleType\ST_Jc`` simple type. - @RomanSyroeshko + +### Changed - Improved error message for the case when ``autoload.php`` is not found. - @RomanSyroeshko #371 -- Renamed ``align`` option of ``NumberingLevel``, ``Frame``, ``Table``, and ``Paragraph`` styles into ``alignment``. Accessor and mutator methods renamed too. - @RomanSyroeshko +- Renamed the ``align`` option of ``NumberingLevel``, ``Frame``, ``Table``, and ``Paragraph`` styles into ``alignment``. - @RomanSyroeshko +### Deprecated +- ``getAlign`` and ``setAlign`` methods of ``NumberingLevel``, ``Frame``, ``Table``, and ``Paragraph`` styles. +Use the correspondent ``getAlignment`` and ``setAlignment`` methods instead. -0.12.1 (30 August 2015) -------------------- +0.12.1 (30 August 2015) +----------------------- Maintenance release. This release is focused primarily on ``TemplateProcessor``. ### Changes @@ -33,7 +37,6 @@ Maintenance release. This release is focused primarily on ``TemplateProcessor``. 0.12.0 (3 January 2015) ----------------------- - This release added form fields (textinput, checkbox, and dropdown), drawing shapes (arc, curve, line, polyline, rect, oval), and basic 2D chart (pie, doughnut, bar, line, area, scatter, radar) elements along with some new styles. Basic MsDoc reader is introduced. ### Features @@ -93,7 +96,6 @@ This release added form fields (textinput, checkbox, and dropdown), drawing shap 0.11.1 (2 June 2014) -------------------- - This is an immediate bugfix release for HTML reader. - HTML Reader: `

` and header tags puts no output - @canyildiz @ivanlanin #257 @@ -102,7 +104,6 @@ This is an immediate bugfix release for HTML reader. 0.11.0 (1 June 2014) -------------------- - This release marked the change of PHPWord license from LGPL 2.1 to LGPL 3. Four new elements were added: TextBox, ListItemRun, Field, and Line. Relative and absolute positioning for images and textboxes were added. Writer classes were refactored into parts, elements, and styles. ODT and RTF features were enhanced. Ability to add elements to PHPWord object via HTML were implemented. RTF and HTML reader were initiated. ### Features @@ -167,7 +168,6 @@ This release marked the change of PHPWord license from LGPL 2.1 to LGPL 3. Four 0.10.1 (21 May 2014) -------------------- - This is a bugfix release for `php-zip` requirement in Composer. - Change Composer requirements for php-zip from `require` to `suggest` - @bskrtich #246 @@ -176,7 +176,6 @@ This is a bugfix release for `php-zip` requirement in Composer. 0.10.0 (4 May 2014) ------------------- - This release marked heavy refactorings on internal code structure with the creation of some abstract classes to reduce code duplication. `Element` subnamespace is introduced in this release to replace `Section`. Word2007 reader capability is greatly enhanced. Endnote is introduced. List numbering is now customizable. Basic HTML and PDF writing support is enabled. Basic ODText reader is introduced. ### Features @@ -261,7 +260,6 @@ This release marked heavy refactorings on internal code structure with the creat 0.9.1 (27 Mar 2014) ------------------- - This is a bugfix release for PSR-4 compatibility. - Fixed PSR-4 composer autoloader - @AntonTyutin @@ -270,7 +268,6 @@ This is a bugfix release for PSR-4 compatibility. 0.9.0 (26 Mar 2014) ------------------- - This release marked the transformation to namespaces (PHP 5.3+). ### Features @@ -293,7 +290,6 @@ This release marked the transformation to namespaces (PHP 5.3+). 0.8.1 (17 Mar 2014) ------------------- - This is a bugfix release for image detection functionality. - Added fallback for computers that do not have exif_imagetype - @bskrtich, @gabrielbull @@ -302,7 +298,6 @@ This is a bugfix release for image detection functionality. 0.8.0 (15 Mar 2014) ------------------- - This release merged a lot of improvements from the community. Unit tests introduced in this release and has reached 90% code coverage. ### Features @@ -351,7 +346,6 @@ This release merged a lot of improvements from the community. Unit tests introdu 0.7.0 (28 Jan 2014) ------------------- - This is the first release after a long development hiatus in [CodePlex](https://phpword.codeplex.com/). This release initialized ODT and RTF Writer, along with some other new features for the existing Word2007 Writer, e.g. tab, multiple header, rowspan and colspan. [Composer](https://packagist.org/packages/phpoffice/phpword) and [Travis](https://travis-ci.org/PHPOffice/PHPWord) were added. ### Features @@ -375,4 +369,4 @@ This is the first release after a long development hiatus in [CodePlex](https:// - Basic CI with Travis - @Progi1984 - Added PHPWord_Exception and exception when could not copy the template - @Progi1984 - IMPROVED: Moved examples out of Classes directory - @Progi1984 -- IMPROVED: Advanced string replace in setValue for Template - @Esmeraldo [#49](http://phpword.codeplex.com/workitem/49) +- IMPROVED: Advanced string replace in setValue for Template - @Esmeraldo [#49](http://phpword.codeplex.com/workitem/49) \ No newline at end of file diff --git a/VERSION b/VERSION index d33c3a2128..51de3305bb 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.12.0 \ No newline at end of file +0.13.0 \ No newline at end of file diff --git a/docs/Makefile b/docs/Makefile index 5631b06028..bd38cd5d9d 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -77,17 +77,17 @@ qthelp: @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/PhpWord.qhcp" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/PHPWord.qhcp" @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/PhpWord.qhc" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/PHPWord.qhc" devhelp: $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp @echo @echo "Build finished." @echo "To view the help file:" - @echo "# mkdir -p $$HOME/.local/share/devhelp/PhpWord" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/PhpWord" + @echo "# mkdir -p $$HOME/.local/share/devhelp/PHPWord" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/PHPWord" @echo "# devhelp" epub: diff --git a/docs/conf.py b/docs/conf.py index de645350d0..e9b1c59e45 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -40,15 +40,15 @@ master_doc = 'index' # General information about the project. -project = u'PhpWord' -copyright = u'2014, PHPWord Contributors' +project = u'PHPWord' +copyright = u'2014-2015, PHPWord Contributors' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. -version = '0.12.0' +version = '0.13.0' # The full version, including alpha/beta/rc tags. release = version @@ -164,7 +164,7 @@ #html_file_suffix = None # Output file base name for HTML help builder. -htmlhelp_basename = 'PhpWorddoc' +htmlhelp_basename = 'PHPWorddoc' # -- Options for LaTeX output -------------------------------------------------- @@ -183,8 +183,8 @@ # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ - ('index', 'PhpWord.tex', u'PhpWord Documentation', - u'The PhpWord Team', 'manual'), + ('index', 'PHPWord.tex', u'PHPWord Documentation', + u'The PHPWord Team', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of @@ -213,8 +213,8 @@ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - ('index', 'PhpWord', u'PhpWord Documentation', - [u'The PhpWord Team'], 1) + ('index', 'PHPWord', u'PHPWord Documentation', + [u'The PHPWord Team'], 1) ] # If true, show URL addresses after external links. @@ -227,8 +227,8 @@ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - ('index', 'PhpWord', u'PhpWord Documentation', - u'The PhpWord Team', 'PhpWord', 'One line description of project.', + ('index', 'PHPWord', u'PHPWord Documentation', + u'The PHPWord Team', 'PHPWord', 'One line description of project.', 'Miscellaneous'), ] @@ -244,9 +244,9 @@ # -- Options for Epub output --------------------------------------------------- # Bibliographic Dublin Core info. -epub_title = u'PhpWord' -epub_author = u'The PhpWord Team' -epub_publisher = u'The PhpWord Team' +epub_title = u'PHPWord' +epub_author = u'The PHPWord Team' +epub_publisher = u'The PHPWord Team' epub_copyright = copyright # The language of the text. It defaults to the language option diff --git a/docs/elements.rst b/docs/elements.rst index 0b4eb08cee..d68ee035dc 100644 --- a/docs/elements.rst +++ b/docs/elements.rst @@ -50,115 +50,48 @@ column shows the containers while the rows lists the elements. Legend: -- ``v`` Available -- ``v*`` Available only when inside header/footer -- ``v**`` Available only when inside section -- ``-`` Not available -- ``?`` Should be available +- ``v``. Available. +- ``v*``. Available only when inside header/footer. +- ``v**``. Available only when inside section. +- ``-``. Not available. +- ``?``. Should be available. Texts ----- Text can be added by using ``addText`` and ``addTextRun`` method. -``addText`` is used for creating simple paragraphs that only contain -texts with the same style. ``addTextRun`` is used for creating complex -paragraphs that contain text with different style (some bold, other -italics, etc) or other elements, e.g. images or links. The syntaxes are -as follow: +``addText`` is used for creating simple paragraphs that only contain texts with the same style. +``addTextRun`` is used for creating complex paragraphs that contain text with different style (some bold, other +italics, etc) or other elements, e.g. images or links. The syntaxes are as follow: .. code-block:: php $section->addText($text, [$fontStyle], [$paragraphStyle]); $textrun = $section->addTextRun([$paragraphStyle]); -Text styles -~~~~~~~~~~~ - -You can use the ``$fontStyle`` and ``$paragraphStyle`` variable to -define text formatting. There are 2 options to style the inserted text -elements, i.e. inline style by using array or defined style by adding -style definition. - -Inline style examples: - -.. code-block:: php - - $fontStyle = array('name' => 'Times New Roman', 'size' => 9); - $paragraphStyle = array('alignment' => 'both'); - $section->addText('I am simple paragraph', $fontStyle, $paragraphStyle); +- ``$text``. Text to be displayed in the document. +- ``$fontStyle``. See :ref:`font-style`. +- ``$paragraphStyle``. See :ref:`paragraph-style`. - $textrun = $section->addTextRun(); - $textrun->addText('I am bold', array('bold' => true)); - $textrun->addText('I am italic', array('italic' => true)); - $textrun->addText('I am colored', array('color' => 'AACC00')); - -Defined style examples: - -.. code-block:: php - - $fontStyle = array('color' => '006699', 'size' => 18, 'bold' => true); - $phpWord->addFontStyle('fStyle', $fontStyle); - $text = $section->addText('Hello world!', 'fStyle'); - - $paragraphStyle = array('alignment' => 'center'); - $phpWord->addParagraphStyle('pStyle', $paragraphStyle); - $text = $section->addText('Hello world!', 'pStyle'); - -Font style -^^^^^^^^^^ - -Available font styles: - -- ``name`` Font name, e.g. *Arial* -- ``size`` Font size, e.g. *20*, *22*, -- ``hint`` Font content type, *default*, *eastAsia*, or *cs* -- ``bold`` Bold, *true* or *false* -- ``italic`` Italic, *true* or *false* -- ``superScript`` Superscript, *true* or *false* -- ``subScript`` Subscript, *true* or *false* -- ``underline`` Underline, *dash*, *dotted*, etc. -- ``strikethrough`` Strikethrough, *true* or *false* -- ``doubleStrikethrough`` Double strikethrough, *true* or *false* -- ``color`` Font color, e.g. *FF0000* -- ``fgColor`` Font highlight color, e.g. *yellow*, *green*, *blue* -- ``bgColor`` Font background color, e.g. *FF0000* -- ``smallCaps`` Small caps, *true* or *false* -- ``allCaps`` All caps, *true* or *false* - -Paragraph style -^^^^^^^^^^^^^^^ - -Available paragraph styles: - -- ``alignment`` Paragraph alignment, *left*, *right* or *center* -- ``spaceBefore`` Space before paragraph -- ``spaceAfter`` Space after paragraph -- ``indent`` Indent by how much -- ``hanging`` Hanging by how much -- ``basedOn`` Parent style -- ``next`` Style for next paragraph -- ``widowControl`` Allow first/last line to display on a separate page, - *true* or *false* -- ``keepNext`` Keep paragraph with next paragraph, *true* or *false* -- ``keepLines`` Keep all lines on one page, *true* or *false* -- ``pageBreakBefore`` Start paragraph on next page, *true* or *false* -- ``lineHeight`` text line height, e.g. *1.0*, *1.5*, ect... -- ``tabs`` Set of custom tab stops +For available styling options see :ref:`font-style` and :ref:`paragraph-style`. Titles ~~~~~~ -If you want to structure your document or build table of contents, you -need titles or headings. To add a title to the document, use the -``addTitleStyle`` and ``addTitle`` method. +If you want to structure your document or build table of contents, you need titles or headings. +To add a title to the document, use the ``addTitleStyle`` and ``addTitle`` method. .. code-block:: php $phpWord->addTitleStyle($depth, [$fontStyle], [$paragraphStyle]); $section->addTitle($text, [$depth]); -Its necessary to add a title style to your document because otherwise -the title won't be detected as a real title. +- ``depth``. +- ``$fontStyle``. See :ref:`font-style`. +- ``$paragraphStyle``. See :ref:`paragraph-style`. +- ``$text``. Text to be displayed in the document. + +It's necessary to add a title style to your document because otherwise the title won't be detected as a real title. Links ~~~~~ @@ -169,16 +102,15 @@ You can add Hyperlinks to the document by using the function addLink: $section->addLink($linkSrc, [$linkName], [$fontStyle], [$paragraphStyle]); -- ``$linkSrc`` The URL of the link. -- ``$linkName`` Placeholder of the URL that appears in the document. -- ``$fontStyle`` See "Font style" section. -- ``$paragraphStyle`` See "Paragraph style" section. +- ``$linkSrc``. The URL of the link. +- ``$linkName``. Placeholder of the URL that appears in the document. +- ``$fontStyle``. See :ref:`font-style`. +- ``$paragraphStyle``. See :ref:`paragraph-style`. Preserve texts ~~~~~~~~~~~~~~ -The ``addPreserveText`` method is used to add a page number or page -count to headers or footers. +The ``addPreserveText`` method is used to add a page number or page count to headers or footers. .. code-block:: php @@ -190,16 +122,15 @@ Breaks Text breaks ~~~~~~~~~~~ -Text breaks are empty new lines. To add text breaks, use the following -syntax. All paramaters are optional. +Text breaks are empty new lines. To add text breaks, use the following syntax. All parameters are optional. .. code-block:: php $section->addTextBreak([$breakCount], [$fontStyle], [$paragraphStyle]); -- ``$breakCount`` How many lines -- ``$fontStyle`` See "Font style" section. -- ``$paragraphStyle`` See "Paragraph style" section. +- ``$breakCount``. How many lines. +- ``$fontStyle``. See :ref:`font-style`. +- ``$paragraphStyle``. See :ref:`paragraph-style`. Page breaks ~~~~~~~~~~~ @@ -224,56 +155,40 @@ Basic usage: Parameters: -- ``$text`` Text that appears in the document. -- ``$depth`` Depth of list item. -- ``$fontStyle`` See "Font style" section. -- ``$listStyle`` List style of the current element TYPE\_NUMBER, - TYPE\_ALPHANUM, TYPE\_BULLET\_FILLED, etc. See list of constants in - PHPWord\_Style\_ListItem. -- ``$paragraphStyle`` See "Paragraph style" section. +- ``$text``. Text that appears in the document. +- ``$depth``. Depth of list item. +- ``$fontStyle``. See :ref:`font-style`. +- ``$listStyle``. List style of the current element TYPE\_NUMBER, + TYPE\_ALPHANUM, TYPE\_BULLET\_FILLED, etc. See list of constants in PHPWord\_Style\_ListItem. +- ``$paragraphStyle``. See :ref:`paragraph-style`. Advanced usage: -You can also create your own numbering style by changing the -``$listStyle`` parameter with the name of your numbering style. +You can also create your own numbering style by changing the ``$listStyle`` parameter with the name of your numbering style. .. code-block:: php $phpWord->addNumberingStyle( 'multilevel', - array('type' => 'multilevel', 'levels' => array( - array('format' => 'decimal', 'text' => '%1.', 'left' => 360, 'hanging' => 360, 'tabPos' => 360), - array('format' => 'upperLetter', 'text' => '%2.', 'left' => 720, 'hanging' => 360, 'tabPos' => 720), + array( + 'type' => 'multilevel', + 'levels' => array( + array('format' => 'decimal', 'text' => '%1.', 'left' => 360, 'hanging' => 360, 'tabPos' => 360), + array('format' => 'upperLetter', 'text' => '%2.', 'left' => 720, 'hanging' => 360, 'tabPos' => 720), ) - ) + ) ); $section->addListItem('List Item I', 0, null, 'multilevel'); $section->addListItem('List Item I.a', 1, null, 'multilevel'); $section->addListItem('List Item I.b', 1, null, 'multilevel'); $section->addListItem('List Item II', 0, null, 'multilevel'); -Level styles: - -- ``start`` Starting value -- ``format`` Numbering format - bullet\|decimal\|upperRoman\|lowerRoman\|upperLetter\|lowerLetter -- ``restart`` Restart numbering level symbol -- ``suffix`` Content between numbering symbol and paragraph text - tab\|space\|nothing -- ``text`` Numbering level text e.g. %1 for nonbullet or bullet - character -- ``align`` Numbering symbol align left\|center\|right\|both -- ``left`` See paragraph style -- ``hanging`` See paragraph style -- ``tabPos`` See paragraph style -- ``font`` Font name -- ``hint`` See font style +For available styling options see :ref:`numbering-level-style`. Tables ------ -To add tables, rows, and cells, use the ``addTable``, ``addRow``, and -``addCell`` methods: +To add tables, rows, and cells, use the ``addTable``, ``addRow``, and ``addCell`` methods: .. code-block:: php @@ -287,46 +202,19 @@ Table style can be defined with ``addTableStyle``: $tableStyle = array( 'borderColor' => '006699', - 'borderSize' => 6, - 'cellMargin' => 50 + 'borderSize' => 6, + 'cellMargin' => 50 ); $firstRowStyle = array('bgColor' => '66BBFF'); $phpWord->addTableStyle('myTable', $tableStyle, $firstRowStyle); $table = $section->addTable('myTable'); -Table, row, and cell styles -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Table styles: - -- ``width`` Table width in percent -- ``bgColor`` Background color, e.g. '9966CC' -- ``border(Top|Right|Bottom|Left)Size`` Border size in twips -- ``border(Top|Right|Bottom|Left)Color`` Border color, e.g. '9966CC' -- ``cellMargin(Top|Right|Bottom|Left)`` Cell margin in twips - -Row styles: - -- ``tblHeader`` Repeat table row on every new page, *true* or *false* -- ``cantSplit`` Table row cannot break across pages, *true* or *false* -- ``exactHeight`` Row height is exact or at least - -Cell styles: - -- ``width`` Cell width in twips -- ``valign`` Vertical alignment, *top*, *center*, *both*, *bottom* -- ``textDirection`` Direction of text -- ``bgColor`` Background color, e.g. '9966CC' -- ``border(Top|Right|Bottom|Left)Size`` Border size in twips -- ``border(Top|Right|Bottom|Left)Color`` Border color, e.g. '9966CC' -- ``gridSpan`` Number of columns spanned -- ``vMerge`` *restart* or *continue* +For available styling options see :ref:`table-style`. Cell span ~~~~~~~~~ -You can span a cell on multiple columns by using ``gridSpan`` or -multiple rows by using ``vMerge``. +You can span a cell on multiple columns by using ``gridSpan`` or multiple rows by using ``vMerge``. .. code-block:: php @@ -338,15 +226,14 @@ See ``Sample_09_Tables.php`` for more code sample. Images ------ -To add an image, use the ``addImage`` method to sections, headers, -footers, textruns, or table cells. +To add an image, use the ``addImage`` method to sections, headers, footers, textruns, or table cells. .. code-block:: php $section->addImage($src, [$style]); -- source String path to a local image or URL of a remote image -- styles Array fo styles for the image. See below. +- ``$src``. String path to a local image or URL of a remote image. +- ``$style``. See :ref:`image-style`. Examples: @@ -356,10 +243,10 @@ Examples: $section->addImage( 'mars.jpg', array( - 'width' => 100, - 'height' => 100, - 'marginTop' => -1, - 'marginLeft' => -1, + 'width' => 100, + 'height' => 100, + 'marginTop' => -1, + 'marginLeft' => -1, 'wrappingStyle' => 'behind' ) ); @@ -368,19 +255,6 @@ Examples: $textrun = $section->addTextRun(); $textrun->addImage('http://php.net/logo.jpg'); -Image styles -~~~~~~~~~~~~ - -Available image styles: - -- ``width`` Width in pixels -- ``height`` Height in pixels -- ``align`` Image alignment, *left*, *right*, or *center* -- ``marginTop`` Top margin in inches, can be negative -- ``marginLeft`` Left margin in inches, can be negative -- ``wrappingStyle`` Wrapping style, *inline*, *square*, *tight*, - *behind*, or *infront* - Watermarks ~~~~~~~~~~ @@ -408,25 +282,22 @@ Table of contents ----------------- To add a table of contents (TOC), you can use the ``addTOC`` method. -Your TOC can only be generated if you have add at least one title (See -"Titles"). +Your TOC can only be generated if you have add at least one title (See "Titles"). .. code-block:: php $section->addTOC([$fontStyle], [$tocStyle], [$minDepth], [$maxDepth]); -- ``$fontStyle``: See font style section -- ``$tocStyle``: See available options below -- ``$minDepth``: Minimum depth of header to be shown. Default 1 -- ``$maxDepth``: Maximum depth of header to be shown. Default 9 +- ``$fontStyle``. See font style section. +- ``$tocStyle``. See available options below. +- ``$minDepth``. Minimum depth of header to be shown. Default 1. +- ``$maxDepth``. Maximum depth of header to be shown. Default 9. Options for ``$tocStyle``: -- ``tabLeader`` Fill type between the title text and the page number. - Use the defined constants in PHPWord\_Style\_TOC. -- ``tabPos`` The position of the tab where the page number appears in - twips. -- ``indent`` The indent factor of the titles in twips. +- ``tabLeader``. Fill type between the title text and the page number. Use the defined constants in PHPWord\_Style\_TOC. +- ``tabPos``. The position of the tab where the page number appears in twips. +- ``indent``. The indent factor of the titles in twips. Footnotes & endnotes -------------------- @@ -468,17 +339,16 @@ redefine by ``addFontStyle`` method. Default value for this style is Checkboxes ---------- -Checkbox elements can be added to sections or table cells by using -``addCheckBox``. +Checkbox elements can be added to sections or table cells by using ``addCheckBox``. .. code-block:: php $section->addCheckBox($name, $text, [$fontStyle], [$paragraphStyle]) -- ``$name`` Name of the check box. -- ``$text`` Text following the check box -- ``$fontStyle`` See "Font style" section. -- ``$paragraphStyle`` See "Paragraph style" section. +- ``$name``. Name of the check box. +- ``$text``. Text to be displayed in the document. +- ``$fontStyle``. See :ref:`font-style`. +- ``$paragraphStyle``. See :ref:`paragraph-style`. Textboxes --------- @@ -502,11 +372,11 @@ Line elements can be added to sections by using ``addLine``. Available line style attributes: -- ``weight`` Line width in twips -- ``color`` Defines the color of stroke -- ``dash`` Line types: dash, rounddot, squaredot, dashdot, longdash, longdashdot, longdashdotdot -- ``beginArrow`` Start type of arrow: block, open, classic, diamond, oval -- ``endArrow`` End type of arrow: block, open, classic, diamond, ovel -- ``width`` Line-object width in pt -- ``height`` Line-object height in pt -- ``flip`` Flip the line element: true, false +- ``weight``. Line width in twips. +- ``color``. Defines the color of stroke. +- ``dash``. Line types: dash, rounddot, squaredot, dashdot, longdash, longdashdot, longdashdotdot. +- ``beginArrow``. Start type of arrow: block, open, classic, diamond, oval. +- ``endArrow``. End type of arrow: block, open, classic, diamond, oval. +- ``width``. Line-object width in pt. +- ``height``. Line-object height in pt. +- ``flip``. Flip the line element: true, false. \ No newline at end of file diff --git a/docs/faq.rst b/docs/faq.rst index 79652ae025..19fca1057f 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -3,11 +3,9 @@ Frequently asked questions ========================== -How contribute to PHPWord ? ---------------------------- - -- Improve the documentation (`Sphinx Format `__) - +How contribute to PHPWord? +-------------------------- +- Improve the documentation (`Sphinx Format `__) Is this the same with PHPWord that I found in CodePlex? ------------------------------------------------------- diff --git a/docs/general.rst b/docs/general.rst index 64298928d9..4e350cd078 100644 --- a/docs/general.rst +++ b/docs/general.rst @@ -184,4 +184,3 @@ points to twips. $sectionStyle->setMarginLeft(\PhpOffice\PhpWord\Shared\Converter::inchToTwip(.5)); // 2 cm right margin $sectionStyle->setMarginRight(\PhpOffice\PhpWord\Shared\Converter::cmToTwip(2)); - diff --git a/docs/installing.rst b/docs/installing.rst index 6599590460..d05464bf07 100644 --- a/docs/installing.rst +++ b/docs/installing.rst @@ -8,17 +8,15 @@ Requirements Mandatory: -- PHP 5.3+ -- PHP `Zip `__ extension -- PHP `XML - Parser `__ - extension +- PHP 5.3+ +- PHP `Zip `__ extension +- PHP `XML Parser `__ extension Optional PHP extensions: -- `GD `__ -- `XMLWriter `__ -- `XSL `__ +- `GD `__ +- `XMLWriter `__ +- `XSL `__ Installation ------------ @@ -42,7 +40,7 @@ To install via Composer, add the following lines to your } If you are a developer or if you want to help us with testing then fetch the latest branch for developers. -Notice: All contributions must be done against the developer branch. +Notice: all contributions must be done against the developer branch. .. code-block:: json @@ -56,8 +54,7 @@ Notice: All contributions must be done against the developer branch. Manual install ~~~~~~~~~~~~~~ -To install manually, you change to the webserver directory of your file system . -Then you have 2 possibilities. +To install manually, you change to the web-server directory of your file system. Then you have 2 possibilities. 1. `download PHPWord package from github `__. Extract the package and put the contents to your machine. diff --git a/docs/intro.rst b/docs/intro.rst index d2decd7c94..8e3d2d0559 100644 --- a/docs/intro.rst +++ b/docs/intro.rst @@ -24,35 +24,35 @@ Documentation `__. Features -------- -- Set document properties, e.g. title, subject, and creator. -- Create document sections with different settings, e.g. - portrait/landscape, page size, and page numbering -- Create header and footer for each sections -- Set default font type, font size, and paragraph style -- Use UTF-8 and East Asia fonts/characters -- Define custom font styles (e.g. bold, italic, color) and paragraph - styles (e.g. centered, multicolumns, spacing) either as named style - or inline in text -- Insert paragraphs, either as a simple text or complex one (a text - run) that contains other elements -- Insert titles (headers) and table of contents -- Insert text breaks and page breaks -- Insert right-to-left text -- Insert and format images, either local, remote, or as page watermarks -- Insert binary OLE Objects such as Excel or Visio -- Insert and format table with customized properties for each rows - (e.g. repeat as header row) and cells (e.g. background color, - rowspan, colspan) -- Insert list items as bulleted, numbered, or multilevel -- Insert hyperlinks -- Insert footnotes and endnotes -- Insert drawing shapes (arc, curve, line, polyline, rect, oval) -- Insert charts (pie, doughnut, bar, line, area, scatter, radar) -- Insert form fields (textinput, checkbox, and dropdown) -- Create document from templates -- Use XSL 1.0 style sheets to transform main document part of OOXML - template -- ... and many more features on progress +- Set document properties, e.g. title, subject, and creator. +- Create document sections with different settings, e.g. + portrait/landscape, page size, and page numbering +- Create header and footer for each sections +- Set default font type, font size, and paragraph style +- Use UTF-8 and East Asia fonts/characters +- Define custom font styles (e.g. bold, italic, color) and paragraph + styles (e.g. centered, multicolumns, spacing) either as named style + or inline in text +- Insert paragraphs, either as a simple text or complex one (a text + run) that contains other elements +- Insert titles (headers) and table of contents +- Insert text breaks and page breaks +- Insert right-to-left text +- Insert and format images, either local, remote, or as page watermarks +- Insert binary OLE Objects such as Excel or Visio +- Insert and format table with customized properties for each rows + (e.g. repeat as header row) and cells (e.g. background color, + rowspan, colspan) +- Insert list items as bulleted, numbered, or multilevel +- Insert hyperlinks +- Insert footnotes and endnotes +- Insert drawing shapes (arc, curve, line, polyline, rect, oval) +- Insert charts (pie, doughnut, bar, line, area, scatter, radar) +- Insert form fields (textinput, checkbox, and dropdown) +- Create document from templates +- Use XSL 1.0 style sheets to transform main document part of OOXML + template +- ... and many more features on progress File formats ------------ @@ -183,13 +183,13 @@ Contributing We welcome everyone to contribute to PHPWord. Below are some of the things that you can do to contribute. -- Read `our contributing - guide `__. -- `Fork us `__ and `request - a pull `__ to the - `develop `__ - branch. -- Submit `bug reports or feature - requests `__ to GitHub. -- Follow `@PHPWord `__ and - `@PHPOffice `__ on Twitter. +- Read `our contributing + guide `__. +- `Fork us `__ and `request + a pull `__ to the + `develop `__ + branch. +- Submit `bug reports or feature + requests `__ to GitHub. +- Follow `@PHPWord `__ and + `@PHPOffice `__ on Twitter. diff --git a/docs/recipes.rst b/docs/recipes.rst index 0be6b4e06a..5042cdedc6 100644 --- a/docs/recipes.rst +++ b/docs/recipes.rst @@ -6,8 +6,7 @@ Recipes Create float left image ----------------------- -Use absolute positioning relative to margin horizontally and to line -vertically. +Use absolute positioning relative to margin horizontally and to line vertically. .. code-block:: php diff --git a/docs/references.rst b/docs/references.rst index 20aa1ed061..9c4e06a809 100644 --- a/docs/references.rst +++ b/docs/references.rst @@ -6,25 +6,23 @@ References ISO/IEC 29500, Third edition, 2012-09-01 --------------------- -- `Part 1: Fundamentals and Markup Language Reference - `__ -- `Part 2: Open Packaging Conventions - `__ -- `Part 3: Markup Compatibility and Extensibility - `__ -- `Part 4: Transitional Migration Features - `__ +- `Part 1: Fundamentals and Markup Language Reference + `__ +- `Part 2: Open Packaging Conventions + `__ +- `Part 3: Markup Compatibility and Extensibility + `__ +- `Part 4: Transitional Migration Features + `__ Formal specifications --------------------- -- `Oasis OpenDocument Standard Version - 1.2 `__ -- `Rich Text Format (RTF) Specification, version - 1.9.1 `__ +- `Oasis OpenDocument Standard Version 1.2 `__ +- `Rich Text Format (RTF) Specification, version 1.9.1 `__ Other resources --------------- -- `DocumentFormat.OpenXml.Wordprocessing Namespace on - MSDN `__ +- `DocumentFormat.OpenXml.Wordprocessing Namespace on + MSDN `__ diff --git a/docs/styles.rst b/docs/styles.rst index ffb9e08782..6c8638c5de 100644 --- a/docs/styles.rst +++ b/docs/styles.rst @@ -3,132 +3,140 @@ Styles ====== +.. _section-style: + Section ------- -Below are the available styles for section: - -- ``pageSizeW`` Page width in twips (the default is 11906/A4 size) -- ``pageSizeH`` Page height in twips (the default is 16838/A4 size) -- ``orientation`` Page orientation, i.e. 'portrait' (default) or - 'landscape' -- ``marginTop`` Page margin top in twips -- ``marginLeft`` Page margin left in twips -- ``marginRight`` Page margin right in twips -- ``marginBottom`` Page margin bottom in twips -- ``borderTopSize`` Border top size in twips -- ``borderTopColor`` Border top color -- ``borderLeftSize`` Border left size in twips -- ``borderLeftColor`` Border left color -- ``borderRightSize`` Border right size in twips -- ``borderRightColor`` Border right color -- ``borderBottomSize`` Border bottom size in twips -- ``borderBottomColor`` Border bottom color -- ``headerHeight`` Spacing to top of header -- ``footerHeight`` Spacing to bottom of footer -- ``gutter`` Page gutter spacing -- ``colsNum`` Number of columns -- ``colsSpace`` Spacing between columns -- ``breakType`` Section break type (nextPage, nextColumn, continuous, - evenPage, oddPage) +Available Section style options: + +- ``borderBottomColor``. Border bottom color. +- ``borderBottomSize``. Border bottom size (in twips). +- ``borderLeftColor``. Border left color. +- ``borderLeftSize``. Border left size (in twips). +- ``borderRightColor``. Border right color. +- ``borderRightSize``. Border right size (in twips). +- ``borderTopColor``. Border top color. +- ``borderTopSize``. Border top size (in twips). +- ``breakType``. Section break type (nextPage, nextColumn, continuous, evenPage, oddPage). +- ``colsNum``. Number of columns. +- ``colsSpace``. Spacing between columns. +- ``footerHeight``. Spacing to bottom of footer. +- ``gutter``. Page gutter spacing. +- ``headerHeight``. Spacing to top of header. +- ``marginTop``. Page margin top (in twips). +- ``marginLeft``. Page margin left (in twips). +- ``marginRight``. Page margin right (in twips). +- ``marginBottom``. Page margin bottom (in twips). +- ``orientation``. Page orientation (``portrait``, which is default, or ``landscape``). +- ``pageSizeH``. Page height (in twips). Implicitly defined by ``orientation`` option. Any changes are discouraged. +- ``pageSizeW``. Page width (in twips). Implicitly defined by ``orientation`` option. Any changes are discouraged. + +.. _font-style: Font ---- -Available font styles: - -- ``name`` Font name, e.g. *Arial* -- ``size`` Font size, e.g. *20*, *22*, -- ``hint`` Font content type, *default*, *eastAsia*, or *cs* -- ``bold`` Bold, *true* or *false* -- ``italic`` Italic, *true* or *false* -- ``superScript`` Superscript, *true* or *false* -- ``subScript`` Subscript, *true* or *false* -- ``underline`` Underline, *dash*, *dotted*, etc. -- ``strikethrough`` Strikethrough, *true* or *false* -- ``doubleStrikethrough`` Double strikethrough, *true* or *false* -- ``color`` Font color, e.g. *FF0000* -- ``fgColor`` Font highlight color, e.g. *yellow*, *green*, *blue* -- ``bgColor`` Font background color, e.g. *FF0000* -- ``smallCaps`` Small caps, *true* or *false* -- ``allCaps`` All caps, *true* or *false* -- ``rtl`` Right to Left language, *true* or *false* +Available Font style options: + +- ``allCaps``. All caps, *true* or *false*. +- ``bgColor``. Font background color, e.g. *FF0000*. +- ``bold``. Bold, *true* or *false*. +- ``color``. Font color, e.g. *FF0000*. +- ``doubleStrikethrough``. Double strikethrough, *true* or *false*. +- ``fgColor``. Font highlight color, e.g. *yellow*, *green*, *blue*. +- ``hint``. Font content type, *default*, *eastAsia*, or *cs*. +- ``italic``. Italic, *true* or *false*. +- ``name``. Font name, e.g. *Arial*. +- ``rtl``. Right to Left language, *true* or *false*. +- ``size``. Font size, e.g. *20*, *22*. +- ``smallCaps``. Small caps, *true* or *false*. +- ``strikethrough``. Strikethrough, *true* or *false*. +- ``subScript``. Subscript, *true* or *false*. +- ``superScript``. Superscript, *true* or *false*. +- ``underline``. Underline, *dash*, *dotted*, etc. + +.. _paragraph-style: Paragraph --------- -Available paragraph styles: - -- ``alignment`` Paragraph alignment, *left*, *right* or *center* -- ``spaceBefore`` Space before paragraph -- ``spaceAfter`` Space after paragraph -- ``indent`` Indent by how much -- ``hanging`` Hanging by how much -- ``basedOn`` Parent style -- ``next`` Style for next paragraph -- ``widowControl`` Allow first/last line to display on a separate page, - *true* or *false* -- ``keepNext`` Keep paragraph with next paragraph, *true* or *false* -- ``keepLines`` Keep all lines on one page, *true* or *false* -- ``pageBreakBefore`` Start paragraph on next page, *true* or *false* -- ``lineHeight`` text line height, e.g. *1.0*, *1.5*, ect... -- ``tabs`` Set of custom tab stops +Available Paragraph style options: + +- ``alignment``. Supports all alignment modes provided by third edition of ISO/IEC 29500 standard. See ``\PhpOffice\PhpWord\SimpleType\ST_Jc`` class for the details. +- ``basedOn``. Parent style. +- ``hanging``. Hanging by how much. +- ``indent``. Indent by how much. +- ``keepLines``. Keep all lines on one page, *true* or *false*. +- ``keepNext``. Keep paragraph with next paragraph, *true* or *false*. +- ``lineHeight``. Text line height, e.g. *1.0*, *1.5*, etc. +- ``next``. Style for next paragraph. +- ``pageBreakBefore``. Start paragraph on next page, *true* or *false*. +- ``spaceBefore``. Space before paragraph. +- ``spaceAfter``. Space after paragraph. +- ``tabs``. Set of custom tab stops. +- ``widowControl``. Allow first/last line to display on a separate page, *true* or *false*. + +.. _table-style: Table ----- -Table styles: +Available Table style options: -- ``width`` Table width in percent -- ``bgColor`` Background color, e.g. '9966CC' -- ``border(Top|Right|Bottom|Left)Size`` Border size in twips -- ``border(Top|Right|Bottom|Left)Color`` Border color, e.g. '9966CC' -- ``cellMargin(Top|Right|Bottom|Left)`` Cell margin in twips +- ``alignment``. Supports all alignment modes provided by third edition of ISO/IEC 29500 standard. See ``\PhpOffice\PhpWord\SimpleType\ST_JcTable`` class for the details. +- ``bgColor``. Background color, e.g. '9966CC'. +- ``border(Top|Right|Bottom|Left)Color``. Border color, e.g. '9966CC'. +- ``border(Top|Right|Bottom|Left)Size``. Border size in twips. +- ``cellMargin(Top|Right|Bottom|Left)``. Cell margin in twips. +- ``width``. Table width in percent. -Row styles: +Available Row style options: -- ``tblHeader`` Repeat table row on every new page, *true* or *false* -- ``cantSplit`` Table row cannot break across pages, *true* or *false* -- ``exactHeight`` Row height is exact or at least +- ``cantSplit``. Table row cannot break across pages, *true* or *false*. +- ``exactHeight``. Row height is exact or at least. +- ``tblHeader``. Repeat table row on every new page, *true* or *false*. -Cell styles: +Available Cell style options: -- ``width`` Cell width in twips -- ``valign`` Vertical alignment, *top*, *center*, *both*, *bottom* -- ``textDirection`` Direction of text -- ``bgColor`` Background color, e.g. '9966CC' -- ``border(Top|Right|Bottom|Left)Size`` Border size in twips -- ``border(Top|Right|Bottom|Left)Color`` Border color, e.g. '9966CC' -- ``gridSpan`` Number of columns spanned -- ``vMerge`` *restart* or *continue* +- ``bgColor``. Background color, e.g. '9966CC'. +- ``border(Top|Right|Bottom|Left)Color``. Border color, e.g. '9966CC'. +- ``border(Top|Right|Bottom|Left)Size``. Border size in twips. +- ``gridSpan``. Number of columns spanned. +- ``textDirection``. Direction of text. +- ``valign``. Vertical alignment, *top*, *center*, *both*, *bottom*. +- ``vMerge``. *restart* or *continue*. +- ``width``. Cell width in twips. + +.. _image-style: Image ----- -Available image styles: +Available Image style options: + +- ``alignment``. See ``\PhpOffice\PhpWord\SimpleType\ST_Jc`` class for the details. +- ``height``. Height in pixels. +- ``marginLeft``. Left margin in inches, can be negative. +- ``marginTop``. Top margin in inches, can be negative. +- ``width``. Width in pixels. +- ``wrappingStyle``. Wrapping style, *inline*, *square*, *tight*, *behind*, or *infront*. -- ``width`` Width in pixels -- ``height`` Height in pixels -- ``align`` Image alignment, *left*, *right*, or *center* -- ``marginTop`` Top margin in inches, can be negative -- ``marginLeft`` Left margin in inches, can be negative -- ``wrappingStyle`` Wrapping style, *inline*, *square*, *tight*, - *behind*, or *infront* +.. _numbering-level-style: Numbering level --------------- -- ``start`` Starting value -- ``format`` Numbering format - bullet\|decimal\|upperRoman\|lowerRoman\|upperLetter\|lowerLetter -- ``restart`` Restart numbering level symbol -- ``suffix`` Content between numbering symbol and paragraph text - tab\|space\|nothing -- ``text`` Numbering level text e.g. %1 for nonbullet or bullet - character -- ``align`` Numbering symbol align left\|center\|right\|both -- ``left`` See paragraph style -- ``hanging`` See paragraph style -- ``tabPos`` See paragraph style -- ``font`` Font name -- ``hint`` See font style +Available NumberingLevel style options: + +- ``alignment``. Supports all alignment modes provided by third edition of ISO/IEC 29500 standard. See ``\PhpOffice\PhpWord\SimpleType\ST_Jc`` class for the details. +- ``font``. Font name. +- ``format``. Numbering format bullet\|decimal\|upperRoman\|lowerRoman\|upperLetter\|lowerLetter. +- ``hanging``. See paragraph style. +- ``hint``. See font style. +- ``left``. See paragraph style. +- ``restart``. Restart numbering level symbol. +- ``start``. Starting value. +- ``suffix``. Content between numbering symbol and paragraph text tab\|space\|nothing. +- ``tabPos``. See paragraph style. +- ``text``. Numbering level text e.g. %1 for nonbullet or bullet character. \ No newline at end of file diff --git a/docs/writersreaders.rst b/docs/writersreaders.rst index 34a0805a8c..33aacc72af 100644 --- a/docs/writersreaders.rst +++ b/docs/writersreaders.rst @@ -8,35 +8,35 @@ OOXML The package of OOXML document consists of the following files. -- \_rels/ +- \_rels/ - - .rels + - .rels -- docProps/ +- docProps/ - - app.xml - - core.xml - - custom.xml + - app.xml + - core.xml + - custom.xml -- word/ +- word/ - - rels/ + - rels/ - - document.rels.xml + - document.rels.xml - - media/ - - theme/ + - media/ + - theme/ - - theme1.xml + - theme1.xml - - document.xml - - fontTable.xml - - numbering.xml - - settings.xml - - styles.xml - - webSettings.xml + - document.xml + - fontTable.xml + - numbering.xml + - settings.xml + - styles.xml + - webSettings.xml -- [Content\_Types].xml +- [Content\_Types].xml OpenDocument ------------ @@ -46,53 +46,53 @@ Package The package of OpenDocument document consists of the following files. -- META-INF/ +- META-INF/ - - manifest.xml + - manifest.xml -- Pictures/ -- content.xml -- meta.xml -- styles.xml +- Pictures/ +- content.xml +- meta.xml +- styles.xml content.xml ~~~~~~~~~~~ The structure of ``content.xml`` is described below. -- office:document-content +- office:document-content - - office:font-facedecls - - office:automatic-styles - - office:body + - office:font-facedecls + - office:automatic-styles + - office:body - - office:text + - office:text - - draw:\* - - office:forms - - table:table - - text:list - - text:numbered-paragraph - - text:p - - text:table-of-contents - - text:section + - draw:\* + - office:forms + - table:table + - text:list + - text:numbered-paragraph + - text:p + - text:table-of-contents + - text:section - - office:chart - - office:image - - office:drawing + - office:chart + - office:image + - office:drawing styles.xml ~~~~~~~~~~ The structure of ``styles.xml`` is described below. -- office:document-styles +- office:document-styles - - office:styles - - office:automatic-styles - - office:master-styles + - office:styles + - office:automatic-styles + - office:master-styles - - office:master-page + - office:master-page RTF --- diff --git a/samples/Sample_01_SimpleText.php b/samples/Sample_01_SimpleText.php index 67276b6abe..b35af8dcff 100644 --- a/samples/Sample_01_SimpleText.php +++ b/samples/Sample_01_SimpleText.php @@ -5,7 +5,7 @@ echo date('H:i:s') , ' Create new PhpWord object' , EOL; $phpWord = new \PhpOffice\PhpWord\PhpWord(); $phpWord->addFontStyle('rStyle', array('bold' => true, 'italic' => true, 'size' => 16, 'allCaps' => true, 'doubleStrikethrough' => true)); -$phpWord->addParagraphStyle('pStyle', array('alignment' => 'center', 'spaceAfter' => 100)); +$phpWord->addParagraphStyle('pStyle', array('alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::CENTER, 'spaceAfter' => 100)); $phpWord->addTitleStyle(1, array('bold' => true), array('spaceAfter' => 240)); // New portrait section diff --git a/samples/Sample_08_ParagraphPagination.php b/samples/Sample_08_ParagraphPagination.php index 4b6338d7f7..f0dc80f1da 100644 --- a/samples/Sample_08_ParagraphPagination.php +++ b/samples/Sample_08_ParagraphPagination.php @@ -6,7 +6,7 @@ $phpWord = new \PhpOffice\PhpWord\PhpWord(); $phpWord->setDefaultParagraphStyle( array( - 'alignment' => 'both', + 'alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::BOTH, 'spaceAfter' => \PhpOffice\PhpWord\Shared\Converter::pointToTwip(12), 'spacing' => 120, ) diff --git a/samples/Sample_09_Tables.php b/samples/Sample_09_Tables.php index 241efcb9fd..3e6cb67094 100644 --- a/samples/Sample_09_Tables.php +++ b/samples/Sample_09_Tables.php @@ -26,11 +26,11 @@ $section->addTextBreak(1); $section->addText(htmlspecialchars('Fancy table', ENT_COMPAT, 'UTF-8'), $header); -$styleTable = array('borderSize' => 6, 'borderColor' => '006699', 'cellMargin' => 80); +$styleTable = array('borderSize' => 6, 'borderColor' => '006699', 'cellMargin' => 80, 'alignment' => \PhpOffice\PhpWord\SimpleType\ST_JcTable::CENTER); $styleFirstRow = array('borderBottomSize' => 18, 'borderBottomColor' => '0000FF', 'bgColor' => '66BBFF'); $styleCell = array('valign' => 'center'); $styleCellBTLR = array('valign' => 'center', 'textDirection' => \PhpOffice\PhpWord\Style\Cell::TEXT_DIR_BTLR); -$fontStyle = array('bold' => true, 'align' => 'center'); +$fontStyle = array('bold' => true); $phpWord->addTableStyle('Fancy Table', $styleTable, $styleFirstRow); $table = $section->addTable('Fancy Table'); $table->addRow(900); @@ -58,7 +58,7 @@ $cellRowSpan = array('vMerge' => 'restart', 'valign' => 'center', 'bgColor' => 'FFFF00'); $cellRowContinue = array('vMerge' => 'continue'); $cellColSpan = array('gridSpan' => 2, 'valign' => 'center'); -$cellHCentered = array('align' => 'center'); +$cellHCentered = array('alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::CENTER); $cellVCentered = array('valign' => 'center'); $phpWord->addTableStyle('Colspan Rowspan', $styleTable); @@ -89,10 +89,10 @@ $section->addTextBreak(2); $section->addText(htmlspecialchars('Nested table in a centered and 50% width table.', ENT_COMPAT, 'UTF-8'), $header); -$table = $section->addTable(array('width' => 50 * 50, 'unit' => 'pct', 'align' => 'center')); +$table = $section->addTable(array('width' => 50 * 50, 'unit' => 'pct', 'alignment' => \PhpOffice\PhpWord\SimpleType\ST_JcTable::CENTER)); $cell = $table->addRow()->addCell(); $cell->addText(htmlspecialchars('This cell contains nested table.', ENT_COMPAT, 'UTF-8')); -$innerCell = $cell->addTable(array('align' => 'center'))->addRow()->addCell(); +$innerCell = $cell->addTable(array('alignment' => \PhpOffice\PhpWord\SimpleType\ST_JcTable::CENTER))->addRow()->addCell(); $innerCell->addText(htmlspecialchars('Inside nested table', ENT_COMPAT, 'UTF-8')); // Save file diff --git a/samples/Sample_12_HeaderFooter.php b/samples/Sample_12_HeaderFooter.php index df06453abf..cb29bf9e50 100644 --- a/samples/Sample_12_HeaderFooter.php +++ b/samples/Sample_12_HeaderFooter.php @@ -17,7 +17,7 @@ $textrun = $cell->addTextRun(); $textrun->addText(htmlspecialchars('This is the header with ', ENT_COMPAT, 'UTF-8')); $textrun->addLink('https://github.com/PHPOffice/PHPWord', htmlspecialchars('PHPWord on GitHub', ENT_COMPAT, 'UTF-8')); -$table->addCell(4500)->addImage('resources/PhpWord.png', array('width' => 80, 'height' => 80, 'align' => 'right')); +$table->addCell(4500)->addImage('resources/PhpWord.png', array('width' => 80, 'height' => 80, 'alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::END)); // Add header for all other pages $subsequent = $section->addHeader(); @@ -26,7 +26,7 @@ // Add footer $footer = $section->addFooter(); -$footer->addPreserveText(htmlspecialchars('Page {PAGE} of {NUMPAGES}.', ENT_COMPAT, 'UTF-8'), null, array('alignment' => 'center')); +$footer->addPreserveText(htmlspecialchars('Page {PAGE} of {NUMPAGES}.', ENT_COMPAT, 'UTF-8'), null, array('alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::CENTER)); $footer->addLink('https://github.com/PHPOffice/PHPWord', htmlspecialchars('PHPWord on GitHub', ENT_COMPAT, 'UTF-8')); // Write some text diff --git a/samples/Sample_13_Images.php b/samples/Sample_13_Images.php index f24dbfba7b..a5e2eecee1 100644 --- a/samples/Sample_13_Images.php +++ b/samples/Sample_13_Images.php @@ -12,7 +12,7 @@ $section->addTextBreak(2); $section->addText(htmlspecialchars('Local image with styles:', ENT_COMPAT, 'UTF-8')); -$section->addImage('resources/_earth.jpg', array('width' => 210, 'height' => 210, 'align' => 'center')); +$section->addImage('resources/_earth.jpg', array('width' => 210, 'height' => 210, 'alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::CENTER)); $section->addTextBreak(2); // Remote image diff --git a/samples/Sample_21_TableRowRules.php b/samples/Sample_21_TableRowRules.php index f22b616517..162f1c7427 100644 --- a/samples/Sample_21_TableRowRules.php +++ b/samples/Sample_21_TableRowRules.php @@ -22,7 +22,7 @@ $table1 = $section->addTable(array('cellMargin' => 0, 'cellMarginRight' => 0, 'cellMarginBottom' => 0, 'cellMarginLeft' => 0)); $table1->addRow(3750); $cell1 = $table1->addCell(null, array('valign' => 'top', 'borderSize' => 30, 'borderColor' => 'ff0000')); -$cell1->addImage('./resources/_earth.jpg', array('width' => 250, 'height' => 250, 'align' => 'center')); +$cell1->addImage('./resources/_earth.jpg', array('width' => 250, 'height' => 250, 'alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::CENTER)); $section->addTextBreak(); $section->addText( @@ -43,7 +43,7 @@ ); $table2->addRow(3750, array('exactHeight' => true)); $cell2 = $table2->addCell(null, array('valign' => 'top', 'borderSize' => 30, 'borderColor' => '00ff00')); -$cell2->addImage('./resources/_earth.jpg', array('width' => 250, 'height' => 250, 'align' => 'center')); +$cell2->addImage('./resources/_earth.jpg', array('width' => 250, 'height' => 250, 'alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::CENTER)); $section->addTextBreak(); $section->addText( diff --git a/samples/Sample_25_TextBox.php b/samples/Sample_25_TextBox.php index ebd597d235..3925a25659 100644 --- a/samples/Sample_25_TextBox.php +++ b/samples/Sample_25_TextBox.php @@ -10,7 +10,7 @@ // In section $textbox = $section->addTextBox( array( - 'align' => 'center', + 'alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::CENTER, 'width' => 400, 'height' => 150, 'borderSize' => 1, diff --git a/samples/Sample_27_Field.php b/samples/Sample_27_Field.php index 165a3e8ca1..2cab80fdd5 100644 --- a/samples/Sample_27_Field.php +++ b/samples/Sample_27_Field.php @@ -19,7 +19,7 @@ $section->addText(htmlspecialchars('Number of pages field:', ENT_COMPAT, 'UTF-8')); $section->addField('NUMPAGES', array('format' => 'Arabic', 'numformat' => '0,00'), array('PreserveFormat')); -$textrun = $section->addTextRun(array('align' => 'center')); +$textrun = $section->addTextRun(array('alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::CENTER)); $textrun->addText(htmlspecialchars('This is the date of lunar calendar ', ENT_COMPAT, 'UTF-8')); $textrun->addField('DATE', array('dateformat' => 'd-M-yyyy H:mm:ss'), array('PreserveFormat', 'LunarCalendar')); $textrun->addText(htmlspecialchars(' written in a textrun.', ENT_COMPAT, 'UTF-8')); diff --git a/samples/Sample_36_RTL.php b/samples/Sample_36_RTL.php index 486e8d6d8b..ee023fd4bb 100644 --- a/samples/Sample_36_RTL.php +++ b/samples/Sample_36_RTL.php @@ -9,7 +9,7 @@ $textrun = $section->addTextRun(); $textrun->addText(htmlspecialchars('This is a Left to Right paragraph.', ENT_COMPAT, 'UTF-8')); -$textrun = $section->addTextRun(array('align' => 'right')); +$textrun = $section->addTextRun(array('alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::END)); $textrun->addText(htmlspecialchars('سلام این یک پاراگراف راست به چپ است', ENT_COMPAT, 'UTF-8'), array('rtl' => true)); // Save file diff --git a/src/PhpWord/Element/AbstractContainer.php b/src/PhpWord/Element/AbstractContainer.php index 57d646a01b..9ab96a6afe 100644 --- a/src/PhpWord/Element/AbstractContainer.php +++ b/src/PhpWord/Element/AbstractContainer.php @@ -178,7 +178,9 @@ public function countElements() * Check if a method is allowed for the current container * * @param string $method + * * @return bool + * * @throws \BadMethodCallException */ private function checkValidity($method) @@ -247,10 +249,13 @@ private function checkValidity($method) /** * Add memory image element * + * @deprecated 0.9.0 + * * @param string $src * @param mixed $style + * * @return \PhpOffice\PhpWord\Element\Image - * @deprecated 0.9.0 + * * @codeCoverageIgnore */ public function addMemoryImage($src, $style = null) @@ -261,9 +266,12 @@ public function addMemoryImage($src, $style = null) /** * Create textrun element * + * @deprecated 0.10.0 + * * @param mixed $paragraphStyle + * * @return \PhpOffice\PhpWord\Element\TextRun - * @deprecated 0.10.0 + * * @codeCoverageIgnore */ public function createTextRun($paragraphStyle = null) @@ -274,9 +282,12 @@ public function createTextRun($paragraphStyle = null) /** * Create footnote element * + * @deprecated 0.10.0 + * * @param mixed $paragraphStyle + * * @return \PhpOffice\PhpWord\Element\Footnote - * @deprecated 0.10.0 + * * @codeCoverageIgnore */ public function createFootnote($paragraphStyle = null) diff --git a/src/PhpWord/Element/AbstractElement.php b/src/PhpWord/Element/AbstractElement.php index 99a7a1becc..68044e029f 100644 --- a/src/PhpWord/Element/AbstractElement.php +++ b/src/PhpWord/Element/AbstractElement.php @@ -378,8 +378,11 @@ protected function setNewStyle($styleObject, $styleValue = null, $returnObject = * @param mixed $value * @param array $enum * @param mixed $default + * * @return mixed + * * @throws \InvalidArgumentException + * * @todo Merge with the same method in AbstractStyle */ protected function setEnumVal($value = null, $enum = array(), $default = null) diff --git a/src/PhpWord/Element/Field.php b/src/PhpWord/Element/Field.php index 1eaa6f242f..8c612252d3 100644 --- a/src/PhpWord/Element/Field.php +++ b/src/PhpWord/Element/Field.php @@ -94,7 +94,9 @@ public function __construct($type = null, $properties = array(), $options = arra * Set Field type * * @param string $type + * * @return string + * * @throws \InvalidArgumentException */ public function setType($type = null) @@ -123,7 +125,9 @@ public function getType() * Set Field properties * * @param array $properties + * * @return self + * * @throws \InvalidArgumentException */ public function setProperties($properties = array()) @@ -153,7 +157,9 @@ public function getProperties() * Set Field options * * @param array $options + * * @return self + * * @throws \InvalidArgumentException */ public function setOptions($options = array()) diff --git a/src/PhpWord/Element/Footnote.php b/src/PhpWord/Element/Footnote.php index 162a703ed5..34bdf3c6b0 100644 --- a/src/PhpWord/Element/Footnote.php +++ b/src/PhpWord/Element/Footnote.php @@ -67,8 +67,10 @@ public function getParagraphStyle() /** * Get Footnote Reference ID * - * @return int * @deprecated 0.10.0 + * + * @return int + * * @codeCoverageIgnore */ public function getReferenceId() @@ -79,8 +81,10 @@ public function getReferenceId() /** * Set Footnote Reference ID * - * @param int $rId * @deprecated 0.10.0 + * + * @param int $rId + * * @codeCoverageIgnore */ public function setReferenceId($rId) diff --git a/src/PhpWord/Element/Image.php b/src/PhpWord/Element/Image.php index cab2527a4e..b0b2967e4c 100644 --- a/src/PhpWord/Element/Image.php +++ b/src/PhpWord/Element/Image.php @@ -126,6 +126,7 @@ class Image extends AbstractElement * @param string $source * @param mixed $style * @param boolean $watermark + * * @throws \PhpOffice\PhpWord\Exception\InvalidImageException * @throws \PhpOffice\PhpWord\Exception\UnsupportedImageTypeException */ @@ -365,7 +366,9 @@ public function getImageStringData($base64 = false) * Check memory image, supported type, image functions, and proportional width/height. * * @param string $source + * * @return void + * * @throws \PhpOffice\PhpWord\Exception\InvalidImageException * @throws \PhpOffice\PhpWord\Exception\UnsupportedImageTypeException */ @@ -425,7 +428,9 @@ private function setSourceType($source) * @since 0.12.0 Throws CreateTemporaryFileException. * * @param string $source + * * @return array|null + * * @throws \PhpOffice\PhpWord\Exception\CreateTemporaryFileException */ private function getArchiveImageSize($source) @@ -517,6 +522,7 @@ private function setProportionalSize($actualWidth, $actualHeight) * Get is watermark * * @deprecated 0.10.0 + * * @codeCoverageIgnore */ public function getIsWatermark() @@ -528,6 +534,7 @@ public function getIsWatermark() * Get is memory image * * @deprecated 0.10.0 + * * @codeCoverageIgnore */ public function getIsMemImage() diff --git a/src/PhpWord/Element/Link.php b/src/PhpWord/Element/Link.php index 9d0eb76662..0359f41516 100644 --- a/src/PhpWord/Element/Link.php +++ b/src/PhpWord/Element/Link.php @@ -129,8 +129,10 @@ public function getParagraphStyle() /** * Get link target * - * @return string * @deprecated 0.12.0 + * + * @return string + * * @codeCoverageIgnore */ public function getTarget() @@ -141,8 +143,10 @@ public function getTarget() /** * Get Link source * - * @return string * @deprecated 0.10.0 + * + * @return string + * * @codeCoverageIgnore */ public function getLinkSrc() @@ -153,8 +157,10 @@ public function getLinkSrc() /** * Get Link name * - * @return string * @deprecated 0.10.0 + * + * @return string + * * @codeCoverageIgnore */ public function getLinkName() diff --git a/src/PhpWord/Element/Object.php b/src/PhpWord/Element/Object.php index 31943ba68a..2721f8c245 100644 --- a/src/PhpWord/Element/Object.php +++ b/src/PhpWord/Element/Object.php @@ -65,6 +65,7 @@ class Object extends AbstractElement * * @param string $source * @param mixed $style + * * @throws \PhpOffice\PhpWord\Exception\InvalidObjectException */ public function __construct($source, $style = null) @@ -142,8 +143,10 @@ public function setImageRelationId($rId) /** * Get Object ID * - * @return int * @deprecated 0.10.0 + * + * @return int + * * @codeCoverageIgnore */ public function getObjectId() @@ -154,8 +157,10 @@ public function getObjectId() /** * Set Object ID * - * @param int $objId * @deprecated 0.10.0 + * + * @param int $objId + * * @codeCoverageIgnore */ public function setObjectId($objId) diff --git a/src/PhpWord/Element/Section.php b/src/PhpWord/Element/Section.php index d746f69bb3..ea547475ac 100644 --- a/src/PhpWord/Element/Section.php +++ b/src/PhpWord/Element/Section.php @@ -153,11 +153,14 @@ public function hasDifferentFirstPage() /** * Add header/footer * + * @since 0.10.0 + * * @param string $type * @param boolean $header + * * @return Header|Footer + * * @throws \PhpOffice\PhpWord\Exception\Exception - * @since 0.10.0 */ private function addHeaderFooter($type = Header::AUTO, $header = true) { @@ -183,8 +186,10 @@ private function addHeaderFooter($type = Header::AUTO, $header = true) /** * Set section style * - * @param array $settings * @deprecated 0.12.0 + * + * @param array $settings + * * @codeCoverageIgnore */ public function setSettings($settings = null) @@ -195,8 +200,10 @@ public function setSettings($settings = null) /** * Get section style * - * @return \PhpOffice\PhpWord\Style\Section * @deprecated 0.12.0 + * + * @return \PhpOffice\PhpWord\Style\Section + * * @codeCoverageIgnore */ public function getSettings() @@ -207,8 +214,10 @@ public function getSettings() /** * Create header * - * @return Header * @deprecated 0.10.0 + * + * @return Header + * * @codeCoverageIgnore */ public function createHeader() @@ -219,8 +228,10 @@ public function createHeader() /** * Create footer * - * @return Footer * @deprecated 0.10.0 + * + * @return Footer + * * @codeCoverageIgnore */ public function createFooter() @@ -231,8 +242,10 @@ public function createFooter() /** * Get footer * - * @return Footer * @deprecated 0.10.0 + * + * @return Footer + * * @codeCoverageIgnore */ public function getFooter() diff --git a/src/PhpWord/IOFactory.php b/src/PhpWord/IOFactory.php index ab46b87ebc..f50ee80785 100644 --- a/src/PhpWord/IOFactory.php +++ b/src/PhpWord/IOFactory.php @@ -20,7 +20,9 @@ abstract class IOFactory * * @param PhpWord $phpWord * @param string $name + * * @return WriterInterface + * * @throws \PhpOffice\PhpWord\Exception\Exception */ public static function createWriter(PhpWord $phpWord, $name = 'Word2007') @@ -38,7 +40,9 @@ public static function createWriter(PhpWord $phpWord, $name = 'Word2007') * Create new reader * * @param string $name + * * @return ReaderInterface + * * @throws Exception */ public static function createReader($name = 'Word2007') @@ -52,7 +56,9 @@ public static function createReader($name = 'Word2007') * @param string $type * @param string $name * @param \PhpOffice\PhpWord\PhpWord $phpWord + * * @return \PhpOffice\PhpWord\Writer\WriterInterface|\PhpOffice\PhpWord\Reader\ReaderInterface + * * @throws \PhpOffice\PhpWord\Exception\Exception */ private static function createObject($type, $name, $phpWord = null) diff --git a/src/PhpWord/Media.php b/src/PhpWord/Media.php index 59735cea4c..baed1fbfe0 100644 --- a/src/PhpWord/Media.php +++ b/src/PhpWord/Media.php @@ -35,14 +35,17 @@ class Media /** * Add new media element * + * @since 0.10.0 + * @since 0.9.2 + * * @param string $container section|headerx|footerx|footnote|endnote * @param string $mediaType image|object|link * @param string $source * @param \PhpOffice\PhpWord\Element\Image $image + * * @return integer + * * @throws \PhpOffice\PhpWord\Exception\Exception - * @since 0.9.2 - * @since 0.10.0 */ public static function addElement($container, $mediaType, $source, Image $image = null) { @@ -199,11 +202,14 @@ public static function resetElements() /** * Add new Section Media Element * + * @deprecated 0.10.0 + * * @param string $src * @param string $type * @param \PhpOffice\PhpWord\Element\Image $image + * * @return integer - * @deprecated 0.10.0 + * * @codeCoverageIgnore */ public static function addSectionMediaElement($src, $type, Image $image = null) @@ -214,9 +220,12 @@ public static function addSectionMediaElement($src, $type, Image $image = null) /** * Add new Section Link Element * + * @deprecated 0.10.0 + * * @param string $linkSrc + * * @return integer - * @deprecated 0.10.0 + * * @codeCoverageIgnore */ public static function addSectionLinkElement($linkSrc) @@ -227,9 +236,12 @@ public static function addSectionLinkElement($linkSrc) /** * Get Section Media Elements * + * @deprecated 0.10.0 + * * @param string $key + * * @return array - * @deprecated 0.10.0 + * * @codeCoverageIgnore */ public static function getSectionMediaElements($key = null) @@ -240,9 +252,12 @@ public static function getSectionMediaElements($key = null) /** * Get Section Media Elements Count * + * @deprecated 0.10.0 + * * @param string $key + * * @return integer - * @deprecated 0.10.0 + * * @codeCoverageIgnore */ public static function countSectionMediaElements($key = null) @@ -253,11 +268,14 @@ public static function countSectionMediaElements($key = null) /** * Add new Header Media Element * + * @deprecated 0.10.0 + * * @param integer $headerCount * @param string $src * @param \PhpOffice\PhpWord\Element\Image $image + * * @return integer - * @deprecated 0.10.0 + * * @codeCoverageIgnore */ public static function addHeaderMediaElement($headerCount, $src, Image $image = null) @@ -268,9 +286,12 @@ public static function addHeaderMediaElement($headerCount, $src, Image $image = /** * Get Header Media Elements Count * + * @deprecated 0.10.0 + * * @param string $key + * * @return integer - * @deprecated 0.10.0 + * * @codeCoverageIgnore */ public static function countHeaderMediaElements($key) @@ -281,8 +302,10 @@ public static function countHeaderMediaElements($key) /** * Get Header Media Elements * - * @return array * @deprecated 0.10.0 + * + * @return array + * * @codeCoverageIgnore */ public static function getHeaderMediaElements() @@ -293,11 +316,14 @@ public static function getHeaderMediaElements() /** * Add new Footer Media Element * + * @deprecated 0.10.0 + * * @param integer $footerCount * @param string $src * @param \PhpOffice\PhpWord\Element\Image $image + * * @return integer - * @deprecated 0.10.0 + * * @codeCoverageIgnore */ public static function addFooterMediaElement($footerCount, $src, Image $image = null) @@ -308,9 +334,12 @@ public static function addFooterMediaElement($footerCount, $src, Image $image = /** * Get Footer Media Elements Count * + * @deprecated 0.10.0 + * * @param string $key + * * @return integer - * @deprecated 0.10.0 + * * @codeCoverageIgnore */ public static function countFooterMediaElements($key) @@ -321,8 +350,10 @@ public static function countFooterMediaElements($key) /** * Get Footer Media Elements * - * @return array * @deprecated 0.10.0 + * + * @return array + * * @codeCoverageIgnore */ public static function getFooterMediaElements() diff --git a/src/PhpWord/PhpWord.php b/src/PhpWord/PhpWord.php index 99c95c7912..cbd87edb2d 100644 --- a/src/PhpWord/PhpWord.php +++ b/src/PhpWord/PhpWord.php @@ -45,8 +45,9 @@ class PhpWord /** * Default font settings * - * @const string|int * @deprecated 0.11.0 Use Settings constants + * + * @const string|int */ const DEFAULT_FONT_NAME = Settings::DEFAULT_FONT_NAME; const DEFAULT_FONT_SIZE = Settings::DEFAULT_FONT_SIZE; @@ -100,11 +101,14 @@ public function __construct() /** * Dynamic function call to reduce static dependency * + * @since 0.12.0 + * * @param mixed $function * @param mixed $args - * @throws \BadMethodCallException + * * @return mixed - * @since 0.12.0 + * + * @throws \BadMethodCallException */ public function __call($function, $args) { @@ -267,8 +271,12 @@ public function setDefaultParagraphStyle($styles) * @deprecated 0.12.0 Use `new TemplateProcessor($documentTemplate)` instead. * * @param string $filename Fully qualified filename. + * * @return TemplateProcessor + * * @throws \PhpOffice\PhpWord\Exception\Exception + * + * @codeCoverageIgnore */ public function loadTemplate($filename) { @@ -319,9 +327,12 @@ public function save($filename, $format = 'Word2007', $download = false) /** * Create new section * + * @deprecated 0.10.0 + * * @param array $settings + * * @return \PhpOffice\PhpWord\Element\Section - * @deprecated 0.10.0 + * * @codeCoverageIgnore */ public function createSection($settings = null) @@ -332,8 +343,10 @@ public function createSection($settings = null) /** * Get document properties object * - * @return \PhpOffice\PhpWord\Metadata\DocInfo * @deprecated 0.12.0 + * + * @return \PhpOffice\PhpWord\Metadata\DocInfo + * * @codeCoverageIgnore */ public function getDocumentProperties() @@ -344,9 +357,12 @@ public function getDocumentProperties() /** * Set document properties object * + * @deprecated 0.12.0 + * * @param \PhpOffice\PhpWord\Metadata\DocInfo $documentProperties + * * @return self - * @deprecated 0.12.0 + * * @codeCoverageIgnore */ public function setDocumentProperties($documentProperties) diff --git a/src/PhpWord/Reader/AbstractReader.php b/src/PhpWord/Reader/AbstractReader.php index c08914e5c6..977dc5d9c5 100644 --- a/src/PhpWord/Reader/AbstractReader.php +++ b/src/PhpWord/Reader/AbstractReader.php @@ -68,7 +68,9 @@ public function setReadDataOnly($value = true) * Open file for reading * * @param string $filename + * * @return resource + * * @throws \PhpOffice\PhpWord\Exception\Exception */ protected function openFile($filename) @@ -110,6 +112,7 @@ public function canRead($filename) * Read data only? * * @deprecated 0.10.0 + * * @codeCoverageIgnore */ public function getReadDataOnly() diff --git a/src/PhpWord/Reader/HTML.php b/src/PhpWord/Reader/HTML.php index a6582a3f26..83c38af1d7 100644 --- a/src/PhpWord/Reader/HTML.php +++ b/src/PhpWord/Reader/HTML.php @@ -31,7 +31,9 @@ class HTML extends AbstractReader implements ReaderInterface * Loads PhpWord from file * * @param string $docFile + * * @throws \Exception + * * @return \PhpOffice\PhpWord\PhpWord */ public function load($docFile) diff --git a/src/PhpWord/Reader/RTF.php b/src/PhpWord/Reader/RTF.php index 9d5d813bf4..3dff864f37 100644 --- a/src/PhpWord/Reader/RTF.php +++ b/src/PhpWord/Reader/RTF.php @@ -31,7 +31,9 @@ class RTF extends AbstractReader implements ReaderInterface * Loads PhpWord from file * * @param string $docFile + * * @throws \Exception + * * @return \PhpOffice\PhpWord\PhpWord */ public function load($docFile) diff --git a/src/PhpWord/Reader/RTF/Document.php b/src/PhpWord/Reader/RTF/Document.php index 3f63e3398e..d33b539632 100644 --- a/src/PhpWord/Reader/RTF/Document.php +++ b/src/PhpWord/Reader/RTF/Document.php @@ -18,6 +18,7 @@ namespace PhpOffice\PhpWord\Reader\RTF; use PhpOffice\PhpWord\PhpWord; +use PhpOffice\PhpWord\SimpleType\ST_Jc; /** * RTF document reader @@ -140,7 +141,7 @@ public function read(PhpWord $phpWord) 125 => 'markClosing', // } 92 => 'markBackslash', // \ 10 => 'markNewline', // LF - 13 => 'markNewline' // CR + 13 => 'markNewline', // CR ); $this->phpWord = $phpWord; @@ -159,7 +160,7 @@ public function read(PhpWord $phpWord) $markerFunction = $markers[$ascii]; $this->$markerFunction(); } else { - if ($this->isControl === false) { // Non control word: Push character + if (false === $this->isControl) { // Non control word: Push character $this->pushText($char); } else { if (preg_match("/^[a-zA-Z0-9-]?$/", $char)) { // No delimiter: Buffer control @@ -169,7 +170,7 @@ public function read(PhpWord $phpWord) if ($this->isFirst) { $this->isFirst = false; } else { - if ($char == ' ') { // Discard space as a control word delimiter + if (' ' == $char) { // Discard space as a control word delimiter $this->flushControl(true); } } @@ -255,12 +256,12 @@ private function flush($isControl = false) */ private function flushControl($isControl = false) { - if (preg_match("/^([A-Za-z]+)(-?[0-9]*) ?$/", $this->control, $match) === 1) { + if (1 === preg_match("/^([A-Za-z]+)(-?[0-9]*) ?$/", $this->control, $match)) { list(, $control, $parameter) = $match; $this->parseControl($control, $parameter); } - if ($isControl === true) { + if (true === $isControl) { $this->setControl(false); } } @@ -276,7 +277,7 @@ private function flushText() if (isset($this->flags['property'])) { // Set property $this->flags['value'] = $this->text; } else { // Set text - if ($this->flags['paragraph'] === true) { + if (true === $this->flags['paragraph']) { $this->flags['paragraph'] = false; $this->flags['text'] = $this->text; } @@ -311,9 +312,9 @@ private function setControl($value) */ private function pushText($char) { - if ($char == '<') { + if ('<' == $char) { $this->text .= "<"; - } elseif ($char == '>') { + } elseif ('>' == $char) { $this->text .= ">"; } else { $this->text .= $char; @@ -336,7 +337,7 @@ private function parseControl($control, $parameter) 'u' => array(self::STYL, 'font', 'underline', true), 'strike' => array(self::STYL, 'font', 'strikethrough',true), 'fs' => array(self::STYL, 'font', 'size', $parameter), - 'qc' => array(self::STYL, 'paragraph', 'align', 'center'), + 'qc' => array(self::STYL, 'paragraph', 'alignment', ST_Jc::CENTER), 'sa' => array(self::STYL, 'paragraph', 'spaceAfter', $parameter), 'fonttbl' => array(self::SKIP, 'fonttbl', null), 'colortbl' => array(self::SKIP, 'colortbl', null), diff --git a/src/PhpWord/Reader/Word2007/AbstractPart.php b/src/PhpWord/Reader/Word2007/AbstractPart.php index 021bdba11e..bf523f2676 100644 --- a/src/PhpWord/Reader/Word2007/AbstractPart.php +++ b/src/PhpWord/Reader/Word2007/AbstractPart.php @@ -122,16 +122,16 @@ protected function readParagraph(XMLReader $xmlReader, \DOMElement $domNode, $pa $instrText = $xmlReader->getValue('w:instrText', $node); if ($xmlReader->elementExists('w:fldChar', $node)) { $fldCharType = $xmlReader->getAttribute('w:fldCharType', $node, 'w:fldChar'); - if ($fldCharType == 'begin') { + if ('begin' == $fldCharType) { $ignoreText = true; - } elseif ($fldCharType == 'end') { + } elseif ('end' == $fldCharType) { $ignoreText = false; } } if (!is_null($instrText)) { $textContent .= '{' . $instrText . '}'; } else { - if ($ignoreText === false) { + if (false === $ignoreText) { $textContent .= $xmlReader->getValue('w:t', $node); } } @@ -163,7 +163,7 @@ protected function readParagraph(XMLReader $xmlReader, \DOMElement $domNode, $pa $runCount = $xmlReader->countElements('w:r', $domNode); $linkCount = $xmlReader->countElements('w:hyperlink', $domNode); $runLinkCount = $runCount + $linkCount; - if ($runLinkCount == 0) { + if (0 == $runLinkCount) { $parent->addTextBreak(null, $paragraphStyle); } else { $nodes = $xmlReader->getElements('*', $domNode); @@ -200,7 +200,7 @@ protected function readRun(XMLReader $xmlReader, \DOMElement $domNode, $parent, $fontStyle = $this->readFontStyle($xmlReader, $domNode); // Link - if ($domNode->nodeName == 'w:hyperlink') { + if ('w:hyperlink' == $domNode->nodeName) { $rId = $xmlReader->getAttribute('r:id', $domNode); $textContent = $xmlReader->getValue('w:r/w:t', $domNode); $target = $this->getMediaTarget($docPart, $rId); @@ -264,26 +264,26 @@ protected function readTable(XMLReader $xmlReader, \DOMElement $domNode, $parent $table = $parent->addTable($tblStyle); $tblNodes = $xmlReader->getElements('*', $domNode); foreach ($tblNodes as $tblNode) { - if ($tblNode->nodeName == 'w:tblGrid') { // Column + if ('w:tblGrid' == $tblNode->nodeName) { // Column // @todo Do something with table columns - } elseif ($tblNode->nodeName == 'w:tr') { // Row + } elseif ('w:tr' == $tblNode->nodeName) { // Row $rowHeight = $xmlReader->getAttribute('w:val', $tblNode, 'w:trPr/w:trHeight'); $rowHRule = $xmlReader->getAttribute('w:hRule', $tblNode, 'w:trPr/w:trHeight'); $rowHRule = $rowHRule == 'exact' ? true : false; $rowStyle = array( - 'tblHeader' => $xmlReader->elementExists('w:trPr/w:tblHeader', $tblNode), - 'cantSplit' => $xmlReader->elementExists('w:trPr/w:cantSplit', $tblNode), + 'tblHeader' => $xmlReader->elementExists('w:trPr/w:tblHeader', $tblNode), + 'cantSplit' => $xmlReader->elementExists('w:trPr/w:cantSplit', $tblNode), 'exactHeight' => $rowHRule, ); $row = $table->addRow($rowHeight, $rowStyle); $rowNodes = $xmlReader->getElements('*', $tblNode); foreach ($rowNodes as $rowNode) { - if ($rowNode->nodeName == 'w:trPr') { // Row style + if ('w:trPr' == $rowNode->nodeName) { // Row style // @todo Do something with row style - } elseif ($rowNode->nodeName == 'w:tc') { // Cell + } elseif ('w:tc' == $rowNode->nodeName) { // Cell $cellWidth = $xmlReader->getAttribute('w:w', $rowNode, 'w:tcPr/w:tcW'); $cellStyle = null; $cellStyleNode = $xmlReader->getElement('w:tcPr', $rowNode); @@ -294,7 +294,7 @@ protected function readTable(XMLReader $xmlReader, \DOMElement $domNode, $parent $cell = $row->addCell($cellWidth, $cellStyle); $cellNodes = $xmlReader->getElements('*', $rowNode); foreach ($cellNodes as $cellNode) { - if ($cellNode->nodeName == 'w:p') { // Paragraph + if ('w:p' == $cellNode->nodeName) { // Paragraph $this->readParagraph($xmlReader, $cellNode, $cell, $docPart); } } @@ -320,7 +320,7 @@ protected function readParagraphStyle(XMLReader $xmlReader, \DOMElement $domNode $styleNode = $xmlReader->getElement('w:pPr', $domNode); $styleDefs = array( 'styleName' => array(self::READ_VALUE, 'w:pStyle'), - 'align' => array(self::READ_VALUE, 'w:jc'), + 'alignment' => array(self::READ_VALUE, 'w:jc'), 'basedOn' => array(self::READ_VALUE, 'w:basedOn'), 'next' => array(self::READ_VALUE, 'w:next'), 'indent' => array(self::READ_VALUE, 'w:ind', 'w:left'), @@ -349,7 +349,7 @@ protected function readFontStyle(XMLReader $xmlReader, \DOMElement $domNode) return null; } // Hyperlink has an extra w:r child - if ($domNode->nodeName == 'w:hyperlink') { + if ('w:hyperlink' == $domNode->nodeName) { $domNode = $xmlReader->getElement('w:r', $domNode); } if (!$xmlReader->elementExists('w:rPr', $domNode)) { @@ -399,7 +399,6 @@ protected function readTableStyle(XMLReader $xmlReader, \DOMElement $domNode) } else { $styleNode = $xmlReader->getElement('w:tblPr', $domNode); $styleDefs = array(); - // $styleDefs['styleName'] = array(self::READ_VALUE, 'w:tblStyle'); foreach ($margins as $side) { $ucfSide = ucfirst($side); $styleDefs["cellMargin$ucfSide"] = array(self::READ_VALUE, "w:tblCellMar/w:$side", 'w:w'); @@ -482,13 +481,13 @@ private function readStyleDef($method, $attributeValue, $expected) { $style = $attributeValue; - if ($method == self::READ_SIZE) { + if (self::READ_SIZE == $method) { $style = $attributeValue / 2; - } elseif ($method == self::READ_TRUE) { + } elseif (self::READ_TRUE == $method) { $style = true; - } elseif ($method == self::READ_FALSE) { + } elseif (self::READ_FALSE == $method) { $style = false; - } elseif ($method == self::READ_EQUAL) { + } elseif (self::READ_EQUAL == $method) { $style = $attributeValue == $expected; } diff --git a/src/PhpWord/Reader/Word2007/Numbering.php b/src/PhpWord/Reader/Word2007/Numbering.php index 872d45033b..f1144b1a37 100644 --- a/src/PhpWord/Reader/Word2007/Numbering.php +++ b/src/PhpWord/Reader/Word2007/Numbering.php @@ -105,7 +105,7 @@ private function readLevel(XMLReader $xmlReader, \DOMElement $subnode, $levelId) $level['restart'] = $xmlReader->getAttribute('w:val', $subnode, 'w:lvlRestart'); $level['suffix'] = $xmlReader->getAttribute('w:val', $subnode, 'w:suff'); $level['text'] = $xmlReader->getAttribute('w:val', $subnode, 'w:lvlText'); - $level['align'] = $xmlReader->getAttribute('w:val', $subnode, 'w:lvlJc'); + $level['alignment'] = $xmlReader->getAttribute('w:val', $subnode, 'w:lvlJc'); $level['tab'] = $xmlReader->getAttribute('w:pos', $subnode, 'w:pPr/w:tabs/w:tab'); $level['left'] = $xmlReader->getAttribute('w:left', $subnode, 'w:pPr/w:ind'); $level['hanging'] = $xmlReader->getAttribute('w:hanging', $subnode, 'w:pPr/w:ind'); diff --git a/src/PhpWord/Settings.php b/src/PhpWord/Settings.php index 67b1dbedbd..14fa9077aa 100644 --- a/src/PhpWord/Settings.php +++ b/src/PhpWord/Settings.php @@ -407,6 +407,7 @@ public static function loadConfig($filename = null) * Return the compatibility option used by the XMLWriter * * @deprecated 0.10.0 + * * @codeCoverageIgnore */ public static function getCompatibility() diff --git a/src/PhpWord/Shared/Font.php b/src/PhpWord/Shared/Font.php index 231b0bbdcc..473ef0e47e 100644 --- a/src/PhpWord/Shared/Font.php +++ b/src/PhpWord/Shared/Font.php @@ -21,6 +21,7 @@ * DEPRECATED: Common font functions; Use 'Converter' * * @deprecated 0.12.0 + * * @codeCoverageIgnore */ class Font diff --git a/src/PhpWord/Shared/Html.php b/src/PhpWord/Shared/Html.php index 2b4acd05b9..cdc88b4396 100644 --- a/src/PhpWord/Shared/Html.php +++ b/src/PhpWord/Shared/Html.php @@ -51,7 +51,7 @@ public static function addHtml($element, $html, $fullHTML = false) $html = str_replace('&', '&', $html); $html = str_replace(array('_lt_', '_gt_', '_amp_'), array('<', '>', '&'), $html); - if ($fullHTML === false) { + if (false === $fullHTML) { $html = '' . $html . ''; } @@ -73,7 +73,7 @@ public static function addHtml($element, $html, $fullHTML = false) */ protected static function parseInlineStyle($node, $styles = array()) { - if ($node->nodeType == XML_ELEMENT_NODE) { + if (XML_ELEMENT_NODE == $node->nodeType) { $attributes = $node->attributes; // get all the attributes(eg: id, class) foreach ($attributes as $attribute) { @@ -173,7 +173,7 @@ protected static function parseNode($node, $element, $styles = array(), $data = */ private static function parseChildNodes($node, $element, $styles, $data) { - if ($node->nodeName != 'li') { + if ('li' != $node->nodeName) { $cNodes = $node->childNodes; if (count($cNodes) > 0) { foreach ($cNodes as $cNode) { @@ -361,7 +361,7 @@ private static function parseStyle($attribute, $styles) } break; case 'text-align': - $styles['align'] = $cValue; + $styles['alignment'] = $cValue; // todo: any mapping? break; case 'color': $styles['color'] = trim($cValue, "#"); diff --git a/src/PhpWord/Shared/OLERead.php b/src/PhpWord/Shared/OLERead.php index 82815afc4b..b833c4bdda 100644 --- a/src/PhpWord/Shared/OLERead.php +++ b/src/PhpWord/Shared/OLERead.php @@ -62,6 +62,7 @@ class OLERead * Read the file * * @param $sFileName string Filename + * * @throws Exception */ public function read($sFileName) diff --git a/src/PhpWord/Shared/XMLReader.php b/src/PhpWord/Shared/XMLReader.php index ca6869eb3c..6af1ca9b36 100644 --- a/src/PhpWord/Shared/XMLReader.php +++ b/src/PhpWord/Shared/XMLReader.php @@ -45,7 +45,9 @@ class XMLReader * * @param string $zipFile * @param string $xmlFile + * * @return \DOMDocument|false + * * @throws \PhpOffice\PhpWord\Exception\Exception */ public function getDomFromZip($zipFile, $xmlFile) diff --git a/src/PhpWord/Shared/XMLWriter.php b/src/PhpWord/Shared/XMLWriter.php index 2134f62a9d..26dbcc3464 100644 --- a/src/PhpWord/Shared/XMLWriter.php +++ b/src/PhpWord/Shared/XMLWriter.php @@ -107,6 +107,7 @@ public function __destruct() * * @param mixed $function * @param mixed $args + * * @throws \BadMethodCallException */ public function __call($function, $args) diff --git a/src/PhpWord/Shared/ZipArchive.php b/src/PhpWord/Shared/ZipArchive.php index 157959e8e9..c670169201 100644 --- a/src/PhpWord/Shared/ZipArchive.php +++ b/src/PhpWord/Shared/ZipArchive.php @@ -151,7 +151,9 @@ public function open($filename, $flags = null) * Close the active archive * * @return bool + * * @throws \PhpOffice\PhpWord\Exception\Exception + * * @codeCoverageIgnore Can't find any test case. Uncomment when found. */ public function close() diff --git a/src/PhpWord/SimpleType/ST_Jc.php b/src/PhpWord/SimpleType/ST_Jc.php new file mode 100644 index 0000000000..5558133c95 --- /dev/null +++ b/src/PhpWord/SimpleType/ST_Jc.php @@ -0,0 +1,57 @@ +getStyle(); - if (!$style instanceof \PhpOffice\PhpWord\Style\Alignment) { - return; - } - $value = $style->getValue(); - if ($value !== null) { - $xmlWriter = $this->getXmlWriter(); - $xmlWriter->startElement('w:jc'); - $xmlWriter->writeAttribute('w:val', $value); - $xmlWriter->endElement(); // w:jc - } + return array(self::START, self::CENTER, self::END); } } diff --git a/src/PhpWord/Style/AbstractStyle.php b/src/PhpWord/Style/AbstractStyle.php index ab1a1ee729..482712e39b 100644 --- a/src/PhpWord/Style/AbstractStyle.php +++ b/src/PhpWord/Style/AbstractStyle.php @@ -278,7 +278,9 @@ protected function setFloatVal($value, $default = null) * @param mixed $value * @param array $enum * @param mixed $default + * * @return mixed + * * @throws \InvalidArgumentException */ protected function setEnumVal($value = null, $enum = array(), $default = null) @@ -337,9 +339,12 @@ protected function setPairedVal(&$property, &$pairProperty, $value) /** * Set style using associative array * + * @deprecated 0.11.0 + * * @param array $style + * * @return self - * @deprecated 0.11.0 + * * @codeCoverageIgnore */ public function setArrayStyle(array $style = array()) diff --git a/src/PhpWord/Style/Alignment.php b/src/PhpWord/Style/Alignment.php deleted file mode 100644 index 3beabe376a..0000000000 --- a/src/PhpWord/Style/Alignment.php +++ /dev/null @@ -1,78 +0,0 @@ -setStyleByArray($style); - } - - /** - * Get alignment - * - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * Set alignment - * - * @param string $value - * @return self - */ - public function setValue($value = null) - { - if (strtolower($value) == self::ALIGN_JUSTIFY) { - $value = self::ALIGN_BOTH; - } - $enum = array(self::ALIGN_LEFT, self::ALIGN_RIGHT, self::ALIGN_CENTER, self::ALIGN_BOTH, self::ALIGN_JUSTIFY); - $this->value = $this->setEnumVal($value, $enum, $this->value); - - return $this; - } -} diff --git a/src/PhpWord/Style/Cell.php b/src/PhpWord/Style/Cell.php index 11290c8752..bef56390f9 100644 --- a/src/PhpWord/Style/Cell.php +++ b/src/PhpWord/Style/Cell.php @@ -240,6 +240,7 @@ public function setShading($value = null) * Get default border color * * @deprecated 0.10.0 + * * @codeCoverageIgnore */ public function getDefaultBorderColor() diff --git a/src/PhpWord/Style/Font.php b/src/PhpWord/Style/Font.php index 8980258b43..000f59fd69 100644 --- a/src/PhpWord/Style/Font.php +++ b/src/PhpWord/Style/Font.php @@ -787,6 +787,7 @@ public function setShading($value = null) * Get bold * * @deprecated 0.10.0 + * * @codeCoverageIgnore */ public function getBold() @@ -798,6 +799,7 @@ public function getBold() * Get italic * * @deprecated 0.10.0 + * * @codeCoverageIgnore */ public function getItalic() @@ -809,6 +811,7 @@ public function getItalic() * Get superscript * * @deprecated 0.10.0 + * * @codeCoverageIgnore */ public function getSuperScript() @@ -820,6 +823,7 @@ public function getSuperScript() * Get subscript * * @deprecated 0.10.0 + * * @codeCoverageIgnore */ public function getSubScript() @@ -831,6 +835,7 @@ public function getSubScript() * Get strikethrough * * @deprecated 0.10.0 + * * @codeCoverageIgnore */ public function getStrikethrough() @@ -842,6 +847,7 @@ public function getStrikethrough() * Get paragraph style * * @deprecated 0.11.0 + * * @codeCoverageIgnore */ public function getParagraphStyle() diff --git a/src/PhpWord/Style/Frame.php b/src/PhpWord/Style/Frame.php index 5fef5f0182..e1c7d52c2d 100644 --- a/src/PhpWord/Style/Frame.php +++ b/src/PhpWord/Style/Frame.php @@ -17,6 +17,8 @@ namespace PhpOffice\PhpWord\Style; +use PhpOffice\PhpWord\SimpleType\ST_Jc; + /** * Frame defines the size and position of an object * @@ -88,11 +90,9 @@ class Frame extends AbstractStyle const WRAP_INFRONT = 'infront'; /** - * Alignment - * - * @var \PhpOffice\PhpWord\Style\Alignment + * @var string */ - private $alignment; + private $alignment = ''; /** * Unit @@ -178,33 +178,61 @@ class Frame extends AbstractStyle */ public function __construct($style = array()) { - $this->alignment = new Alignment(); $this->setStyleByArray($style); } /** - * Get alignment + * @since 0.13.0 * * @return string */ - public function getAlign() + public function getAlignment() { - return $this->alignment->getValue(); + return $this->alignment; } /** - * Set alignment + * @since 0.13.0 * * @param string $value + * * @return self */ - public function setAlign($value = null) + public function setAlignment($value) { - $this->alignment->setValue($value); + if (in_array($value, ST_Jc::getAllowedValues(), true)) { + $this->alignment = $value; + } return $this; } + /** + * @deprecated 0.13.0 Use the `getAlignment` method instead. + * + * @return string + * + * @codeCoverageIgnore + */ + public function getAlign() + { + return $this->getAlignment(); + } + + /** + * @deprecated 0.13.0 Use the `setAlignment` method instead. + * + * @param string $value + * + * @return self + * + * @codeCoverageIgnore + */ + public function setAlign($value = null) + { + return $this->setAlignment($value); + } + /** * Get unit * diff --git a/src/PhpWord/Style/Image.php b/src/PhpWord/Style/Image.php index babfa6798e..5308a3bae7 100644 --- a/src/PhpWord/Style/Image.php +++ b/src/PhpWord/Style/Image.php @@ -133,7 +133,9 @@ public function getWrappingStyle() * Set wrapping style * * @param string $wrappingStyle + * * @throws \InvalidArgumentException + * * @return self */ public function setWrappingStyle($wrappingStyle) @@ -157,7 +159,9 @@ public function getPositioning() * Set positioning type * * @param string $positioning + * * @throws \InvalidArgumentException + * * @return self */ public function setPositioning($positioning) @@ -181,7 +185,9 @@ public function getPosHorizontal() * Set horizontal alignment * * @param string $alignment + * * @throws \InvalidArgumentException + * * @return self */ public function setPosHorizontal($alignment) @@ -205,7 +211,9 @@ public function getPosVertical() * Set vertical alignment * * @param string $alignment + * * @throws \InvalidArgumentException + * * @return self */ public function setPosVertical($alignment) @@ -229,7 +237,9 @@ public function getPosHorizontalRel() * Set horizontal relation * * @param string $relto + * * @throws \InvalidArgumentException + * * @return self */ public function setPosHorizontalRel($relto) @@ -253,7 +263,9 @@ public function getPosVerticalRel() * Set vertical relation * * @param string $relto + * * @throws \InvalidArgumentException + * * @return self */ public function setPosVerticalRel($relto) diff --git a/src/PhpWord/Style/ListItem.php b/src/PhpWord/Style/ListItem.php index a689c691c0..6583f74d10 100644 --- a/src/PhpWord/Style/ListItem.php +++ b/src/PhpWord/Style/ListItem.php @@ -155,7 +155,7 @@ private function getListTypeStyle() } // Property mapping for numbering level information - $properties = array('start', 'format', 'text', 'align', 'tabPos', 'left', 'hanging', 'font', 'hint'); + $properties = array('start', 'format', 'text', 'alignment', 'tabPos', 'left', 'hanging', 'font', 'hint'); // Legacy level information $listTypeStyles = array( diff --git a/src/PhpWord/Style/NumberingLevel.php b/src/PhpWord/Style/NumberingLevel.php index 32e61c8962..420287da02 100644 --- a/src/PhpWord/Style/NumberingLevel.php +++ b/src/PhpWord/Style/NumberingLevel.php @@ -81,12 +81,9 @@ class NumberingLevel extends AbstractStyle private $text; /** - * Align left|center|right|both - * * @var string - * @link http://www.schemacentral.com/sc/ooxml/e-w_lvlJc-1.html */ - private $align; + private $alignment; /** * Left @@ -281,26 +278,55 @@ public function setText($value) } /** - * Get align + * @since 0.13.0 * * @return string */ + public function getAlignment() + { + return $this->alignment; + } + + /** + * @since 0.13.0 + * + * @param string $value + * + * @return self + */ + public function setAlignment($value) + { + if (in_array($value, Jc::getAllowedValues(), true)) { + $this->alignment = $value; + } + + return $this; + } + + /** + * @deprecated 0.13.0 Use the `getAlignment` method instead. + * + * @return string + * + * @codeCoverageIgnore + */ public function getAlign() { - return $this->align; + return $this->getAlignment(); } /** - * Set align + * @deprecated 0.13.0 Use the `setAlignment` method instead. * * @param string $value + * * @return self + * + * @codeCoverageIgnore */ public function setAlign($value) { - $enum = array('left', 'center', 'right', 'both'); - $this->align = $this->setEnumVal($value, $enum, $this->align); - return $this; + return $this->setAlignment($value); } /** diff --git a/src/PhpWord/Style/Paragraph.php b/src/PhpWord/Style/Paragraph.php index ff89b9d5c9..ba2a6ac245 100644 --- a/src/PhpWord/Style/Paragraph.php +++ b/src/PhpWord/Style/Paragraph.php @@ -19,13 +19,13 @@ use PhpOffice\PhpWord\Exception\InvalidStyleException; use PhpOffice\PhpWord\Shared\String; +use PhpOffice\PhpWord\SimpleType\ST_Jc; /** * Paragraph style * * OOXML: * - General: alignment, outline level - * - Alignment: left, right, center, both * - Indentation: left, right, firstline, hanging * - Spacing: before, after, line spacing * - Pagination: widow control, keep next, keep line, page break before @@ -77,11 +77,9 @@ class Paragraph extends Border private $next; /** - * Alignment - * - * @var \PhpOffice\PhpWord\Style\Alignment + * @var string */ - private $alignment; + private $alignment = ''; /** * Indentation @@ -170,9 +168,9 @@ class Paragraph extends Border public function setStyleValue($key, $value) { $key = String::removeUnderscorePrefix($key); - if ($key == 'indent' || $key == 'hanging') { + if ('indent' == $key || 'hanging' == $key) { $value = $value * 720; - } elseif ($key == 'spacing') { + } elseif ('spacing' == $key) { $value += 240; // because line height of 1 matches 240 twips } @@ -216,9 +214,9 @@ public function getStyleValues() } /** - * Get alignment + * @since 0.13.0 * - * @return \PhpOffice\PhpWord\Style\Alignment + * @return string */ public function getAlignment() { @@ -226,18 +224,47 @@ public function getAlignment() } /** - * Set alignment + * @since 0.13.0 * * @param string $value + * * @return self */ - public function setAlignment($value = null) + public function setAlignment($value) { - $this->setObjectVal(array('value' => $value), 'Alignment', $this->alignment); + if (in_array($value, ST_Jc::getAllowedValues(), true)) { + $this->alignment = $value; + } return $this; } + /** + * @deprecated 0.13.0 Use the `getAlignment` method instead. + * + * @return string + * + * @codeCoverageIgnore + */ + public function getAlign() + { + return $this->getAlignment(); + } + + /** + * @deprecated 0.13.0 Use the `setAlignment` method instead. + * + * @param string $value + * + * @return self + * + * @codeCoverageIgnore + */ + public function setAlign($value = null) + { + return $this->setAlignment($value); + } + /** * Get parent style ID * @@ -451,7 +478,9 @@ public function getLineHeight() * Set the line height * * @param int|float|string $lineHeight + * * @return self + * * @throws \PhpOffice\PhpWord\Exception\InvalidStyleException */ public function setLineHeight($lineHeight) @@ -636,6 +665,7 @@ public function setTabs($value = null) * Get allow first/last line to display on a separate page setting * * @deprecated 0.10.0 + * * @codeCoverageIgnore */ public function getWidowControl() @@ -647,6 +677,7 @@ public function getWidowControl() * Get keep paragraph with next paragraph setting * * @deprecated 0.10.0 + * * @codeCoverageIgnore */ public function getKeepNext() @@ -658,6 +689,7 @@ public function getKeepNext() * Get keep all lines on one page setting * * @deprecated 0.10.0 + * * @codeCoverageIgnore */ public function getKeepLines() @@ -669,6 +701,7 @@ public function getKeepLines() * Get start paragraph on next page setting * * @deprecated 0.10.0 + * * @codeCoverageIgnore */ public function getPageBreakBefore() diff --git a/src/PhpWord/Style/Row.php b/src/PhpWord/Style/Row.php index 45897aed5e..d88af652a1 100644 --- a/src/PhpWord/Style/Row.php +++ b/src/PhpWord/Style/Row.php @@ -125,6 +125,7 @@ public function setExactHeight($value = true) * Get tblHeader * * @deprecated 0.10.0 + * * @codeCoverageIgnore */ public function getTblHeader() @@ -136,6 +137,7 @@ public function getTblHeader() * Get cantSplit * * @deprecated 0.10.0 + * * @codeCoverageIgnore */ public function getCantSplit() @@ -147,6 +149,7 @@ public function getCantSplit() * Get exactHeight * * @deprecated 0.10.0 + * * @codeCoverageIgnore */ public function getExactHeight() diff --git a/src/PhpWord/Style/Section.php b/src/PhpWord/Style/Section.php index 128e8e6b21..b81e4393b4 100644 --- a/src/PhpWord/Style/Section.php +++ b/src/PhpWord/Style/Section.php @@ -35,14 +35,14 @@ class Section extends Border * * @const int|float */ - const DEFAULT_WIDTH = 11870; // In twip - const DEFAULT_HEIGHT = 16787; // In twip - const DEFAULT_MARGIN = 1440; // In twip - const DEFAULT_GUTTER = 0; // In twip - const DEFAULT_HEADER_HEIGHT = 720; // In twip - const DEFAULT_FOOTER_HEIGHT = 720; // In twip + const DEFAULT_WIDTH = 11870; // In twips. + const DEFAULT_HEIGHT = 16787; // In twips. + const DEFAULT_MARGIN = 1440; // In twips. + const DEFAULT_GUTTER = 0; // In twips. + const DEFAULT_HEADER_HEIGHT = 720; // In twips. + const DEFAULT_FOOTER_HEIGHT = 720; // In twips. const DEFAULT_COLUMN_COUNT = 1; - const DEFAULT_COLUMN_SPACING = 720; // In twip + const DEFAULT_COLUMN_SPACING = 720; // In twips. /** * Page Orientation diff --git a/src/PhpWord/Style/TOC.php b/src/PhpWord/Style/TOC.php index 5285565278..8f6022cfce 100644 --- a/src/PhpWord/Style/TOC.php +++ b/src/PhpWord/Style/TOC.php @@ -25,8 +25,9 @@ class TOC extends Tab /** * Tab leader types for backward compatibility * - * @const string * @deprecated 0.11.0 + * + * @const string */ const TABLEADER_DOT = self::TAB_LEADER_DOT; const TABLEADER_UNDERSCORE = self::TAB_LEADER_UNDERSCORE; diff --git a/src/PhpWord/Style/Table.php b/src/PhpWord/Style/Table.php index 24f5066777..c92df68a17 100644 --- a/src/PhpWord/Style/Table.php +++ b/src/PhpWord/Style/Table.php @@ -17,9 +17,8 @@ namespace PhpOffice\PhpWord\Style; -/** - * Table style - */ +use PhpOffice\PhpWord\SimpleType\ST_JcTable; + class Table extends Border { /** @@ -107,9 +106,9 @@ class Table extends Border private $shading; /** - * @var \PhpOffice\PhpWord\Style\Alignment Alignment + * @var string */ - private $alignment; + private $alignment = ''; /** * @var int|float Width value @@ -129,8 +128,6 @@ class Table extends Border */ public function __construct($tableStyle = null, $firstRowStyle = null) { - $this->alignment = new Alignment(); - // Clone first row from table style, but with certain properties disabled if ($firstRowStyle !== null && is_array($firstRowStyle)) { $this->firstRowStyle = clone $this; @@ -494,28 +491,57 @@ public function setShading($value = null) } /** - * Get alignment + * @since 0.13.0 * * @return string */ - public function getAlign() + public function getAlignment() { - return $this->alignment->getValue(); + return $this->alignment; } /** - * Set alignment + * @since 0.13.0 * * @param string $value + * * @return self */ - public function setAlign($value = null) + public function setAlignment($value) { - $this->alignment->setValue($value); + if (in_array($value, ST_JcTable::getAllowedValues(), true)) { + $this->alignment = $value; + } return $this; } + /** + * @deprecated 0.13.0 Use the `getAlignment` method instead. + * + * @return string + * + * @codeCoverageIgnore + */ + public function getAlign() + { + return $this->getAlignment(); + } + + /** + * @deprecated 0.13.0 Use the `setAlignment` method instead. + * + * @param string $value + * + * @return self + * + * @codeCoverageIgnore + */ + public function setAlign($value = null) + { + return $this->setAlignment($value); + } + /** * Get width * @@ -574,7 +600,7 @@ public function setUnit($value = null) */ private function getTableOnlyProperty($property) { - if ($this->isFirstRow === false) { + if (false === $this->isFirstRow) { return $this->$property; } @@ -594,8 +620,8 @@ private function getTableOnlyProperty($property) */ private function setTableOnlyProperty($property, $value, $isNumeric = true) { - if ($this->isFirstRow === false) { - if ($isNumeric === true) { + if (false === $this->isFirstRow) { + if (true === $isNumeric) { $this->$property = $this->setNumericVal($value, $this->$property); } else { $this->$property = $value; diff --git a/src/PhpWord/Template.php b/src/PhpWord/Template.php index f6ad790eab..81e3186467 100644 --- a/src/PhpWord/Template.php +++ b/src/PhpWord/Template.php @@ -18,7 +18,9 @@ namespace PhpOffice\PhpWord; /** - * @deprecated 0.12.0 Use \PhpOffice\PhpWord\TemplateProcessor instead. + * @deprecated 0.12.0 Use `\PhpOffice\PhpWord\TemplateProcessor` instead. + * + * @codeCoverageIgnore */ class Template extends TemplateProcessor { diff --git a/src/PhpWord/Writer/AbstractWriter.php b/src/PhpWord/Writer/AbstractWriter.php index 599d8a6fdd..686a4b18de 100644 --- a/src/PhpWord/Writer/AbstractWriter.php +++ b/src/PhpWord/Writer/AbstractWriter.php @@ -97,6 +97,7 @@ abstract class AbstractWriter implements WriterInterface * Get PhpWord object * * @return \PhpOffice\PhpWord\PhpWord + * * @throws \PhpOffice\PhpWord\Exception\Exception */ public function getPhpWord() @@ -150,7 +151,9 @@ public function isUseDiskCaching() * * @param bool $value * @param string $directory + * * @return self + * * @throws \PhpOffice\PhpWord\Exception\Exception */ public function setUseDiskCaching($value = false, $directory = null) @@ -234,6 +237,7 @@ protected function getTempFile($filename) * Cleanup temporary file. * * @return void + * * @throws \PhpOffice\PhpWord\Exception\CopyFileException */ protected function cleanupTempFile() @@ -267,7 +271,9 @@ protected function clearTempDir() * Get ZipArchive object * * @param string $filename + * * @return \PhpOffice\PhpWord\Shared\ZipArchive + * * @throws \Exception */ protected function getZipArchive($filename) @@ -295,10 +301,13 @@ protected function getZipArchive($filename) /** * Open file for writing * + * @since 0.11.0 + * * @param string $filename + * * @return resource + * * @throws \Exception - * @since 0.11.0 */ protected function openFile($filename) { @@ -423,6 +432,7 @@ private function deleteDir($dir) * Get use disk caching status * * @deprecated 0.10.0 + * * @codeCoverageIgnore */ public function getUseDiskCaching() diff --git a/src/PhpWord/Writer/HTML.php b/src/PhpWord/Writer/HTML.php index 5c58acfc9d..7c9aaf1ff9 100644 --- a/src/PhpWord/Writer/HTML.php +++ b/src/PhpWord/Writer/HTML.php @@ -64,7 +64,9 @@ public function __construct(PhpWord $phpWord = null) * Save PhpWord to file. * * @param string $filename + * * @return void + * * @throws \PhpOffice\PhpWord\Exception\Exception */ public function save($filename = null) @@ -127,8 +129,10 @@ public function addNote($noteId, $noteMark) /** * Write document * - * @return string * @deprecated 0.11.0 + * + * @return string + * * @codeCoverageIgnore */ public function writeDocument() diff --git a/src/PhpWord/Writer/HTML/Part/AbstractPart.php b/src/PhpWord/Writer/HTML/Part/AbstractPart.php index 124cc15a8a..c63424fd1b 100644 --- a/src/PhpWord/Writer/HTML/Part/AbstractPart.php +++ b/src/PhpWord/Writer/HTML/Part/AbstractPart.php @@ -56,6 +56,7 @@ public function setParentWriter(AbstractWriter $writer = null) * Get parent writer * * @return \PhpOffice\PhpWord\Writer\AbstractWriter + * * @throws \PhpOffice\PhpWord\Exception\Exception */ public function getParentWriter() diff --git a/src/PhpWord/Writer/HTML/Style/Paragraph.php b/src/PhpWord/Writer/HTML/Style/Paragraph.php index 0d7df22d4e..4604e37481 100644 --- a/src/PhpWord/Writer/HTML/Style/Paragraph.php +++ b/src/PhpWord/Writer/HTML/Style/Paragraph.php @@ -38,10 +38,8 @@ public function write() $css = array(); // Alignment - $alignment = $style->getAlignment(); - if (!is_null($alignment)) { - $alignmentValue = $alignment->getValue(); - $css['text-align'] = $this->getValueIf(!is_null($alignmentValue), $alignmentValue); + if ('' !== $style->getAlignment()) { + $css['text-align'] = $style->getAlignment(); // todo: convert OpenXml to Html values } // Spacing diff --git a/src/PhpWord/Writer/PDF.php b/src/PhpWord/Writer/PDF.php index 178655633c..2d3429c524 100644 --- a/src/PhpWord/Writer/PDF.php +++ b/src/PhpWord/Writer/PDF.php @@ -39,6 +39,7 @@ class PDF * Instantiate a new renderer of the configured type within this container class * * @param \PhpOffice\PhpWord\PhpWord $phpWord + * * @throws \PhpOffice\PhpWord\Exception\Exception */ public function __construct(PhpWord $phpWord) diff --git a/src/PhpWord/Writer/PDF/AbstractRenderer.php b/src/PhpWord/Writer/PDF/AbstractRenderer.php index 572e4b1dfd..679d95002f 100644 --- a/src/PhpWord/Writer/PDF/AbstractRenderer.php +++ b/src/PhpWord/Writer/PDF/AbstractRenderer.php @@ -77,6 +77,7 @@ abstract class AbstractRenderer extends HTML * Create new instance * * @param PhpWord $phpWord PhpWord object + * * @throws \PhpOffice\PhpWord\Exception\Exception */ public function __construct(PhpWord $phpWord) @@ -169,7 +170,9 @@ public function setOrientation($value = 'default') * Save PhpWord to PDF file, pre-save * * @param string $filename Name of the file to save as + * * @return resource + * * @throws \PhpOffice\PhpWord\Exception\Exception */ protected function prepareForSave($filename = null) @@ -190,7 +193,9 @@ protected function prepareForSave($filename = null) * Save PhpWord to PDF file, post-save * * @param resource $fileHandle + * * @return void + * * @throws Exception */ protected function restoreStateAfterSave($fileHandle) diff --git a/src/PhpWord/Writer/RTF.php b/src/PhpWord/Writer/RTF.php index 58210c997f..ae1fa243b5 100644 --- a/src/PhpWord/Writer/RTF.php +++ b/src/PhpWord/Writer/RTF.php @@ -58,7 +58,9 @@ public function __construct(PhpWord $phpWord = null) * Save content to file. * * @param string $filename + * * @return void + * * @throws \PhpOffice\PhpWord\Exception\Exception */ public function save($filename = null) diff --git a/src/PhpWord/Writer/RTF/Style/Paragraph.php b/src/PhpWord/Writer/RTF/Style/Paragraph.php index fc74b1dd9d..aed59c9406 100644 --- a/src/PhpWord/Writer/RTF/Style/Paragraph.php +++ b/src/PhpWord/Writer/RTF/Style/Paragraph.php @@ -17,7 +17,7 @@ namespace PhpOffice\PhpWord\Writer\RTF\Style; -use PhpOffice\PhpWord\Style\Alignment; +use PhpOffice\PhpWord\SimpleType\ST_Jc; /** * RTF paragraph style writer @@ -48,13 +48,12 @@ public function write() } $alignments = array( - Alignment::ALIGN_LEFT => '\ql', - Alignment::ALIGN_RIGHT => '\qr', - Alignment::ALIGN_CENTER => '\qc', - Alignment::ALIGN_BOTH => '\qj', + ST_Jc::START => '\ql', + ST_Jc::END => '\qr', + ST_Jc::CENTER => '\qc', + ST_Jc::BOTH => '\qj', ); - $alignment = $style->getAlignment(); $spaceAfter = $style->getSpaceAfter(); $spaceBefore = $style->getSpaceBefore(); @@ -62,8 +61,8 @@ public function write() if ($this->nestedLevel == 0) { $content .= '\pard\nowidctlpar '; } - if (!is_null($alignment) && isset($alignments[$alignment->getValue()])) { - $content .= $alignments[$alignment->getValue()]; + if (isset($alignments[$style->getAlignment()])) { + $content .= $alignments[$style->getAlignment()]; } $content .= $this->getValueIf($spaceBefore !== null, '\sb' . $spaceBefore); $content .= $this->getValueIf($spaceAfter !== null, '\sa' . $spaceAfter); diff --git a/src/PhpWord/Writer/Word2007/Element/ParagraphAlignment.php b/src/PhpWord/Writer/Word2007/Element/ParagraphAlignment.php new file mode 100644 index 0000000000..1c2650e247 --- /dev/null +++ b/src/PhpWord/Writer/Word2007/Element/ParagraphAlignment.php @@ -0,0 +1,60 @@ +attributes['w:val'] = $value; + } + + /** + * @since 0.13.0 + * + * @return string + */ + final public function getName() + { + return $this->name; + } + + /** + * @since 0.13.0 + * + * @return string[] + */ + final public function getAttributes() + { + return $this->attributes; + } +} diff --git a/src/PhpWord/Writer/Word2007/Element/TableAlignment.php b/src/PhpWord/Writer/Word2007/Element/TableAlignment.php new file mode 100644 index 0000000000..c13be63240 --- /dev/null +++ b/src/PhpWord/Writer/Word2007/Element/TableAlignment.php @@ -0,0 +1,60 @@ +attributes['w:val'] = $value; + } + + /** + * @since 0.13.0 + * + * @return string + */ + final public function getName() + { + return $this->name; + } + + /** + * @since 0.13.0 + * + * @return string[] + */ + final public function getAttributes() + { + return $this->attributes; + } +} diff --git a/src/PhpWord/Writer/Word2007/Part/AbstractPart.php b/src/PhpWord/Writer/Word2007/Part/AbstractPart.php index e26853d737..71a268d92f 100644 --- a/src/PhpWord/Writer/Word2007/Part/AbstractPart.php +++ b/src/PhpWord/Writer/Word2007/Part/AbstractPart.php @@ -60,6 +60,7 @@ public function setParentWriter(AbstractWriter $writer = null) * Get parent writer * * @return \PhpOffice\PhpWord\Writer\AbstractWriter + * * @throws \PhpOffice\PhpWord\Exception\Exception */ public function getParentWriter() diff --git a/src/PhpWord/Writer/Word2007/Part/Numbering.php b/src/PhpWord/Writer/Word2007/Part/Numbering.php index bbb8eeb455..742aecc238 100644 --- a/src/PhpWord/Writer/Word2007/Part/Numbering.php +++ b/src/PhpWord/Writer/Word2007/Part/Numbering.php @@ -18,9 +18,9 @@ namespace PhpOffice\PhpWord\Writer\Word2007\Part; use PhpOffice\PhpWord\Shared\XMLWriter; +use PhpOffice\PhpWord\Style; use PhpOffice\PhpWord\Style\Numbering as NumberingStyle; use PhpOffice\PhpWord\Style\NumberingLevel; -use PhpOffice\PhpWord\Style; /** * Word2007 numbering part writer: word/numbering.xml @@ -108,13 +108,13 @@ private function writeLevel(XMLWriter $xmlWriter, NumberingLevel $level) // Numbering level properties $properties = array( - 'start' => 'start', - 'format' => 'numFmt', - 'restart' => 'lvlRestart', - 'pStyle' => 'pStyle', - 'suffix' => 'suff', - 'text' => 'lvlText', - 'align' => 'lvlJc' + 'start' => 'start', + 'format' => 'numFmt', + 'restart' => 'lvlRestart', + 'pStyle' => 'pStyle', + 'suffix' => 'suff', + 'text' => 'lvlText', + 'alignment' => 'lvlJc' ); foreach ($properties as $property => $nodeName) { $getMethod = "get{$property}"; diff --git a/src/PhpWord/Writer/Word2007/Part/Rels.php b/src/PhpWord/Writer/Word2007/Part/Rels.php index 9a7f444bd4..8327f5c9c5 100644 --- a/src/PhpWord/Writer/Word2007/Part/Rels.php +++ b/src/PhpWord/Writer/Word2007/Part/Rels.php @@ -108,7 +108,9 @@ private function writeMediaRel(XMLWriter $xmlWriter, $relId, $mediaRel) * @param string $type Relationship type * @param string $target Relationship target * @param string $targetMode Relationship target mode + * * @return void + * * @throws \PhpOffice\PhpWord\Exception\Exception */ private function writeRel(XMLWriter $xmlWriter, $relId, $type, $target, $targetMode = '') diff --git a/src/PhpWord/Writer/Word2007/Style/Frame.php b/src/PhpWord/Writer/Word2007/Style/Frame.php index 28ebeaf52e..ec6c1be589 100644 --- a/src/PhpWord/Writer/Word2007/Style/Frame.php +++ b/src/PhpWord/Writer/Word2007/Style/Frame.php @@ -18,8 +18,8 @@ namespace PhpOffice\PhpWord\Writer\Word2007\Style; use PhpOffice\PhpWord\Shared\XMLWriter; -use PhpOffice\PhpWord\Style\Alignment as AlignmentStyle; use PhpOffice\PhpWord\Style\Frame as FrameStyle; +use PhpOffice\PhpWord\Writer\Word2007\Element\ParagraphAlignment; /** * Frame style writer @@ -89,13 +89,21 @@ public function writeAlignment() $xmlWriter = $this->getXmlWriter(); $xmlWriter->startElement('w:pPr'); - $styleWriter = new Alignment($xmlWriter, new AlignmentStyle(array('value' => $style->getAlign()))); - $styleWriter->write(); - $xmlWriter->endElement(); // w:pPr + + if ('' !== $style->getAlignment()) { + $paragraphAlignment = new ParagraphAlignment($style->getAlignment()); + $xmlWriter->startElement($paragraphAlignment->getName()); + foreach ($paragraphAlignment->getAttributes() as $attributeName => $attributeValue) { + $xmlWriter->writeAttribute($attributeName, $attributeValue); + } + $xmlWriter->endElement(); + } + + $xmlWriter->endElement(); } /** - * Write alignment. + * Write wrap. * * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Style\Frame $style diff --git a/src/PhpWord/Writer/Word2007/Style/Paragraph.php b/src/PhpWord/Writer/Word2007/Style/Paragraph.php index f9a49bba2e..cd25fdc800 100644 --- a/src/PhpWord/Writer/Word2007/Style/Paragraph.php +++ b/src/PhpWord/Writer/Word2007/Style/Paragraph.php @@ -20,6 +20,7 @@ use PhpOffice\PhpWord\Shared\XMLWriter; use PhpOffice\PhpWord\Style; use PhpOffice\PhpWord\Style\Paragraph as ParagraphStyle; +use PhpOffice\PhpWord\Writer\Word2007\Element\ParagraphAlignment; /** * Paragraph style writer @@ -96,8 +97,17 @@ private function writeStyle() $xmlWriter->writeElementIf($styles['pagination']['keepLines'] === true, 'w:keepLines', 'w:val', '1'); $xmlWriter->writeElementIf($styles['pagination']['pageBreak'] === true, 'w:pageBreakBefore', 'w:val', '1'); + // Paragraph alignment + if ('' !== $styles['alignment']) { + $paragraphAlignment = new ParagraphAlignment($styles['alignment']); + $xmlWriter->startElement($paragraphAlignment->getName()); + foreach ($paragraphAlignment->getAttributes() as $attributeName => $attributeValue) { + $xmlWriter->writeAttribute($attributeName, $attributeValue); + } + $xmlWriter->endElement(); + } + // Child style: alignment, indentation, spacing, and shading - $this->writeChildStyle($xmlWriter, 'Alignment', $styles['alignment']); $this->writeChildStyle($xmlWriter, 'Indentation', $styles['indentation']); $this->writeChildStyle($xmlWriter, 'Spacing', $styles['spacing']); $this->writeChildStyle($xmlWriter, 'Shading', $styles['shading']); diff --git a/src/PhpWord/Writer/Word2007/Style/Table.php b/src/PhpWord/Writer/Word2007/Style/Table.php index 8bbad107c3..08eec00eb6 100644 --- a/src/PhpWord/Writer/Word2007/Style/Table.php +++ b/src/PhpWord/Writer/Word2007/Style/Table.php @@ -18,8 +18,8 @@ namespace PhpOffice\PhpWord\Writer\Word2007\Style; use PhpOffice\PhpWord\Shared\XMLWriter; -use PhpOffice\PhpWord\Style\Alignment as AlignmentStyle; use PhpOffice\PhpWord\Style\Table as TableStyle; +use PhpOffice\PhpWord\Writer\Word2007\Element\TableAlignment; /** * Table style writer @@ -50,7 +50,7 @@ public function write() $xmlWriter->startElement('w:tblStyle'); $xmlWriter->writeAttribute('w:val', $style); $xmlWriter->endElement(); - if ($this->width !== null) { + if (null !== $this->width) { $this->writeWidth($xmlWriter, $this->width, 'pct'); } $xmlWriter->endElement(); @@ -69,9 +69,15 @@ private function writeStyle(XMLWriter $xmlWriter, TableStyle $style) // w:tblPr $xmlWriter->startElement('w:tblPr'); - // Alignment - $styleWriter = new Alignment($xmlWriter, new AlignmentStyle(array('value' => $style->getAlign()))); - $styleWriter->write(); + // Table alignment + if ('' !== $style->getAlignment()) { + $tableAlignment = new TableAlignment($style->getAlignment()); + $xmlWriter->startElement($tableAlignment->getName()); + foreach ($tableAlignment->getAttributes() as $attributeName => $attributeValue) { + $xmlWriter->writeAttribute($attributeName, $attributeValue); + } + $xmlWriter->endElement(); + } $this->writeWidth($xmlWriter, $style->getWidth(), $style->getUnit()); $this->writeMargin($xmlWriter, $style); @@ -174,7 +180,7 @@ private function writeFirstRow(XMLWriter $xmlWriter, TableStyle $style) */ private function writeShading(XMLWriter $xmlWriter, TableStyle $style) { - if ($style->getShading() !== null) { + if (null !== $style->getShading()) { $xmlWriter->startElement('w:tcPr'); $styleWriter = new Shading($xmlWriter, $style->getShading()); diff --git a/tests/PhpWord/Tests/Element/CheckBoxTest.php b/tests/PhpWord/Tests/Element/CheckBoxTest.php index 942c908df5..0e9b968240 100644 --- a/tests/PhpWord/Tests/Element/CheckBoxTest.php +++ b/tests/PhpWord/Tests/Element/CheckBoxTest.php @@ -18,6 +18,7 @@ namespace PhpOffice\PhpWord\Tests\Element; use PhpOffice\PhpWord\Element\CheckBox; +use PhpOffice\PhpWord\SimpleType\ST_Jc; use PhpOffice\PhpWord\Style\Font; /** @@ -81,7 +82,7 @@ public function testParagraph() $oCheckBox = new CheckBox(htmlspecialchars('chkBox', ENT_COMPAT, 'UTF-8'), htmlspecialchars('CheckBox', ENT_COMPAT, 'UTF-8'), 'fontStyle', 'paragraphStyle'); $this->assertEquals('paragraphStyle', $oCheckBox->getParagraphStyle()); - $oCheckBox->setParagraphStyle(array('align' => 'center', 'spaceAfter' => 100)); + $oCheckBox->setParagraphStyle(array('alignment' => ST_Jc::CENTER, 'spaceAfter' => 100)); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Paragraph', $oCheckBox->getParagraphStyle()); } } diff --git a/tests/PhpWord/Tests/Element/ImageTest.php b/tests/PhpWord/Tests/Element/ImageTest.php index e73abb2aa8..7e8ef94c81 100644 --- a/tests/PhpWord/Tests/Element/ImageTest.php +++ b/tests/PhpWord/Tests/Element/ImageTest.php @@ -18,6 +18,7 @@ namespace PhpOffice\PhpWord\Tests\Element; use PhpOffice\PhpWord\Element\Image; +use PhpOffice\PhpWord\SimpleType\ST_Jc; /** * Test class for PhpOffice\PhpWord\Element\Image @@ -54,7 +55,7 @@ public function testConstructWithStyle() array( 'width' => 210, 'height' => 210, - 'align' => 'center', + 'alignment' => ST_Jc::CENTER, 'wrappingStyle' => \PhpOffice\PhpWord\Style\Image::WRAPPING_STYLE_BEHIND, ) ); @@ -97,7 +98,7 @@ public function testStyle() { $oImage = new Image( __DIR__ . '/../_files/images/earth.jpg', - array('height' => 210, 'align' => 'center') + array('height' => 210, 'alignment' => ST_Jc::CENTER) ); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Image', $oImage->getStyle()); diff --git a/tests/PhpWord/Tests/Element/PreserveTextTest.php b/tests/PhpWord/Tests/Element/PreserveTextTest.php index 05cfded377..36a0e572de 100644 --- a/tests/PhpWord/Tests/Element/PreserveTextTest.php +++ b/tests/PhpWord/Tests/Element/PreserveTextTest.php @@ -18,6 +18,7 @@ namespace PhpOffice\PhpWord\Tests\Element; use PhpOffice\PhpWord\Element\PreserveText; +use PhpOffice\PhpWord\SimpleType\ST_Jc; /** * Test class for PhpOffice\PhpWord\Element\PreserveText @@ -58,7 +59,7 @@ public function testConstructWithArray() $oPreserveText = new PreserveText( htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), array('size' => 16, 'color' => '1B2232'), - array('alignment' => 'center') + array('alignment' => ST_Jc::CENTER) ); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Font', $oPreserveText->getFontStyle()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Paragraph', $oPreserveText->getParagraphStyle()); diff --git a/tests/PhpWord/Tests/Element/TextTest.php b/tests/PhpWord/Tests/Element/TextTest.php index 3112dbfa6a..34f742a2a1 100644 --- a/tests/PhpWord/Tests/Element/TextTest.php +++ b/tests/PhpWord/Tests/Element/TextTest.php @@ -18,6 +18,7 @@ namespace PhpOffice\PhpWord\Tests\Element; use PhpOffice\PhpWord\Element\Text; +use PhpOffice\PhpWord\SimpleType\ST_Jc; use PhpOffice\PhpWord\Style\Font; /** @@ -80,7 +81,7 @@ public function testParagraph() $oText = new Text(htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), 'fontStyle', 'paragraphStyle'); $this->assertEquals('paragraphStyle', $oText->getParagraphStyle()); - $oText->setParagraphStyle(array('align' => 'center', 'spaceAfter' => 100)); + $oText->setParagraphStyle(array('alignment' => ST_Jc::CENTER, 'spaceAfter' => 100)); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Paragraph', $oText->getParagraphStyle()); } } diff --git a/tests/PhpWord/Tests/Style/FontTest.php b/tests/PhpWord/Tests/Style/FontTest.php index 23b2eae4de..24255c390a 100644 --- a/tests/PhpWord/Tests/Style/FontTest.php +++ b/tests/PhpWord/Tests/Style/FontTest.php @@ -18,6 +18,7 @@ namespace PhpOffice\PhpWord\Tests\Style; use PhpOffice\PhpWord\PhpWord; +use PhpOffice\PhpWord\SimpleType\ST_Jc; use PhpOffice\PhpWord\Style\Font; use PhpOffice\PhpWord\Tests\TestHelperDOCX; @@ -41,7 +42,7 @@ public function tearDown() */ public function testInitiation() { - $object = new Font(htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), array('align' => 'both')); + $object = new Font(htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), array('alignment' => ST_Jc::BOTH)); $this->assertEquals(htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), $object->getStyleType()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Paragraph', $object->getParagraphStyle()); @@ -157,7 +158,7 @@ public function testLineHeight() */ public function testLineHeightFloatval() { - $object = new Font(null, array('align' => 'center')); + $object = new Font(null, array('alignment' => ST_Jc::CENTER)); $object->setLineHeight('1.5pt'); $this->assertEquals(1.5, $object->getLineHeight()); } diff --git a/tests/PhpWord/Tests/Style/ImageTest.php b/tests/PhpWord/Tests/Style/ImageTest.php index 08ec9a99c5..741bd4b366 100644 --- a/tests/PhpWord/Tests/Style/ImageTest.php +++ b/tests/PhpWord/Tests/Style/ImageTest.php @@ -17,6 +17,7 @@ namespace PhpOffice\PhpWord\Tests\Style; +use PhpOffice\PhpWord\SimpleType\ST_Jc; use PhpOffice\PhpWord\Style\Image; /** @@ -37,7 +38,7 @@ public function testSetGetNormal() $properties = array( 'width' => 200, 'height' => 200, - 'align' => 'left', + 'alignment' => ST_Jc::START, 'marginTop' => 240, 'marginLeft' => 240, 'wrappingStyle' => 'inline', @@ -60,7 +61,7 @@ public function testSetStyleValue() $properties = array( 'width' => 200, 'height' => 200, - 'align' => 'left', + 'alignment' => ST_Jc::START, 'marginTop' => 240, 'marginLeft' => 240, 'positioning' => \PhpOffice\PhpWord\Style\Image::POSITION_ABSOLUTE, diff --git a/tests/PhpWord/Tests/Style/NumberingLevelTest.php b/tests/PhpWord/Tests/Style/NumberingLevelTest.php index 69864bdcfd..e752205750 100644 --- a/tests/PhpWord/Tests/Style/NumberingLevelTest.php +++ b/tests/PhpWord/Tests/Style/NumberingLevelTest.php @@ -17,6 +17,7 @@ namespace PhpOffice\PhpWord\Tests\Style; +use PhpOffice\PhpWord\SimpleType\ST_Jc; use PhpOffice\PhpWord\Style\NumberingLevel; /** @@ -34,19 +35,19 @@ public function testSetGetNormal() $object = new NumberingLevel(); $attributes = array( - 'level' => 1, - 'start' => 1, - 'format' => 'decimal', - 'restart' => 1, - 'pStyle' => 'pStyle', - 'suffix' => 'space', - 'text' => '%1.', - 'align' => 'left', - 'left' => 360, - 'hanging' => 360, - 'tabPos' => 360, - 'font' => 'Arial', - 'hint' => 'default', + 'level' => 1, + 'start' => 1, + 'format' => 'decimal', + 'restart' => 1, + 'pStyle' => 'pStyle', + 'suffix' => 'space', + 'text' => '%1.', + 'alignment' => ST_Jc::START, + 'left' => 360, + 'hanging' => 360, + 'tabPos' => 360, + 'font' => 'Arial', + 'hint' => 'default', ); foreach ($attributes as $key => $value) { $set = "set{$key}"; diff --git a/tests/PhpWord/Tests/Style/TableTest.php b/tests/PhpWord/Tests/Style/TableTest.php index e63d86786e..f81211a6e2 100644 --- a/tests/PhpWord/Tests/Style/TableTest.php +++ b/tests/PhpWord/Tests/Style/TableTest.php @@ -17,6 +17,7 @@ namespace PhpOffice\PhpWord\Tests\Style; +use PhpOffice\PhpWord\SimpleType\ST_JcTable; use PhpOffice\PhpWord\Style\Table; /** @@ -74,7 +75,7 @@ public function testSetGetNormal() 'cellMarginLeft' => 240, 'cellMarginRight' => 240, 'cellMarginBottom' => 240, - 'align' => 'center', + 'alignment' => ST_JcTable::CENTER, 'width' => 100, 'unit' => 'pct', ); diff --git a/tests/PhpWord/Tests/Style/TextBoxTest.php b/tests/PhpWord/Tests/Style/TextBoxTest.php index eb1a31a4d3..3334f1e5d6 100644 --- a/tests/PhpWord/Tests/Style/TextBoxTest.php +++ b/tests/PhpWord/Tests/Style/TextBoxTest.php @@ -17,6 +17,7 @@ namespace PhpOffice\PhpWord\Tests\Style; +use PhpOffice\PhpWord\SimpleType\ST_Jc; use PhpOffice\PhpWord\Style\TextBox; /** @@ -37,7 +38,7 @@ public function testSetGetNormal() $properties = array( 'width' => 200, 'height' => 200, - 'align' => 'left', + 'alignment' => ST_Jc::START, 'marginTop' => 240, 'marginLeft' => 240, 'wrappingStyle' => 'inline', @@ -71,7 +72,7 @@ public function testSetStyleValue() $properties = array( 'width' => 200, 'height' => 200, - 'align' => 'left', + 'alignment' => ST_Jc::START, 'marginTop' => 240, 'marginLeft' => 240, 'wrappingStyle' => 'inline', @@ -132,10 +133,11 @@ public function testSetGetHeight() */ public function testSetGetAlign() { - $expected = 'left'; - $object = new TextBox(); - $object->setAlign($expected); - $this->assertEquals($expected, $object->getAlign()); + $textBox = new TextBox(); + + $expectedAlignment = ST_Jc::START; + $textBox->setAlignment($expectedAlignment); + $this->assertEquals($expectedAlignment, $textBox->getAlignment()); } /** diff --git a/tests/PhpWord/Tests/StyleTest.php b/tests/PhpWord/Tests/StyleTest.php index 261de31cb2..b2d02242cd 100644 --- a/tests/PhpWord/Tests/StyleTest.php +++ b/tests/PhpWord/Tests/StyleTest.php @@ -17,6 +17,7 @@ namespace PhpOffice\PhpWord\Tests; +use PhpOffice\PhpWord\SimpleType\ST_Jc; use PhpOffice\PhpWord\Style; /** @@ -44,7 +45,7 @@ class StyleTest extends \PHPUnit_Framework_TestCase */ public function testStyles() { - $paragraph = array('align' => 'center'); + $paragraph = array('alignment' => ST_Jc::CENTER); $font = array('italic' => true, '_bold' => true); $table = array('bgColor' => 'CCCCCC'); $styles = array( @@ -82,7 +83,7 @@ public function testStyles() */ public function testDefaultParagraphStyle() { - $paragraph = array('align' => 'center'); + $paragraph = array('alignment' => ST_Jc::CENTER); Style::setDefaultParagraphStyle($paragraph); diff --git a/tests/PhpWord/Tests/TemplateProcessorTest.php b/tests/PhpWord/Tests/TemplateProcessorTest.php index f75f7d3b05..3683bb7949 100644 --- a/tests/PhpWord/Tests/TemplateProcessorTest.php +++ b/tests/PhpWord/Tests/TemplateProcessorTest.php @@ -70,11 +70,13 @@ final public function testTemplateCanBeSavedInTemporaryLocation() /** * XSL stylesheet can be applied. * - * @param string $actualDocumentFqfn - * @throws \Exception + * @test * @covers ::applyXslStyleSheet * @depends testTemplateCanBeSavedInTemporaryLocation - * @test + * + * @param string $actualDocumentFqfn + * + * @throws \Exception */ final public function testXslStyleSheetCanBeApplied($actualDocumentFqfn) { diff --git a/tests/PhpWord/Tests/Writer/HTMLTest.php b/tests/PhpWord/Tests/Writer/HTMLTest.php index 7bdfc71085..eca06326f8 100644 --- a/tests/PhpWord/Tests/Writer/HTMLTest.php +++ b/tests/PhpWord/Tests/Writer/HTMLTest.php @@ -17,6 +17,7 @@ namespace PhpOffice\PhpWord\Tests\Writer; use PhpOffice\PhpWord\PhpWord; +use PhpOffice\PhpWord\SimpleType\ST_Jc; use PhpOffice\PhpWord\Writer\HTML; /** @@ -69,7 +70,7 @@ public function testSave() 'Font', array('name' => 'Verdana', 'size' => 11, 'color' => 'FF0000', 'fgColor' => 'FF0000') ); - $phpWord->addParagraphStyle('Paragraph', array('align' => 'center', 'spaceAfter' => 20, 'spaceBefore' => 20)); + $phpWord->addParagraphStyle('Paragraph', array('alignment' => ST_Jc::CENTER, 'spaceAfter' => 20, 'spaceBefore' => 20)); $section = $phpWord->addSection(); $section->addText(htmlspecialchars('Test 1', ENT_COMPAT, 'UTF-8'), 'Font', 'Paragraph'); $section->addTextBreak(); @@ -90,7 +91,7 @@ public function testSave() $section = $phpWord->addSection(); - $textrun = $section->addTextRun(array('align' => 'center')); + $textrun = $section->addTextRun(array('alignment' => ST_Jc::CENTER)); $textrun->addText(htmlspecialchars('Test 3', ENT_COMPAT, 'UTF-8')); $textrun->addTextBreak(); diff --git a/tests/PhpWord/Tests/Writer/ODText/Part/ContentTest.php b/tests/PhpWord/Tests/Writer/ODText/Part/ContentTest.php index 33ffd176b4..b34737c9a3 100644 --- a/tests/PhpWord/Tests/Writer/ODText/Part/ContentTest.php +++ b/tests/PhpWord/Tests/Writer/ODText/Part/ContentTest.php @@ -17,6 +17,7 @@ namespace PhpOffice\PhpWord\Tests\Writer\ODText\Part; use PhpOffice\PhpWord\PhpWord; +use PhpOffice\PhpWord\SimpleType\ST_Jc; use PhpOffice\PhpWord\Tests\TestHelperDOCX; /** @@ -51,7 +52,7 @@ public function testWriteContent() $phpWord->setDefaultFontName('Verdana'); $phpWord->addFontStyle('Font', array('size' => 11)); - $phpWord->addParagraphStyle('Paragraph', array('align' => 'center')); + $phpWord->addParagraphStyle('Paragraph', array('alignment' => ST_Jc::CENTER)); $phpWord->addTableStyle('tblStyle', array('width' => 100)); $section = $phpWord->addSection(array('colsNum' => 2)); diff --git a/tests/PhpWord/Tests/Writer/ODTextTest.php b/tests/PhpWord/Tests/Writer/ODTextTest.php index 8bf8eb020b..b474ae0463 100644 --- a/tests/PhpWord/Tests/Writer/ODTextTest.php +++ b/tests/PhpWord/Tests/Writer/ODTextTest.php @@ -17,6 +17,7 @@ namespace PhpOffice\PhpWord\Tests\Writer; use PhpOffice\PhpWord\PhpWord; +use PhpOffice\PhpWord\SimpleType\ST_Jc; use PhpOffice\PhpWord\Writer\ODText; /** @@ -71,7 +72,7 @@ public function testSave() $phpWord = new PhpWord(); $phpWord->addFontStyle('Font', array('size' => 11)); - $phpWord->addParagraphStyle('Paragraph', array('align' => 'center')); + $phpWord->addParagraphStyle('Paragraph', array('alignment' => ST_Jc::CENTER)); $section = $phpWord->addSection(); $section->addText(htmlspecialchars('Test 1', ENT_COMPAT, 'UTF-8'), 'Font'); $section->addTextBreak(); diff --git a/tests/PhpWord/Tests/Writer/RTFTest.php b/tests/PhpWord/Tests/Writer/RTFTest.php index a469e9360d..ffa70871d8 100644 --- a/tests/PhpWord/Tests/Writer/RTFTest.php +++ b/tests/PhpWord/Tests/Writer/RTFTest.php @@ -17,6 +17,7 @@ namespace PhpOffice\PhpWord\Tests\Writer; use PhpOffice\PhpWord\PhpWord; +use PhpOffice\PhpWord\SimpleType\ST_Jc; use PhpOffice\PhpWord\Writer\RTF; /** @@ -62,7 +63,7 @@ public function testSave() 'Font', array('name' => 'Verdana', 'size' => 11, 'color' => 'FF0000', 'fgColor' => '00FF00') ); - $phpWord->addParagraphStyle('Paragraph', array('align' => 'center')); + $phpWord->addParagraphStyle('Paragraph', array('alignment' => ST_Jc::CENTER)); $section = $phpWord->addSection(); $section->addText(htmlspecialchars('Test 1', ENT_COMPAT, 'UTF-8'), 'Font', 'Paragraph'); $section->addTextBreak(); diff --git a/tests/PhpWord/Tests/Writer/Word2007/Part/DocumentTest.php b/tests/PhpWord/Tests/Writer/Word2007/Part/DocumentTest.php index 6c68ec7594..8ad43b7e51 100644 --- a/tests/PhpWord/Tests/Writer/Word2007/Part/DocumentTest.php +++ b/tests/PhpWord/Tests/Writer/Word2007/Part/DocumentTest.php @@ -17,6 +17,7 @@ namespace PhpOffice\PhpWord\Tests\Writer\Word2007\Part; use PhpOffice\PhpWord\PhpWord; +use PhpOffice\PhpWord\SimpleType\ST_Jc; use PhpOffice\PhpWord\Style\Font; use PhpOffice\PhpWord\Tests\TestHelperDOCX; @@ -90,7 +91,7 @@ public function testElements() 'borderColor' => '#FF0', ) ); - $section->addTextBox(array('wrappingStyle' => 'tight', 'positioning' => 'absolute', 'align' => 'center')); + $section->addTextBox(array('wrappingStyle' => 'tight', 'positioning' => 'absolute', 'alignment' => ST_Jc::CENTER)); $section->addListItemRun()->addText(htmlspecialchars('List item run 1', ENT_COMPAT, 'UTF-8')); $section->addField( 'DATE', @@ -157,7 +158,7 @@ public function testElementStyles() $phpWord->addParagraphStyle( 'pStyle', array( - 'align' => 'center', + 'alignment' => ST_Jc::CENTER, 'tabs' => $tabs, 'shading' => array('fill' => 'FFFF99'), 'borderSize' => 4, @@ -176,11 +177,11 @@ public function testElementStyles() ); // Style #2 $phpWord->addTitleStyle(1, array('color' => '333333', 'doubleStrikethrough' => true)); // Style #3 $phpWord->addTableStyle('tStyle', array('borderSize' => 1)); - $fontStyle = new Font('text', array('align' => 'center')); + $fontStyle = new Font('text', array('alignment' => ST_Jc::CENTER)); $section = $phpWord->addSection(); $section->addListItem(htmlspecialchars('List Item', ENT_COMPAT, 'UTF-8'), 0, null, null, 'pStyle'); // Style #5 - $section->addObject($objectSrc, array('align' => 'center')); + $section->addObject($objectSrc, array('alignment' => ST_Jc::CENTER)); $section->addTOC($fontStyle); $section->addTitle(htmlspecialchars('Title 1', ENT_COMPAT, 'UTF-8'), 1); $section->addTOC('fStyle'); @@ -230,7 +231,7 @@ public function testWriteText() public function testWriteTextRun() { $pStyle = 'pStyle'; - $aStyle = array('align' => 'justify', 'spaceBefore' => 120, 'spaceAfter' => 120); + $aStyle = array('alignment' => ST_Jc::BOTH, 'spaceBefore' => 120, 'spaceAfter' => 120); $imageSrc = __DIR__ . '/../../../_files/images/earth.jpg'; $phpWord = new PhpWord(); @@ -241,7 +242,7 @@ public function testWriteTextRun() $textrun->addTextBreak(); $textrun = $section->addTextRun($aStyle); $textrun->addLink('https://github.com/PHPOffice/PHPWord'); - $textrun->addImage($imageSrc, array('align' => 'center')); + $textrun->addImage($imageSrc, array('alignment' => ST_Jc::CENTER)); $textrun->addFootnote(); $doc = TestHelperDOCX::getDocument($phpWord); @@ -258,7 +259,7 @@ public function testWriteLink() $section = $phpWord->addSection(); $fontStyleArray = array('bold' => true); $fontStyleName = 'Font Style'; - $paragraphStyleArray = array('align' => 'center'); + $paragraphStyleArray = array('alignment' => ST_Jc::CENTER); $paragraphStyleName = 'Paragraph Style'; $expected = 'PHPWord on GitHub'; @@ -292,7 +293,7 @@ public function testWritePreserveText() $footer = $section->addFooter(); $fontStyleArray = array('bold' => true); $fontStyleName = 'Font'; - $paragraphStyleArray = array('align' => 'right'); + $paragraphStyleArray = array('alignment' => ST_Jc::END); $paragraphStyleName = 'Paragraph'; $footer->addPreserveText(htmlspecialchars('Page {PAGE}', ENT_COMPAT, 'UTF-8')); @@ -337,7 +338,7 @@ public function testWriteTextBreak() public function testWriteImage() { $phpWord = new PhpWord(); - $styles = array('align' => 'left', 'width' => 40, 'height' => 40, 'marginTop' => -1, 'marginLeft' => -1); + $styles = array('alignment' => ST_Jc::START, 'width' => 40, 'height' => 40, 'marginTop' => -1, 'marginLeft' => -1); $wraps = array('inline', 'behind', 'infront', 'square', 'tight'); $section = $phpWord->addSection(); foreach ($wraps as $wrap) { @@ -421,7 +422,7 @@ public function testWriteParagraphStyle() $phpWord = new PhpWord(); $section = $phpWord->addSection(); $attributes = array( - 'alignment' => 'right', + 'alignment' => ST_Jc::END, 'widowControl' => false, 'keepNext' => true, 'keepLines' => true, diff --git a/tests/PhpWord/Tests/Writer/Word2007/Part/FootnotesTest.php b/tests/PhpWord/Tests/Writer/Word2007/Part/FootnotesTest.php index 86e87dd123..67c2909fb1 100644 --- a/tests/PhpWord/Tests/Writer/Word2007/Part/FootnotesTest.php +++ b/tests/PhpWord/Tests/Writer/Word2007/Part/FootnotesTest.php @@ -17,6 +17,7 @@ namespace PhpOffice\PhpWord\Tests\Writer\Word2007\Part; use PhpOffice\PhpWord\PhpWord; +use PhpOffice\PhpWord\SimpleType\ST_Jc; use PhpOffice\PhpWord\Tests\TestHelperDOCX; /** @@ -40,14 +41,14 @@ public function tearDown() public function testWriteFootnotes() { $phpWord = new PhpWord(); - $phpWord->addParagraphStyle('pStyle', array('align' => 'left')); + $phpWord->addParagraphStyle('pStyle', array('alignment' => ST_Jc::START)); $section = $phpWord->addSection(); $section->addText(htmlspecialchars('Text', ENT_COMPAT, 'UTF-8')); $footnote1 = $section->addFootnote('pStyle'); $footnote1->addText(htmlspecialchars('Footnote', ENT_COMPAT, 'UTF-8')); $footnote1->addTextBreak(); $footnote1->addLink('https://github.com/PHPOffice/PHPWord'); - $footnote2 = $section->addEndnote(array('align' => 'left')); + $footnote2 = $section->addEndnote(array('alignment' => ST_Jc::START)); $footnote2->addText(htmlspecialchars('Endnote', ENT_COMPAT, 'UTF-8')); $doc = TestHelperDOCX::getDocument($phpWord); diff --git a/tests/PhpWord/Tests/Writer/Word2007/Part/NumberingTest.php b/tests/PhpWord/Tests/Writer/Word2007/Part/NumberingTest.php index 4f67571b42..0d4b5e05ca 100644 --- a/tests/PhpWord/Tests/Writer/Word2007/Part/NumberingTest.php +++ b/tests/PhpWord/Tests/Writer/Word2007/Part/NumberingTest.php @@ -17,6 +17,7 @@ namespace PhpOffice\PhpWord\Tests\Writer\Word2007\Part; use PhpOffice\PhpWord\PhpWord; +use PhpOffice\PhpWord\SimpleType\ST_Jc; use PhpOffice\PhpWord\Tests\TestHelperDOCX; /** @@ -50,17 +51,17 @@ public function testWriteNumbering() 'type' => 'multilevel', 'levels' => array( array( - 'start' => 1, - 'format' => 'decimal', - 'restart' => 1, - 'suffix' => 'space', - 'text' => '%1.', - 'align' => 'left', - 'left' => 360, - 'hanging' => 360, - 'tabPos' => 360, - 'font' => 'Arial', - 'hint' => 'default', + 'start' => 1, + 'format' => 'decimal', + 'restart' => 1, + 'suffix' => 'space', + 'text' => '%1.', + 'alignment' => ST_Jc::START, + 'left' => 360, + 'hanging' => 360, + 'tabPos' => 360, + 'font' => 'Arial', + 'hint' => 'default', ), ) ) diff --git a/tests/PhpWord/Tests/Writer/Word2007/Part/StylesTest.php b/tests/PhpWord/Tests/Writer/Word2007/Part/StylesTest.php index 36d65af615..225aab6673 100644 --- a/tests/PhpWord/Tests/Writer/Word2007/Part/StylesTest.php +++ b/tests/PhpWord/Tests/Writer/Word2007/Part/StylesTest.php @@ -17,6 +17,7 @@ namespace PhpOffice\PhpWord\Tests\Writer\Word2007\Part; use PhpOffice\PhpWord\PhpWord; +use PhpOffice\PhpWord\SimpleType\ST_Jc; use PhpOffice\PhpWord\Tests\TestHelperDOCX; /** @@ -42,20 +43,12 @@ public function testWriteStyles() { $phpWord = new PhpWord(); - $pStyle = array('align' => 'both'); + $pStyle = array('alignment' => ST_Jc::BOTH); $pBase = array('basedOn' => 'Normal'); $pNew = array('basedOn' => 'Base Style', 'next' => 'Normal'); $rStyle = array('size' => 20); - $tStyle = array( - 'bgColor' => 'FF0000', - 'cellMargin' => 120, - 'borderSize' => 120, - ); - $firstRowStyle = array( - 'bgColor' => '0000FF', - 'borderSize' => 120, - 'borderColor' => '00FF00', - ); + $tStyle = array('bgColor' => 'FF0000', 'cellMargin' => 120, 'borderSize' => 120); + $firstRowStyle = array('bgColor' => '0000FF', 'borderSize' => 120, 'borderColor' => '00FF00'); $phpWord->setDefaultParagraphStyle($pStyle); $phpWord->addParagraphStyle('Base Style', $pBase); $phpWord->addParagraphStyle('New Style', $pNew); diff --git a/tests/PhpWord/Tests/Writer/Word2007/StyleTest.php b/tests/PhpWord/Tests/Writer/Word2007/StyleTest.php index 8dd229c311..1650e115e3 100644 --- a/tests/PhpWord/Tests/Writer/Word2007/StyleTest.php +++ b/tests/PhpWord/Tests/Writer/Word2007/StyleTest.php @@ -29,7 +29,7 @@ class StyleTest extends \PHPUnit_Framework_TestCase public function testEmptyStyles() { $styles = array( - 'Alignment', 'Cell', 'Font', 'Image', 'Indentation', 'LineNumbering', + 'Cell', 'Font', 'Image', 'Indentation', 'LineNumbering', 'Paragraph', 'Row', 'Section', 'Shading', 'Spacing', 'Tab', 'Table', 'TextBox', 'Line', 'Shape', 'Frame', 'Outline', 'Fill', 'Shadow', 'Extrusion', ); diff --git a/tests/PhpWord/Tests/Writer/Word2007Test.php b/tests/PhpWord/Tests/Writer/Word2007Test.php index c08f279f5f..b6a5d08585 100644 --- a/tests/PhpWord/Tests/Writer/Word2007Test.php +++ b/tests/PhpWord/Tests/Writer/Word2007Test.php @@ -17,6 +17,7 @@ namespace PhpOffice\PhpWord\Tests\Writer; use PhpOffice\PhpWord\PhpWord; +use PhpOffice\PhpWord\SimpleType\ST_Jc; use PhpOffice\PhpWord\Tests\TestHelperDOCX; use PhpOffice\PhpWord\Writer\Word2007; @@ -77,7 +78,7 @@ public function testSave() $remoteImage = 'http://php.net//images/logos/php-med-trans-light.gif'; $phpWord = new PhpWord(); $phpWord->addFontStyle('Font', array('size' => 11)); - $phpWord->addParagraphStyle('Paragraph', array('align' => 'center')); + $phpWord->addParagraphStyle('Paragraph', array('alignment' => ST_Jc::CENTER)); $section = $phpWord->addSection(); $section->addText(htmlspecialchars('Test 1', ENT_COMPAT, 'UTF-8'), 'Font', 'Paragraph'); $section->addTextBreak(); diff --git a/tests/PhpWord/Tests/_includes/TestHelperDOCX.php b/tests/PhpWord/Tests/_includes/TestHelperDOCX.php index 49a7e716e4..b27f9a994b 100644 --- a/tests/PhpWord/Tests/_includes/TestHelperDOCX.php +++ b/tests/PhpWord/Tests/_includes/TestHelperDOCX.php @@ -41,7 +41,9 @@ class TestHelperDOCX * * @param \PhpOffice\PhpWord\PhpWord $phpWord * @param string $writerName + * * @return \PhpOffice\PhpWord\Tests\XmlDocument + * * @throws \PhpOffice\PhpWord\Exception\CreateTemporaryFileException */ public static function getDocument(PhpWord $phpWord, $writerName = 'Word2007') From 505cc76406120b27e38ab399a997db7c11b41e13 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 10 Oct 2015 19:22:19 +0400 Subject: [PATCH 48/99] Fixed build. --- CHANGELOG.md | 4 ++-- docs/styles.rst | 8 +++---- samples/Sample_01_SimpleText.php | 2 +- samples/Sample_08_ParagraphPagination.php | 2 +- samples/Sample_09_Tables.php | 8 +++---- samples/Sample_12_HeaderFooter.php | 4 ++-- samples/Sample_13_Images.php | 2 +- samples/Sample_21_TableRowRules.php | 4 ++-- samples/Sample_25_TextBox.php | 2 +- samples/Sample_27_Field.php | 2 +- samples/Sample_36_RTL.php | 2 +- src/PhpWord/Reader/RTF/Document.php | 4 ++-- src/PhpWord/SimpleType/{ST_Jc.php => Jc.php} | 2 +- .../{ST_JcTable.php => JcTable.php} | 2 +- src/PhpWord/Style/Frame.php | 4 ++-- src/PhpWord/Style/Paragraph.php | 4 ++-- src/PhpWord/Style/Table.php | 4 ++-- src/PhpWord/Writer/RTF/Style/Paragraph.php | 10 ++++----- .../Word2007/Element/ParagraphAlignment.php | 2 +- .../Word2007/Element/TableAlignment.php | 2 +- tests/PhpWord/Tests/Element/CheckBoxTest.php | 4 ++-- tests/PhpWord/Tests/Element/ImageTest.php | 6 ++--- .../Tests/Element/PreserveTextTest.php | 4 ++-- tests/PhpWord/Tests/Element/TextTest.php | 4 ++-- tests/PhpWord/Tests/Style/FontTest.php | 6 ++--- tests/PhpWord/Tests/Style/ImageTest.php | 6 ++--- .../Tests/Style/NumberingLevelTest.php | 4 ++-- tests/PhpWord/Tests/Style/TableTest.php | 4 ++-- tests/PhpWord/Tests/Style/TextBoxTest.php | 8 +++---- tests/PhpWord/Tests/StyleTest.php | 6 ++--- tests/PhpWord/Tests/Writer/HTMLTest.php | 6 ++--- .../Tests/Writer/ODText/Part/ContentTest.php | 4 ++-- tests/PhpWord/Tests/Writer/ODTextTest.php | 4 ++-- tests/PhpWord/Tests/Writer/RTFTest.php | 4 ++-- .../Writer/Word2007/Part/DocumentTest.php | 22 +++++++++---------- .../Writer/Word2007/Part/FootnotesTest.php | 6 ++--- .../Writer/Word2007/Part/NumberingTest.php | 4 ++-- .../Tests/Writer/Word2007/Part/StylesTest.php | 4 ++-- tests/PhpWord/Tests/Writer/Word2007Test.php | 4 ++-- 39 files changed, 92 insertions(+), 92 deletions(-) rename src/PhpWord/SimpleType/{ST_Jc.php => Jc.php} (98%) rename src/PhpWord/SimpleType/{ST_JcTable.php => JcTable.php} (97%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e6385ba93..ee20032897 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,8 +8,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). Place announcement text here. ### Added -- Introduced the ``\PhpOffice\PhpWord\SimpleType\ST_JcTable`` simple type. - @RomanSyroeshko -- Introduced the ``\PhpOffice\PhpWord\SimpleType\ST_Jc`` simple type. - @RomanSyroeshko +- Introduced the ``\PhpOffice\PhpWord\SimpleType\JcTable`` simple type. - @RomanSyroeshko +- Introduced the ``\PhpOffice\PhpWord\SimpleType\Jc`` simple type. - @RomanSyroeshko ### Changed - Improved error message for the case when ``autoload.php`` is not found. - @RomanSyroeshko #371 diff --git a/docs/styles.rst b/docs/styles.rst index 6c8638c5de..a0e9c7ff0e 100644 --- a/docs/styles.rst +++ b/docs/styles.rst @@ -63,7 +63,7 @@ Paragraph Available Paragraph style options: -- ``alignment``. Supports all alignment modes provided by third edition of ISO/IEC 29500 standard. See ``\PhpOffice\PhpWord\SimpleType\ST_Jc`` class for the details. +- ``alignment``. Supports all alignment modes provided by third edition of ISO/IEC 29500 standard. See ``\PhpOffice\PhpWord\SimpleType\Jc`` class for the details. - ``basedOn``. Parent style. - ``hanging``. Hanging by how much. - ``indent``. Indent by how much. @@ -84,7 +84,7 @@ Table Available Table style options: -- ``alignment``. Supports all alignment modes provided by third edition of ISO/IEC 29500 standard. See ``\PhpOffice\PhpWord\SimpleType\ST_JcTable`` class for the details. +- ``alignment``. Supports all alignment modes provided by third edition of ISO/IEC 29500 standard. See ``\PhpOffice\PhpWord\SimpleType\JcTable`` class for the details. - ``bgColor``. Background color, e.g. '9966CC'. - ``border(Top|Right|Bottom|Left)Color``. Border color, e.g. '9966CC'. - ``border(Top|Right|Bottom|Left)Size``. Border size in twips. @@ -115,7 +115,7 @@ Image Available Image style options: -- ``alignment``. See ``\PhpOffice\PhpWord\SimpleType\ST_Jc`` class for the details. +- ``alignment``. See ``\PhpOffice\PhpWord\SimpleType\Jc`` class for the details. - ``height``. Height in pixels. - ``marginLeft``. Left margin in inches, can be negative. - ``marginTop``. Top margin in inches, can be negative. @@ -129,7 +129,7 @@ Numbering level Available NumberingLevel style options: -- ``alignment``. Supports all alignment modes provided by third edition of ISO/IEC 29500 standard. See ``\PhpOffice\PhpWord\SimpleType\ST_Jc`` class for the details. +- ``alignment``. Supports all alignment modes provided by third edition of ISO/IEC 29500 standard. See ``\PhpOffice\PhpWord\SimpleType\Jc`` class for the details. - ``font``. Font name. - ``format``. Numbering format bullet\|decimal\|upperRoman\|lowerRoman\|upperLetter\|lowerLetter. - ``hanging``. See paragraph style. diff --git a/samples/Sample_01_SimpleText.php b/samples/Sample_01_SimpleText.php index b35af8dcff..d8d5915ab5 100644 --- a/samples/Sample_01_SimpleText.php +++ b/samples/Sample_01_SimpleText.php @@ -5,7 +5,7 @@ echo date('H:i:s') , ' Create new PhpWord object' , EOL; $phpWord = new \PhpOffice\PhpWord\PhpWord(); $phpWord->addFontStyle('rStyle', array('bold' => true, 'italic' => true, 'size' => 16, 'allCaps' => true, 'doubleStrikethrough' => true)); -$phpWord->addParagraphStyle('pStyle', array('alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::CENTER, 'spaceAfter' => 100)); +$phpWord->addParagraphStyle('pStyle', array('alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER, 'spaceAfter' => 100)); $phpWord->addTitleStyle(1, array('bold' => true), array('spaceAfter' => 240)); // New portrait section diff --git a/samples/Sample_08_ParagraphPagination.php b/samples/Sample_08_ParagraphPagination.php index f0dc80f1da..1a802f32df 100644 --- a/samples/Sample_08_ParagraphPagination.php +++ b/samples/Sample_08_ParagraphPagination.php @@ -6,7 +6,7 @@ $phpWord = new \PhpOffice\PhpWord\PhpWord(); $phpWord->setDefaultParagraphStyle( array( - 'alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::BOTH, + 'alignment' => \PhpOffice\PhpWord\SimpleType\Jc::BOTH, 'spaceAfter' => \PhpOffice\PhpWord\Shared\Converter::pointToTwip(12), 'spacing' => 120, ) diff --git a/samples/Sample_09_Tables.php b/samples/Sample_09_Tables.php index 3e6cb67094..e78fe297ab 100644 --- a/samples/Sample_09_Tables.php +++ b/samples/Sample_09_Tables.php @@ -26,7 +26,7 @@ $section->addTextBreak(1); $section->addText(htmlspecialchars('Fancy table', ENT_COMPAT, 'UTF-8'), $header); -$styleTable = array('borderSize' => 6, 'borderColor' => '006699', 'cellMargin' => 80, 'alignment' => \PhpOffice\PhpWord\SimpleType\ST_JcTable::CENTER); +$styleTable = array('borderSize' => 6, 'borderColor' => '006699', 'cellMargin' => 80, 'alignment' => \PhpOffice\PhpWord\SimpleType\JcTable::CENTER); $styleFirstRow = array('borderBottomSize' => 18, 'borderBottomColor' => '0000FF', 'bgColor' => '66BBFF'); $styleCell = array('valign' => 'center'); $styleCellBTLR = array('valign' => 'center', 'textDirection' => \PhpOffice\PhpWord\Style\Cell::TEXT_DIR_BTLR); @@ -58,7 +58,7 @@ $cellRowSpan = array('vMerge' => 'restart', 'valign' => 'center', 'bgColor' => 'FFFF00'); $cellRowContinue = array('vMerge' => 'continue'); $cellColSpan = array('gridSpan' => 2, 'valign' => 'center'); -$cellHCentered = array('alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::CENTER); +$cellHCentered = array('alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER); $cellVCentered = array('valign' => 'center'); $phpWord->addTableStyle('Colspan Rowspan', $styleTable); @@ -89,10 +89,10 @@ $section->addTextBreak(2); $section->addText(htmlspecialchars('Nested table in a centered and 50% width table.', ENT_COMPAT, 'UTF-8'), $header); -$table = $section->addTable(array('width' => 50 * 50, 'unit' => 'pct', 'alignment' => \PhpOffice\PhpWord\SimpleType\ST_JcTable::CENTER)); +$table = $section->addTable(array('width' => 50 * 50, 'unit' => 'pct', 'alignment' => \PhpOffice\PhpWord\SimpleType\JcTable::CENTER)); $cell = $table->addRow()->addCell(); $cell->addText(htmlspecialchars('This cell contains nested table.', ENT_COMPAT, 'UTF-8')); -$innerCell = $cell->addTable(array('alignment' => \PhpOffice\PhpWord\SimpleType\ST_JcTable::CENTER))->addRow()->addCell(); +$innerCell = $cell->addTable(array('alignment' => \PhpOffice\PhpWord\SimpleType\JcTable::CENTER))->addRow()->addCell(); $innerCell->addText(htmlspecialchars('Inside nested table', ENT_COMPAT, 'UTF-8')); // Save file diff --git a/samples/Sample_12_HeaderFooter.php b/samples/Sample_12_HeaderFooter.php index cb29bf9e50..4ea3e2872c 100644 --- a/samples/Sample_12_HeaderFooter.php +++ b/samples/Sample_12_HeaderFooter.php @@ -17,7 +17,7 @@ $textrun = $cell->addTextRun(); $textrun->addText(htmlspecialchars('This is the header with ', ENT_COMPAT, 'UTF-8')); $textrun->addLink('https://github.com/PHPOffice/PHPWord', htmlspecialchars('PHPWord on GitHub', ENT_COMPAT, 'UTF-8')); -$table->addCell(4500)->addImage('resources/PhpWord.png', array('width' => 80, 'height' => 80, 'alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::END)); +$table->addCell(4500)->addImage('resources/PhpWord.png', array('width' => 80, 'height' => 80, 'alignment' => \PhpOffice\PhpWord\SimpleType\Jc::END)); // Add header for all other pages $subsequent = $section->addHeader(); @@ -26,7 +26,7 @@ // Add footer $footer = $section->addFooter(); -$footer->addPreserveText(htmlspecialchars('Page {PAGE} of {NUMPAGES}.', ENT_COMPAT, 'UTF-8'), null, array('alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::CENTER)); +$footer->addPreserveText(htmlspecialchars('Page {PAGE} of {NUMPAGES}.', ENT_COMPAT, 'UTF-8'), null, array('alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER)); $footer->addLink('https://github.com/PHPOffice/PHPWord', htmlspecialchars('PHPWord on GitHub', ENT_COMPAT, 'UTF-8')); // Write some text diff --git a/samples/Sample_13_Images.php b/samples/Sample_13_Images.php index a5e2eecee1..0088acbd92 100644 --- a/samples/Sample_13_Images.php +++ b/samples/Sample_13_Images.php @@ -12,7 +12,7 @@ $section->addTextBreak(2); $section->addText(htmlspecialchars('Local image with styles:', ENT_COMPAT, 'UTF-8')); -$section->addImage('resources/_earth.jpg', array('width' => 210, 'height' => 210, 'alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::CENTER)); +$section->addImage('resources/_earth.jpg', array('width' => 210, 'height' => 210, 'alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER)); $section->addTextBreak(2); // Remote image diff --git a/samples/Sample_21_TableRowRules.php b/samples/Sample_21_TableRowRules.php index 162f1c7427..a1414dc14c 100644 --- a/samples/Sample_21_TableRowRules.php +++ b/samples/Sample_21_TableRowRules.php @@ -22,7 +22,7 @@ $table1 = $section->addTable(array('cellMargin' => 0, 'cellMarginRight' => 0, 'cellMarginBottom' => 0, 'cellMarginLeft' => 0)); $table1->addRow(3750); $cell1 = $table1->addCell(null, array('valign' => 'top', 'borderSize' => 30, 'borderColor' => 'ff0000')); -$cell1->addImage('./resources/_earth.jpg', array('width' => 250, 'height' => 250, 'alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::CENTER)); +$cell1->addImage('./resources/_earth.jpg', array('width' => 250, 'height' => 250, 'alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER)); $section->addTextBreak(); $section->addText( @@ -43,7 +43,7 @@ ); $table2->addRow(3750, array('exactHeight' => true)); $cell2 = $table2->addCell(null, array('valign' => 'top', 'borderSize' => 30, 'borderColor' => '00ff00')); -$cell2->addImage('./resources/_earth.jpg', array('width' => 250, 'height' => 250, 'alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::CENTER)); +$cell2->addImage('./resources/_earth.jpg', array('width' => 250, 'height' => 250, 'alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER)); $section->addTextBreak(); $section->addText( diff --git a/samples/Sample_25_TextBox.php b/samples/Sample_25_TextBox.php index 3925a25659..36bd171840 100644 --- a/samples/Sample_25_TextBox.php +++ b/samples/Sample_25_TextBox.php @@ -10,7 +10,7 @@ // In section $textbox = $section->addTextBox( array( - 'alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::CENTER, + 'alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER, 'width' => 400, 'height' => 150, 'borderSize' => 1, diff --git a/samples/Sample_27_Field.php b/samples/Sample_27_Field.php index 2cab80fdd5..479342e3dd 100644 --- a/samples/Sample_27_Field.php +++ b/samples/Sample_27_Field.php @@ -19,7 +19,7 @@ $section->addText(htmlspecialchars('Number of pages field:', ENT_COMPAT, 'UTF-8')); $section->addField('NUMPAGES', array('format' => 'Arabic', 'numformat' => '0,00'), array('PreserveFormat')); -$textrun = $section->addTextRun(array('alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::CENTER)); +$textrun = $section->addTextRun(array('alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER)); $textrun->addText(htmlspecialchars('This is the date of lunar calendar ', ENT_COMPAT, 'UTF-8')); $textrun->addField('DATE', array('dateformat' => 'd-M-yyyy H:mm:ss'), array('PreserveFormat', 'LunarCalendar')); $textrun->addText(htmlspecialchars(' written in a textrun.', ENT_COMPAT, 'UTF-8')); diff --git a/samples/Sample_36_RTL.php b/samples/Sample_36_RTL.php index ee023fd4bb..3121e4d06b 100644 --- a/samples/Sample_36_RTL.php +++ b/samples/Sample_36_RTL.php @@ -9,7 +9,7 @@ $textrun = $section->addTextRun(); $textrun->addText(htmlspecialchars('This is a Left to Right paragraph.', ENT_COMPAT, 'UTF-8')); -$textrun = $section->addTextRun(array('alignment' => \PhpOffice\PhpWord\SimpleType\ST_Jc::END)); +$textrun = $section->addTextRun(array('alignment' => \PhpOffice\PhpWord\SimpleType\Jc::END)); $textrun->addText(htmlspecialchars('سلام این یک پاراگراف راست به چپ است', ENT_COMPAT, 'UTF-8'), array('rtl' => true)); // Save file diff --git a/src/PhpWord/Reader/RTF/Document.php b/src/PhpWord/Reader/RTF/Document.php index d33b539632..d2f850bf0f 100644 --- a/src/PhpWord/Reader/RTF/Document.php +++ b/src/PhpWord/Reader/RTF/Document.php @@ -18,7 +18,7 @@ namespace PhpOffice\PhpWord\Reader\RTF; use PhpOffice\PhpWord\PhpWord; -use PhpOffice\PhpWord\SimpleType\ST_Jc; +use PhpOffice\PhpWord\SimpleType\Jc; /** * RTF document reader @@ -337,7 +337,7 @@ private function parseControl($control, $parameter) 'u' => array(self::STYL, 'font', 'underline', true), 'strike' => array(self::STYL, 'font', 'strikethrough',true), 'fs' => array(self::STYL, 'font', 'size', $parameter), - 'qc' => array(self::STYL, 'paragraph', 'alignment', ST_Jc::CENTER), + 'qc' => array(self::STYL, 'paragraph', 'alignment', Jc::CENTER), 'sa' => array(self::STYL, 'paragraph', 'spaceAfter', $parameter), 'fonttbl' => array(self::SKIP, 'fonttbl', null), 'colortbl' => array(self::SKIP, 'colortbl', null), diff --git a/src/PhpWord/SimpleType/ST_Jc.php b/src/PhpWord/SimpleType/Jc.php similarity index 98% rename from src/PhpWord/SimpleType/ST_Jc.php rename to src/PhpWord/SimpleType/Jc.php index 5558133c95..3d7366e403 100644 --- a/src/PhpWord/SimpleType/ST_Jc.php +++ b/src/PhpWord/SimpleType/Jc.php @@ -22,7 +22,7 @@ * * @since 0.13.0 */ -final class ST_Jc +final class Jc { const START = 'start'; const CENTER = 'center'; diff --git a/src/PhpWord/SimpleType/ST_JcTable.php b/src/PhpWord/SimpleType/JcTable.php similarity index 97% rename from src/PhpWord/SimpleType/ST_JcTable.php rename to src/PhpWord/SimpleType/JcTable.php index c9736ca155..e9928a01fd 100644 --- a/src/PhpWord/SimpleType/ST_JcTable.php +++ b/src/PhpWord/SimpleType/JcTable.php @@ -22,7 +22,7 @@ * * @since 0.13.0 */ -final class ST_JcTable +final class JcTable { const START = 'start'; const CENTER = 'center'; diff --git a/src/PhpWord/Style/Frame.php b/src/PhpWord/Style/Frame.php index e1c7d52c2d..055a4e8944 100644 --- a/src/PhpWord/Style/Frame.php +++ b/src/PhpWord/Style/Frame.php @@ -17,7 +17,7 @@ namespace PhpOffice\PhpWord\Style; -use PhpOffice\PhpWord\SimpleType\ST_Jc; +use PhpOffice\PhpWord\SimpleType\Jc; /** * Frame defines the size and position of an object @@ -200,7 +200,7 @@ public function getAlignment() */ public function setAlignment($value) { - if (in_array($value, ST_Jc::getAllowedValues(), true)) { + if (in_array($value, Jc::getAllowedValues(), true)) { $this->alignment = $value; } diff --git a/src/PhpWord/Style/Paragraph.php b/src/PhpWord/Style/Paragraph.php index ba2a6ac245..78a9c95f97 100644 --- a/src/PhpWord/Style/Paragraph.php +++ b/src/PhpWord/Style/Paragraph.php @@ -19,7 +19,7 @@ use PhpOffice\PhpWord\Exception\InvalidStyleException; use PhpOffice\PhpWord\Shared\String; -use PhpOffice\PhpWord\SimpleType\ST_Jc; +use PhpOffice\PhpWord\SimpleType\Jc; /** * Paragraph style @@ -232,7 +232,7 @@ public function getAlignment() */ public function setAlignment($value) { - if (in_array($value, ST_Jc::getAllowedValues(), true)) { + if (in_array($value, Jc::getAllowedValues(), true)) { $this->alignment = $value; } diff --git a/src/PhpWord/Style/Table.php b/src/PhpWord/Style/Table.php index c92df68a17..ea4e493284 100644 --- a/src/PhpWord/Style/Table.php +++ b/src/PhpWord/Style/Table.php @@ -17,7 +17,7 @@ namespace PhpOffice\PhpWord\Style; -use PhpOffice\PhpWord\SimpleType\ST_JcTable; +use PhpOffice\PhpWord\SimpleType\JcTable; class Table extends Border { @@ -509,7 +509,7 @@ public function getAlignment() */ public function setAlignment($value) { - if (in_array($value, ST_JcTable::getAllowedValues(), true)) { + if (in_array($value, JcTable::getAllowedValues(), true)) { $this->alignment = $value; } diff --git a/src/PhpWord/Writer/RTF/Style/Paragraph.php b/src/PhpWord/Writer/RTF/Style/Paragraph.php index aed59c9406..84e5b8ee36 100644 --- a/src/PhpWord/Writer/RTF/Style/Paragraph.php +++ b/src/PhpWord/Writer/RTF/Style/Paragraph.php @@ -17,7 +17,7 @@ namespace PhpOffice\PhpWord\Writer\RTF\Style; -use PhpOffice\PhpWord\SimpleType\ST_Jc; +use PhpOffice\PhpWord\SimpleType\Jc; /** * RTF paragraph style writer @@ -48,10 +48,10 @@ public function write() } $alignments = array( - ST_Jc::START => '\ql', - ST_Jc::END => '\qr', - ST_Jc::CENTER => '\qc', - ST_Jc::BOTH => '\qj', + Jc::START => '\ql', + Jc::END => '\qr', + Jc::CENTER => '\qc', + Jc::BOTH => '\qj', ); $spaceAfter = $style->getSpaceAfter(); diff --git a/src/PhpWord/Writer/Word2007/Element/ParagraphAlignment.php b/src/PhpWord/Writer/Word2007/Element/ParagraphAlignment.php index 1c2650e247..16352c1ee4 100644 --- a/src/PhpWord/Writer/Word2007/Element/ParagraphAlignment.php +++ b/src/PhpWord/Writer/Word2007/Element/ParagraphAlignment.php @@ -29,7 +29,7 @@ class ParagraphAlignment /** * @since 0.13.0 * - * @param string $value Any value provided by ST_Jc simple type. + * @param string $value Any value provided by Jc simple type. * * @see \PhpOffice\PhpWord\SimpleType\Jc For the allowed values of $value parameter. */ diff --git a/src/PhpWord/Writer/Word2007/Element/TableAlignment.php b/src/PhpWord/Writer/Word2007/Element/TableAlignment.php index c13be63240..ad088569df 100644 --- a/src/PhpWord/Writer/Word2007/Element/TableAlignment.php +++ b/src/PhpWord/Writer/Word2007/Element/TableAlignment.php @@ -29,7 +29,7 @@ class TableAlignment /** * @since 0.13.0 * - * @param string $value Any value provided by ST_JcTable simple type. + * @param string $value Any value provided by JcTable simple type. * * @see \PhpOffice\PhpWord\SimpleType\JcTable For the allowed values of $value parameter. */ diff --git a/tests/PhpWord/Tests/Element/CheckBoxTest.php b/tests/PhpWord/Tests/Element/CheckBoxTest.php index 0e9b968240..fdc2ef77e3 100644 --- a/tests/PhpWord/Tests/Element/CheckBoxTest.php +++ b/tests/PhpWord/Tests/Element/CheckBoxTest.php @@ -18,7 +18,7 @@ namespace PhpOffice\PhpWord\Tests\Element; use PhpOffice\PhpWord\Element\CheckBox; -use PhpOffice\PhpWord\SimpleType\ST_Jc; +use PhpOffice\PhpWord\SimpleType\Jc; use PhpOffice\PhpWord\Style\Font; /** @@ -82,7 +82,7 @@ public function testParagraph() $oCheckBox = new CheckBox(htmlspecialchars('chkBox', ENT_COMPAT, 'UTF-8'), htmlspecialchars('CheckBox', ENT_COMPAT, 'UTF-8'), 'fontStyle', 'paragraphStyle'); $this->assertEquals('paragraphStyle', $oCheckBox->getParagraphStyle()); - $oCheckBox->setParagraphStyle(array('alignment' => ST_Jc::CENTER, 'spaceAfter' => 100)); + $oCheckBox->setParagraphStyle(array('alignment' => Jc::CENTER, 'spaceAfter' => 100)); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Paragraph', $oCheckBox->getParagraphStyle()); } } diff --git a/tests/PhpWord/Tests/Element/ImageTest.php b/tests/PhpWord/Tests/Element/ImageTest.php index 7e8ef94c81..d036075628 100644 --- a/tests/PhpWord/Tests/Element/ImageTest.php +++ b/tests/PhpWord/Tests/Element/ImageTest.php @@ -18,7 +18,7 @@ namespace PhpOffice\PhpWord\Tests\Element; use PhpOffice\PhpWord\Element\Image; -use PhpOffice\PhpWord\SimpleType\ST_Jc; +use PhpOffice\PhpWord\SimpleType\Jc; /** * Test class for PhpOffice\PhpWord\Element\Image @@ -55,7 +55,7 @@ public function testConstructWithStyle() array( 'width' => 210, 'height' => 210, - 'alignment' => ST_Jc::CENTER, + 'alignment' => Jc::CENTER, 'wrappingStyle' => \PhpOffice\PhpWord\Style\Image::WRAPPING_STYLE_BEHIND, ) ); @@ -98,7 +98,7 @@ public function testStyle() { $oImage = new Image( __DIR__ . '/../_files/images/earth.jpg', - array('height' => 210, 'alignment' => ST_Jc::CENTER) + array('height' => 210, 'alignment' => Jc::CENTER) ); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Image', $oImage->getStyle()); diff --git a/tests/PhpWord/Tests/Element/PreserveTextTest.php b/tests/PhpWord/Tests/Element/PreserveTextTest.php index 36a0e572de..73cee03e3a 100644 --- a/tests/PhpWord/Tests/Element/PreserveTextTest.php +++ b/tests/PhpWord/Tests/Element/PreserveTextTest.php @@ -18,7 +18,7 @@ namespace PhpOffice\PhpWord\Tests\Element; use PhpOffice\PhpWord\Element\PreserveText; -use PhpOffice\PhpWord\SimpleType\ST_Jc; +use PhpOffice\PhpWord\SimpleType\Jc; /** * Test class for PhpOffice\PhpWord\Element\PreserveText @@ -59,7 +59,7 @@ public function testConstructWithArray() $oPreserveText = new PreserveText( htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), array('size' => 16, 'color' => '1B2232'), - array('alignment' => ST_Jc::CENTER) + array('alignment' => Jc::CENTER) ); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Font', $oPreserveText->getFontStyle()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Paragraph', $oPreserveText->getParagraphStyle()); diff --git a/tests/PhpWord/Tests/Element/TextTest.php b/tests/PhpWord/Tests/Element/TextTest.php index 34f742a2a1..00a2033e28 100644 --- a/tests/PhpWord/Tests/Element/TextTest.php +++ b/tests/PhpWord/Tests/Element/TextTest.php @@ -18,7 +18,7 @@ namespace PhpOffice\PhpWord\Tests\Element; use PhpOffice\PhpWord\Element\Text; -use PhpOffice\PhpWord\SimpleType\ST_Jc; +use PhpOffice\PhpWord\SimpleType\Jc; use PhpOffice\PhpWord\Style\Font; /** @@ -81,7 +81,7 @@ public function testParagraph() $oText = new Text(htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), 'fontStyle', 'paragraphStyle'); $this->assertEquals('paragraphStyle', $oText->getParagraphStyle()); - $oText->setParagraphStyle(array('alignment' => ST_Jc::CENTER, 'spaceAfter' => 100)); + $oText->setParagraphStyle(array('alignment' => Jc::CENTER, 'spaceAfter' => 100)); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Paragraph', $oText->getParagraphStyle()); } } diff --git a/tests/PhpWord/Tests/Style/FontTest.php b/tests/PhpWord/Tests/Style/FontTest.php index 24255c390a..ea36f395f0 100644 --- a/tests/PhpWord/Tests/Style/FontTest.php +++ b/tests/PhpWord/Tests/Style/FontTest.php @@ -18,7 +18,7 @@ namespace PhpOffice\PhpWord\Tests\Style; use PhpOffice\PhpWord\PhpWord; -use PhpOffice\PhpWord\SimpleType\ST_Jc; +use PhpOffice\PhpWord\SimpleType\Jc; use PhpOffice\PhpWord\Style\Font; use PhpOffice\PhpWord\Tests\TestHelperDOCX; @@ -42,7 +42,7 @@ public function tearDown() */ public function testInitiation() { - $object = new Font(htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), array('alignment' => ST_Jc::BOTH)); + $object = new Font(htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), array('alignment' => Jc::BOTH)); $this->assertEquals(htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), $object->getStyleType()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Paragraph', $object->getParagraphStyle()); @@ -158,7 +158,7 @@ public function testLineHeight() */ public function testLineHeightFloatval() { - $object = new Font(null, array('alignment' => ST_Jc::CENTER)); + $object = new Font(null, array('alignment' => Jc::CENTER)); $object->setLineHeight('1.5pt'); $this->assertEquals(1.5, $object->getLineHeight()); } diff --git a/tests/PhpWord/Tests/Style/ImageTest.php b/tests/PhpWord/Tests/Style/ImageTest.php index 741bd4b366..74518e12ba 100644 --- a/tests/PhpWord/Tests/Style/ImageTest.php +++ b/tests/PhpWord/Tests/Style/ImageTest.php @@ -17,7 +17,7 @@ namespace PhpOffice\PhpWord\Tests\Style; -use PhpOffice\PhpWord\SimpleType\ST_Jc; +use PhpOffice\PhpWord\SimpleType\Jc; use PhpOffice\PhpWord\Style\Image; /** @@ -38,7 +38,7 @@ public function testSetGetNormal() $properties = array( 'width' => 200, 'height' => 200, - 'alignment' => ST_Jc::START, + 'alignment' => Jc::START, 'marginTop' => 240, 'marginLeft' => 240, 'wrappingStyle' => 'inline', @@ -61,7 +61,7 @@ public function testSetStyleValue() $properties = array( 'width' => 200, 'height' => 200, - 'alignment' => ST_Jc::START, + 'alignment' => Jc::START, 'marginTop' => 240, 'marginLeft' => 240, 'positioning' => \PhpOffice\PhpWord\Style\Image::POSITION_ABSOLUTE, diff --git a/tests/PhpWord/Tests/Style/NumberingLevelTest.php b/tests/PhpWord/Tests/Style/NumberingLevelTest.php index e752205750..854b97af1c 100644 --- a/tests/PhpWord/Tests/Style/NumberingLevelTest.php +++ b/tests/PhpWord/Tests/Style/NumberingLevelTest.php @@ -17,7 +17,7 @@ namespace PhpOffice\PhpWord\Tests\Style; -use PhpOffice\PhpWord\SimpleType\ST_Jc; +use PhpOffice\PhpWord\SimpleType\Jc; use PhpOffice\PhpWord\Style\NumberingLevel; /** @@ -42,7 +42,7 @@ public function testSetGetNormal() 'pStyle' => 'pStyle', 'suffix' => 'space', 'text' => '%1.', - 'alignment' => ST_Jc::START, + 'alignment' => Jc::START, 'left' => 360, 'hanging' => 360, 'tabPos' => 360, diff --git a/tests/PhpWord/Tests/Style/TableTest.php b/tests/PhpWord/Tests/Style/TableTest.php index f81211a6e2..987c2e0116 100644 --- a/tests/PhpWord/Tests/Style/TableTest.php +++ b/tests/PhpWord/Tests/Style/TableTest.php @@ -17,7 +17,7 @@ namespace PhpOffice\PhpWord\Tests\Style; -use PhpOffice\PhpWord\SimpleType\ST_JcTable; +use PhpOffice\PhpWord\SimpleType\JcTable; use PhpOffice\PhpWord\Style\Table; /** @@ -75,7 +75,7 @@ public function testSetGetNormal() 'cellMarginLeft' => 240, 'cellMarginRight' => 240, 'cellMarginBottom' => 240, - 'alignment' => ST_JcTable::CENTER, + 'alignment' => JcTable::CENTER, 'width' => 100, 'unit' => 'pct', ); diff --git a/tests/PhpWord/Tests/Style/TextBoxTest.php b/tests/PhpWord/Tests/Style/TextBoxTest.php index 3334f1e5d6..c2bb17fbaa 100644 --- a/tests/PhpWord/Tests/Style/TextBoxTest.php +++ b/tests/PhpWord/Tests/Style/TextBoxTest.php @@ -17,7 +17,7 @@ namespace PhpOffice\PhpWord\Tests\Style; -use PhpOffice\PhpWord\SimpleType\ST_Jc; +use PhpOffice\PhpWord\SimpleType\Jc; use PhpOffice\PhpWord\Style\TextBox; /** @@ -38,7 +38,7 @@ public function testSetGetNormal() $properties = array( 'width' => 200, 'height' => 200, - 'alignment' => ST_Jc::START, + 'alignment' => Jc::START, 'marginTop' => 240, 'marginLeft' => 240, 'wrappingStyle' => 'inline', @@ -72,7 +72,7 @@ public function testSetStyleValue() $properties = array( 'width' => 200, 'height' => 200, - 'alignment' => ST_Jc::START, + 'alignment' => Jc::START, 'marginTop' => 240, 'marginLeft' => 240, 'wrappingStyle' => 'inline', @@ -135,7 +135,7 @@ public function testSetGetAlign() { $textBox = new TextBox(); - $expectedAlignment = ST_Jc::START; + $expectedAlignment = Jc::START; $textBox->setAlignment($expectedAlignment); $this->assertEquals($expectedAlignment, $textBox->getAlignment()); } diff --git a/tests/PhpWord/Tests/StyleTest.php b/tests/PhpWord/Tests/StyleTest.php index b2d02242cd..908441a8bf 100644 --- a/tests/PhpWord/Tests/StyleTest.php +++ b/tests/PhpWord/Tests/StyleTest.php @@ -17,7 +17,7 @@ namespace PhpOffice\PhpWord\Tests; -use PhpOffice\PhpWord\SimpleType\ST_Jc; +use PhpOffice\PhpWord\SimpleType\Jc; use PhpOffice\PhpWord\Style; /** @@ -45,7 +45,7 @@ class StyleTest extends \PHPUnit_Framework_TestCase */ public function testStyles() { - $paragraph = array('alignment' => ST_Jc::CENTER); + $paragraph = array('alignment' => Jc::CENTER); $font = array('italic' => true, '_bold' => true); $table = array('bgColor' => 'CCCCCC'); $styles = array( @@ -83,7 +83,7 @@ public function testStyles() */ public function testDefaultParagraphStyle() { - $paragraph = array('alignment' => ST_Jc::CENTER); + $paragraph = array('alignment' => Jc::CENTER); Style::setDefaultParagraphStyle($paragraph); diff --git a/tests/PhpWord/Tests/Writer/HTMLTest.php b/tests/PhpWord/Tests/Writer/HTMLTest.php index eca06326f8..6ad9093d25 100644 --- a/tests/PhpWord/Tests/Writer/HTMLTest.php +++ b/tests/PhpWord/Tests/Writer/HTMLTest.php @@ -17,7 +17,7 @@ namespace PhpOffice\PhpWord\Tests\Writer; use PhpOffice\PhpWord\PhpWord; -use PhpOffice\PhpWord\SimpleType\ST_Jc; +use PhpOffice\PhpWord\SimpleType\Jc; use PhpOffice\PhpWord\Writer\HTML; /** @@ -70,7 +70,7 @@ public function testSave() 'Font', array('name' => 'Verdana', 'size' => 11, 'color' => 'FF0000', 'fgColor' => 'FF0000') ); - $phpWord->addParagraphStyle('Paragraph', array('alignment' => ST_Jc::CENTER, 'spaceAfter' => 20, 'spaceBefore' => 20)); + $phpWord->addParagraphStyle('Paragraph', array('alignment' => Jc::CENTER, 'spaceAfter' => 20, 'spaceBefore' => 20)); $section = $phpWord->addSection(); $section->addText(htmlspecialchars('Test 1', ENT_COMPAT, 'UTF-8'), 'Font', 'Paragraph'); $section->addTextBreak(); @@ -91,7 +91,7 @@ public function testSave() $section = $phpWord->addSection(); - $textrun = $section->addTextRun(array('alignment' => ST_Jc::CENTER)); + $textrun = $section->addTextRun(array('alignment' => Jc::CENTER)); $textrun->addText(htmlspecialchars('Test 3', ENT_COMPAT, 'UTF-8')); $textrun->addTextBreak(); diff --git a/tests/PhpWord/Tests/Writer/ODText/Part/ContentTest.php b/tests/PhpWord/Tests/Writer/ODText/Part/ContentTest.php index b34737c9a3..1f028c8743 100644 --- a/tests/PhpWord/Tests/Writer/ODText/Part/ContentTest.php +++ b/tests/PhpWord/Tests/Writer/ODText/Part/ContentTest.php @@ -17,7 +17,7 @@ namespace PhpOffice\PhpWord\Tests\Writer\ODText\Part; use PhpOffice\PhpWord\PhpWord; -use PhpOffice\PhpWord\SimpleType\ST_Jc; +use PhpOffice\PhpWord\SimpleType\Jc; use PhpOffice\PhpWord\Tests\TestHelperDOCX; /** @@ -52,7 +52,7 @@ public function testWriteContent() $phpWord->setDefaultFontName('Verdana'); $phpWord->addFontStyle('Font', array('size' => 11)); - $phpWord->addParagraphStyle('Paragraph', array('alignment' => ST_Jc::CENTER)); + $phpWord->addParagraphStyle('Paragraph', array('alignment' => Jc::CENTER)); $phpWord->addTableStyle('tblStyle', array('width' => 100)); $section = $phpWord->addSection(array('colsNum' => 2)); diff --git a/tests/PhpWord/Tests/Writer/ODTextTest.php b/tests/PhpWord/Tests/Writer/ODTextTest.php index b474ae0463..cdc3651681 100644 --- a/tests/PhpWord/Tests/Writer/ODTextTest.php +++ b/tests/PhpWord/Tests/Writer/ODTextTest.php @@ -17,7 +17,7 @@ namespace PhpOffice\PhpWord\Tests\Writer; use PhpOffice\PhpWord\PhpWord; -use PhpOffice\PhpWord\SimpleType\ST_Jc; +use PhpOffice\PhpWord\SimpleType\Jc; use PhpOffice\PhpWord\Writer\ODText; /** @@ -72,7 +72,7 @@ public function testSave() $phpWord = new PhpWord(); $phpWord->addFontStyle('Font', array('size' => 11)); - $phpWord->addParagraphStyle('Paragraph', array('alignment' => ST_Jc::CENTER)); + $phpWord->addParagraphStyle('Paragraph', array('alignment' => Jc::CENTER)); $section = $phpWord->addSection(); $section->addText(htmlspecialchars('Test 1', ENT_COMPAT, 'UTF-8'), 'Font'); $section->addTextBreak(); diff --git a/tests/PhpWord/Tests/Writer/RTFTest.php b/tests/PhpWord/Tests/Writer/RTFTest.php index ffa70871d8..7e978cb582 100644 --- a/tests/PhpWord/Tests/Writer/RTFTest.php +++ b/tests/PhpWord/Tests/Writer/RTFTest.php @@ -17,7 +17,7 @@ namespace PhpOffice\PhpWord\Tests\Writer; use PhpOffice\PhpWord\PhpWord; -use PhpOffice\PhpWord\SimpleType\ST_Jc; +use PhpOffice\PhpWord\SimpleType\Jc; use PhpOffice\PhpWord\Writer\RTF; /** @@ -63,7 +63,7 @@ public function testSave() 'Font', array('name' => 'Verdana', 'size' => 11, 'color' => 'FF0000', 'fgColor' => '00FF00') ); - $phpWord->addParagraphStyle('Paragraph', array('alignment' => ST_Jc::CENTER)); + $phpWord->addParagraphStyle('Paragraph', array('alignment' => Jc::CENTER)); $section = $phpWord->addSection(); $section->addText(htmlspecialchars('Test 1', ENT_COMPAT, 'UTF-8'), 'Font', 'Paragraph'); $section->addTextBreak(); diff --git a/tests/PhpWord/Tests/Writer/Word2007/Part/DocumentTest.php b/tests/PhpWord/Tests/Writer/Word2007/Part/DocumentTest.php index 8ad43b7e51..71dba3edeb 100644 --- a/tests/PhpWord/Tests/Writer/Word2007/Part/DocumentTest.php +++ b/tests/PhpWord/Tests/Writer/Word2007/Part/DocumentTest.php @@ -17,7 +17,7 @@ namespace PhpOffice\PhpWord\Tests\Writer\Word2007\Part; use PhpOffice\PhpWord\PhpWord; -use PhpOffice\PhpWord\SimpleType\ST_Jc; +use PhpOffice\PhpWord\SimpleType\Jc; use PhpOffice\PhpWord\Style\Font; use PhpOffice\PhpWord\Tests\TestHelperDOCX; @@ -91,7 +91,7 @@ public function testElements() 'borderColor' => '#FF0', ) ); - $section->addTextBox(array('wrappingStyle' => 'tight', 'positioning' => 'absolute', 'alignment' => ST_Jc::CENTER)); + $section->addTextBox(array('wrappingStyle' => 'tight', 'positioning' => 'absolute', 'alignment' => Jc::CENTER)); $section->addListItemRun()->addText(htmlspecialchars('List item run 1', ENT_COMPAT, 'UTF-8')); $section->addField( 'DATE', @@ -158,7 +158,7 @@ public function testElementStyles() $phpWord->addParagraphStyle( 'pStyle', array( - 'alignment' => ST_Jc::CENTER, + 'alignment' => Jc::CENTER, 'tabs' => $tabs, 'shading' => array('fill' => 'FFFF99'), 'borderSize' => 4, @@ -177,11 +177,11 @@ public function testElementStyles() ); // Style #2 $phpWord->addTitleStyle(1, array('color' => '333333', 'doubleStrikethrough' => true)); // Style #3 $phpWord->addTableStyle('tStyle', array('borderSize' => 1)); - $fontStyle = new Font('text', array('alignment' => ST_Jc::CENTER)); + $fontStyle = new Font('text', array('alignment' => Jc::CENTER)); $section = $phpWord->addSection(); $section->addListItem(htmlspecialchars('List Item', ENT_COMPAT, 'UTF-8'), 0, null, null, 'pStyle'); // Style #5 - $section->addObject($objectSrc, array('alignment' => ST_Jc::CENTER)); + $section->addObject($objectSrc, array('alignment' => Jc::CENTER)); $section->addTOC($fontStyle); $section->addTitle(htmlspecialchars('Title 1', ENT_COMPAT, 'UTF-8'), 1); $section->addTOC('fStyle'); @@ -231,7 +231,7 @@ public function testWriteText() public function testWriteTextRun() { $pStyle = 'pStyle'; - $aStyle = array('alignment' => ST_Jc::BOTH, 'spaceBefore' => 120, 'spaceAfter' => 120); + $aStyle = array('alignment' => Jc::BOTH, 'spaceBefore' => 120, 'spaceAfter' => 120); $imageSrc = __DIR__ . '/../../../_files/images/earth.jpg'; $phpWord = new PhpWord(); @@ -242,7 +242,7 @@ public function testWriteTextRun() $textrun->addTextBreak(); $textrun = $section->addTextRun($aStyle); $textrun->addLink('https://github.com/PHPOffice/PHPWord'); - $textrun->addImage($imageSrc, array('alignment' => ST_Jc::CENTER)); + $textrun->addImage($imageSrc, array('alignment' => Jc::CENTER)); $textrun->addFootnote(); $doc = TestHelperDOCX::getDocument($phpWord); @@ -259,7 +259,7 @@ public function testWriteLink() $section = $phpWord->addSection(); $fontStyleArray = array('bold' => true); $fontStyleName = 'Font Style'; - $paragraphStyleArray = array('alignment' => ST_Jc::CENTER); + $paragraphStyleArray = array('alignment' => Jc::CENTER); $paragraphStyleName = 'Paragraph Style'; $expected = 'PHPWord on GitHub'; @@ -293,7 +293,7 @@ public function testWritePreserveText() $footer = $section->addFooter(); $fontStyleArray = array('bold' => true); $fontStyleName = 'Font'; - $paragraphStyleArray = array('alignment' => ST_Jc::END); + $paragraphStyleArray = array('alignment' => Jc::END); $paragraphStyleName = 'Paragraph'; $footer->addPreserveText(htmlspecialchars('Page {PAGE}', ENT_COMPAT, 'UTF-8')); @@ -338,7 +338,7 @@ public function testWriteTextBreak() public function testWriteImage() { $phpWord = new PhpWord(); - $styles = array('alignment' => ST_Jc::START, 'width' => 40, 'height' => 40, 'marginTop' => -1, 'marginLeft' => -1); + $styles = array('alignment' => Jc::START, 'width' => 40, 'height' => 40, 'marginTop' => -1, 'marginLeft' => -1); $wraps = array('inline', 'behind', 'infront', 'square', 'tight'); $section = $phpWord->addSection(); foreach ($wraps as $wrap) { @@ -422,7 +422,7 @@ public function testWriteParagraphStyle() $phpWord = new PhpWord(); $section = $phpWord->addSection(); $attributes = array( - 'alignment' => ST_Jc::END, + 'alignment' => Jc::END, 'widowControl' => false, 'keepNext' => true, 'keepLines' => true, diff --git a/tests/PhpWord/Tests/Writer/Word2007/Part/FootnotesTest.php b/tests/PhpWord/Tests/Writer/Word2007/Part/FootnotesTest.php index 67c2909fb1..151331072a 100644 --- a/tests/PhpWord/Tests/Writer/Word2007/Part/FootnotesTest.php +++ b/tests/PhpWord/Tests/Writer/Word2007/Part/FootnotesTest.php @@ -17,7 +17,7 @@ namespace PhpOffice\PhpWord\Tests\Writer\Word2007\Part; use PhpOffice\PhpWord\PhpWord; -use PhpOffice\PhpWord\SimpleType\ST_Jc; +use PhpOffice\PhpWord\SimpleType\Jc; use PhpOffice\PhpWord\Tests\TestHelperDOCX; /** @@ -41,14 +41,14 @@ public function tearDown() public function testWriteFootnotes() { $phpWord = new PhpWord(); - $phpWord->addParagraphStyle('pStyle', array('alignment' => ST_Jc::START)); + $phpWord->addParagraphStyle('pStyle', array('alignment' => Jc::START)); $section = $phpWord->addSection(); $section->addText(htmlspecialchars('Text', ENT_COMPAT, 'UTF-8')); $footnote1 = $section->addFootnote('pStyle'); $footnote1->addText(htmlspecialchars('Footnote', ENT_COMPAT, 'UTF-8')); $footnote1->addTextBreak(); $footnote1->addLink('https://github.com/PHPOffice/PHPWord'); - $footnote2 = $section->addEndnote(array('alignment' => ST_Jc::START)); + $footnote2 = $section->addEndnote(array('alignment' => Jc::START)); $footnote2->addText(htmlspecialchars('Endnote', ENT_COMPAT, 'UTF-8')); $doc = TestHelperDOCX::getDocument($phpWord); diff --git a/tests/PhpWord/Tests/Writer/Word2007/Part/NumberingTest.php b/tests/PhpWord/Tests/Writer/Word2007/Part/NumberingTest.php index 0d4b5e05ca..3add6854d0 100644 --- a/tests/PhpWord/Tests/Writer/Word2007/Part/NumberingTest.php +++ b/tests/PhpWord/Tests/Writer/Word2007/Part/NumberingTest.php @@ -17,7 +17,7 @@ namespace PhpOffice\PhpWord\Tests\Writer\Word2007\Part; use PhpOffice\PhpWord\PhpWord; -use PhpOffice\PhpWord\SimpleType\ST_Jc; +use PhpOffice\PhpWord\SimpleType\Jc; use PhpOffice\PhpWord\Tests\TestHelperDOCX; /** @@ -56,7 +56,7 @@ public function testWriteNumbering() 'restart' => 1, 'suffix' => 'space', 'text' => '%1.', - 'alignment' => ST_Jc::START, + 'alignment' => Jc::START, 'left' => 360, 'hanging' => 360, 'tabPos' => 360, diff --git a/tests/PhpWord/Tests/Writer/Word2007/Part/StylesTest.php b/tests/PhpWord/Tests/Writer/Word2007/Part/StylesTest.php index 225aab6673..ad8464671b 100644 --- a/tests/PhpWord/Tests/Writer/Word2007/Part/StylesTest.php +++ b/tests/PhpWord/Tests/Writer/Word2007/Part/StylesTest.php @@ -17,7 +17,7 @@ namespace PhpOffice\PhpWord\Tests\Writer\Word2007\Part; use PhpOffice\PhpWord\PhpWord; -use PhpOffice\PhpWord\SimpleType\ST_Jc; +use PhpOffice\PhpWord\SimpleType\Jc; use PhpOffice\PhpWord\Tests\TestHelperDOCX; /** @@ -43,7 +43,7 @@ public function testWriteStyles() { $phpWord = new PhpWord(); - $pStyle = array('alignment' => ST_Jc::BOTH); + $pStyle = array('alignment' => Jc::BOTH); $pBase = array('basedOn' => 'Normal'); $pNew = array('basedOn' => 'Base Style', 'next' => 'Normal'); $rStyle = array('size' => 20); diff --git a/tests/PhpWord/Tests/Writer/Word2007Test.php b/tests/PhpWord/Tests/Writer/Word2007Test.php index b6a5d08585..83a4a9a1d8 100644 --- a/tests/PhpWord/Tests/Writer/Word2007Test.php +++ b/tests/PhpWord/Tests/Writer/Word2007Test.php @@ -17,7 +17,7 @@ namespace PhpOffice\PhpWord\Tests\Writer; use PhpOffice\PhpWord\PhpWord; -use PhpOffice\PhpWord\SimpleType\ST_Jc; +use PhpOffice\PhpWord\SimpleType\Jc; use PhpOffice\PhpWord\Tests\TestHelperDOCX; use PhpOffice\PhpWord\Writer\Word2007; @@ -78,7 +78,7 @@ public function testSave() $remoteImage = 'http://php.net//images/logos/php-med-trans-light.gif'; $phpWord = new PhpWord(); $phpWord->addFontStyle('Font', array('size' => 11)); - $phpWord->addParagraphStyle('Paragraph', array('alignment' => ST_Jc::CENTER)); + $phpWord->addParagraphStyle('Paragraph', array('alignment' => Jc::CENTER)); $section = $phpWord->addSection(); $section->addText(htmlspecialchars('Test 1', ENT_COMPAT, 'UTF-8'), 'Font', 'Paragraph'); $section->addTextBreak(); From 12823a5fbff1f380ff1d65d729f8b05d3829b8f8 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 10 Oct 2015 19:32:53 +0400 Subject: [PATCH 49/99] Fixed build. --- src/PhpWord/Style/NumberingLevel.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/PhpWord/Style/NumberingLevel.php b/src/PhpWord/Style/NumberingLevel.php index 420287da02..50272a2afb 100644 --- a/src/PhpWord/Style/NumberingLevel.php +++ b/src/PhpWord/Style/NumberingLevel.php @@ -17,6 +17,8 @@ namespace PhpOffice\PhpWord\Style; +use PhpOffice\PhpWord\SimpleType\Jc; + /** * Numbering level definition * From 09e5e352a994ffabf6437fc9e4367464a3d76997 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Wed, 21 Oct 2015 21:44:10 +0400 Subject: [PATCH 50/99] Changed init value of the NumberingLevel.alignment property. --- src/PhpWord/Style/NumberingLevel.php | 2 +- src/PhpWord/Writer/Word2007/Part/Numbering.php | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/PhpWord/Style/NumberingLevel.php b/src/PhpWord/Style/NumberingLevel.php index 50272a2afb..91f40df247 100644 --- a/src/PhpWord/Style/NumberingLevel.php +++ b/src/PhpWord/Style/NumberingLevel.php @@ -85,7 +85,7 @@ class NumberingLevel extends AbstractStyle /** * @var string */ - private $alignment; + private $alignment = ''; /** * Left diff --git a/src/PhpWord/Writer/Word2007/Part/Numbering.php b/src/PhpWord/Writer/Word2007/Part/Numbering.php index 742aecc238..e7a354d568 100644 --- a/src/PhpWord/Writer/Word2007/Part/Numbering.php +++ b/src/PhpWord/Writer/Word2007/Part/Numbering.php @@ -114,11 +114,12 @@ private function writeLevel(XMLWriter $xmlWriter, NumberingLevel $level) 'pStyle' => 'pStyle', 'suffix' => 'suff', 'text' => 'lvlText', - 'alignment' => 'lvlJc' + 'alignment' => 'lvlJc', ); foreach ($properties as $property => $nodeName) { $getMethod = "get{$property}"; - if (!is_null($level->$getMethod())) { + if ('' !== $level->$getMethod() // this condition is now supported by `alignment` only + && !is_null($level->$getMethod())) { $xmlWriter->startElement("w:{$nodeName}"); $xmlWriter->writeAttribute('w:val', $level->$getMethod()); $xmlWriter->endElement(); // w:start From d3908deff8572a545875446e73de9b64c76a2485 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Fri, 23 Oct 2015 20:37:20 +0400 Subject: [PATCH 51/99] Updated change log due to the changes previously committed. --- CHANGELOG.md | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ee20032897..650ca5dfc6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,30 +8,35 @@ This project adheres to [Semantic Versioning](http://semver.org/). Place announcement text here. ### Added -- Introduced the ``\PhpOffice\PhpWord\SimpleType\JcTable`` simple type. - @RomanSyroeshko -- Introduced the ``\PhpOffice\PhpWord\SimpleType\Jc`` simple type. - @RomanSyroeshko +- Introduced the `\PhpOffice\PhpWord\SimpleType\Jc` simple type. - @RomanSyroeshko +- Introduced the `\PhpOffice\PhpWord\SimpleType\JcTable` simple type. - @RomanSyroeshko +- Introduced writer for the "Paragraph Alignment" element (see `\PhpOffice\PhpWord\Writer\Word2007\Element\ParagraphAlignment`). - @RomanSyroeshko +- Introduced writer for the "Table Alignment" element (see `\PhpOffice\PhpWord\Writer\Word2007\Element\TableAlignment`). - @RomanSyroeshko ### Changed -- Improved error message for the case when ``autoload.php`` is not found. - @RomanSyroeshko #371 -- Renamed the ``align`` option of ``NumberingLevel``, ``Frame``, ``Table``, and ``Paragraph`` styles into ``alignment``. - @RomanSyroeshko +- Improved error message for the case when `autoload.php` is not found. - @RomanSyroeshko #371 +- Renamed the `align` option of `NumberingLevel`, `Frame`, `Table`, and `Paragraph` styles into `alignment`. - @RomanSyroeshko ### Deprecated -- ``getAlign`` and ``setAlign`` methods of ``NumberingLevel``, ``Frame``, ``Table``, and ``Paragraph`` styles. -Use the correspondent ``getAlignment`` and ``setAlignment`` methods instead. +- `getAlign` and `setAlign` methods of `NumberingLevel`, `Frame`, `Table`, and `Paragraph` styles. +Use the correspondent `getAlignment` and `setAlignment` methods instead. +### Removed +- `PhpOffice\PhpWord\Style\Alignment`. Style properties, which previously stored instances of this class, now deal with strings. +In each case set of available string values is defined by the correspondent simple type. 0.12.1 (30 August 2015) ----------------------- -Maintenance release. This release is focused primarily on ``TemplateProcessor``. +Maintenance release. This release is focused primarily on `TemplateProcessor`. ### Changes -- Changed visibility of all private properties and methods of ``TemplateProcessor`` to ``protected``. - @RomanSyroeshko #498 -- Improved performance of ``TemplateProcessor::setValue()``. - @RomanSyroeshko @nicoSWD #513 +- Changed visibility of all private properties and methods of `TemplateProcessor` to `protected`. - @RomanSyroeshko #498 +- Improved performance of `TemplateProcessor::setValue()`. - @RomanSyroeshko @nicoSWD #513 ### Bugfixes -- Fixed issue with "Access denied" message while opening ``Sample_07_TemplateCloneRow.docx`` and ``Sample_23_TemplateBlock.docx`` result files on Windows platform. - @RomanSyroeshko @AshSat #532 -- Fixed ``PreserveText`` element alignment in footer (see ``Sample_12_HeaderFooter.php``). - @RomanSyroeshko @SSchwaiger #495 +- Fixed issue with "Access denied" message while opening `Sample_07_TemplateCloneRow.docx` and `Sample_23_TemplateBlock.docx` result files on Windows platform. - @RomanSyroeshko @AshSat #532 +- Fixed `PreserveText` element alignment in footer (see `Sample_12_HeaderFooter.php`). - @RomanSyroeshko @SSchwaiger #495 From d74c0bd87803c29f6fefab943c2734ff08464b2a Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 14 Nov 2015 15:31:50 +0400 Subject: [PATCH 52/99] Added backward compatibility for deprecated alignment options. --- CHANGELOG.md | 3 ++ bootstrap.php | 28 ++++++++++++++++ composer.json | 16 +++++---- docs/installing.rst | 15 ++++----- samples/Sample_Footer.php | 3 -- samples/Sample_Header.php | 8 ++--- src/PhpWord/Autoloader.php | 3 -- src/PhpWord/SimpleType/Jc.php | 50 ++++++++++++++++++++-------- src/PhpWord/SimpleType/JcTable.php | 28 +++++++++++++--- src/PhpWord/Style/Frame.php | 21 ++++++++++-- src/PhpWord/Style/NumberingLevel.php | 21 ++++++++++-- src/PhpWord/Style/Paragraph.php | 21 ++++++++++-- src/PhpWord/Style/Table.php | 21 ++++++++++-- tests/bootstrap.php | 14 ++------ 14 files changed, 187 insertions(+), 65 deletions(-) create mode 100644 bootstrap.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 650ca5dfc6..6c554bb78f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,10 +16,13 @@ Place announcement text here. ### Changed - Improved error message for the case when `autoload.php` is not found. - @RomanSyroeshko #371 - Renamed the `align` option of `NumberingLevel`, `Frame`, `Table`, and `Paragraph` styles into `alignment`. - @RomanSyroeshko +- Bootstrap script for the manual installation scenario (now include `bootstrap.php` instead of `src/PhpWord/Autoloader.php`). - @RomanSyroeshko ### Deprecated - `getAlign` and `setAlign` methods of `NumberingLevel`, `Frame`, `Table`, and `Paragraph` styles. Use the correspondent `getAlignment` and `setAlignment` methods instead. +- `left`, `right`, and `justify` alignment options for paragraphs (now are mapped to `Jc::START`, `Jc::END`, and `Jc::BOTH`). +- `left`, `right`, and `justify` alignment options for tables (now are mapped to `Jc::START`, `Jc::END`, and `Jc::CENTER`). ### Removed - `PhpOffice\PhpWord\Style\Alignment`. Style properties, which previously stored instances of this class, now deal with strings. diff --git a/bootstrap.php b/bootstrap.php new file mode 100644 index 0000000000..8f427a946d --- /dev/null +++ b/bootstrap.php @@ -0,0 +1,28 @@ +=5.3.3", - "ext-xml": "*" + "ext-xml": "*", + "zendframework/zend-validator": "2.5.*" }, "require-dev": { "phpunit/phpunit": "3.7.*", @@ -44,14 +45,15 @@ "phploc/phploc": "2.*", "dompdf/dompdf":"0.6.*", "tecnick.com/tcpdf": "6.*", - "mpdf/mpdf": "5.*" + "mpdf/mpdf": "5.*", + "zendframework/zend-validator": "2.5.*" }, "suggest": { - "ext-zip": "Used to write DOCX and ODT", - "ext-gd2": "Used to add images", - "ext-xmlwriter": "Used to write DOCX and ODT", - "ext-xsl": "Used to apply XSL style sheet to main document part of OOXML template", - "dompdf/dompdf": "Used to write PDF" + "ext-zip": "Allows writing DOCX and ODT", + "ext-gd2": "Allows adding images", + "ext-xmlwriter": "Allows writing DOCX and ODT", + "ext-xsl": "Allows applying XSL style sheet to main document part of OOXML template", + "dompdf/dompdf": "Allows writing PDF" }, "autoload": { "psr-4": { diff --git a/docs/installing.rst b/docs/installing.rst index d05464bf07..2ba8509a15 100644 --- a/docs/installing.rst +++ b/docs/installing.rst @@ -22,14 +22,12 @@ Installation ------------ There are two ways to install PHPWord, i.e. via -`Composer `__ or manually by downloading the -library. +`Composer `__ or manually by downloading the library. Using Composer ~~~~~~~~~~~~~~ -To install via Composer, add the following lines to your -``composer.json``: +To install via Composer, add the following lines to your ``composer.json``: .. code-block:: json @@ -51,8 +49,8 @@ Notice: all contributions must be done against the developer branch. } -Manual install -~~~~~~~~~~~~~~ +Manual installation +~~~~~~~~~~~~~~~~~~~ To install manually, you change to the web-server directory of your file system. Then you have 2 possibilities. @@ -63,12 +61,11 @@ To install manually, you change to the web-server directory of your file system. git clone https://github.com/PHPOffice/PHPWord.git -To use the library, include ``src/PhpWord/Autoloader.php`` in your PHP script and -invoke ``Autoloader::register``. +To use the library, include ``bootstrap.php`` in your PHP script and invoke ``Autoloader::register``. .. code-block:: php - require_once '/path/to/src/PhpWord/Autoloader.php'; + require_once "${path_to_the_cloned_repo}/bootstrap.php"; \PhpOffice\PhpWord\Autoloader::register(); diff --git a/samples/Sample_Footer.php b/samples/Sample_Footer.php index 95ac693fc3..2d89bfd253 100644 --- a/samples/Sample_Footer.php +++ b/samples/Sample_Footer.php @@ -1,7 +1,4 @@ '); diff --git a/src/PhpWord/Autoloader.php b/src/PhpWord/Autoloader.php index 68da845de3..1865292b76 100644 --- a/src/PhpWord/Autoloader.php +++ b/src/PhpWord/Autoloader.php @@ -17,9 +17,6 @@ namespace PhpOffice\PhpWord; -/** - * Autoloader - */ class Autoloader { /** @const string */ diff --git a/src/PhpWord/SimpleType/Jc.php b/src/PhpWord/SimpleType/Jc.php index 3d7366e403..ff94db169d 100644 --- a/src/PhpWord/SimpleType/Jc.php +++ b/src/PhpWord/SimpleType/Jc.php @@ -17,6 +17,8 @@ namespace PhpOffice\PhpWord\SimpleType; +use Zend\Validator\InArray; + /** * Horizontal Alignment Type. * @@ -35,23 +37,45 @@ final class Jc const LOW_KASHIDA = 'lowKashida'; const THAI_DISTRIBUTE = 'thaiDistribute'; + /** + * @deprecated 0.13.0 Use `START` instead. + */ + const LEFT = 'left'; + /** + * @deprecated 0.13.0 Use `END` instead. + */ + const RIGHT = 'right'; + /** + * @deprecated 0.13.0 Use `BOTH` instead. + */ + const JUSTIFY = 'justify'; + /** * @since 0.13.0 * - * @return string[] + * @return \Zend\Validator\InArray */ - final public static function getAllowedValues() - { - return array( - self::START, - self::CENTER, - self::END, - self::MEDIUM_KASHIDA, - self::DISTRIBUTE, - self::NUM_TAB, - self::HIGH_KASHIDA, - self::LOW_KASHIDA, - self::THAI_DISTRIBUTE, + final public static function getValidator() { + // todo: consider caching validator instances. + return new InArray( + array ( + 'haystack' => array( + self::START, + self::CENTER, + self::END, + self::BOTH, + self::MEDIUM_KASHIDA, + self::DISTRIBUTE, + self::NUM_TAB, + self::HIGH_KASHIDA, + self::LOW_KASHIDA, + self::THAI_DISTRIBUTE, + self::LEFT, + self::RIGHT, + self::JUSTIFY, + ), + 'strict' => InArray::COMPARE_STRICT, + ) ); } } diff --git a/src/PhpWord/SimpleType/JcTable.php b/src/PhpWord/SimpleType/JcTable.php index e9928a01fd..8a918fe7bb 100644 --- a/src/PhpWord/SimpleType/JcTable.php +++ b/src/PhpWord/SimpleType/JcTable.php @@ -17,6 +17,8 @@ namespace PhpOffice\PhpWord\SimpleType; +use Zend\Validator\InArray; + /** * Table Alignment Type. * @@ -28,13 +30,31 @@ final class JcTable const CENTER = 'center'; const END = 'end'; + /** + * @deprecated 0.13.0 Use `START` instead. + */ + const LEFT = 'left'; + /** + * @deprecated 0.13.0 Use `END` instead. + */ + const RIGHT = 'right'; + /** + * @deprecated 0.13.0 Use `CENTER` instead. + */ + const JUSTIFY = 'justify'; + /** * @since 0.13.0 * - * @return string[] + * @return \Zend\Validator\InArray */ - final public static function getAllowedValues() - { - return array(self::START, self::CENTER, self::END); + final public static function getValidator() { + // todo: consider caching validator instances. + return new InArray( + array ( + 'haystack' => array(self::START, self::CENTER, self::END, self::LEFT, self::RIGHT, self::JUSTIFY), + 'strict' => InArray::COMPARE_STRICT, + ) + ); } } diff --git a/src/PhpWord/Style/Frame.php b/src/PhpWord/Style/Frame.php index 055a4e8944..13388f6bc6 100644 --- a/src/PhpWord/Style/Frame.php +++ b/src/PhpWord/Style/Frame.php @@ -200,8 +200,25 @@ public function getAlignment() */ public function setAlignment($value) { - if (in_array($value, Jc::getAllowedValues(), true)) { - $this->alignment = $value; + if (Jc::getValidator()->isValid($value)) { + $alignment = ''; + + switch ($value) { + case Jc::LEFT: + $alignment = Jc::START; + break; + case Jc::RIGHT: + $alignment = Jc::END; + break; + case Jc::JUSTIFY: + $alignment = Jc::BOTH; + break; + default: + $alignment = $value; + break; + } + + $this->alignment = $alignment; } return $this; diff --git a/src/PhpWord/Style/NumberingLevel.php b/src/PhpWord/Style/NumberingLevel.php index 91f40df247..46686bf6fe 100644 --- a/src/PhpWord/Style/NumberingLevel.php +++ b/src/PhpWord/Style/NumberingLevel.php @@ -298,8 +298,25 @@ public function getAlignment() */ public function setAlignment($value) { - if (in_array($value, Jc::getAllowedValues(), true)) { - $this->alignment = $value; + if (Jc::getValidator()->isValid($value)) { + $alignment = ''; + + switch ($value) { + case Jc::LEFT: + $alignment = Jc::START; + break; + case Jc::RIGHT: + $alignment = Jc::END; + break; + case Jc::JUSTIFY: + $alignment = Jc::BOTH; + break; + default: + $alignment = $value; + break; + } + + $this->alignment = $alignment; } return $this; diff --git a/src/PhpWord/Style/Paragraph.php b/src/PhpWord/Style/Paragraph.php index 78a9c95f97..a98ca258cc 100644 --- a/src/PhpWord/Style/Paragraph.php +++ b/src/PhpWord/Style/Paragraph.php @@ -232,8 +232,25 @@ public function getAlignment() */ public function setAlignment($value) { - if (in_array($value, Jc::getAllowedValues(), true)) { - $this->alignment = $value; + if (Jc::getValidator()->isValid($value)) { + $alignment = ''; + + switch ($value) { + case Jc::LEFT: + $alignment = Jc::START; + break; + case Jc::RIGHT: + $alignment = Jc::END; + break; + case Jc::JUSTIFY: + $alignment = Jc::BOTH; + break; + default: + $alignment = $value; + break; + } + + $this->alignment = $alignment; } return $this; diff --git a/src/PhpWord/Style/Table.php b/src/PhpWord/Style/Table.php index ea4e493284..717a6bc168 100644 --- a/src/PhpWord/Style/Table.php +++ b/src/PhpWord/Style/Table.php @@ -509,8 +509,25 @@ public function getAlignment() */ public function setAlignment($value) { - if (in_array($value, JcTable::getAllowedValues(), true)) { - $this->alignment = $value; + if (JcTable::getValidator()->isValid($value)) { + $alignment = ''; + + switch ($value) { + case JcTable::LEFT: + $alignment = JcTable::START; + break; + case JcTable::RIGHT: + $alignment = JcTable::END; + break; + case JcTable::JUSTIFY: + $alignment = JcTable::CENTER; + break; + default: + $alignment = $value; + break; + } + + $this->alignment = $alignment; } return $this; diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 6a1398a4db..8ea94aede9 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -15,6 +15,8 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ +require_once __DIR__ . '/../bootstrap.php'; + date_default_timezone_set('UTC'); // defining base dir for tests @@ -22,18 +24,6 @@ define('PHPWORD_TESTS_BASE_DIR', realpath(__DIR__)); } -$vendorDirPath = realpath(__DIR__ . '/../vendor'); -if (file_exists($vendorDirPath . '/autoload.php')) { - require $vendorDirPath . '/autoload.php'; -} else { - throw new Exception( - sprintf( - 'Could not find file \'%s\'. It is generated by Composer. Use \'install\' or \'update\' Composer commands to move forward.', - $vendorDirPath . '/autoload.php' - ) - ); -} - spl_autoload_register(function ($class) { $class = ltrim($class, '\\'); $prefix = 'PhpOffice\\PhpWord\\Tests'; From 3965f110ffd53eeb30e6d7cd6665c6014fdd83f9 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 14 Nov 2015 15:57:15 +0400 Subject: [PATCH 53/99] Added backward compatibility for deprecated alignment options. --- src/PhpWord/SimpleType/Jc.php | 3 ++- src/PhpWord/SimpleType/JcTable.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/PhpWord/SimpleType/Jc.php b/src/PhpWord/SimpleType/Jc.php index ff94db169d..f78ed87d92 100644 --- a/src/PhpWord/SimpleType/Jc.php +++ b/src/PhpWord/SimpleType/Jc.php @@ -55,7 +55,8 @@ final class Jc * * @return \Zend\Validator\InArray */ - final public static function getValidator() { + final public static function getValidator() + { // todo: consider caching validator instances. return new InArray( array ( diff --git a/src/PhpWord/SimpleType/JcTable.php b/src/PhpWord/SimpleType/JcTable.php index 8a918fe7bb..43c64385b1 100644 --- a/src/PhpWord/SimpleType/JcTable.php +++ b/src/PhpWord/SimpleType/JcTable.php @@ -48,7 +48,8 @@ final class JcTable * * @return \Zend\Validator\InArray */ - final public static function getValidator() { + final public static function getValidator() + { // todo: consider caching validator instances. return new InArray( array ( From 015a34f5cb47082c3b823f067c46b3c947a94df1 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 14 Nov 2015 16:50:52 +0400 Subject: [PATCH 54/99] Added backward compatibility for deprecated alignment options. --- .travis.yml | 2 -- CHANGELOG.md | 10 +++++----- composer.json | 1 - docs/installing.rst | 33 +++++---------------------------- 4 files changed, 10 insertions(+), 36 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4d52286ae5..c39a05c460 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,8 +31,6 @@ before_script: script: ## PHP_CodeSniffer - ./vendor/bin/phpcs src/ tests/ --standard=PSR2 -n --ignore=src/PhpWord/Shared/PCLZip - ## PHP Copy/Paste Detector - - ./vendor/bin/phpcpd src/ tests/ --verbose ## PHP Mess Detector - ./vendor/bin/phpmd src/,tests/ text ./phpmd.xml.dist --exclude pclzip.lib.php ## PHPUnit diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c554bb78f..51d0bb56d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,17 +16,17 @@ Place announcement text here. ### Changed - Improved error message for the case when `autoload.php` is not found. - @RomanSyroeshko #371 - Renamed the `align` option of `NumberingLevel`, `Frame`, `Table`, and `Paragraph` styles into `alignment`. - @RomanSyroeshko -- Bootstrap script for the manual installation scenario (now include `bootstrap.php` instead of `src/PhpWord/Autoloader.php`). - @RomanSyroeshko ### Deprecated - `getAlign` and `setAlign` methods of `NumberingLevel`, `Frame`, `Table`, and `Paragraph` styles. -Use the correspondent `getAlignment` and `setAlignment` methods instead. -- `left`, `right`, and `justify` alignment options for paragraphs (now are mapped to `Jc::START`, `Jc::END`, and `Jc::BOTH`). -- `left`, `right`, and `justify` alignment options for tables (now are mapped to `Jc::START`, `Jc::END`, and `Jc::CENTER`). +Use the correspondent `getAlignment` and `setAlignment` methods instead. - @RomanSyroeshko +- `left`, `right`, and `justify` alignment options for paragraphs (now are mapped to `Jc::START`, `Jc::END`, and `Jc::BOTH`). - @RomanSyroeshko +- `left`, `right`, and `justify` alignment options for tables (now are mapped to `Jc::START`, `Jc::END`, and `Jc::CENTER`). - @RomanSyroeshko ### Removed - `PhpOffice\PhpWord\Style\Alignment`. Style properties, which previously stored instances of this class, now deal with strings. -In each case set of available string values is defined by the correspondent simple type. +In each case set of available string values is defined by the correspondent simple type. - @RomanSyroeshko +- Manual installation option. To install PHPWord use Composer since now. - @RomanSyroeshko 0.12.1 (30 August 2015) diff --git a/composer.json b/composer.json index b579598668..9629e3067c 100644 --- a/composer.json +++ b/composer.json @@ -41,7 +41,6 @@ "phpdocumentor/phpdocumentor":"2.*", "squizlabs/php_codesniffer": "1.*", "phpmd/phpmd": "2.*", - "sebastian/phpcpd": "2.*", "phploc/phploc": "2.*", "dompdf/dompdf":"0.6.*", "tecnick.com/tcpdf": "6.*", diff --git a/docs/installing.rst b/docs/installing.rst index 2ba8509a15..fe34ad3497 100644 --- a/docs/installing.rst +++ b/docs/installing.rst @@ -21,25 +21,22 @@ Optional PHP extensions: Installation ------------ -There are two ways to install PHPWord, i.e. via -`Composer `__ or manually by downloading the library. - -Using Composer -~~~~~~~~~~~~~~ - -To install via Composer, add the following lines to your ``composer.json``: +PHPWord is installed via `Composer `__. +You just need to `add dependency `__ on PHPWord into your package. +Example: .. code-block:: json { "require": { - "phpoffice/phpword": "dev-master" + "phpoffice/phpword": "v0.13.*" } } If you are a developer or if you want to help us with testing then fetch the latest branch for developers. Notice: all contributions must be done against the developer branch. +Example: .. code-block:: json { @@ -49,26 +46,6 @@ Notice: all contributions must be done against the developer branch. } -Manual installation -~~~~~~~~~~~~~~~~~~~ - -To install manually, you change to the web-server directory of your file system. Then you have 2 possibilities. - - 1. `download PHPWord package from github `__. - Extract the package and put the contents to your machine. - 2. Alternatively you can use Git to install it: - .. code-block:: console - - git clone https://github.com/PHPOffice/PHPWord.git - -To use the library, include ``bootstrap.php`` in your PHP script and invoke ``Autoloader::register``. - -.. code-block:: php - - require_once "${path_to_the_cloned_repo}/bootstrap.php"; - \PhpOffice\PhpWord\Autoloader::register(); - - Using samples ------------- From f884527af1bd5322e24910ea335fe2d0671e84e7 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 14 Nov 2015 17:24:36 +0400 Subject: [PATCH 55/99] Added backward compatibility for deprecated alignment options. --- README.md | 19 +++++++------------ docs/general.rst | 2 +- docs/installing.rst | 2 ++ 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 5f0f00cd41..4a1ece1c2b 100644 --- a/README.md +++ b/README.md @@ -53,8 +53,9 @@ With PHPWord, you can create DOCX, ODT, or RTF documents dynamically using your PHPWord requires the following: - PHP 5.3+ -- [Zip extension](http://php.net/manual/en/book.zip.php) - [XML Parser extension](http://www.php.net/manual/en/xml.installation.php) +- [Zend\Validator component](http://framework.zend.com/manual/current/en/modules/zend.validator.html) +- [Zip extension](http://php.net/manual/en/book.zip.php) (optional, used to write DOCX and ODT) - [GD extension](http://php.net/manual/en/book.image.php) (optional, used to add images) - [XMLWriter extension](http://php.net/manual/en/book.xmlwriter.php) (optional, used to write DOCX and ODT) - [XSL extension](http://php.net/manual/en/book.xsl.php) (optional, used to apply XSL style sheet to template ) @@ -62,8 +63,10 @@ PHPWord requires the following: ## Installation -It is recommended that you install the PHPWord library [through composer](http://getcomposer.org/). To do so, add -the following lines to your ``composer.json``. +PHPWord is installed via [Composer](https://getcomposer.org/). +You just need to [add dependency](https://getcomposer.org/doc/04-schema.md#package-links>) on PHPWord into your package. + +Example: ```json { @@ -73,21 +76,13 @@ the following lines to your ``composer.json``. } ``` -Alternatively, you can download the latest release from the [releases page](https://github.com/PHPOffice/PHPWord/releases). -In this case, you will have to register the autoloader. - -```php -require_once 'path/to/PhpWord/src/PhpWord/Autoloader.php'; -\PhpOffice\PhpWord\Autoloader::register(); -``` - ## Getting started The following is a basic usage example of the PHPWord library. ```php `__. .. code-block:: php `__. You just need to `add dependency `__ on PHPWord into your package. Example: + .. code-block:: json { @@ -37,6 +38,7 @@ If you are a developer or if you want to help us with testing then fetch the lat Notice: all contributions must be done against the developer branch. Example: + .. code-block:: json { From e3c88526b9e98254bb639de670451eb4a39eee4d Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 14 Nov 2015 17:30:22 +0400 Subject: [PATCH 56/99] Added backward compatibility for deprecated alignment options. --- docs/installing.rst | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/installing.rst b/docs/installing.rst index 01000eb9d9..67a4f4516a 100644 --- a/docs/installing.rst +++ b/docs/installing.rst @@ -9,14 +9,16 @@ Requirements Mandatory: - PHP 5.3+ -- PHP `Zip `__ extension -- PHP `XML Parser `__ extension +- `XML Parser `__ extension +- `Zend\Validator `__ component -Optional PHP extensions: +Optional: -- `GD `__ -- `XMLWriter `__ -- `XSL `__ +- `Zip `__ extension +- `GD `__ extension +- `XMLWriter `__ extension +- `XSL `__ extension +- `dompdf `__ Installation ------------ From 4ebd668d7a8a36e970400ecbf15068a4e51c1d73 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 14 Nov 2015 17:32:32 +0400 Subject: [PATCH 57/99] Added backward compatibility for deprecated alignment options. --- docs/installing.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/installing.rst b/docs/installing.rst index 67a4f4516a..2027a1a0e9 100644 --- a/docs/installing.rst +++ b/docs/installing.rst @@ -10,7 +10,7 @@ Mandatory: - PHP 5.3+ - `XML Parser `__ extension -- `Zend\Validator `__ component +- `Zend\\Validator `__ component Optional: From e24fec79665e11e59b80bcbf9ac3eb8bd7b8624a Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 14 Nov 2015 17:34:30 +0400 Subject: [PATCH 58/99] Added backward compatibility for deprecated alignment options. --- README.md | 2 +- docs/installing.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4a1ece1c2b..bb670afe86 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ PHPWord requires the following: - [GD extension](http://php.net/manual/en/book.image.php) (optional, used to add images) - [XMLWriter extension](http://php.net/manual/en/book.xmlwriter.php) (optional, used to write DOCX and ODT) - [XSL extension](http://php.net/manual/en/book.xsl.php) (optional, used to apply XSL style sheet to template ) -- [dompdf](https://github.com/dompdf/dompdf) (optional, used to write PDF) +- [dompdf library](https://github.com/dompdf/dompdf) (optional, used to write PDF) ## Installation diff --git a/docs/installing.rst b/docs/installing.rst index 2027a1a0e9..dc1f40f384 100644 --- a/docs/installing.rst +++ b/docs/installing.rst @@ -18,7 +18,7 @@ Optional: - `GD `__ extension - `XMLWriter `__ extension - `XSL `__ extension -- `dompdf `__ +- `dompdf `__ library Installation ------------ From e771b473a6951c17d4139ddd4634e3a27d767e5a Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 14 Nov 2015 18:13:51 +0400 Subject: [PATCH 59/99] Added backward compatibility for deprecated alignment options. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bb670afe86..f86ff0edef 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ Example: ```json { "require": { - "phpoffice/phpword": "dev-master" + "phpoffice/phpword": "v0.13.*" } } ``` From ef3c3b8a9d765229e37435115738c404413a81af Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sun, 15 Nov 2015 13:33:05 +0400 Subject: [PATCH 60/99] Reorganized unit tests. --- tests/PhpWord/{Tests => }/AutoloaderTest.php | 4 +--- .../{Tests => }/Collection/CollectionTest.php | 3 +-- .../{Tests => }/Element/AbstractElementTest.php | 2 +- tests/PhpWord/{Tests => }/Element/CellTest.php | 4 +--- tests/PhpWord/{Tests => }/Element/CheckBoxTest.php | 3 +-- tests/PhpWord/{Tests => }/Element/FieldTest.php | 4 +--- tests/PhpWord/{Tests => }/Element/FooterTest.php | 4 +--- tests/PhpWord/{Tests => }/Element/FootnoteTest.php | 4 +--- tests/PhpWord/{Tests => }/Element/HeaderTest.php | 4 +--- tests/PhpWord/{Tests => }/Element/ImageTest.php | 3 +-- tests/PhpWord/{Tests => }/Element/LineTest.php | 4 +--- tests/PhpWord/{Tests => }/Element/LinkTest.php | 3 +-- .../PhpWord/{Tests => }/Element/ListItemRunTest.php | 4 +--- tests/PhpWord/{Tests => }/Element/ListItemTest.php | 4 +--- tests/PhpWord/{Tests => }/Element/ObjectTest.php | 4 +--- tests/PhpWord/{Tests => }/Element/PageBreakTest.php | 4 +--- .../{Tests => }/Element/PreserveTextTest.php | 3 +-- tests/PhpWord/{Tests => }/Element/RowTest.php | 4 +--- tests/PhpWord/{Tests => }/Element/SDTTest.php | 4 +--- tests/PhpWord/{Tests => }/Element/SectionTest.php | 4 +--- tests/PhpWord/{Tests => }/Element/TOCTest.php | 4 +--- tests/PhpWord/{Tests => }/Element/TableTest.php | 4 +--- tests/PhpWord/{Tests => }/Element/TextBoxTest.php | 4 +--- tests/PhpWord/{Tests => }/Element/TextBreakTest.php | 3 +-- tests/PhpWord/{Tests => }/Element/TextRunTest.php | 3 +-- tests/PhpWord/{Tests => }/Element/TextTest.php | 3 +-- tests/PhpWord/{Tests => }/Element/TitleTest.php | 4 +--- .../{Tests => }/Exception/CopyFileExceptionTest.php | 4 +--- .../Exception/CreateTemporaryFileExceptionTest.php | 4 +--- .../PhpWord/{Tests => }/Exception/ExceptionTest.php | 4 +--- .../Exception/InvalidImageExceptionTest.php | 4 +--- .../Exception/InvalidStyleExceptionTest.php | 4 +--- .../Exception/UnsupportedImageTypeExceptionTest.php | 4 +--- tests/PhpWord/{Tests => }/IOFactoryTest.php | 5 +---- tests/PhpWord/{Tests => }/MediaTest.php | 3 +-- tests/PhpWord/{Tests => }/Metadata/DocInfoTest.php | 4 +--- tests/PhpWord/{Tests => }/PhpWordTest.php | 4 +--- tests/PhpWord/{Tests => }/Reader/HTMLTest.php | 2 +- tests/PhpWord/{Tests => }/Reader/ODTextTest.php | 2 +- tests/PhpWord/{Tests => }/Reader/RTFTest.php | 2 +- tests/PhpWord/{Tests => }/Reader/Word2007Test.php | 2 +- tests/PhpWord/{Tests => }/SettingsTest.php | 8 +++----- tests/PhpWord/{Tests => }/Shared/ConverterTest.php | 4 +--- tests/PhpWord/{Tests => }/Shared/HtmlTest.php | 3 +-- tests/PhpWord/{Tests => }/Shared/StringTest.php | 4 +--- tests/PhpWord/{Tests => }/Shared/XMLReaderTest.php | 4 +--- tests/PhpWord/{Tests => }/Shared/XMLWriterTest.php | 3 +-- tests/PhpWord/{Tests => }/Shared/ZipArchiveTest.php | 3 +-- .../PhpWord/{Tests => }/Style/AbstractStyleTest.php | 2 +- tests/PhpWord/{Tests => }/Style/CellTest.php | 4 +--- tests/PhpWord/{Tests => }/Style/FontTest.php | 5 ++--- tests/PhpWord/{Tests => }/Style/ImageTest.php | 3 +-- tests/PhpWord/{Tests => }/Style/IndentationTest.php | 4 +--- .../PhpWord/{Tests => }/Style/LineNumberingTest.php | 4 +--- tests/PhpWord/{Tests => }/Style/LineTest.php | 4 +--- tests/PhpWord/{Tests => }/Style/ListItemTest.php | 4 +--- .../{Tests => }/Style/NumberingLevelTest.php | 3 +-- tests/PhpWord/{Tests => }/Style/NumberingTest.php | 4 +--- tests/PhpWord/{Tests => }/Style/ParagraphTest.php | 6 ++---- tests/PhpWord/{Tests => }/Style/RowTest.php | 4 +--- tests/PhpWord/{Tests => }/Style/SectionTest.php | 4 +--- tests/PhpWord/{Tests => }/Style/ShadingTest.php | 4 +--- tests/PhpWord/{Tests => }/Style/SpacingTest.php | 4 +--- tests/PhpWord/{Tests => }/Style/TOCTest.php | 4 +--- tests/PhpWord/{Tests => }/Style/TabTest.php | 4 +--- tests/PhpWord/{Tests => }/Style/TableTest.php | 3 +-- tests/PhpWord/{Tests => }/Style/TextBoxTest.php | 3 +-- tests/PhpWord/{Tests => }/StyleTest.php | 2 +- tests/PhpWord/{Tests => }/TemplateProcessorTest.php | 4 +--- .../PhpWord/{Tests => }/Writer/HTML/ElementTest.php | 4 ++-- tests/PhpWord/{Tests => }/Writer/HTML/PartTest.php | 2 +- tests/PhpWord/{Tests => }/Writer/HTML/StyleTest.php | 4 +--- tests/PhpWord/{Tests => }/Writer/HTMLTest.php | 2 +- .../{Tests => }/Writer/ODText/ElementTest.php | 2 +- .../Writer/ODText/Part/AbstractPartTest.php | 2 +- .../{Tests => }/Writer/ODText/Part/ContentTest.php | 4 ++-- .../PhpWord/{Tests => }/Writer/ODText/StyleTest.php | 2 +- tests/PhpWord/{Tests => }/Writer/ODTextTest.php | 2 +- tests/PhpWord/{Tests => }/Writer/PDF/DomPDFTest.php | 2 +- tests/PhpWord/{Tests => }/Writer/PDF/MPDFTest.php | 2 +- tests/PhpWord/{Tests => }/Writer/PDF/TCPDFTest.php | 2 +- tests/PhpWord/{Tests => }/Writer/PDFTest.php | 2 +- .../PhpWord/{Tests => }/Writer/RTF/ElementTest.php | 2 +- tests/PhpWord/{Tests => }/Writer/RTF/StyleTest.php | 4 +--- tests/PhpWord/{Tests => }/Writer/RTFTest.php | 2 +- .../{Tests => }/Writer/Word2007/ElementTest.php | 4 ++-- .../Writer/Word2007/Part/AbstractPartTest.php | 4 ++-- .../Writer/Word2007/Part/DocumentTest.php | 4 ++-- .../{Tests => }/Writer/Word2007/Part/FooterTest.php | 3 +-- .../Writer/Word2007/Part/FootnotesTest.php | 4 ++-- .../{Tests => }/Writer/Word2007/Part/HeaderTest.php | 3 +-- .../Writer/Word2007/Part/NumberingTest.php | 4 ++-- .../Writer/Word2007/Part/SettingsTest.php | 4 ++-- .../{Tests => }/Writer/Word2007/Part/StylesTest.php | 4 ++-- .../{Tests => }/Writer/Word2007/PartTest.php | 2 +- .../{Tests => }/Writer/Word2007/Style/FontTest.php | 4 ++-- .../{Tests => }/Writer/Word2007/StyleTest.php | 2 +- tests/PhpWord/{Tests => }/Writer/Word2007Test.php | 4 ++-- .../{Tests => }/_files/documents/reader.docx | Bin .../{Tests => }/_files/documents/reader.docx.zip | Bin .../{Tests => }/_files/documents/reader.html | 0 .../PhpWord/{Tests => }/_files/documents/reader.odt | Bin .../PhpWord/{Tests => }/_files/documents/reader.rtf | 0 .../PhpWord/{Tests => }/_files/documents/sheet.xls | Bin .../_files/documents/without_table_macros.docx | Bin tests/PhpWord/{Tests => }/_files/images/PhpWord.png | Bin .../{Tests => }/_files/images/alexz-johnson.pcx | Bin .../{Tests => }/_files/images/angela_merkel.tif | Bin .../{Tests => }/_files/images/duke_nukem.bmp | Bin tests/PhpWord/{Tests => }/_files/images/earth.jpg | Bin tests/PhpWord/{Tests => }/_files/images/firefox.png | Bin tests/PhpWord/{Tests => }/_files/images/mario.gif | Bin tests/PhpWord/{Tests => }/_files/images/mars.jpg | Bin .../{Tests => }/_files/images/mars_noext_jpg | Bin .../PhpWord/{Tests => }/_files/templates/blank.docx | Bin .../_files/templates/clone-delete-block.docx | Bin .../{Tests => }/_files/templates/clone-merge.docx | Bin .../templates/corrupted_main_document_part.docx | Bin .../{Tests => }/_files/templates/header-footer.docx | Bin .../_files/templates/with_table_macros.docx | Bin .../PhpWord/{Tests => }/_files/xsl/passthrough.xsl | 2 +- .../_files/xsl/remove_tables_by_needle.xsl | 0 .../{Tests => }/_includes/TestHelperDOCX.php | 7 ++----- tests/PhpWord/{Tests => }/_includes/XmlDocument.php | 2 +- tests/bootstrap.php | 5 ++--- 125 files changed, 119 insertions(+), 237 deletions(-) rename tests/PhpWord/{Tests => }/AutoloaderTest.php (96%) rename tests/PhpWord/{Tests => }/Collection/CollectionTest.php (93%) rename tests/PhpWord/{Tests => }/Element/AbstractElementTest.php (97%) rename tests/PhpWord/{Tests => }/Element/CellTest.php (99%) rename tests/PhpWord/{Tests => }/Element/CheckBoxTest.php (97%) rename tests/PhpWord/{Tests => }/Element/FieldTest.php (97%) rename tests/PhpWord/{Tests => }/Element/FooterTest.php (98%) rename tests/PhpWord/{Tests => }/Element/FootnoteTest.php (97%) rename tests/PhpWord/{Tests => }/Element/HeaderTest.php (98%) rename tests/PhpWord/{Tests => }/Element/ImageTest.php (98%) rename tests/PhpWord/{Tests => }/Element/LineTest.php (96%) rename tests/PhpWord/{Tests => }/Element/LinkTest.php (97%) rename tests/PhpWord/{Tests => }/Element/ListItemRunTest.php (98%) rename tests/PhpWord/{Tests => }/Element/ListItemTest.php (95%) rename tests/PhpWord/{Tests => }/Element/ObjectTest.php (97%) rename tests/PhpWord/{Tests => }/Element/PageBreakTest.php (93%) rename tests/PhpWord/{Tests => }/Element/PreserveTextTest.php (96%) rename tests/PhpWord/{Tests => }/Element/RowTest.php (96%) rename tests/PhpWord/{Tests => }/Element/SDTTest.php (96%) rename tests/PhpWord/{Tests => }/Element/SectionTest.php (97%) rename tests/PhpWord/{Tests => }/Element/TOCTest.php (96%) rename tests/PhpWord/{Tests => }/Element/TableTest.php (97%) rename tests/PhpWord/{Tests => }/Element/TextBoxTest.php (96%) rename tests/PhpWord/{Tests => }/Element/TextBreakTest.php (96%) rename tests/PhpWord/{Tests => }/Element/TextRunTest.php (98%) rename tests/PhpWord/{Tests => }/Element/TextTest.php (97%) rename tests/PhpWord/{Tests => }/Element/TitleTest.php (94%) rename tests/PhpWord/{Tests => }/Exception/CopyFileExceptionTest.php (92%) rename tests/PhpWord/{Tests => }/Exception/CreateTemporaryFileExceptionTest.php (92%) rename tests/PhpWord/{Tests => }/Exception/ExceptionTest.php (92%) rename tests/PhpWord/{Tests => }/Exception/InvalidImageExceptionTest.php (92%) rename tests/PhpWord/{Tests => }/Exception/InvalidStyleExceptionTest.php (92%) rename tests/PhpWord/{Tests => }/Exception/UnsupportedImageTypeExceptionTest.php (92%) rename tests/PhpWord/{Tests => }/IOFactoryTest.php (95%) rename tests/PhpWord/{Tests => }/MediaTest.php (98%) rename tests/PhpWord/{Tests => }/Metadata/DocInfoTest.php (98%) rename tests/PhpWord/{Tests => }/PhpWordTest.php (98%) rename tests/PhpWord/{Tests => }/Reader/HTMLTest.php (97%) rename tests/PhpWord/{Tests => }/Reader/ODTextTest.php (96%) rename tests/PhpWord/{Tests => }/Reader/RTFTest.php (97%) rename tests/PhpWord/{Tests => }/Reader/Word2007Test.php (97%) rename tests/PhpWord/{Tests => }/SettingsTest.php (97%) rename tests/PhpWord/{Tests => }/Shared/ConverterTest.php (98%) rename tests/PhpWord/{Tests => }/Shared/HtmlTest.php (96%) rename tests/PhpWord/{Tests => }/Shared/StringTest.php (96%) rename tests/PhpWord/{Tests => }/Shared/XMLReaderTest.php (96%) rename tests/PhpWord/{Tests => }/Shared/XMLWriterTest.php (93%) rename tests/PhpWord/{Tests => }/Shared/ZipArchiveTest.php (98%) rename tests/PhpWord/{Tests => }/Style/AbstractStyleTest.php (98%) rename tests/PhpWord/{Tests => }/Style/CellTest.php (97%) rename tests/PhpWord/{Tests => }/Style/FontTest.php (98%) rename tests/PhpWord/{Tests => }/Style/ImageTest.php (97%) rename tests/PhpWord/{Tests => }/Style/IndentationTest.php (95%) rename tests/PhpWord/{Tests => }/Style/LineNumberingTest.php (94%) rename tests/PhpWord/{Tests => }/Style/LineTest.php (98%) rename tests/PhpWord/{Tests => }/Style/ListItemTest.php (96%) rename tests/PhpWord/{Tests => }/Style/NumberingLevelTest.php (95%) rename tests/PhpWord/{Tests => }/Style/NumberingTest.php (95%) rename tests/PhpWord/{Tests => }/Style/ParagraphTest.php (96%) rename tests/PhpWord/{Tests => }/Style/RowTest.php (96%) rename tests/PhpWord/{Tests => }/Style/SectionTest.php (99%) rename tests/PhpWord/{Tests => }/Style/ShadingTest.php (95%) rename tests/PhpWord/{Tests => }/Style/SpacingTest.php (95%) rename tests/PhpWord/{Tests => }/Style/TOCTest.php (95%) rename tests/PhpWord/{Tests => }/Style/TabTest.php (95%) rename tests/PhpWord/{Tests => }/Style/TableTest.php (98%) rename tests/PhpWord/{Tests => }/Style/TextBoxTest.php (99%) rename tests/PhpWord/{Tests => }/StyleTest.php (98%) rename tests/PhpWord/{Tests => }/TemplateProcessorTest.php (99%) rename tests/PhpWord/{Tests => }/Writer/HTML/ElementTest.php (97%) rename tests/PhpWord/{Tests => }/Writer/HTML/PartTest.php (95%) rename tests/PhpWord/{Tests => }/Writer/HTML/StyleTest.php (93%) rename tests/PhpWord/{Tests => }/Writer/HTMLTest.php (99%) rename tests/PhpWord/{Tests => }/Writer/ODText/ElementTest.php (96%) rename tests/PhpWord/{Tests => }/Writer/ODText/Part/AbstractPartTest.php (96%) rename tests/PhpWord/{Tests => }/Writer/ODText/Part/ContentTest.php (97%) rename tests/PhpWord/{Tests => }/Writer/ODText/StyleTest.php (96%) rename tests/PhpWord/{Tests => }/Writer/ODTextTest.php (99%) rename tests/PhpWord/{Tests => }/Writer/PDF/DomPDFTest.php (98%) rename tests/PhpWord/{Tests => }/Writer/PDF/MPDFTest.php (97%) rename tests/PhpWord/{Tests => }/Writer/PDF/TCPDFTest.php (97%) rename tests/PhpWord/{Tests => }/Writer/PDFTest.php (97%) rename tests/PhpWord/{Tests => }/Writer/RTF/ElementTest.php (96%) rename tests/PhpWord/{Tests => }/Writer/RTF/StyleTest.php (93%) rename tests/PhpWord/{Tests => }/Writer/RTFTest.php (98%) rename tests/PhpWord/{Tests => }/Writer/Word2007/ElementTest.php (98%) rename tests/PhpWord/{Tests => }/Writer/Word2007/Part/AbstractPartTest.php (97%) rename tests/PhpWord/{Tests => }/Writer/Word2007/Part/DocumentTest.php (99%) rename tests/PhpWord/{Tests => }/Writer/Word2007/Part/FooterTest.php (94%) rename tests/PhpWord/{Tests => }/Writer/Word2007/Part/FootnotesTest.php (95%) rename tests/PhpWord/{Tests => }/Writer/Word2007/Part/HeaderTest.php (94%) rename tests/PhpWord/{Tests => }/Writer/Word2007/Part/NumberingTest.php (95%) rename tests/PhpWord/{Tests => }/Writer/Word2007/Part/SettingsTest.php (94%) rename tests/PhpWord/{Tests => }/Writer/Word2007/Part/StylesTest.php (96%) rename tests/PhpWord/{Tests => }/Writer/Word2007/PartTest.php (96%) rename tests/PhpWord/{Tests => }/Writer/Word2007/Style/FontTest.php (94%) rename tests/PhpWord/{Tests => }/Writer/Word2007/StyleTest.php (97%) rename tests/PhpWord/{Tests => }/Writer/Word2007Test.php (98%) rename tests/PhpWord/{Tests => }/_files/documents/reader.docx (100%) rename tests/PhpWord/{Tests => }/_files/documents/reader.docx.zip (100%) rename tests/PhpWord/{Tests => }/_files/documents/reader.html (100%) rename tests/PhpWord/{Tests => }/_files/documents/reader.odt (100%) rename tests/PhpWord/{Tests => }/_files/documents/reader.rtf (100%) rename tests/PhpWord/{Tests => }/_files/documents/sheet.xls (100%) rename tests/PhpWord/{Tests => }/_files/documents/without_table_macros.docx (100%) rename tests/PhpWord/{Tests => }/_files/images/PhpWord.png (100%) rename tests/PhpWord/{Tests => }/_files/images/alexz-johnson.pcx (100%) rename tests/PhpWord/{Tests => }/_files/images/angela_merkel.tif (100%) rename tests/PhpWord/{Tests => }/_files/images/duke_nukem.bmp (100%) rename tests/PhpWord/{Tests => }/_files/images/earth.jpg (100%) rename tests/PhpWord/{Tests => }/_files/images/firefox.png (100%) rename tests/PhpWord/{Tests => }/_files/images/mario.gif (100%) rename tests/PhpWord/{Tests => }/_files/images/mars.jpg (100%) rename tests/PhpWord/{Tests => }/_files/images/mars_noext_jpg (100%) rename tests/PhpWord/{Tests => }/_files/templates/blank.docx (100%) rename tests/PhpWord/{Tests => }/_files/templates/clone-delete-block.docx (100%) rename tests/PhpWord/{Tests => }/_files/templates/clone-merge.docx (100%) rename tests/PhpWord/{Tests => }/_files/templates/corrupted_main_document_part.docx (100%) rename tests/PhpWord/{Tests => }/_files/templates/header-footer.docx (100%) rename tests/PhpWord/{Tests => }/_files/templates/with_table_macros.docx (100%) rename tests/PhpWord/{Tests => }/_files/xsl/passthrough.xsl (76%) rename tests/PhpWord/{Tests => }/_files/xsl/remove_tables_by_needle.xsl (100%) rename tests/PhpWord/{Tests => }/_includes/TestHelperDOCX.php (94%) rename tests/PhpWord/{Tests => }/_includes/XmlDocument.php (98%) diff --git a/tests/PhpWord/Tests/AutoloaderTest.php b/tests/PhpWord/AutoloaderTest.php similarity index 96% rename from tests/PhpWord/Tests/AutoloaderTest.php rename to tests/PhpWord/AutoloaderTest.php index 7847aa05ff..6922821328 100644 --- a/tests/PhpWord/Tests/AutoloaderTest.php +++ b/tests/PhpWord/AutoloaderTest.php @@ -15,9 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests; - -use PhpOffice\PhpWord\Autoloader; +namespace PhpOffice\PhpWord; /** * Test class for PhpOffice\PhpWord\Autoloader diff --git a/tests/PhpWord/Tests/Collection/CollectionTest.php b/tests/PhpWord/Collection/CollectionTest.php similarity index 93% rename from tests/PhpWord/Tests/Collection/CollectionTest.php rename to tests/PhpWord/Collection/CollectionTest.php index 833b3e8072..12240904f4 100644 --- a/tests/PhpWord/Tests/Collection/CollectionTest.php +++ b/tests/PhpWord/Collection/CollectionTest.php @@ -7,10 +7,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Element; +namespace PhpOffice\PhpWord\Element; use PhpOffice\PhpWord\Collection\Footnotes; -use PhpOffice\PhpWord\Element\Footnote; /** * Test class for PhpOffice\PhpWord\Element\Collection subnamespace diff --git a/tests/PhpWord/Tests/Element/AbstractElementTest.php b/tests/PhpWord/Element/AbstractElementTest.php similarity index 97% rename from tests/PhpWord/Tests/Element/AbstractElementTest.php rename to tests/PhpWord/Element/AbstractElementTest.php index 53485c6b88..4770fe47e0 100644 --- a/tests/PhpWord/Tests/Element/AbstractElementTest.php +++ b/tests/PhpWord/Element/AbstractElementTest.php @@ -15,7 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Element; +namespace PhpOffice\PhpWord\Element; /** * Test class for PhpOffice\PhpWord\Element\AbstractElement diff --git a/tests/PhpWord/Tests/Element/CellTest.php b/tests/PhpWord/Element/CellTest.php similarity index 99% rename from tests/PhpWord/Tests/Element/CellTest.php rename to tests/PhpWord/Element/CellTest.php index 322f6417a7..90ef203925 100644 --- a/tests/PhpWord/Tests/Element/CellTest.php +++ b/tests/PhpWord/Element/CellTest.php @@ -15,9 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Element; - -use PhpOffice\PhpWord\Element\Cell; +namespace PhpOffice\PhpWord\Element; /** * Test class for PhpOffice\PhpWord\Element\Cell diff --git a/tests/PhpWord/Tests/Element/CheckBoxTest.php b/tests/PhpWord/Element/CheckBoxTest.php similarity index 97% rename from tests/PhpWord/Tests/Element/CheckBoxTest.php rename to tests/PhpWord/Element/CheckBoxTest.php index fdc2ef77e3..e0a40ea3f6 100644 --- a/tests/PhpWord/Tests/Element/CheckBoxTest.php +++ b/tests/PhpWord/Element/CheckBoxTest.php @@ -15,9 +15,8 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Element; +namespace PhpOffice\PhpWord\Element; -use PhpOffice\PhpWord\Element\CheckBox; use PhpOffice\PhpWord\SimpleType\Jc; use PhpOffice\PhpWord\Style\Font; diff --git a/tests/PhpWord/Tests/Element/FieldTest.php b/tests/PhpWord/Element/FieldTest.php similarity index 97% rename from tests/PhpWord/Tests/Element/FieldTest.php rename to tests/PhpWord/Element/FieldTest.php index 552b5cf5c0..c24fb88f52 100644 --- a/tests/PhpWord/Tests/Element/FieldTest.php +++ b/tests/PhpWord/Element/FieldTest.php @@ -15,9 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Element; - -use PhpOffice\PhpWord\Element\Field; +namespace PhpOffice\PhpWord\Element; /** * Test class for PhpOffice\PhpWord\Element\Field diff --git a/tests/PhpWord/Tests/Element/FooterTest.php b/tests/PhpWord/Element/FooterTest.php similarity index 98% rename from tests/PhpWord/Tests/Element/FooterTest.php rename to tests/PhpWord/Element/FooterTest.php index 8fe6289419..438e858b28 100644 --- a/tests/PhpWord/Tests/Element/FooterTest.php +++ b/tests/PhpWord/Element/FooterTest.php @@ -15,9 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Element; - -use PhpOffice\PhpWord\Element\Footer; +namespace PhpOffice\PhpWord\Element; /** * Test class for PhpOffice\PhpWord\Element\Footer diff --git a/tests/PhpWord/Tests/Element/FootnoteTest.php b/tests/PhpWord/Element/FootnoteTest.php similarity index 97% rename from tests/PhpWord/Tests/Element/FootnoteTest.php rename to tests/PhpWord/Element/FootnoteTest.php index 745c602f1e..1187ce91e7 100644 --- a/tests/PhpWord/Tests/Element/FootnoteTest.php +++ b/tests/PhpWord/Element/FootnoteTest.php @@ -15,9 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Element; - -use PhpOffice\PhpWord\Element\Footnote; +namespace PhpOffice\PhpWord\Element; /** * Test class for PhpOffice\PhpWord\Element\Footnote diff --git a/tests/PhpWord/Tests/Element/HeaderTest.php b/tests/PhpWord/Element/HeaderTest.php similarity index 98% rename from tests/PhpWord/Tests/Element/HeaderTest.php rename to tests/PhpWord/Element/HeaderTest.php index 0bce5e4f91..25b2c69e0e 100644 --- a/tests/PhpWord/Tests/Element/HeaderTest.php +++ b/tests/PhpWord/Element/HeaderTest.php @@ -15,9 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Element; - -use PhpOffice\PhpWord\Element\Header; +namespace PhpOffice\PhpWord\Element; /** * Test class for PhpOffice\PhpWord\Element\Header diff --git a/tests/PhpWord/Tests/Element/ImageTest.php b/tests/PhpWord/Element/ImageTest.php similarity index 98% rename from tests/PhpWord/Tests/Element/ImageTest.php rename to tests/PhpWord/Element/ImageTest.php index d036075628..0907ee8f9a 100644 --- a/tests/PhpWord/Tests/Element/ImageTest.php +++ b/tests/PhpWord/Element/ImageTest.php @@ -15,9 +15,8 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Element; +namespace PhpOffice\PhpWord\Element; -use PhpOffice\PhpWord\Element\Image; use PhpOffice\PhpWord\SimpleType\Jc; /** diff --git a/tests/PhpWord/Tests/Element/LineTest.php b/tests/PhpWord/Element/LineTest.php similarity index 96% rename from tests/PhpWord/Tests/Element/LineTest.php rename to tests/PhpWord/Element/LineTest.php index 66ab257eca..6ed2ddc752 100644 --- a/tests/PhpWord/Tests/Element/LineTest.php +++ b/tests/PhpWord/Element/LineTest.php @@ -15,9 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Element; - -use PhpOffice\PhpWord\Element\Line; +namespace PhpOffice\PhpWord\Element; /** * Test class for PhpOffice\PhpWord\Element\Line diff --git a/tests/PhpWord/Tests/Element/LinkTest.php b/tests/PhpWord/Element/LinkTest.php similarity index 97% rename from tests/PhpWord/Tests/Element/LinkTest.php rename to tests/PhpWord/Element/LinkTest.php index 16bd531ac1..bc6ec4d6cb 100644 --- a/tests/PhpWord/Tests/Element/LinkTest.php +++ b/tests/PhpWord/Element/LinkTest.php @@ -15,9 +15,8 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Element; +namespace PhpOffice\PhpWord\Element; -use PhpOffice\PhpWord\Element\Link; use PhpOffice\PhpWord\Style\Font; /** diff --git a/tests/PhpWord/Tests/Element/ListItemRunTest.php b/tests/PhpWord/Element/ListItemRunTest.php similarity index 98% rename from tests/PhpWord/Tests/Element/ListItemRunTest.php rename to tests/PhpWord/Element/ListItemRunTest.php index 2e003a20bc..422f5ce094 100644 --- a/tests/PhpWord/Tests/Element/ListItemRunTest.php +++ b/tests/PhpWord/Element/ListItemRunTest.php @@ -15,9 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Element; - -use PhpOffice\PhpWord\Element\ListItemRun; +namespace PhpOffice\PhpWord\Element; /** * Test class for PhpOffice\PhpWord\Element\ListItemRun diff --git a/tests/PhpWord/Tests/Element/ListItemTest.php b/tests/PhpWord/Element/ListItemTest.php similarity index 95% rename from tests/PhpWord/Tests/Element/ListItemTest.php rename to tests/PhpWord/Element/ListItemTest.php index f8e76d74cf..e4e7ca5851 100644 --- a/tests/PhpWord/Tests/Element/ListItemTest.php +++ b/tests/PhpWord/Element/ListItemTest.php @@ -15,9 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Element; - -use PhpOffice\PhpWord\Element\ListItem; +namespace PhpOffice\PhpWord\Element; /** * Test class for PhpOffice\PhpWord\Element\ListItem diff --git a/tests/PhpWord/Tests/Element/ObjectTest.php b/tests/PhpWord/Element/ObjectTest.php similarity index 97% rename from tests/PhpWord/Tests/Element/ObjectTest.php rename to tests/PhpWord/Element/ObjectTest.php index ae72b3d61a..a5fc9862ac 100644 --- a/tests/PhpWord/Tests/Element/ObjectTest.php +++ b/tests/PhpWord/Element/ObjectTest.php @@ -15,9 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Element; - -use PhpOffice\PhpWord\Element\Object; +namespace PhpOffice\PhpWord\Element; /** * Test class for PhpOffice\PhpWord\Element\Object diff --git a/tests/PhpWord/Tests/Element/PageBreakTest.php b/tests/PhpWord/Element/PageBreakTest.php similarity index 93% rename from tests/PhpWord/Tests/Element/PageBreakTest.php rename to tests/PhpWord/Element/PageBreakTest.php index 6b038a8257..9aea06e47a 100644 --- a/tests/PhpWord/Tests/Element/PageBreakTest.php +++ b/tests/PhpWord/Element/PageBreakTest.php @@ -15,9 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Element; - -use PhpOffice\PhpWord\Element\PageBreak; +namespace PhpOffice\PhpWord\Element; /** * Test class for PhpOffice\PhpWord\Element\PageBreak diff --git a/tests/PhpWord/Tests/Element/PreserveTextTest.php b/tests/PhpWord/Element/PreserveTextTest.php similarity index 96% rename from tests/PhpWord/Tests/Element/PreserveTextTest.php rename to tests/PhpWord/Element/PreserveTextTest.php index 73cee03e3a..c87e3d0036 100644 --- a/tests/PhpWord/Tests/Element/PreserveTextTest.php +++ b/tests/PhpWord/Element/PreserveTextTest.php @@ -15,9 +15,8 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Element; +namespace PhpOffice\PhpWord\Element; -use PhpOffice\PhpWord\Element\PreserveText; use PhpOffice\PhpWord\SimpleType\Jc; /** diff --git a/tests/PhpWord/Tests/Element/RowTest.php b/tests/PhpWord/Element/RowTest.php similarity index 96% rename from tests/PhpWord/Tests/Element/RowTest.php rename to tests/PhpWord/Element/RowTest.php index 446884c6e3..6172360918 100644 --- a/tests/PhpWord/Tests/Element/RowTest.php +++ b/tests/PhpWord/Element/RowTest.php @@ -15,9 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Element; - -use PhpOffice\PhpWord\Element\Row; +namespace PhpOffice\PhpWord\Element; /** * Test class for PhpOffice\PhpWord\Element\Row diff --git a/tests/PhpWord/Tests/Element/SDTTest.php b/tests/PhpWord/Element/SDTTest.php similarity index 96% rename from tests/PhpWord/Tests/Element/SDTTest.php rename to tests/PhpWord/Element/SDTTest.php index 8c7b4bf328..09bc3eb73b 100644 --- a/tests/PhpWord/Tests/Element/SDTTest.php +++ b/tests/PhpWord/Element/SDTTest.php @@ -15,9 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Element; - -use PhpOffice\PhpWord\Element\SDT; +namespace PhpOffice\PhpWord\Element; /** * Test class for PhpOffice\PhpWord\Element\SDT diff --git a/tests/PhpWord/Tests/Element/SectionTest.php b/tests/PhpWord/Element/SectionTest.php similarity index 97% rename from tests/PhpWord/Tests/Element/SectionTest.php rename to tests/PhpWord/Element/SectionTest.php index 79a2168412..adad9daa71 100644 --- a/tests/PhpWord/Tests/Element/SectionTest.php +++ b/tests/PhpWord/Element/SectionTest.php @@ -15,10 +15,8 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Element; +namespace PhpOffice\PhpWord\Element; -use PhpOffice\PhpWord\Element\Header; -use PhpOffice\PhpWord\Element\Section; use PhpOffice\PhpWord\Exception\Exception; use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\Style; diff --git a/tests/PhpWord/Tests/Element/TOCTest.php b/tests/PhpWord/Element/TOCTest.php similarity index 96% rename from tests/PhpWord/Tests/Element/TOCTest.php rename to tests/PhpWord/Element/TOCTest.php index e4d984ebb9..f6337e9842 100644 --- a/tests/PhpWord/Tests/Element/TOCTest.php +++ b/tests/PhpWord/Element/TOCTest.php @@ -15,10 +15,8 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Element; +namespace PhpOffice\PhpWord\Element; -use PhpOffice\PhpWord\Element\Title; -use PhpOffice\PhpWord\Element\TOC; use PhpOffice\PhpWord\PhpWord; /** diff --git a/tests/PhpWord/Tests/Element/TableTest.php b/tests/PhpWord/Element/TableTest.php similarity index 97% rename from tests/PhpWord/Tests/Element/TableTest.php rename to tests/PhpWord/Element/TableTest.php index be5df55c96..5ac97f04db 100644 --- a/tests/PhpWord/Tests/Element/TableTest.php +++ b/tests/PhpWord/Element/TableTest.php @@ -15,9 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Element; - -use PhpOffice\PhpWord\Element\Table; +namespace PhpOffice\PhpWord\Element; /** * Test class for PhpOffice\PhpWord\Element\Table diff --git a/tests/PhpWord/Tests/Element/TextBoxTest.php b/tests/PhpWord/Element/TextBoxTest.php similarity index 96% rename from tests/PhpWord/Tests/Element/TextBoxTest.php rename to tests/PhpWord/Element/TextBoxTest.php index 0dda48994e..0ddb7af702 100644 --- a/tests/PhpWord/Tests/Element/TextBoxTest.php +++ b/tests/PhpWord/Element/TextBoxTest.php @@ -15,9 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Element; - -use PhpOffice\PhpWord\Element\TextBox; +namespace PhpOffice\PhpWord\Element; /** * Test class for PhpOffice\PhpWord\Element\TextBox diff --git a/tests/PhpWord/Tests/Element/TextBreakTest.php b/tests/PhpWord/Element/TextBreakTest.php similarity index 96% rename from tests/PhpWord/Tests/Element/TextBreakTest.php rename to tests/PhpWord/Element/TextBreakTest.php index 1d9479ee3e..a2bcd5ae5b 100644 --- a/tests/PhpWord/Tests/Element/TextBreakTest.php +++ b/tests/PhpWord/Element/TextBreakTest.php @@ -15,9 +15,8 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Element; +namespace PhpOffice\PhpWord\Element; -use PhpOffice\PhpWord\Element\TextBreak; use PhpOffice\PhpWord\Style\Font; use PhpOffice\PhpWord\Style\Paragraph; diff --git a/tests/PhpWord/Tests/Element/TextRunTest.php b/tests/PhpWord/Element/TextRunTest.php similarity index 98% rename from tests/PhpWord/Tests/Element/TextRunTest.php rename to tests/PhpWord/Element/TextRunTest.php index 5e2dd856e8..a223110856 100644 --- a/tests/PhpWord/Tests/Element/TextRunTest.php +++ b/tests/PhpWord/Element/TextRunTest.php @@ -15,9 +15,8 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Element; +namespace PhpOffice\PhpWord\Element; -use PhpOffice\PhpWord\Element\TextRun; use PhpOffice\PhpWord\PhpWord; /** diff --git a/tests/PhpWord/Tests/Element/TextTest.php b/tests/PhpWord/Element/TextTest.php similarity index 97% rename from tests/PhpWord/Tests/Element/TextTest.php rename to tests/PhpWord/Element/TextTest.php index 00a2033e28..24c51213c3 100644 --- a/tests/PhpWord/Tests/Element/TextTest.php +++ b/tests/PhpWord/Element/TextTest.php @@ -15,9 +15,8 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Element; +namespace PhpOffice\PhpWord\Element; -use PhpOffice\PhpWord\Element\Text; use PhpOffice\PhpWord\SimpleType\Jc; use PhpOffice\PhpWord\Style\Font; diff --git a/tests/PhpWord/Tests/Element/TitleTest.php b/tests/PhpWord/Element/TitleTest.php similarity index 94% rename from tests/PhpWord/Tests/Element/TitleTest.php rename to tests/PhpWord/Element/TitleTest.php index ee72f7fc43..325d5b9a51 100644 --- a/tests/PhpWord/Tests/Element/TitleTest.php +++ b/tests/PhpWord/Element/TitleTest.php @@ -15,9 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Element; - -use PhpOffice\PhpWord\Element\Title; +namespace PhpOffice\PhpWord\Element; /** * Test class for PhpOffice\PhpWord\Element\Title diff --git a/tests/PhpWord/Tests/Exception/CopyFileExceptionTest.php b/tests/PhpWord/Exception/CopyFileExceptionTest.php similarity index 92% rename from tests/PhpWord/Tests/Exception/CopyFileExceptionTest.php rename to tests/PhpWord/Exception/CopyFileExceptionTest.php index 3d92595f25..3440819888 100644 --- a/tests/PhpWord/Tests/Exception/CopyFileExceptionTest.php +++ b/tests/PhpWord/Exception/CopyFileExceptionTest.php @@ -15,9 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Exception; - -use PhpOffice\PhpWord\Exception\CopyFileException; +namespace PhpOffice\PhpWord\Exception; /** * @covers \PhpOffice\PhpWord\Exception\CopyFileException diff --git a/tests/PhpWord/Tests/Exception/CreateTemporaryFileExceptionTest.php b/tests/PhpWord/Exception/CreateTemporaryFileExceptionTest.php similarity index 92% rename from tests/PhpWord/Tests/Exception/CreateTemporaryFileExceptionTest.php rename to tests/PhpWord/Exception/CreateTemporaryFileExceptionTest.php index 7cf0cb773d..2ec59e8d83 100644 --- a/tests/PhpWord/Tests/Exception/CreateTemporaryFileExceptionTest.php +++ b/tests/PhpWord/Exception/CreateTemporaryFileExceptionTest.php @@ -15,9 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Exception; - -use PhpOffice\PhpWord\Exception\CreateTemporaryFileException; +namespace PhpOffice\PhpWord\Exception; /** * @covers \PhpOffice\PhpWord\Exception\CreateTemporaryFileException diff --git a/tests/PhpWord/Tests/Exception/ExceptionTest.php b/tests/PhpWord/Exception/ExceptionTest.php similarity index 92% rename from tests/PhpWord/Tests/Exception/ExceptionTest.php rename to tests/PhpWord/Exception/ExceptionTest.php index 38d0f7f2c7..55e925a9f9 100644 --- a/tests/PhpWord/Tests/Exception/ExceptionTest.php +++ b/tests/PhpWord/Exception/ExceptionTest.php @@ -15,9 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Exception; - -use PhpOffice\PhpWord\Exception\Exception; +namespace PhpOffice\PhpWord\Exception; /** * Test class for PhpOffice\PhpWord\Exception\Exception diff --git a/tests/PhpWord/Tests/Exception/InvalidImageExceptionTest.php b/tests/PhpWord/Exception/InvalidImageExceptionTest.php similarity index 92% rename from tests/PhpWord/Tests/Exception/InvalidImageExceptionTest.php rename to tests/PhpWord/Exception/InvalidImageExceptionTest.php index 7c6303e306..cb1850b80a 100644 --- a/tests/PhpWord/Tests/Exception/InvalidImageExceptionTest.php +++ b/tests/PhpWord/Exception/InvalidImageExceptionTest.php @@ -15,9 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Exception; - -use PhpOffice\PhpWord\Exception\InvalidImageException; +namespace PhpOffice\PhpWord\Exception; /** * Test class for PhpOffice\PhpWord\Exception\InvalidImageException diff --git a/tests/PhpWord/Tests/Exception/InvalidStyleExceptionTest.php b/tests/PhpWord/Exception/InvalidStyleExceptionTest.php similarity index 92% rename from tests/PhpWord/Tests/Exception/InvalidStyleExceptionTest.php rename to tests/PhpWord/Exception/InvalidStyleExceptionTest.php index 3cff7376ff..edb8b59a36 100644 --- a/tests/PhpWord/Tests/Exception/InvalidStyleExceptionTest.php +++ b/tests/PhpWord/Exception/InvalidStyleExceptionTest.php @@ -15,9 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Exception; - -use PhpOffice\PhpWord\Exception\InvalidStyleException; +namespace PhpOffice\PhpWord\Exception; /** * Test class for PhpOffice\PhpWord\Exception\InvalidStyleException diff --git a/tests/PhpWord/Tests/Exception/UnsupportedImageTypeExceptionTest.php b/tests/PhpWord/Exception/UnsupportedImageTypeExceptionTest.php similarity index 92% rename from tests/PhpWord/Tests/Exception/UnsupportedImageTypeExceptionTest.php rename to tests/PhpWord/Exception/UnsupportedImageTypeExceptionTest.php index 0a1020eb4e..19b4f5534c 100644 --- a/tests/PhpWord/Tests/Exception/UnsupportedImageTypeExceptionTest.php +++ b/tests/PhpWord/Exception/UnsupportedImageTypeExceptionTest.php @@ -15,9 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Exception; - -use PhpOffice\PhpWord\Exception\UnsupportedImageTypeException; +namespace PhpOffice\PhpWord\Exception; /** * Test class for PhpOffice\PhpWord\Exception\UnsupportedImageTypeExceptionTest diff --git a/tests/PhpWord/Tests/IOFactoryTest.php b/tests/PhpWord/IOFactoryTest.php similarity index 95% rename from tests/PhpWord/Tests/IOFactoryTest.php rename to tests/PhpWord/IOFactoryTest.php index 1f293b0e98..f4f686e7db 100644 --- a/tests/PhpWord/Tests/IOFactoryTest.php +++ b/tests/PhpWord/IOFactoryTest.php @@ -15,10 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests; - -use PhpOffice\PhpWord\IOFactory; -use PhpOffice\PhpWord\PhpWord; +namespace PhpOffice\PhpWord; /** * Test class for PhpOffice\PhpWord\IOFactory diff --git a/tests/PhpWord/Tests/MediaTest.php b/tests/PhpWord/MediaTest.php similarity index 98% rename from tests/PhpWord/Tests/MediaTest.php rename to tests/PhpWord/MediaTest.php index 8eef6469b2..10d8a725b0 100644 --- a/tests/PhpWord/Tests/MediaTest.php +++ b/tests/PhpWord/MediaTest.php @@ -15,10 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests; +namespace PhpOffice\PhpWord; use PhpOffice\PhpWord\Element\Image; -use PhpOffice\PhpWord\Media; /** * Test class for PhpOffice\PhpWord\Media diff --git a/tests/PhpWord/Tests/Metadata/DocInfoTest.php b/tests/PhpWord/Metadata/DocInfoTest.php similarity index 98% rename from tests/PhpWord/Tests/Metadata/DocInfoTest.php rename to tests/PhpWord/Metadata/DocInfoTest.php index d9472eb269..e5ec8ec7b5 100644 --- a/tests/PhpWord/Tests/Metadata/DocInfoTest.php +++ b/tests/PhpWord/Metadata/DocInfoTest.php @@ -15,9 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Metadata; - -use PhpOffice\PhpWord\Metadata\DocInfo; +namespace PhpOffice\PhpWord\Metadata; /** * Test class for PhpOffice\PhpWord\Metadata\DocInfo diff --git a/tests/PhpWord/Tests/PhpWordTest.php b/tests/PhpWord/PhpWordTest.php similarity index 98% rename from tests/PhpWord/Tests/PhpWordTest.php rename to tests/PhpWord/PhpWordTest.php index 7fdbd689a6..8e9129e250 100644 --- a/tests/PhpWord/Tests/PhpWordTest.php +++ b/tests/PhpWord/PhpWordTest.php @@ -15,11 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests; +namespace PhpOffice\PhpWord; use PhpOffice\PhpWord\Metadata\DocInfo; -use PhpOffice\PhpWord\PhpWord; -use PhpOffice\PhpWord\Settings; use PhpOffice\PhpWord\Style; /** diff --git a/tests/PhpWord/Tests/Reader/HTMLTest.php b/tests/PhpWord/Reader/HTMLTest.php similarity index 97% rename from tests/PhpWord/Tests/Reader/HTMLTest.php rename to tests/PhpWord/Reader/HTMLTest.php index cb3dc55c29..55ac2b6491 100644 --- a/tests/PhpWord/Tests/Reader/HTMLTest.php +++ b/tests/PhpWord/Reader/HTMLTest.php @@ -15,7 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Reader; +namespace PhpOffice\PhpWord\Reader; use PhpOffice\PhpWord\IOFactory; diff --git a/tests/PhpWord/Tests/Reader/ODTextTest.php b/tests/PhpWord/Reader/ODTextTest.php similarity index 96% rename from tests/PhpWord/Tests/Reader/ODTextTest.php rename to tests/PhpWord/Reader/ODTextTest.php index fc4d2e337e..91f5c83f3f 100644 --- a/tests/PhpWord/Tests/Reader/ODTextTest.php +++ b/tests/PhpWord/Reader/ODTextTest.php @@ -15,7 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Reader; +namespace PhpOffice\PhpWord\Reader; use PhpOffice\PhpWord\IOFactory; diff --git a/tests/PhpWord/Tests/Reader/RTFTest.php b/tests/PhpWord/Reader/RTFTest.php similarity index 97% rename from tests/PhpWord/Tests/Reader/RTFTest.php rename to tests/PhpWord/Reader/RTFTest.php index c495db6884..c8c0c5e561 100644 --- a/tests/PhpWord/Tests/Reader/RTFTest.php +++ b/tests/PhpWord/Reader/RTFTest.php @@ -15,7 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Reader; +namespace PhpOffice\PhpWord\Reader; use PhpOffice\PhpWord\IOFactory; diff --git a/tests/PhpWord/Tests/Reader/Word2007Test.php b/tests/PhpWord/Reader/Word2007Test.php similarity index 97% rename from tests/PhpWord/Tests/Reader/Word2007Test.php rename to tests/PhpWord/Reader/Word2007Test.php index f2257012a5..873114bed9 100644 --- a/tests/PhpWord/Tests/Reader/Word2007Test.php +++ b/tests/PhpWord/Reader/Word2007Test.php @@ -15,7 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Reader; +namespace PhpOffice\PhpWord\Reader; use PhpOffice\PhpWord\IOFactory; use PhpOffice\PhpWord\Reader\Word2007; diff --git a/tests/PhpWord/Tests/SettingsTest.php b/tests/PhpWord/SettingsTest.php similarity index 97% rename from tests/PhpWord/Tests/SettingsTest.php rename to tests/PhpWord/SettingsTest.php index fb9b602354..e5f6f4e830 100644 --- a/tests/PhpWord/Tests/SettingsTest.php +++ b/tests/PhpWord/SettingsTest.php @@ -15,9 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests; - -use PhpOffice\PhpWord\Settings; +namespace PhpOffice\PhpWord; /** * Test class for PhpOffice\PhpWord\Settings @@ -134,9 +132,9 @@ public function testLoadConfig() $this->assertEquals($expected, Settings::loadConfig()); // Test with valid file - $this->assertEquals($expected, Settings::loadConfig(__DIR__ . '/../../../phpword.ini.dist')); + $this->assertEquals($expected, Settings::loadConfig(__DIR__ . '/../../phpword.ini.dist')); // Test with invalid file - $this->assertEmpty(Settings::loadConfig(__DIR__ . '/../../../phpunit.xml.dist')); + $this->assertEmpty(Settings::loadConfig(__DIR__ . '/../../phpunit.xml.dist')); } } diff --git a/tests/PhpWord/Tests/Shared/ConverterTest.php b/tests/PhpWord/Shared/ConverterTest.php similarity index 98% rename from tests/PhpWord/Tests/Shared/ConverterTest.php rename to tests/PhpWord/Shared/ConverterTest.php index 002e2e33bf..1f481e71e9 100644 --- a/tests/PhpWord/Tests/Shared/ConverterTest.php +++ b/tests/PhpWord/Shared/ConverterTest.php @@ -15,9 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Shared; - -use PhpOffice\PhpWord\Shared\Converter; +namespace PhpOffice\PhpWord\Shared; /** * Test class for PhpOffice\PhpWord\Shared\Converter diff --git a/tests/PhpWord/Tests/Shared/HtmlTest.php b/tests/PhpWord/Shared/HtmlTest.php similarity index 96% rename from tests/PhpWord/Tests/Shared/HtmlTest.php rename to tests/PhpWord/Shared/HtmlTest.php index de746e8200..91bfab1855 100644 --- a/tests/PhpWord/Tests/Shared/HtmlTest.php +++ b/tests/PhpWord/Shared/HtmlTest.php @@ -15,10 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Shared; +namespace PhpOffice\PhpWord\Shared; use PhpOffice\PhpWord\Element\Section; -use PhpOffice\PhpWord\Shared\Html; /** * Test class for PhpOffice\PhpWord\Shared\Html diff --git a/tests/PhpWord/Tests/Shared/StringTest.php b/tests/PhpWord/Shared/StringTest.php similarity index 96% rename from tests/PhpWord/Tests/Shared/StringTest.php rename to tests/PhpWord/Shared/StringTest.php index a3524eded8..c358833d69 100644 --- a/tests/PhpWord/Tests/Shared/StringTest.php +++ b/tests/PhpWord/Shared/StringTest.php @@ -15,9 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Shared; - -use PhpOffice\PhpWord\Shared\String; +namespace PhpOffice\PhpWord\Shared; /** * Test class for PhpOffice\PhpWord\Shared\String diff --git a/tests/PhpWord/Tests/Shared/XMLReaderTest.php b/tests/PhpWord/Shared/XMLReaderTest.php similarity index 96% rename from tests/PhpWord/Tests/Shared/XMLReaderTest.php rename to tests/PhpWord/Shared/XMLReaderTest.php index e82f475af6..10fc855400 100644 --- a/tests/PhpWord/Tests/Shared/XMLReaderTest.php +++ b/tests/PhpWord/Shared/XMLReaderTest.php @@ -15,9 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Shared; - -use PhpOffice\PhpWord\Shared\XMLReader; +namespace PhpOffice\PhpWord\Shared; /** * Test class for PhpOffice\PhpWord\Shared\XMLReader diff --git a/tests/PhpWord/Tests/Shared/XMLWriterTest.php b/tests/PhpWord/Shared/XMLWriterTest.php similarity index 93% rename from tests/PhpWord/Tests/Shared/XMLWriterTest.php rename to tests/PhpWord/Shared/XMLWriterTest.php index 08db39184f..1c6d44fccd 100644 --- a/tests/PhpWord/Tests/Shared/XMLWriterTest.php +++ b/tests/PhpWord/Shared/XMLWriterTest.php @@ -15,10 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Shared; +namespace PhpOffice\PhpWord\Shared; use PhpOffice\PhpWord\Settings; -use PhpOffice\PhpWord\Shared\XMLWriter; /** * Test class for PhpOffice\PhpWord\Shared\XMLWriter diff --git a/tests/PhpWord/Tests/Shared/ZipArchiveTest.php b/tests/PhpWord/Shared/ZipArchiveTest.php similarity index 98% rename from tests/PhpWord/Tests/Shared/ZipArchiveTest.php rename to tests/PhpWord/Shared/ZipArchiveTest.php index fa407c2ac1..6a3f9d154e 100644 --- a/tests/PhpWord/Tests/Shared/ZipArchiveTest.php +++ b/tests/PhpWord/Shared/ZipArchiveTest.php @@ -15,10 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Shared; +namespace PhpOffice\PhpWord\Shared; use PhpOffice\PhpWord\Settings; -use PhpOffice\PhpWord\Shared\ZipArchive; /** * Test class for PhpOffice\PhpWord\Shared\ZipArchive diff --git a/tests/PhpWord/Tests/Style/AbstractStyleTest.php b/tests/PhpWord/Style/AbstractStyleTest.php similarity index 98% rename from tests/PhpWord/Tests/Style/AbstractStyleTest.php rename to tests/PhpWord/Style/AbstractStyleTest.php index 946e1f1539..0c3d730bdf 100644 --- a/tests/PhpWord/Tests/Style/AbstractStyleTest.php +++ b/tests/PhpWord/Style/AbstractStyleTest.php @@ -15,7 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Style; +namespace PhpOffice\PhpWord\Style; /** * Test class for PhpOffice\PhpWord\Style\AbstractStyle diff --git a/tests/PhpWord/Tests/Style/CellTest.php b/tests/PhpWord/Style/CellTest.php similarity index 97% rename from tests/PhpWord/Tests/Style/CellTest.php rename to tests/PhpWord/Style/CellTest.php index 4f058f0cd1..4c398ce98a 100644 --- a/tests/PhpWord/Tests/Style/CellTest.php +++ b/tests/PhpWord/Style/CellTest.php @@ -15,9 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Style; - -use PhpOffice\PhpWord\Style\Cell; +namespace PhpOffice\PhpWord\Style; /** * Test class for PhpOffice\PhpWord\Style\Cell diff --git a/tests/PhpWord/Tests/Style/FontTest.php b/tests/PhpWord/Style/FontTest.php similarity index 98% rename from tests/PhpWord/Tests/Style/FontTest.php rename to tests/PhpWord/Style/FontTest.php index ea36f395f0..f4b42887b8 100644 --- a/tests/PhpWord/Tests/Style/FontTest.php +++ b/tests/PhpWord/Style/FontTest.php @@ -15,12 +15,11 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Style; +namespace PhpOffice\PhpWord\Style; use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\SimpleType\Jc; -use PhpOffice\PhpWord\Style\Font; -use PhpOffice\PhpWord\Tests\TestHelperDOCX; +use PhpOffice\PhpWord\TestHelperDOCX; /** * Test class for PhpOffice\PhpWord\Style\Font diff --git a/tests/PhpWord/Tests/Style/ImageTest.php b/tests/PhpWord/Style/ImageTest.php similarity index 97% rename from tests/PhpWord/Tests/Style/ImageTest.php rename to tests/PhpWord/Style/ImageTest.php index 74518e12ba..a2481e7284 100644 --- a/tests/PhpWord/Tests/Style/ImageTest.php +++ b/tests/PhpWord/Style/ImageTest.php @@ -15,10 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Style; +namespace PhpOffice\PhpWord\Style; use PhpOffice\PhpWord\SimpleType\Jc; -use PhpOffice\PhpWord\Style\Image; /** * Test class for PhpOffice\PhpWord\Style\Image diff --git a/tests/PhpWord/Tests/Style/IndentationTest.php b/tests/PhpWord/Style/IndentationTest.php similarity index 95% rename from tests/PhpWord/Tests/Style/IndentationTest.php rename to tests/PhpWord/Style/IndentationTest.php index 9c997c3876..2566615580 100644 --- a/tests/PhpWord/Tests/Style/IndentationTest.php +++ b/tests/PhpWord/Style/IndentationTest.php @@ -15,9 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Style; - -use PhpOffice\PhpWord\Style\Indentation; +namespace PhpOffice\PhpWord\Style; /** * Test class for PhpOffice\PhpWord\Style\Indentation diff --git a/tests/PhpWord/Tests/Style/LineNumberingTest.php b/tests/PhpWord/Style/LineNumberingTest.php similarity index 94% rename from tests/PhpWord/Tests/Style/LineNumberingTest.php rename to tests/PhpWord/Style/LineNumberingTest.php index 5b8e3f9e94..3195f9d7bf 100644 --- a/tests/PhpWord/Tests/Style/LineNumberingTest.php +++ b/tests/PhpWord/Style/LineNumberingTest.php @@ -15,9 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Style; - -use PhpOffice\PhpWord\Style\LineNumbering; +namespace PhpOffice\PhpWord\Style; /** * Test class for PhpOffice\PhpWord\Style\LineNumbering diff --git a/tests/PhpWord/Tests/Style/LineTest.php b/tests/PhpWord/Style/LineTest.php similarity index 98% rename from tests/PhpWord/Tests/Style/LineTest.php rename to tests/PhpWord/Style/LineTest.php index a574120dc0..02371cf4ee 100644 --- a/tests/PhpWord/Tests/Style/LineTest.php +++ b/tests/PhpWord/Style/LineTest.php @@ -15,9 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Style; - -use PhpOffice\PhpWord\Style\Line; +namespace PhpOffice\PhpWord\Style; /** * Test class for PhpOffice\PhpWord\Style\Image diff --git a/tests/PhpWord/Tests/Style/ListItemTest.php b/tests/PhpWord/Style/ListItemTest.php similarity index 96% rename from tests/PhpWord/Tests/Style/ListItemTest.php rename to tests/PhpWord/Style/ListItemTest.php index a97c8dd604..3d8be66475 100644 --- a/tests/PhpWord/Tests/Style/ListItemTest.php +++ b/tests/PhpWord/Style/ListItemTest.php @@ -15,9 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Style; - -use PhpOffice\PhpWord\Style\ListItem; +namespace PhpOffice\PhpWord\Style; /** * Test class for PhpOffice\PhpWord\Style\ListItem diff --git a/tests/PhpWord/Tests/Style/NumberingLevelTest.php b/tests/PhpWord/Style/NumberingLevelTest.php similarity index 95% rename from tests/PhpWord/Tests/Style/NumberingLevelTest.php rename to tests/PhpWord/Style/NumberingLevelTest.php index 854b97af1c..8884ba9ea6 100644 --- a/tests/PhpWord/Tests/Style/NumberingLevelTest.php +++ b/tests/PhpWord/Style/NumberingLevelTest.php @@ -15,10 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Style; +namespace PhpOffice\PhpWord\Style; use PhpOffice\PhpWord\SimpleType\Jc; -use PhpOffice\PhpWord\Style\NumberingLevel; /** * Test class for PhpOffice\PhpWord\Style\NumberingLevel diff --git a/tests/PhpWord/Tests/Style/NumberingTest.php b/tests/PhpWord/Style/NumberingTest.php similarity index 95% rename from tests/PhpWord/Tests/Style/NumberingTest.php rename to tests/PhpWord/Style/NumberingTest.php index ca7f0cb013..fd396280a5 100644 --- a/tests/PhpWord/Tests/Style/NumberingTest.php +++ b/tests/PhpWord/Style/NumberingTest.php @@ -15,9 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Style; - -use PhpOffice\PhpWord\Style\Numbering; +namespace PhpOffice\PhpWord\Style; /** * Test class for PhpOffice\PhpWord\Style\Numbering diff --git a/tests/PhpWord/Tests/Style/ParagraphTest.php b/tests/PhpWord/Style/ParagraphTest.php similarity index 96% rename from tests/PhpWord/Tests/Style/ParagraphTest.php rename to tests/PhpWord/Style/ParagraphTest.php index 55e6e395a9..694b0e7718 100644 --- a/tests/PhpWord/Tests/Style/ParagraphTest.php +++ b/tests/PhpWord/Style/ParagraphTest.php @@ -15,12 +15,10 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Style; +namespace PhpOffice\PhpWord\Style; use PhpOffice\PhpWord\PhpWord; -use PhpOffice\PhpWord\Style\Paragraph; -use PhpOffice\PhpWord\Style\Tab; -use PhpOffice\PhpWord\Tests\TestHelperDOCX; +use PhpOffice\PhpWord\TestHelperDOCX; /** * Test class for PhpOffice\PhpWord\Style\Paragraph diff --git a/tests/PhpWord/Tests/Style/RowTest.php b/tests/PhpWord/Style/RowTest.php similarity index 96% rename from tests/PhpWord/Tests/Style/RowTest.php rename to tests/PhpWord/Style/RowTest.php index 757dbadbb6..e02148f623 100644 --- a/tests/PhpWord/Tests/Style/RowTest.php +++ b/tests/PhpWord/Style/RowTest.php @@ -15,9 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Style; - -use PhpOffice\PhpWord\Style\Row; +namespace PhpOffice\PhpWord\Style; /** * Test class for PhpOffice\PhpWord\Style\Row diff --git a/tests/PhpWord/Tests/Style/SectionTest.php b/tests/PhpWord/Style/SectionTest.php similarity index 99% rename from tests/PhpWord/Tests/Style/SectionTest.php rename to tests/PhpWord/Style/SectionTest.php index 10e406051b..3aa1e6d7a2 100644 --- a/tests/PhpWord/Tests/Style/SectionTest.php +++ b/tests/PhpWord/Style/SectionTest.php @@ -15,9 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Style; - -use PhpOffice\PhpWord\Style\Section; +namespace PhpOffice\PhpWord\Style; /** * Test class for PhpOffice\PhpWord\Style\Section diff --git a/tests/PhpWord/Tests/Style/ShadingTest.php b/tests/PhpWord/Style/ShadingTest.php similarity index 95% rename from tests/PhpWord/Tests/Style/ShadingTest.php rename to tests/PhpWord/Style/ShadingTest.php index 5a965e1d10..834564d499 100644 --- a/tests/PhpWord/Tests/Style/ShadingTest.php +++ b/tests/PhpWord/Style/ShadingTest.php @@ -15,9 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Style; - -use PhpOffice\PhpWord\Style\Shading; +namespace PhpOffice\PhpWord\Style; /** * Test class for PhpOffice\PhpWord\Style\Shading diff --git a/tests/PhpWord/Tests/Style/SpacingTest.php b/tests/PhpWord/Style/SpacingTest.php similarity index 95% rename from tests/PhpWord/Tests/Style/SpacingTest.php rename to tests/PhpWord/Style/SpacingTest.php index 30b1ccce1e..b78bae8984 100644 --- a/tests/PhpWord/Tests/Style/SpacingTest.php +++ b/tests/PhpWord/Style/SpacingTest.php @@ -15,9 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Style; - -use PhpOffice\PhpWord\Style\Spacing; +namespace PhpOffice\PhpWord\Style; /** * Test class for PhpOffice\PhpWord\Style\Spacing diff --git a/tests/PhpWord/Tests/Style/TOCTest.php b/tests/PhpWord/Style/TOCTest.php similarity index 95% rename from tests/PhpWord/Tests/Style/TOCTest.php rename to tests/PhpWord/Style/TOCTest.php index e6e32e6b9d..fe3b533f3c 100644 --- a/tests/PhpWord/Tests/Style/TOCTest.php +++ b/tests/PhpWord/Style/TOCTest.php @@ -15,9 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Style; - -use PhpOffice\PhpWord\Style\TOC; +namespace PhpOffice\PhpWord\Style; /** * Test class for PhpOffice\PhpWord\Style\TOC diff --git a/tests/PhpWord/Tests/Style/TabTest.php b/tests/PhpWord/Style/TabTest.php similarity index 95% rename from tests/PhpWord/Tests/Style/TabTest.php rename to tests/PhpWord/Style/TabTest.php index 784b4e4709..65333597ce 100644 --- a/tests/PhpWord/Tests/Style/TabTest.php +++ b/tests/PhpWord/Style/TabTest.php @@ -15,9 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Style; - -use PhpOffice\PhpWord\Style\Tab; +namespace PhpOffice\PhpWord\Style; /** * Test class for PhpOffice\PhpWord\Style\Tab diff --git a/tests/PhpWord/Tests/Style/TableTest.php b/tests/PhpWord/Style/TableTest.php similarity index 98% rename from tests/PhpWord/Tests/Style/TableTest.php rename to tests/PhpWord/Style/TableTest.php index 987c2e0116..343cf8381a 100644 --- a/tests/PhpWord/Tests/Style/TableTest.php +++ b/tests/PhpWord/Style/TableTest.php @@ -15,10 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Style; +namespace PhpOffice\PhpWord\Style; use PhpOffice\PhpWord\SimpleType\JcTable; -use PhpOffice\PhpWord\Style\Table; /** * Test class for PhpOffice\PhpWord\Style\Table diff --git a/tests/PhpWord/Tests/Style/TextBoxTest.php b/tests/PhpWord/Style/TextBoxTest.php similarity index 99% rename from tests/PhpWord/Tests/Style/TextBoxTest.php rename to tests/PhpWord/Style/TextBoxTest.php index c2bb17fbaa..2890b61a92 100644 --- a/tests/PhpWord/Tests/Style/TextBoxTest.php +++ b/tests/PhpWord/Style/TextBoxTest.php @@ -15,10 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Style; +namespace PhpOffice\PhpWord\Style; use PhpOffice\PhpWord\SimpleType\Jc; -use PhpOffice\PhpWord\Style\TextBox; /** * Test class for PhpOffice\PhpWord\Style\Image diff --git a/tests/PhpWord/Tests/StyleTest.php b/tests/PhpWord/StyleTest.php similarity index 98% rename from tests/PhpWord/Tests/StyleTest.php rename to tests/PhpWord/StyleTest.php index 908441a8bf..fe80454be0 100644 --- a/tests/PhpWord/Tests/StyleTest.php +++ b/tests/PhpWord/StyleTest.php @@ -15,7 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests; +namespace PhpOffice\PhpWord; use PhpOffice\PhpWord\SimpleType\Jc; use PhpOffice\PhpWord\Style; diff --git a/tests/PhpWord/Tests/TemplateProcessorTest.php b/tests/PhpWord/TemplateProcessorTest.php similarity index 99% rename from tests/PhpWord/Tests/TemplateProcessorTest.php rename to tests/PhpWord/TemplateProcessorTest.php index 3683bb7949..ddb7277225 100644 --- a/tests/PhpWord/Tests/TemplateProcessorTest.php +++ b/tests/PhpWord/TemplateProcessorTest.php @@ -15,9 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests; - -use PhpOffice\PhpWord\TemplateProcessor; +namespace PhpOffice\PhpWord; /** * @covers \PhpOffice\PhpWord\TemplateProcessor diff --git a/tests/PhpWord/Tests/Writer/HTML/ElementTest.php b/tests/PhpWord/Writer/HTML/ElementTest.php similarity index 97% rename from tests/PhpWord/Tests/Writer/HTML/ElementTest.php rename to tests/PhpWord/Writer/HTML/ElementTest.php index 0c8dfa3e2a..7db28cc6e9 100644 --- a/tests/PhpWord/Tests/Writer/HTML/ElementTest.php +++ b/tests/PhpWord/Writer/HTML/ElementTest.php @@ -14,11 +14,11 @@ * @copyright 2010-2014 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Writer\HTML; +namespace PhpOffice\PhpWord\Writer\HTML; use PhpOffice\PhpWord\Element\Text as TextElement; -use PhpOffice\PhpWord\Writer\HTML\Element\Text; use PhpOffice\PhpWord\Writer\HTML; +use PhpOffice\PhpWord\Writer\HTML\Element\Text; /** * Test class for PhpOffice\PhpWord\Writer\HTML\Element subnamespace diff --git a/tests/PhpWord/Tests/Writer/HTML/PartTest.php b/tests/PhpWord/Writer/HTML/PartTest.php similarity index 95% rename from tests/PhpWord/Tests/Writer/HTML/PartTest.php rename to tests/PhpWord/Writer/HTML/PartTest.php index 93e9a98ef8..b19b0be299 100644 --- a/tests/PhpWord/Tests/Writer/HTML/PartTest.php +++ b/tests/PhpWord/Writer/HTML/PartTest.php @@ -14,7 +14,7 @@ * @copyright 2010-2014 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Writer\HTML; +namespace PhpOffice\PhpWord\Writer\HTML; use PhpOffice\PhpWord\Writer\HTML\Part\Body; diff --git a/tests/PhpWord/Tests/Writer/HTML/StyleTest.php b/tests/PhpWord/Writer/HTML/StyleTest.php similarity index 93% rename from tests/PhpWord/Tests/Writer/HTML/StyleTest.php rename to tests/PhpWord/Writer/HTML/StyleTest.php index 8af1e47930..4d7ac73970 100644 --- a/tests/PhpWord/Tests/Writer/HTML/StyleTest.php +++ b/tests/PhpWord/Writer/HTML/StyleTest.php @@ -14,9 +14,7 @@ * @copyright 2010-2014 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Writer\HTML; - -use PhpOffice\PhpWord\Shared\XMLWriter; +namespace PhpOffice\PhpWord\Writer\HTML; /** * Test class for PhpOffice\PhpWord\Writer\HTML\Style subnamespace diff --git a/tests/PhpWord/Tests/Writer/HTMLTest.php b/tests/PhpWord/Writer/HTMLTest.php similarity index 99% rename from tests/PhpWord/Tests/Writer/HTMLTest.php rename to tests/PhpWord/Writer/HTMLTest.php index 6ad9093d25..062efc7e16 100644 --- a/tests/PhpWord/Tests/Writer/HTMLTest.php +++ b/tests/PhpWord/Writer/HTMLTest.php @@ -14,7 +14,7 @@ * @copyright 2010-2014 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Writer; +namespace PhpOffice\PhpWord\Writer; use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\SimpleType\Jc; diff --git a/tests/PhpWord/Tests/Writer/ODText/ElementTest.php b/tests/PhpWord/Writer/ODText/ElementTest.php similarity index 96% rename from tests/PhpWord/Tests/Writer/ODText/ElementTest.php rename to tests/PhpWord/Writer/ODText/ElementTest.php index fa9532d147..586ea2dc06 100644 --- a/tests/PhpWord/Tests/Writer/ODText/ElementTest.php +++ b/tests/PhpWord/Writer/ODText/ElementTest.php @@ -14,7 +14,7 @@ * @copyright 2010-2014 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Writer\ODText; +namespace PhpOffice\PhpWord\Writer\ODText; use PhpOffice\PhpWord\Shared\XMLWriter; diff --git a/tests/PhpWord/Tests/Writer/ODText/Part/AbstractPartTest.php b/tests/PhpWord/Writer/ODText/Part/AbstractPartTest.php similarity index 96% rename from tests/PhpWord/Tests/Writer/ODText/Part/AbstractPartTest.php rename to tests/PhpWord/Writer/ODText/Part/AbstractPartTest.php index add4a3fbe2..ac7215c408 100644 --- a/tests/PhpWord/Tests/Writer/ODText/Part/AbstractPartTest.php +++ b/tests/PhpWord/Writer/ODText/Part/AbstractPartTest.php @@ -14,7 +14,7 @@ * @copyright 2010-2014 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Writer\ODText\Part; +namespace PhpOffice\PhpWord\Writer\ODText\Part; use PhpOffice\PhpWord\Writer\ODText; use PhpWord\Tests\TestHelperDOCX; diff --git a/tests/PhpWord/Tests/Writer/ODText/Part/ContentTest.php b/tests/PhpWord/Writer/ODText/Part/ContentTest.php similarity index 97% rename from tests/PhpWord/Tests/Writer/ODText/Part/ContentTest.php rename to tests/PhpWord/Writer/ODText/Part/ContentTest.php index 1f028c8743..b1f8f868d5 100644 --- a/tests/PhpWord/Tests/Writer/ODText/Part/ContentTest.php +++ b/tests/PhpWord/Writer/ODText/Part/ContentTest.php @@ -14,11 +14,11 @@ * @copyright 2010-2014 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Writer\ODText\Part; +namespace PhpOffice\PhpWord\Writer\ODText\Part; use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\SimpleType\Jc; -use PhpOffice\PhpWord\Tests\TestHelperDOCX; +use PhpOffice\PhpWord\TestHelperDOCX; /** * Test class for PhpOffice\PhpWord\Writer\ODText\Part\Content diff --git a/tests/PhpWord/Tests/Writer/ODText/StyleTest.php b/tests/PhpWord/Writer/ODText/StyleTest.php similarity index 96% rename from tests/PhpWord/Tests/Writer/ODText/StyleTest.php rename to tests/PhpWord/Writer/ODText/StyleTest.php index cd5ea0eb15..65df1be705 100644 --- a/tests/PhpWord/Tests/Writer/ODText/StyleTest.php +++ b/tests/PhpWord/Writer/ODText/StyleTest.php @@ -14,7 +14,7 @@ * @copyright 2010-2014 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Writer\ODText; +namespace PhpOffice\PhpWord\Writer\ODText; use PhpOffice\PhpWord\Shared\XMLWriter; diff --git a/tests/PhpWord/Tests/Writer/ODTextTest.php b/tests/PhpWord/Writer/ODTextTest.php similarity index 99% rename from tests/PhpWord/Tests/Writer/ODTextTest.php rename to tests/PhpWord/Writer/ODTextTest.php index cdc3651681..ad500e2cef 100644 --- a/tests/PhpWord/Tests/Writer/ODTextTest.php +++ b/tests/PhpWord/Writer/ODTextTest.php @@ -14,7 +14,7 @@ * @copyright 2010-2014 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Writer; +namespace PhpOffice\PhpWord\Writer; use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\SimpleType\Jc; diff --git a/tests/PhpWord/Tests/Writer/PDF/DomPDFTest.php b/tests/PhpWord/Writer/PDF/DomPDFTest.php similarity index 98% rename from tests/PhpWord/Tests/Writer/PDF/DomPDFTest.php rename to tests/PhpWord/Writer/PDF/DomPDFTest.php index 71d157231c..290ac454e0 100644 --- a/tests/PhpWord/Tests/Writer/PDF/DomPDFTest.php +++ b/tests/PhpWord/Writer/PDF/DomPDFTest.php @@ -14,7 +14,7 @@ * @copyright 2010-2014 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Writer\PDF; +namespace PhpOffice\PhpWord\Writer\PDF; use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\Settings; diff --git a/tests/PhpWord/Tests/Writer/PDF/MPDFTest.php b/tests/PhpWord/Writer/PDF/MPDFTest.php similarity index 97% rename from tests/PhpWord/Tests/Writer/PDF/MPDFTest.php rename to tests/PhpWord/Writer/PDF/MPDFTest.php index fbf6d1d40b..f03358e209 100644 --- a/tests/PhpWord/Tests/Writer/PDF/MPDFTest.php +++ b/tests/PhpWord/Writer/PDF/MPDFTest.php @@ -14,7 +14,7 @@ * @copyright 2010-2014 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Writer\PDF; +namespace PhpOffice\PhpWord\Writer\PDF; use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\Settings; diff --git a/tests/PhpWord/Tests/Writer/PDF/TCPDFTest.php b/tests/PhpWord/Writer/PDF/TCPDFTest.php similarity index 97% rename from tests/PhpWord/Tests/Writer/PDF/TCPDFTest.php rename to tests/PhpWord/Writer/PDF/TCPDFTest.php index c6d2a99f37..15ba156922 100644 --- a/tests/PhpWord/Tests/Writer/PDF/TCPDFTest.php +++ b/tests/PhpWord/Writer/PDF/TCPDFTest.php @@ -14,7 +14,7 @@ * @copyright 2010-2014 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Writer\PDF; +namespace PhpOffice\PhpWord\Writer\PDF; use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\Settings; diff --git a/tests/PhpWord/Tests/Writer/PDFTest.php b/tests/PhpWord/Writer/PDFTest.php similarity index 97% rename from tests/PhpWord/Tests/Writer/PDFTest.php rename to tests/PhpWord/Writer/PDFTest.php index 8e1149cda7..305e564862 100644 --- a/tests/PhpWord/Tests/Writer/PDFTest.php +++ b/tests/PhpWord/Writer/PDFTest.php @@ -14,7 +14,7 @@ * @copyright 2010-2014 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Writer; +namespace PhpOffice\PhpWord\Writer; use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\Settings; diff --git a/tests/PhpWord/Tests/Writer/RTF/ElementTest.php b/tests/PhpWord/Writer/RTF/ElementTest.php similarity index 96% rename from tests/PhpWord/Tests/Writer/RTF/ElementTest.php rename to tests/PhpWord/Writer/RTF/ElementTest.php index e090b34921..0045867fc1 100644 --- a/tests/PhpWord/Tests/Writer/RTF/ElementTest.php +++ b/tests/PhpWord/Writer/RTF/ElementTest.php @@ -14,7 +14,7 @@ * @copyright 2010-2014 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Writer\RTF; +namespace PhpOffice\PhpWord\Writer\RTF; use PhpOffice\PhpWord\Writer\RTF; diff --git a/tests/PhpWord/Tests/Writer/RTF/StyleTest.php b/tests/PhpWord/Writer/RTF/StyleTest.php similarity index 93% rename from tests/PhpWord/Tests/Writer/RTF/StyleTest.php rename to tests/PhpWord/Writer/RTF/StyleTest.php index 542e34fe7c..09561a9322 100644 --- a/tests/PhpWord/Tests/Writer/RTF/StyleTest.php +++ b/tests/PhpWord/Writer/RTF/StyleTest.php @@ -14,9 +14,7 @@ * @copyright 2010-2014 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Writer\RTF; - -use PhpOffice\PhpWord\Shared\XMLWriter; +namespace PhpOffice\PhpWord\Writer\RTF; /** * Test class for PhpOffice\PhpWord\Writer\RTF\Style subnamespace diff --git a/tests/PhpWord/Tests/Writer/RTFTest.php b/tests/PhpWord/Writer/RTFTest.php similarity index 98% rename from tests/PhpWord/Tests/Writer/RTFTest.php rename to tests/PhpWord/Writer/RTFTest.php index 7e978cb582..dcc2e86992 100644 --- a/tests/PhpWord/Tests/Writer/RTFTest.php +++ b/tests/PhpWord/Writer/RTFTest.php @@ -14,7 +14,7 @@ * @copyright 2010-2014 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Writer; +namespace PhpOffice\PhpWord\Writer; use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\SimpleType\Jc; diff --git a/tests/PhpWord/Tests/Writer/Word2007/ElementTest.php b/tests/PhpWord/Writer/Word2007/ElementTest.php similarity index 98% rename from tests/PhpWord/Tests/Writer/Word2007/ElementTest.php rename to tests/PhpWord/Writer/Word2007/ElementTest.php index da95ee026b..ff744f8df0 100644 --- a/tests/PhpWord/Tests/Writer/Word2007/ElementTest.php +++ b/tests/PhpWord/Writer/Word2007/ElementTest.php @@ -14,11 +14,11 @@ * @copyright 2010-2014 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Writer\Word2007; +namespace PhpOffice\PhpWord\Writer\Word2007; use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\Shared\XMLWriter; -use PhpOffice\PhpWord\Tests\TestHelperDOCX; +use PhpOffice\PhpWord\TestHelperDOCX; /** * Test class for PhpOffice\PhpWord\Writer\Word2007\Element subnamespace diff --git a/tests/PhpWord/Tests/Writer/Word2007/Part/AbstractPartTest.php b/tests/PhpWord/Writer/Word2007/Part/AbstractPartTest.php similarity index 97% rename from tests/PhpWord/Tests/Writer/Word2007/Part/AbstractPartTest.php rename to tests/PhpWord/Writer/Word2007/Part/AbstractPartTest.php index 37a5ece691..351042438f 100644 --- a/tests/PhpWord/Tests/Writer/Word2007/Part/AbstractPartTest.php +++ b/tests/PhpWord/Writer/Word2007/Part/AbstractPartTest.php @@ -14,10 +14,10 @@ * @copyright 2010-2014 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Writer\Word2007\Part; +namespace PhpOffice\PhpWord\Writer\Word2007\Part; -use PhpOffice\PhpWord\Writer\Word2007\Part\AbstractWriterPart; use PhpOffice\PhpWord\Writer\Word2007; +use PhpOffice\PhpWord\Writer\Word2007\Part\AbstractWriterPart; use PhpWord\Tests\TestHelperDOCX; /** diff --git a/tests/PhpWord/Tests/Writer/Word2007/Part/DocumentTest.php b/tests/PhpWord/Writer/Word2007/Part/DocumentTest.php similarity index 99% rename from tests/PhpWord/Tests/Writer/Word2007/Part/DocumentTest.php rename to tests/PhpWord/Writer/Word2007/Part/DocumentTest.php index 71dba3edeb..484a5ffdfe 100644 --- a/tests/PhpWord/Tests/Writer/Word2007/Part/DocumentTest.php +++ b/tests/PhpWord/Writer/Word2007/Part/DocumentTest.php @@ -14,12 +14,12 @@ * @copyright 2010-2014 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Writer\Word2007\Part; +namespace PhpOffice\PhpWord\Writer\Word2007\Part; use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\SimpleType\Jc; use PhpOffice\PhpWord\Style\Font; -use PhpOffice\PhpWord\Tests\TestHelperDOCX; +use PhpOffice\PhpWord\TestHelperDOCX; /** * Test class for PhpOffice\PhpWord\Writer\Word2007\Part\Document diff --git a/tests/PhpWord/Tests/Writer/Word2007/Part/FooterTest.php b/tests/PhpWord/Writer/Word2007/Part/FooterTest.php similarity index 94% rename from tests/PhpWord/Tests/Writer/Word2007/Part/FooterTest.php rename to tests/PhpWord/Writer/Word2007/Part/FooterTest.php index 068b2e25be..96349b5ac1 100644 --- a/tests/PhpWord/Tests/Writer/Word2007/Part/FooterTest.php +++ b/tests/PhpWord/Writer/Word2007/Part/FooterTest.php @@ -14,10 +14,9 @@ * @copyright 2010-2014 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Writer\Word2007\Part; +namespace PhpOffice\PhpWord\Writer\Word2007\Part; use PhpOffice\PhpWord\Writer\Word2007; -use PhpOffice\PhpWord\Writer\Word2007\Part\Footer; /** * Test class for PhpOffice\PhpWord\Writer\Word2007\Part\Footer diff --git a/tests/PhpWord/Tests/Writer/Word2007/Part/FootnotesTest.php b/tests/PhpWord/Writer/Word2007/Part/FootnotesTest.php similarity index 95% rename from tests/PhpWord/Tests/Writer/Word2007/Part/FootnotesTest.php rename to tests/PhpWord/Writer/Word2007/Part/FootnotesTest.php index 151331072a..5952b4919d 100644 --- a/tests/PhpWord/Tests/Writer/Word2007/Part/FootnotesTest.php +++ b/tests/PhpWord/Writer/Word2007/Part/FootnotesTest.php @@ -14,11 +14,11 @@ * @copyright 2010-2014 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Writer\Word2007\Part; +namespace PhpOffice\PhpWord\Writer\Word2007\Part; use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\SimpleType\Jc; -use PhpOffice\PhpWord\Tests\TestHelperDOCX; +use PhpOffice\PhpWord\TestHelperDOCX; /** * Test class for PhpOffice\PhpWord\Writer\Word2007\Part\Notes diff --git a/tests/PhpWord/Tests/Writer/Word2007/Part/HeaderTest.php b/tests/PhpWord/Writer/Word2007/Part/HeaderTest.php similarity index 94% rename from tests/PhpWord/Tests/Writer/Word2007/Part/HeaderTest.php rename to tests/PhpWord/Writer/Word2007/Part/HeaderTest.php index e8f77845dc..36b8688d78 100644 --- a/tests/PhpWord/Tests/Writer/Word2007/Part/HeaderTest.php +++ b/tests/PhpWord/Writer/Word2007/Part/HeaderTest.php @@ -14,10 +14,9 @@ * @copyright 2010-2014 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Writer\Word2007\Part; +namespace PhpOffice\PhpWord\Writer\Word2007\Part; use PhpOffice\PhpWord\Writer\Word2007; -use PhpOffice\PhpWord\Writer\Word2007\Part\Header; /** * Test class for PhpOffice\PhpWord\Writer\Word2007\Part\Header diff --git a/tests/PhpWord/Tests/Writer/Word2007/Part/NumberingTest.php b/tests/PhpWord/Writer/Word2007/Part/NumberingTest.php similarity index 95% rename from tests/PhpWord/Tests/Writer/Word2007/Part/NumberingTest.php rename to tests/PhpWord/Writer/Word2007/Part/NumberingTest.php index 3add6854d0..d650386e3e 100644 --- a/tests/PhpWord/Tests/Writer/Word2007/Part/NumberingTest.php +++ b/tests/PhpWord/Writer/Word2007/Part/NumberingTest.php @@ -14,11 +14,11 @@ * @copyright 2010-2014 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Writer\Word2007\Part; +namespace PhpOffice\PhpWord\Writer\Word2007\Part; use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\SimpleType\Jc; -use PhpOffice\PhpWord\Tests\TestHelperDOCX; +use PhpOffice\PhpWord\TestHelperDOCX; /** * Test class for PhpOffice\PhpWord\Writer\Word2007\Part\Numbering diff --git a/tests/PhpWord/Tests/Writer/Word2007/Part/SettingsTest.php b/tests/PhpWord/Writer/Word2007/Part/SettingsTest.php similarity index 94% rename from tests/PhpWord/Tests/Writer/Word2007/Part/SettingsTest.php rename to tests/PhpWord/Writer/Word2007/Part/SettingsTest.php index 7d4d1849c6..e8b2bea85b 100644 --- a/tests/PhpWord/Tests/Writer/Word2007/Part/SettingsTest.php +++ b/tests/PhpWord/Writer/Word2007/Part/SettingsTest.php @@ -14,10 +14,10 @@ * @copyright 2010-2014 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Writer\Word2007\Part; +namespace PhpOffice\PhpWord\Writer\Word2007\Part; use PhpOffice\PhpWord\PhpWord; -use PhpOffice\PhpWord\Tests\TestHelperDOCX; +use PhpOffice\PhpWord\TestHelperDOCX; /** * Test class for PhpOffice\PhpWord\Writer\Word2007\Part\Settings diff --git a/tests/PhpWord/Tests/Writer/Word2007/Part/StylesTest.php b/tests/PhpWord/Writer/Word2007/Part/StylesTest.php similarity index 96% rename from tests/PhpWord/Tests/Writer/Word2007/Part/StylesTest.php rename to tests/PhpWord/Writer/Word2007/Part/StylesTest.php index ad8464671b..dd652a8587 100644 --- a/tests/PhpWord/Tests/Writer/Word2007/Part/StylesTest.php +++ b/tests/PhpWord/Writer/Word2007/Part/StylesTest.php @@ -14,11 +14,11 @@ * @copyright 2010-2014 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Writer\Word2007\Part; +namespace PhpOffice\PhpWord\Writer\Word2007\Part; use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\SimpleType\Jc; -use PhpOffice\PhpWord\Tests\TestHelperDOCX; +use PhpOffice\PhpWord\TestHelperDOCX; /** * Test class for PhpOffice\PhpWord\Writer\Word2007\Part\Styles diff --git a/tests/PhpWord/Tests/Writer/Word2007/PartTest.php b/tests/PhpWord/Writer/Word2007/PartTest.php similarity index 96% rename from tests/PhpWord/Tests/Writer/Word2007/PartTest.php rename to tests/PhpWord/Writer/Word2007/PartTest.php index c3d2933190..92f56a32ec 100644 --- a/tests/PhpWord/Tests/Writer/Word2007/PartTest.php +++ b/tests/PhpWord/Writer/Word2007/PartTest.php @@ -14,7 +14,7 @@ * @copyright 2010-2014 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Writer\Word2007; +namespace PhpOffice\PhpWord\Writer\Word2007; use PhpOffice\PhpWord\Writer\Word2007\Part\RelsPart; diff --git a/tests/PhpWord/Tests/Writer/Word2007/Style/FontTest.php b/tests/PhpWord/Writer/Word2007/Style/FontTest.php similarity index 94% rename from tests/PhpWord/Tests/Writer/Word2007/Style/FontTest.php rename to tests/PhpWord/Writer/Word2007/Style/FontTest.php index f3f6badb49..0224d0eeb1 100644 --- a/tests/PhpWord/Tests/Writer/Word2007/Style/FontTest.php +++ b/tests/PhpWord/Writer/Word2007/Style/FontTest.php @@ -14,9 +14,9 @@ * @copyright 2010-2014 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Writer\Word2007\Part; +namespace PhpOffice\PhpWord\Writer\Word2007\Part; -use PhpOffice\PhpWord\Tests\TestHelperDOCX; +use PhpOffice\PhpWord\TestHelperDOCX; /** * Test class for PhpOffice\PhpWord\Writer\Word2007\Style\Font diff --git a/tests/PhpWord/Tests/Writer/Word2007/StyleTest.php b/tests/PhpWord/Writer/Word2007/StyleTest.php similarity index 97% rename from tests/PhpWord/Tests/Writer/Word2007/StyleTest.php rename to tests/PhpWord/Writer/Word2007/StyleTest.php index 1650e115e3..fdd29c0ed8 100644 --- a/tests/PhpWord/Tests/Writer/Word2007/StyleTest.php +++ b/tests/PhpWord/Writer/Word2007/StyleTest.php @@ -14,7 +14,7 @@ * @copyright 2010-2014 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Writer\Word2007; +namespace PhpOffice\PhpWord\Writer\Word2007; use PhpOffice\PhpWord\Shared\XMLWriter; diff --git a/tests/PhpWord/Tests/Writer/Word2007Test.php b/tests/PhpWord/Writer/Word2007Test.php similarity index 98% rename from tests/PhpWord/Tests/Writer/Word2007Test.php rename to tests/PhpWord/Writer/Word2007Test.php index 83a4a9a1d8..753d9a2ef2 100644 --- a/tests/PhpWord/Tests/Writer/Word2007Test.php +++ b/tests/PhpWord/Writer/Word2007Test.php @@ -14,11 +14,11 @@ * @copyright 2010-2014 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests\Writer; +namespace PhpOffice\PhpWord\Writer; use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\SimpleType\Jc; -use PhpOffice\PhpWord\Tests\TestHelperDOCX; +use PhpOffice\PhpWord\TestHelperDOCX; use PhpOffice\PhpWord\Writer\Word2007; /** diff --git a/tests/PhpWord/Tests/_files/documents/reader.docx b/tests/PhpWord/_files/documents/reader.docx similarity index 100% rename from tests/PhpWord/Tests/_files/documents/reader.docx rename to tests/PhpWord/_files/documents/reader.docx diff --git a/tests/PhpWord/Tests/_files/documents/reader.docx.zip b/tests/PhpWord/_files/documents/reader.docx.zip similarity index 100% rename from tests/PhpWord/Tests/_files/documents/reader.docx.zip rename to tests/PhpWord/_files/documents/reader.docx.zip diff --git a/tests/PhpWord/Tests/_files/documents/reader.html b/tests/PhpWord/_files/documents/reader.html similarity index 100% rename from tests/PhpWord/Tests/_files/documents/reader.html rename to tests/PhpWord/_files/documents/reader.html diff --git a/tests/PhpWord/Tests/_files/documents/reader.odt b/tests/PhpWord/_files/documents/reader.odt similarity index 100% rename from tests/PhpWord/Tests/_files/documents/reader.odt rename to tests/PhpWord/_files/documents/reader.odt diff --git a/tests/PhpWord/Tests/_files/documents/reader.rtf b/tests/PhpWord/_files/documents/reader.rtf similarity index 100% rename from tests/PhpWord/Tests/_files/documents/reader.rtf rename to tests/PhpWord/_files/documents/reader.rtf diff --git a/tests/PhpWord/Tests/_files/documents/sheet.xls b/tests/PhpWord/_files/documents/sheet.xls similarity index 100% rename from tests/PhpWord/Tests/_files/documents/sheet.xls rename to tests/PhpWord/_files/documents/sheet.xls diff --git a/tests/PhpWord/Tests/_files/documents/without_table_macros.docx b/tests/PhpWord/_files/documents/without_table_macros.docx similarity index 100% rename from tests/PhpWord/Tests/_files/documents/without_table_macros.docx rename to tests/PhpWord/_files/documents/without_table_macros.docx diff --git a/tests/PhpWord/Tests/_files/images/PhpWord.png b/tests/PhpWord/_files/images/PhpWord.png similarity index 100% rename from tests/PhpWord/Tests/_files/images/PhpWord.png rename to tests/PhpWord/_files/images/PhpWord.png diff --git a/tests/PhpWord/Tests/_files/images/alexz-johnson.pcx b/tests/PhpWord/_files/images/alexz-johnson.pcx similarity index 100% rename from tests/PhpWord/Tests/_files/images/alexz-johnson.pcx rename to tests/PhpWord/_files/images/alexz-johnson.pcx diff --git a/tests/PhpWord/Tests/_files/images/angela_merkel.tif b/tests/PhpWord/_files/images/angela_merkel.tif similarity index 100% rename from tests/PhpWord/Tests/_files/images/angela_merkel.tif rename to tests/PhpWord/_files/images/angela_merkel.tif diff --git a/tests/PhpWord/Tests/_files/images/duke_nukem.bmp b/tests/PhpWord/_files/images/duke_nukem.bmp similarity index 100% rename from tests/PhpWord/Tests/_files/images/duke_nukem.bmp rename to tests/PhpWord/_files/images/duke_nukem.bmp diff --git a/tests/PhpWord/Tests/_files/images/earth.jpg b/tests/PhpWord/_files/images/earth.jpg similarity index 100% rename from tests/PhpWord/Tests/_files/images/earth.jpg rename to tests/PhpWord/_files/images/earth.jpg diff --git a/tests/PhpWord/Tests/_files/images/firefox.png b/tests/PhpWord/_files/images/firefox.png similarity index 100% rename from tests/PhpWord/Tests/_files/images/firefox.png rename to tests/PhpWord/_files/images/firefox.png diff --git a/tests/PhpWord/Tests/_files/images/mario.gif b/tests/PhpWord/_files/images/mario.gif similarity index 100% rename from tests/PhpWord/Tests/_files/images/mario.gif rename to tests/PhpWord/_files/images/mario.gif diff --git a/tests/PhpWord/Tests/_files/images/mars.jpg b/tests/PhpWord/_files/images/mars.jpg similarity index 100% rename from tests/PhpWord/Tests/_files/images/mars.jpg rename to tests/PhpWord/_files/images/mars.jpg diff --git a/tests/PhpWord/Tests/_files/images/mars_noext_jpg b/tests/PhpWord/_files/images/mars_noext_jpg similarity index 100% rename from tests/PhpWord/Tests/_files/images/mars_noext_jpg rename to tests/PhpWord/_files/images/mars_noext_jpg diff --git a/tests/PhpWord/Tests/_files/templates/blank.docx b/tests/PhpWord/_files/templates/blank.docx similarity index 100% rename from tests/PhpWord/Tests/_files/templates/blank.docx rename to tests/PhpWord/_files/templates/blank.docx diff --git a/tests/PhpWord/Tests/_files/templates/clone-delete-block.docx b/tests/PhpWord/_files/templates/clone-delete-block.docx similarity index 100% rename from tests/PhpWord/Tests/_files/templates/clone-delete-block.docx rename to tests/PhpWord/_files/templates/clone-delete-block.docx diff --git a/tests/PhpWord/Tests/_files/templates/clone-merge.docx b/tests/PhpWord/_files/templates/clone-merge.docx similarity index 100% rename from tests/PhpWord/Tests/_files/templates/clone-merge.docx rename to tests/PhpWord/_files/templates/clone-merge.docx diff --git a/tests/PhpWord/Tests/_files/templates/corrupted_main_document_part.docx b/tests/PhpWord/_files/templates/corrupted_main_document_part.docx similarity index 100% rename from tests/PhpWord/Tests/_files/templates/corrupted_main_document_part.docx rename to tests/PhpWord/_files/templates/corrupted_main_document_part.docx diff --git a/tests/PhpWord/Tests/_files/templates/header-footer.docx b/tests/PhpWord/_files/templates/header-footer.docx similarity index 100% rename from tests/PhpWord/Tests/_files/templates/header-footer.docx rename to tests/PhpWord/_files/templates/header-footer.docx diff --git a/tests/PhpWord/Tests/_files/templates/with_table_macros.docx b/tests/PhpWord/_files/templates/with_table_macros.docx similarity index 100% rename from tests/PhpWord/Tests/_files/templates/with_table_macros.docx rename to tests/PhpWord/_files/templates/with_table_macros.docx diff --git a/tests/PhpWord/Tests/_files/xsl/passthrough.xsl b/tests/PhpWord/_files/xsl/passthrough.xsl similarity index 76% rename from tests/PhpWord/Tests/_files/xsl/passthrough.xsl rename to tests/PhpWord/_files/xsl/passthrough.xsl index 4ab21dd745..b1d656a10f 100644 --- a/tests/PhpWord/Tests/_files/xsl/passthrough.xsl +++ b/tests/PhpWord/_files/xsl/passthrough.xsl @@ -1,6 +1,6 @@ +> diff --git a/tests/PhpWord/Tests/_files/xsl/remove_tables_by_needle.xsl b/tests/PhpWord/_files/xsl/remove_tables_by_needle.xsl similarity index 100% rename from tests/PhpWord/Tests/_files/xsl/remove_tables_by_needle.xsl rename to tests/PhpWord/_files/xsl/remove_tables_by_needle.xsl diff --git a/tests/PhpWord/Tests/_includes/TestHelperDOCX.php b/tests/PhpWord/_includes/TestHelperDOCX.php similarity index 94% rename from tests/PhpWord/Tests/_includes/TestHelperDOCX.php rename to tests/PhpWord/_includes/TestHelperDOCX.php index b27f9a994b..3b23055679 100644 --- a/tests/PhpWord/Tests/_includes/TestHelperDOCX.php +++ b/tests/PhpWord/_includes/TestHelperDOCX.php @@ -15,12 +15,9 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests; +namespace PhpOffice\PhpWord; use PhpOffice\PhpWord\Exception\CreateTemporaryFileException; -use PhpOffice\PhpWord\IOFactory; -use PhpOffice\PhpWord\PhpWord; -use PhpOffice\PhpWord\Settings; /** * Test helper class @@ -42,7 +39,7 @@ class TestHelperDOCX * @param \PhpOffice\PhpWord\PhpWord $phpWord * @param string $writerName * - * @return \PhpOffice\PhpWord\Tests\XmlDocument + * @return \PhpOffice\PhpWord\XmlDocument * * @throws \PhpOffice\PhpWord\Exception\CreateTemporaryFileException */ diff --git a/tests/PhpWord/Tests/_includes/XmlDocument.php b/tests/PhpWord/_includes/XmlDocument.php similarity index 98% rename from tests/PhpWord/Tests/_includes/XmlDocument.php rename to tests/PhpWord/_includes/XmlDocument.php index 0a70c5f22f..4158f4abf8 100644 --- a/tests/PhpWord/Tests/_includes/XmlDocument.php +++ b/tests/PhpWord/_includes/XmlDocument.php @@ -15,7 +15,7 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Tests; +namespace PhpOffice\PhpWord; /** * DOM wrapper class diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 8ea94aede9..b7b5351b5a 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -26,10 +26,10 @@ spl_autoload_register(function ($class) { $class = ltrim($class, '\\'); - $prefix = 'PhpOffice\\PhpWord\\Tests'; + $prefix = 'PhpOffice\\PhpWord'; if (strpos($class, $prefix) === 0) { $class = str_replace('\\', DIRECTORY_SEPARATOR, $class); - $class = join(DIRECTORY_SEPARATOR, array('PhpWord', 'Tests', '_includes')) . + $class = join(DIRECTORY_SEPARATOR, array('PhpWord', '_includes')) . substr($class, strlen($prefix)); $file = __DIR__ . DIRECTORY_SEPARATOR . $class . '.php'; if (file_exists($file)) { @@ -38,5 +38,4 @@ } }); -require_once __DIR__ . '/../src/PhpWord/Autoloader.php'; \PhpOffice\PhpWord\Autoloader::register(); From c75056f076c7fb1f8b2987cd253d923ba5654bd8 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sun, 15 Nov 2015 21:22:29 +0400 Subject: [PATCH 61/99] Reorganized unit tests. --- tests/PhpWord/Collection/CollectionTest.php | 6 +++--- tests/PhpWord/Reader/Word2007Test.php | 1 - tests/PhpWord/StyleTest.php | 1 - tests/PhpWord/Writer/HTMLTest.php | 1 - tests/PhpWord/Writer/ODText/Part/AbstractPartTest.php | 1 - tests/PhpWord/Writer/ODTextTest.php | 1 - tests/PhpWord/Writer/PDFTest.php | 1 - tests/PhpWord/Writer/RTFTest.php | 1 - tests/PhpWord/Writer/Word2007/Part/AbstractPartTest.php | 2 -- tests/PhpWord/Writer/Word2007/Style/FontTest.php | 2 +- tests/PhpWord/Writer/Word2007Test.php | 1 - 11 files changed, 4 insertions(+), 14 deletions(-) diff --git a/tests/PhpWord/Collection/CollectionTest.php b/tests/PhpWord/Collection/CollectionTest.php index 12240904f4..f50055dd01 100644 --- a/tests/PhpWord/Collection/CollectionTest.php +++ b/tests/PhpWord/Collection/CollectionTest.php @@ -7,12 +7,12 @@ * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Element; +namespace PhpOffice\PhpWord\Collection; -use PhpOffice\PhpWord\Collection\Footnotes; +use PhpOffice\PhpWord\Element\Footnote; /** - * Test class for PhpOffice\PhpWord\Element\Collection subnamespace + * Test class for PhpOffice\PhpWord\Collection subnamespace * * Using concrete class Footnotes instead of AbstractCollection */ diff --git a/tests/PhpWord/Reader/Word2007Test.php b/tests/PhpWord/Reader/Word2007Test.php index 873114bed9..dedc1e2d38 100644 --- a/tests/PhpWord/Reader/Word2007Test.php +++ b/tests/PhpWord/Reader/Word2007Test.php @@ -18,7 +18,6 @@ namespace PhpOffice\PhpWord\Reader; use PhpOffice\PhpWord\IOFactory; -use PhpOffice\PhpWord\Reader\Word2007; /** * Test class for PhpOffice\PhpWord\Reader\Word2007 diff --git a/tests/PhpWord/StyleTest.php b/tests/PhpWord/StyleTest.php index fe80454be0..528d407d2a 100644 --- a/tests/PhpWord/StyleTest.php +++ b/tests/PhpWord/StyleTest.php @@ -18,7 +18,6 @@ namespace PhpOffice\PhpWord; use PhpOffice\PhpWord\SimpleType\Jc; -use PhpOffice\PhpWord\Style; /** * Test class for PhpOffice\PhpWord\Style diff --git a/tests/PhpWord/Writer/HTMLTest.php b/tests/PhpWord/Writer/HTMLTest.php index 062efc7e16..cfeef5d98f 100644 --- a/tests/PhpWord/Writer/HTMLTest.php +++ b/tests/PhpWord/Writer/HTMLTest.php @@ -18,7 +18,6 @@ use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\SimpleType\Jc; -use PhpOffice\PhpWord\Writer\HTML; /** * Test class for PhpOffice\PhpWord\Writer\HTML diff --git a/tests/PhpWord/Writer/ODText/Part/AbstractPartTest.php b/tests/PhpWord/Writer/ODText/Part/AbstractPartTest.php index ac7215c408..2df5f60833 100644 --- a/tests/PhpWord/Writer/ODText/Part/AbstractPartTest.php +++ b/tests/PhpWord/Writer/ODText/Part/AbstractPartTest.php @@ -17,7 +17,6 @@ namespace PhpOffice\PhpWord\Writer\ODText\Part; use PhpOffice\PhpWord\Writer\ODText; -use PhpWord\Tests\TestHelperDOCX; /** * Test class for PhpOffice\PhpWord\Writer\ODText\Part\AbstractPart diff --git a/tests/PhpWord/Writer/ODTextTest.php b/tests/PhpWord/Writer/ODTextTest.php index ad500e2cef..92f6bf3d82 100644 --- a/tests/PhpWord/Writer/ODTextTest.php +++ b/tests/PhpWord/Writer/ODTextTest.php @@ -18,7 +18,6 @@ use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\SimpleType\Jc; -use PhpOffice\PhpWord\Writer\ODText; /** * Test class for PhpOffice\PhpWord\Writer\ODText diff --git a/tests/PhpWord/Writer/PDFTest.php b/tests/PhpWord/Writer/PDFTest.php index 305e564862..a2a49f44fd 100644 --- a/tests/PhpWord/Writer/PDFTest.php +++ b/tests/PhpWord/Writer/PDFTest.php @@ -18,7 +18,6 @@ use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\Settings; -use PhpOffice\PhpWord\Writer\PDF; /** * Test class for PhpOffice\PhpWord\Writer\PDF diff --git a/tests/PhpWord/Writer/RTFTest.php b/tests/PhpWord/Writer/RTFTest.php index dcc2e86992..8dca3c07ec 100644 --- a/tests/PhpWord/Writer/RTFTest.php +++ b/tests/PhpWord/Writer/RTFTest.php @@ -18,7 +18,6 @@ use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\SimpleType\Jc; -use PhpOffice\PhpWord\Writer\RTF; /** * Test class for PhpOffice\PhpWord\Writer\RTF diff --git a/tests/PhpWord/Writer/Word2007/Part/AbstractPartTest.php b/tests/PhpWord/Writer/Word2007/Part/AbstractPartTest.php index 351042438f..ef42756c9e 100644 --- a/tests/PhpWord/Writer/Word2007/Part/AbstractPartTest.php +++ b/tests/PhpWord/Writer/Word2007/Part/AbstractPartTest.php @@ -17,8 +17,6 @@ namespace PhpOffice\PhpWord\Writer\Word2007\Part; use PhpOffice\PhpWord\Writer\Word2007; -use PhpOffice\PhpWord\Writer\Word2007\Part\AbstractWriterPart; -use PhpWord\Tests\TestHelperDOCX; /** * Test class for PhpOffice\PhpWord\Writer\Word2007\Part\AbstractWriterPart diff --git a/tests/PhpWord/Writer/Word2007/Style/FontTest.php b/tests/PhpWord/Writer/Word2007/Style/FontTest.php index 0224d0eeb1..2527436c1f 100644 --- a/tests/PhpWord/Writer/Word2007/Style/FontTest.php +++ b/tests/PhpWord/Writer/Word2007/Style/FontTest.php @@ -14,7 +14,7 @@ * @copyright 2010-2014 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ -namespace PhpOffice\PhpWord\Writer\Word2007\Part; +namespace PhpOffice\PhpWord\Writer\Word2007\Style; use PhpOffice\PhpWord\TestHelperDOCX; diff --git a/tests/PhpWord/Writer/Word2007Test.php b/tests/PhpWord/Writer/Word2007Test.php index 753d9a2ef2..873b0ae232 100644 --- a/tests/PhpWord/Writer/Word2007Test.php +++ b/tests/PhpWord/Writer/Word2007Test.php @@ -19,7 +19,6 @@ use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\SimpleType\Jc; use PhpOffice\PhpWord\TestHelperDOCX; -use PhpOffice\PhpWord\Writer\Word2007; /** * Test class for PhpOffice\PhpWord\Writer\Word2007 From 95c097106f3f6f9540991555f0f6e7156f9c9999 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sun, 15 Nov 2015 21:34:36 +0400 Subject: [PATCH 62/99] Reorganized unit tests. --- src/PhpWord/Reader/AbstractReader.php | 1 + src/PhpWord/SimpleType/Jc.php | 2 ++ src/PhpWord/SimpleType/JcTable.php | 2 ++ 3 files changed, 5 insertions(+) diff --git a/src/PhpWord/Reader/AbstractReader.php b/src/PhpWord/Reader/AbstractReader.php index 977dc5d9c5..6b6b877eba 100644 --- a/src/PhpWord/Reader/AbstractReader.php +++ b/src/PhpWord/Reader/AbstractReader.php @@ -23,6 +23,7 @@ * Reader abstract class * * @since 0.8.0 + * * @codeCoverageIgnore Abstract class */ abstract class AbstractReader implements ReaderInterface diff --git a/src/PhpWord/SimpleType/Jc.php b/src/PhpWord/SimpleType/Jc.php index f78ed87d92..37a30060b2 100644 --- a/src/PhpWord/SimpleType/Jc.php +++ b/src/PhpWord/SimpleType/Jc.php @@ -23,6 +23,8 @@ * Horizontal Alignment Type. * * @since 0.13.0 + * + * @codeCoverageIgnore */ final class Jc { diff --git a/src/PhpWord/SimpleType/JcTable.php b/src/PhpWord/SimpleType/JcTable.php index 43c64385b1..eca49d2adb 100644 --- a/src/PhpWord/SimpleType/JcTable.php +++ b/src/PhpWord/SimpleType/JcTable.php @@ -23,6 +23,8 @@ * Table Alignment Type. * * @since 0.13.0 + * + * @codeCoverageIgnore */ final class JcTable { From e6d73d8ff8f2273387fe12150c111c0a08c80880 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 21 Nov 2015 20:24:49 +0400 Subject: [PATCH 63/99] Removed custom autoloader. --- CHANGELOG.md | 6 +++- README.md | 1 - docs/general.rst | 1 - samples/Sample_Header.php | 2 -- src/PhpWord/Autoloader.php | 55 ------------------------------ tests/PhpWord/AutoloaderTest.php | 58 -------------------------------- tests/bootstrap.php | 2 -- 7 files changed, 5 insertions(+), 120 deletions(-) delete mode 100644 src/PhpWord/Autoloader.php delete mode 100644 tests/PhpWord/AutoloaderTest.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 51d0bb56d8..b792b19b00 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,7 +26,11 @@ Use the correspondent `getAlignment` and `setAlignment` methods instead. - @Roma ### Removed - `PhpOffice\PhpWord\Style\Alignment`. Style properties, which previously stored instances of this class, now deal with strings. In each case set of available string values is defined by the correspondent simple type. - @RomanSyroeshko -- Manual installation option. To install PHPWord use Composer since now. - @RomanSyroeshko +- Manual installation support. Since the release we have dependencies on third party libraries, +so installation via ZIP-archive download is not an option anymore. To install PHPWord use [Composer](https://getcomposer.org/). + We also removed `PhpOffice\PhpWord\Autoloader`, because the latter change made it completely useless. + Autoloaders provided by Composer are in use now (see `bootstrap.php`). - @RomanSyroeshko + 0.12.1 (30 August 2015) diff --git a/README.md b/README.md index f86ff0edef..b3bfa53a45 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,6 @@ The following is a basic usage example of the PHPWord library. ```php `__. assertContains( - array('PhpOffice\\PhpWord\\Autoloader', 'autoload'), - spl_autoload_functions() - ); - } - - /** - * Autoload - */ - public function testAutoload() - { - $declaredCount = count(get_declared_classes()); - Autoloader::autoload('Foo'); - $this->assertCount( - $declaredCount, - get_declared_classes(), - 'PhpOffice\\PhpWord\\Autoloader::autoload() is trying to load classes outside of the PhpOffice\\PhpWord namespace' - ); - // TODO change this class to the main PhpWord class when it is namespaced - Autoloader::autoload('PhpOffice\\PhpWord\\Exception\\InvalidStyleException'); - $this->assertTrue( - in_array('PhpOffice\\PhpWord\\Exception\\InvalidStyleException', get_declared_classes()), - 'PhpOffice\\PhpWord\\Autoloader::autoload() failed to autoload the PhpOffice\\PhpWord\\Exception\\InvalidStyleException class' - ); - } -} diff --git a/tests/bootstrap.php b/tests/bootstrap.php index b7b5351b5a..7535d3788d 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -37,5 +37,3 @@ } } }); - -\PhpOffice\PhpWord\Autoloader::register(); From 43fb23d89691f373678555fbb0895b4fec234f26 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 5 Dec 2015 21:25:59 +0400 Subject: [PATCH 64/99] Copyright update. --- LICENSE | 2 +- bootstrap.php | 2 +- src/PhpWord/Collection/AbstractCollection.php | 4 ++-- src/PhpWord/Collection/Bookmarks.php | 4 ++-- src/PhpWord/Collection/Charts.php | 4 ++-- src/PhpWord/Collection/Endnotes.php | 4 ++-- src/PhpWord/Collection/Footnotes.php | 4 ++-- src/PhpWord/Collection/Titles.php | 4 ++-- src/PhpWord/Element/AbstractContainer.php | 2 +- src/PhpWord/Element/AbstractElement.php | 2 +- src/PhpWord/Element/Bookmark.php | 2 +- src/PhpWord/Element/Cell.php | 2 +- src/PhpWord/Element/Chart.php | 2 +- src/PhpWord/Element/CheckBox.php | 2 +- src/PhpWord/Element/Endnote.php | 2 +- src/PhpWord/Element/Field.php | 2 +- src/PhpWord/Element/Footer.php | 2 +- src/PhpWord/Element/Footnote.php | 2 +- src/PhpWord/Element/FormField.php | 2 +- src/PhpWord/Element/Header.php | 2 +- src/PhpWord/Element/Image.php | 2 +- src/PhpWord/Element/Line.php | 2 +- src/PhpWord/Element/Link.php | 2 +- src/PhpWord/Element/ListItem.php | 2 +- src/PhpWord/Element/ListItemRun.php | 2 +- src/PhpWord/Element/Object.php | 2 +- src/PhpWord/Element/PageBreak.php | 2 +- src/PhpWord/Element/PreserveText.php | 2 +- src/PhpWord/Element/Row.php | 2 +- src/PhpWord/Element/SDT.php | 2 +- src/PhpWord/Element/Section.php | 2 +- src/PhpWord/Element/Shape.php | 2 +- src/PhpWord/Element/TOC.php | 4 ++-- src/PhpWord/Element/Table.php | 2 +- src/PhpWord/Element/Text.php | 2 +- src/PhpWord/Element/TextBox.php | 2 +- src/PhpWord/Element/TextBreak.php | 2 +- src/PhpWord/Element/TextRun.php | 2 +- src/PhpWord/Element/Title.php | 2 +- src/PhpWord/Exception/CopyFileException.php | 2 +- src/PhpWord/Exception/CreateTemporaryFileException.php | 2 +- src/PhpWord/Exception/Exception.php | 2 +- src/PhpWord/Exception/InvalidImageException.php | 2 +- src/PhpWord/Exception/InvalidObjectException.php | 2 +- src/PhpWord/Exception/InvalidStyleException.php | 2 +- src/PhpWord/Exception/UnsupportedImageTypeException.php | 2 +- src/PhpWord/Media.php | 2 +- src/PhpWord/Metadata/Compatibility.php | 2 +- src/PhpWord/Metadata/DocInfo.php | 2 +- src/PhpWord/Metadata/Protection.php | 2 +- src/PhpWord/PhpWord.php | 2 +- src/PhpWord/Reader/AbstractReader.php | 2 +- src/PhpWord/Reader/HTML.php | 2 +- src/PhpWord/Reader/ODText.php | 2 +- src/PhpWord/Reader/ODText/AbstractPart.php | 2 +- src/PhpWord/Reader/ODText/Content.php | 2 +- src/PhpWord/Reader/ODText/Meta.php | 2 +- src/PhpWord/Reader/RTF.php | 2 +- src/PhpWord/Reader/RTF/Document.php | 2 +- src/PhpWord/Reader/ReaderInterface.php | 2 +- src/PhpWord/Reader/Word2007.php | 2 +- src/PhpWord/Reader/Word2007/AbstractPart.php | 2 +- src/PhpWord/Reader/Word2007/DocPropsApp.php | 2 +- src/PhpWord/Reader/Word2007/DocPropsCore.php | 2 +- src/PhpWord/Reader/Word2007/DocPropsCustom.php | 2 +- src/PhpWord/Reader/Word2007/Document.php | 2 +- src/PhpWord/Reader/Word2007/Endnotes.php | 2 +- src/PhpWord/Reader/Word2007/Footnotes.php | 2 +- src/PhpWord/Reader/Word2007/Numbering.php | 2 +- src/PhpWord/Reader/Word2007/Styles.php | 2 +- src/PhpWord/Settings.php | 2 +- src/PhpWord/Shared/Converter.php | 2 +- src/PhpWord/Shared/Font.php | 2 +- src/PhpWord/Shared/Html.php | 2 +- src/PhpWord/Shared/String.php | 2 +- src/PhpWord/Shared/XMLReader.php | 2 +- src/PhpWord/Shared/XMLWriter.php | 2 +- src/PhpWord/Shared/ZipArchive.php | 2 +- src/PhpWord/SimpleType/Jc.php | 2 +- src/PhpWord/SimpleType/JcTable.php | 2 +- src/PhpWord/Style.php | 2 +- src/PhpWord/Style/AbstractStyle.php | 2 +- src/PhpWord/Style/Border.php | 2 +- src/PhpWord/Style/Cell.php | 2 +- src/PhpWord/Style/Chart.php | 2 +- src/PhpWord/Style/Extrusion.php | 2 +- src/PhpWord/Style/Fill.php | 2 +- src/PhpWord/Style/Font.php | 2 +- src/PhpWord/Style/Frame.php | 2 +- src/PhpWord/Style/Image.php | 2 +- src/PhpWord/Style/Indentation.php | 2 +- src/PhpWord/Style/Line.php | 2 +- src/PhpWord/Style/LineNumbering.php | 2 +- src/PhpWord/Style/ListItem.php | 2 +- src/PhpWord/Style/Numbering.php | 2 +- src/PhpWord/Style/NumberingLevel.php | 2 +- src/PhpWord/Style/Outline.php | 2 +- src/PhpWord/Style/Paper.php | 2 +- src/PhpWord/Style/Paragraph.php | 2 +- src/PhpWord/Style/Row.php | 2 +- src/PhpWord/Style/Section.php | 2 +- src/PhpWord/Style/Shading.php | 2 +- src/PhpWord/Style/Shadow.php | 2 +- src/PhpWord/Style/Shape.php | 2 +- src/PhpWord/Style/Spacing.php | 2 +- src/PhpWord/Style/TOC.php | 2 +- src/PhpWord/Style/Tab.php | 2 +- src/PhpWord/Style/Table.php | 2 +- src/PhpWord/Style/TextBox.php | 2 +- src/PhpWord/Template.php | 2 +- src/PhpWord/TemplateProcessor.php | 2 +- src/PhpWord/Writer/AbstractWriter.php | 2 +- src/PhpWord/Writer/HTML.php | 2 +- src/PhpWord/Writer/HTML/Element/AbstractElement.php | 2 +- src/PhpWord/Writer/HTML/Element/Container.php | 2 +- src/PhpWord/Writer/HTML/Element/Endnote.php | 2 +- src/PhpWord/Writer/HTML/Element/Footnote.php | 2 +- src/PhpWord/Writer/HTML/Element/Image.php | 2 +- src/PhpWord/Writer/HTML/Element/Link.php | 2 +- src/PhpWord/Writer/HTML/Element/ListItem.php | 2 +- src/PhpWord/Writer/HTML/Element/PageBreak.php | 2 +- src/PhpWord/Writer/HTML/Element/Table.php | 2 +- src/PhpWord/Writer/HTML/Element/Text.php | 2 +- src/PhpWord/Writer/HTML/Element/TextBreak.php | 2 +- src/PhpWord/Writer/HTML/Element/TextRun.php | 2 +- src/PhpWord/Writer/HTML/Element/Title.php | 2 +- src/PhpWord/Writer/HTML/Part/AbstractPart.php | 2 +- src/PhpWord/Writer/HTML/Part/Body.php | 2 +- src/PhpWord/Writer/HTML/Part/Head.php | 2 +- src/PhpWord/Writer/HTML/Style/AbstractStyle.php | 2 +- src/PhpWord/Writer/HTML/Style/Font.php | 2 +- src/PhpWord/Writer/HTML/Style/Generic.php | 2 +- src/PhpWord/Writer/HTML/Style/Image.php | 2 +- src/PhpWord/Writer/HTML/Style/Paragraph.php | 2 +- src/PhpWord/Writer/ODText.php | 2 +- src/PhpWord/Writer/ODText/Element/AbstractElement.php | 2 +- src/PhpWord/Writer/ODText/Element/Container.php | 2 +- src/PhpWord/Writer/ODText/Element/Image.php | 2 +- src/PhpWord/Writer/ODText/Element/Link.php | 2 +- src/PhpWord/Writer/ODText/Element/Table.php | 2 +- src/PhpWord/Writer/ODText/Element/Text.php | 2 +- src/PhpWord/Writer/ODText/Element/TextBreak.php | 2 +- src/PhpWord/Writer/ODText/Element/TextRun.php | 2 +- src/PhpWord/Writer/ODText/Element/Title.php | 2 +- src/PhpWord/Writer/ODText/Part/AbstractPart.php | 2 +- src/PhpWord/Writer/ODText/Part/Content.php | 2 +- src/PhpWord/Writer/ODText/Part/Manifest.php | 2 +- src/PhpWord/Writer/ODText/Part/Meta.php | 2 +- src/PhpWord/Writer/ODText/Part/Mimetype.php | 2 +- src/PhpWord/Writer/ODText/Part/Styles.php | 2 +- src/PhpWord/Writer/ODText/Style/AbstractStyle.php | 2 +- src/PhpWord/Writer/ODText/Style/Font.php | 2 +- src/PhpWord/Writer/ODText/Style/Image.php | 2 +- src/PhpWord/Writer/ODText/Style/Paragraph.php | 2 +- src/PhpWord/Writer/ODText/Style/Section.php | 2 +- src/PhpWord/Writer/ODText/Style/Table.php | 2 +- src/PhpWord/Writer/PDF.php | 2 +- src/PhpWord/Writer/PDF/AbstractRenderer.php | 2 +- src/PhpWord/Writer/PDF/DomPDF.php | 2 +- src/PhpWord/Writer/PDF/MPDF.php | 2 +- src/PhpWord/Writer/PDF/TCPDF.php | 2 +- src/PhpWord/Writer/RTF.php | 2 +- src/PhpWord/Writer/RTF/Element/AbstractElement.php | 4 ++-- src/PhpWord/Writer/RTF/Element/Container.php | 2 +- src/PhpWord/Writer/RTF/Element/Image.php | 2 +- src/PhpWord/Writer/RTF/Element/Link.php | 2 +- src/PhpWord/Writer/RTF/Element/ListItem.php | 2 +- src/PhpWord/Writer/RTF/Element/PageBreak.php | 2 +- src/PhpWord/Writer/RTF/Element/Table.php | 2 +- src/PhpWord/Writer/RTF/Element/Text.php | 2 +- src/PhpWord/Writer/RTF/Element/TextBreak.php | 2 +- src/PhpWord/Writer/RTF/Element/TextRun.php | 2 +- src/PhpWord/Writer/RTF/Element/Title.php | 2 +- src/PhpWord/Writer/RTF/Part/AbstractPart.php | 2 +- src/PhpWord/Writer/RTF/Part/Document.php | 2 +- src/PhpWord/Writer/RTF/Part/Header.php | 2 +- src/PhpWord/Writer/RTF/Style/AbstractStyle.php | 2 +- src/PhpWord/Writer/RTF/Style/Border.php | 2 +- src/PhpWord/Writer/RTF/Style/Font.php | 2 +- src/PhpWord/Writer/RTF/Style/Paragraph.php | 2 +- src/PhpWord/Writer/RTF/Style/Section.php | 2 +- src/PhpWord/Writer/Word2007.php | 2 +- src/PhpWord/Writer/Word2007/Element/AbstractElement.php | 2 +- src/PhpWord/Writer/Word2007/Element/Bookmark.php | 2 +- src/PhpWord/Writer/Word2007/Element/Chart.php | 2 +- src/PhpWord/Writer/Word2007/Element/CheckBox.php | 2 +- src/PhpWord/Writer/Word2007/Element/Container.php | 2 +- src/PhpWord/Writer/Word2007/Element/Endnote.php | 2 +- src/PhpWord/Writer/Word2007/Element/Field.php | 2 +- src/PhpWord/Writer/Word2007/Element/Footnote.php | 2 +- src/PhpWord/Writer/Word2007/Element/FormField.php | 2 +- src/PhpWord/Writer/Word2007/Element/Image.php | 2 +- src/PhpWord/Writer/Word2007/Element/Line.php | 2 +- src/PhpWord/Writer/Word2007/Element/Link.php | 2 +- src/PhpWord/Writer/Word2007/Element/ListItem.php | 2 +- src/PhpWord/Writer/Word2007/Element/ListItemRun.php | 2 +- src/PhpWord/Writer/Word2007/Element/Object.php | 2 +- src/PhpWord/Writer/Word2007/Element/PageBreak.php | 2 +- src/PhpWord/Writer/Word2007/Element/ParagraphAlignment.php | 2 +- src/PhpWord/Writer/Word2007/Element/PreserveText.php | 2 +- src/PhpWord/Writer/Word2007/Element/SDT.php | 2 +- src/PhpWord/Writer/Word2007/Element/Shape.php | 2 +- src/PhpWord/Writer/Word2007/Element/TOC.php | 2 +- src/PhpWord/Writer/Word2007/Element/Table.php | 2 +- src/PhpWord/Writer/Word2007/Element/TableAlignment.php | 2 +- src/PhpWord/Writer/Word2007/Element/Text.php | 2 +- src/PhpWord/Writer/Word2007/Element/TextBox.php | 2 +- src/PhpWord/Writer/Word2007/Element/TextBreak.php | 2 +- src/PhpWord/Writer/Word2007/Element/TextRun.php | 2 +- src/PhpWord/Writer/Word2007/Element/Title.php | 2 +- src/PhpWord/Writer/Word2007/Part/AbstractPart.php | 2 +- src/PhpWord/Writer/Word2007/Part/Chart.php | 2 +- src/PhpWord/Writer/Word2007/Part/ContentTypes.php | 2 +- src/PhpWord/Writer/Word2007/Part/DocPropsApp.php | 2 +- src/PhpWord/Writer/Word2007/Part/DocPropsCore.php | 2 +- src/PhpWord/Writer/Word2007/Part/DocPropsCustom.php | 2 +- src/PhpWord/Writer/Word2007/Part/Document.php | 2 +- src/PhpWord/Writer/Word2007/Part/Endnotes.php | 2 +- src/PhpWord/Writer/Word2007/Part/FontTable.php | 2 +- src/PhpWord/Writer/Word2007/Part/Footer.php | 2 +- src/PhpWord/Writer/Word2007/Part/Footnotes.php | 2 +- src/PhpWord/Writer/Word2007/Part/Header.php | 2 +- src/PhpWord/Writer/Word2007/Part/Numbering.php | 2 +- src/PhpWord/Writer/Word2007/Part/Rels.php | 2 +- src/PhpWord/Writer/Word2007/Part/RelsDocument.php | 2 +- src/PhpWord/Writer/Word2007/Part/RelsPart.php | 2 +- src/PhpWord/Writer/Word2007/Part/Settings.php | 2 +- src/PhpWord/Writer/Word2007/Part/Styles.php | 2 +- src/PhpWord/Writer/Word2007/Part/Theme.php | 2 +- src/PhpWord/Writer/Word2007/Part/WebSettings.php | 2 +- src/PhpWord/Writer/Word2007/Style/AbstractStyle.php | 2 +- src/PhpWord/Writer/Word2007/Style/Cell.php | 2 +- src/PhpWord/Writer/Word2007/Style/Extrusion.php | 2 +- src/PhpWord/Writer/Word2007/Style/Fill.php | 2 +- src/PhpWord/Writer/Word2007/Style/Font.php | 2 +- src/PhpWord/Writer/Word2007/Style/Frame.php | 2 +- src/PhpWord/Writer/Word2007/Style/Image.php | 2 +- src/PhpWord/Writer/Word2007/Style/Indentation.php | 2 +- src/PhpWord/Writer/Word2007/Style/Line.php | 2 +- src/PhpWord/Writer/Word2007/Style/LineNumbering.php | 2 +- src/PhpWord/Writer/Word2007/Style/MarginBorder.php | 2 +- src/PhpWord/Writer/Word2007/Style/Outline.php | 2 +- src/PhpWord/Writer/Word2007/Style/Paragraph.php | 2 +- src/PhpWord/Writer/Word2007/Style/Row.php | 2 +- src/PhpWord/Writer/Word2007/Style/Section.php | 2 +- src/PhpWord/Writer/Word2007/Style/Shading.php | 2 +- src/PhpWord/Writer/Word2007/Style/Shadow.php | 2 +- src/PhpWord/Writer/Word2007/Style/Shape.php | 2 +- src/PhpWord/Writer/Word2007/Style/Spacing.php | 2 +- src/PhpWord/Writer/Word2007/Style/Tab.php | 2 +- src/PhpWord/Writer/Word2007/Style/Table.php | 2 +- src/PhpWord/Writer/Word2007/Style/TextBox.php | 2 +- src/PhpWord/Writer/WriterInterface.php | 2 +- tests/PhpWord/Element/AbstractElementTest.php | 2 +- tests/PhpWord/Element/CellTest.php | 2 +- tests/PhpWord/Element/CheckBoxTest.php | 2 +- tests/PhpWord/Element/FieldTest.php | 2 +- tests/PhpWord/Element/FooterTest.php | 2 +- tests/PhpWord/Element/FootnoteTest.php | 2 +- tests/PhpWord/Element/HeaderTest.php | 2 +- tests/PhpWord/Element/ImageTest.php | 2 +- tests/PhpWord/Element/LineTest.php | 2 +- tests/PhpWord/Element/LinkTest.php | 2 +- tests/PhpWord/Element/ListItemRunTest.php | 2 +- tests/PhpWord/Element/ListItemTest.php | 2 +- tests/PhpWord/Element/ObjectTest.php | 2 +- tests/PhpWord/Element/PageBreakTest.php | 2 +- tests/PhpWord/Element/PreserveTextTest.php | 2 +- tests/PhpWord/Element/RowTest.php | 2 +- tests/PhpWord/Element/SDTTest.php | 2 +- tests/PhpWord/Element/SectionTest.php | 2 +- tests/PhpWord/Element/TOCTest.php | 2 +- tests/PhpWord/Element/TableTest.php | 2 +- tests/PhpWord/Element/TextBoxTest.php | 2 +- tests/PhpWord/Element/TextBreakTest.php | 2 +- tests/PhpWord/Element/TextRunTest.php | 2 +- tests/PhpWord/Element/TextTest.php | 2 +- tests/PhpWord/Element/TitleTest.php | 2 +- tests/PhpWord/Exception/CopyFileExceptionTest.php | 2 +- tests/PhpWord/Exception/CreateTemporaryFileExceptionTest.php | 2 +- tests/PhpWord/Exception/ExceptionTest.php | 2 +- tests/PhpWord/Exception/InvalidImageExceptionTest.php | 2 +- tests/PhpWord/Exception/InvalidStyleExceptionTest.php | 2 +- tests/PhpWord/Exception/UnsupportedImageTypeExceptionTest.php | 2 +- tests/PhpWord/IOFactoryTest.php | 2 +- tests/PhpWord/MediaTest.php | 2 +- tests/PhpWord/Metadata/DocInfoTest.php | 2 +- tests/PhpWord/PhpWordTest.php | 2 +- tests/PhpWord/Reader/HTMLTest.php | 2 +- tests/PhpWord/Reader/ODTextTest.php | 2 +- tests/PhpWord/Reader/RTFTest.php | 2 +- tests/PhpWord/Reader/Word2007Test.php | 2 +- tests/PhpWord/SettingsTest.php | 2 +- tests/PhpWord/Shared/ConverterTest.php | 2 +- tests/PhpWord/Shared/HtmlTest.php | 2 +- tests/PhpWord/Shared/StringTest.php | 2 +- tests/PhpWord/Shared/XMLReaderTest.php | 2 +- tests/PhpWord/Shared/XMLWriterTest.php | 2 +- tests/PhpWord/Shared/ZipArchiveTest.php | 2 +- tests/PhpWord/Style/AbstractStyleTest.php | 2 +- tests/PhpWord/Style/CellTest.php | 2 +- tests/PhpWord/Style/FontTest.php | 2 +- tests/PhpWord/Style/ImageTest.php | 2 +- tests/PhpWord/Style/IndentationTest.php | 2 +- tests/PhpWord/Style/LineNumberingTest.php | 2 +- tests/PhpWord/Style/LineTest.php | 2 +- tests/PhpWord/Style/ListItemTest.php | 2 +- tests/PhpWord/Style/NumberingLevelTest.php | 2 +- tests/PhpWord/Style/NumberingTest.php | 2 +- tests/PhpWord/Style/ParagraphTest.php | 2 +- tests/PhpWord/Style/RowTest.php | 2 +- tests/PhpWord/Style/SectionTest.php | 2 +- tests/PhpWord/Style/ShadingTest.php | 2 +- tests/PhpWord/Style/SpacingTest.php | 2 +- tests/PhpWord/Style/TOCTest.php | 2 +- tests/PhpWord/Style/TabTest.php | 2 +- tests/PhpWord/Style/TableTest.php | 2 +- tests/PhpWord/Style/TextBoxTest.php | 2 +- tests/PhpWord/StyleTest.php | 2 +- tests/PhpWord/TemplateProcessorTest.php | 2 +- tests/PhpWord/Writer/HTML/ElementTest.php | 2 +- tests/PhpWord/Writer/HTML/PartTest.php | 2 +- tests/PhpWord/Writer/HTML/StyleTest.php | 2 +- tests/PhpWord/Writer/HTMLTest.php | 2 +- tests/PhpWord/Writer/ODText/ElementTest.php | 2 +- tests/PhpWord/Writer/ODText/Part/AbstractPartTest.php | 2 +- tests/PhpWord/Writer/ODText/Part/ContentTest.php | 2 +- tests/PhpWord/Writer/ODText/StyleTest.php | 2 +- tests/PhpWord/Writer/ODTextTest.php | 2 +- tests/PhpWord/Writer/PDF/DomPDFTest.php | 2 +- tests/PhpWord/Writer/PDF/MPDFTest.php | 2 +- tests/PhpWord/Writer/PDF/TCPDFTest.php | 2 +- tests/PhpWord/Writer/PDFTest.php | 2 +- tests/PhpWord/Writer/RTF/ElementTest.php | 2 +- tests/PhpWord/Writer/RTF/StyleTest.php | 2 +- tests/PhpWord/Writer/RTFTest.php | 2 +- tests/PhpWord/Writer/Word2007/ElementTest.php | 2 +- tests/PhpWord/Writer/Word2007/Part/AbstractPartTest.php | 2 +- tests/PhpWord/Writer/Word2007/Part/DocumentTest.php | 2 +- tests/PhpWord/Writer/Word2007/Part/FooterTest.php | 2 +- tests/PhpWord/Writer/Word2007/Part/FootnotesTest.php | 2 +- tests/PhpWord/Writer/Word2007/Part/HeaderTest.php | 2 +- tests/PhpWord/Writer/Word2007/Part/NumberingTest.php | 2 +- tests/PhpWord/Writer/Word2007/Part/SettingsTest.php | 2 +- tests/PhpWord/Writer/Word2007/Part/StylesTest.php | 2 +- tests/PhpWord/Writer/Word2007/PartTest.php | 2 +- tests/PhpWord/Writer/Word2007/Style/FontTest.php | 2 +- tests/PhpWord/Writer/Word2007/StyleTest.php | 2 +- tests/PhpWord/Writer/Word2007Test.php | 2 +- tests/PhpWord/_includes/TestHelperDOCX.php | 2 +- tests/PhpWord/_includes/XmlDocument.php | 2 +- tests/bootstrap.php | 2 +- 352 files changed, 360 insertions(+), 360 deletions(-) diff --git a/LICENSE b/LICENSE index 3f6a8c3865..ac3b2c9247 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ PHPWord, a pure PHP library for reading and writing word processing documents. -Copyright (c) 2010-2014 PHPWord. +Copyright (c) 2010-2015 PHPWord. PHPWord is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 3 as published by diff --git a/bootstrap.php b/bootstrap.php index 8f427a946d..81d7d319bc 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. test bootstrap * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Collection/AbstractCollection.php b/src/PhpWord/Collection/AbstractCollection.php index 41e40e2e9e..dc97566ae4 100644 --- a/src/PhpWord/Collection/AbstractCollection.php +++ b/src/PhpWord/Collection/AbstractCollection.php @@ -11,8 +11,8 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL + * @copyright 2010-2015 PHPWord contributors + * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Collection; diff --git a/src/PhpWord/Collection/Bookmarks.php b/src/PhpWord/Collection/Bookmarks.php index cb9d74d53f..9943b477ff 100644 --- a/src/PhpWord/Collection/Bookmarks.php +++ b/src/PhpWord/Collection/Bookmarks.php @@ -11,8 +11,8 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL + * @copyright 2010-2015 PHPWord contributors + * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Collection; diff --git a/src/PhpWord/Collection/Charts.php b/src/PhpWord/Collection/Charts.php index cfccee2ec3..379fb3a148 100644 --- a/src/PhpWord/Collection/Charts.php +++ b/src/PhpWord/Collection/Charts.php @@ -11,8 +11,8 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL + * @copyright 2010-2015 PHPWord contributors + * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Collection; diff --git a/src/PhpWord/Collection/Endnotes.php b/src/PhpWord/Collection/Endnotes.php index c16486ae65..c1ca59b81a 100644 --- a/src/PhpWord/Collection/Endnotes.php +++ b/src/PhpWord/Collection/Endnotes.php @@ -11,8 +11,8 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL + * @copyright 2010-2015 PHPWord contributors + * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Collection; diff --git a/src/PhpWord/Collection/Footnotes.php b/src/PhpWord/Collection/Footnotes.php index e83ac873a7..b8c331ede9 100644 --- a/src/PhpWord/Collection/Footnotes.php +++ b/src/PhpWord/Collection/Footnotes.php @@ -11,8 +11,8 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL + * @copyright 2010-2015 PHPWord contributors + * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Collection; diff --git a/src/PhpWord/Collection/Titles.php b/src/PhpWord/Collection/Titles.php index 7e5e5da787..f0349cb69f 100644 --- a/src/PhpWord/Collection/Titles.php +++ b/src/PhpWord/Collection/Titles.php @@ -11,8 +11,8 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL + * @copyright 2010-2015 PHPWord contributors + * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Collection; diff --git a/src/PhpWord/Element/AbstractContainer.php b/src/PhpWord/Element/AbstractContainer.php index 9ab96a6afe..c24cdd63f1 100644 --- a/src/PhpWord/Element/AbstractContainer.php +++ b/src/PhpWord/Element/AbstractContainer.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/AbstractElement.php b/src/PhpWord/Element/AbstractElement.php index 68044e029f..fd81ba00ae 100644 --- a/src/PhpWord/Element/AbstractElement.php +++ b/src/PhpWord/Element/AbstractElement.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/Bookmark.php b/src/PhpWord/Element/Bookmark.php index d5b8ff6fba..764dd605cf 100644 --- a/src/PhpWord/Element/Bookmark.php +++ b/src/PhpWord/Element/Bookmark.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/Cell.php b/src/PhpWord/Element/Cell.php index cac37a7804..3e2fdfdc86 100644 --- a/src/PhpWord/Element/Cell.php +++ b/src/PhpWord/Element/Cell.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/Chart.php b/src/PhpWord/Element/Chart.php index 66c59ff52c..2d95e11082 100644 --- a/src/PhpWord/Element/Chart.php +++ b/src/PhpWord/Element/Chart.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/CheckBox.php b/src/PhpWord/Element/CheckBox.php index d3b2a3c6f4..9362c3b17a 100644 --- a/src/PhpWord/Element/CheckBox.php +++ b/src/PhpWord/Element/CheckBox.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/Endnote.php b/src/PhpWord/Element/Endnote.php index 1000055520..a82841c00f 100644 --- a/src/PhpWord/Element/Endnote.php +++ b/src/PhpWord/Element/Endnote.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/Field.php b/src/PhpWord/Element/Field.php index 8c612252d3..5cc20df2b0 100644 --- a/src/PhpWord/Element/Field.php +++ b/src/PhpWord/Element/Field.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/Footer.php b/src/PhpWord/Element/Footer.php index 8e19eaf7db..b7f727af46 100644 --- a/src/PhpWord/Element/Footer.php +++ b/src/PhpWord/Element/Footer.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/Footnote.php b/src/PhpWord/Element/Footnote.php index 34bdf3c6b0..917b6cc901 100644 --- a/src/PhpWord/Element/Footnote.php +++ b/src/PhpWord/Element/Footnote.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/FormField.php b/src/PhpWord/Element/FormField.php index 7bd61be1e7..97aa2e1ae9 100644 --- a/src/PhpWord/Element/FormField.php +++ b/src/PhpWord/Element/FormField.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/Header.php b/src/PhpWord/Element/Header.php index feaa86e81a..619380fbb4 100644 --- a/src/PhpWord/Element/Header.php +++ b/src/PhpWord/Element/Header.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/Image.php b/src/PhpWord/Element/Image.php index b0b2967e4c..f5cc7ccccf 100644 --- a/src/PhpWord/Element/Image.php +++ b/src/PhpWord/Element/Image.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/Line.php b/src/PhpWord/Element/Line.php index b76ac4fb32..1e806c5ec5 100644 --- a/src/PhpWord/Element/Line.php +++ b/src/PhpWord/Element/Line.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/Link.php b/src/PhpWord/Element/Link.php index 0359f41516..480016f44c 100644 --- a/src/PhpWord/Element/Link.php +++ b/src/PhpWord/Element/Link.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/ListItem.php b/src/PhpWord/Element/ListItem.php index 4cb8d33952..5914f431c6 100644 --- a/src/PhpWord/Element/ListItem.php +++ b/src/PhpWord/Element/ListItem.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/ListItemRun.php b/src/PhpWord/Element/ListItemRun.php index 1b77830db3..f921134865 100644 --- a/src/PhpWord/Element/ListItemRun.php +++ b/src/PhpWord/Element/ListItemRun.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord -* @copyright 2010-2014 PHPWord contributors +* @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/Object.php b/src/PhpWord/Element/Object.php index 2721f8c245..950e8eb16b 100644 --- a/src/PhpWord/Element/Object.php +++ b/src/PhpWord/Element/Object.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/PageBreak.php b/src/PhpWord/Element/PageBreak.php index a1e7e998e8..e8234f4841 100644 --- a/src/PhpWord/Element/PageBreak.php +++ b/src/PhpWord/Element/PageBreak.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/PreserveText.php b/src/PhpWord/Element/PreserveText.php index 44aef3b40e..247b3cebab 100644 --- a/src/PhpWord/Element/PreserveText.php +++ b/src/PhpWord/Element/PreserveText.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/Row.php b/src/PhpWord/Element/Row.php index e2df632551..bcc422b781 100644 --- a/src/PhpWord/Element/Row.php +++ b/src/PhpWord/Element/Row.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/SDT.php b/src/PhpWord/Element/SDT.php index c69ed42772..ebaf7edf72 100644 --- a/src/PhpWord/Element/SDT.php +++ b/src/PhpWord/Element/SDT.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/Section.php b/src/PhpWord/Element/Section.php index ea547475ac..f8db87d703 100644 --- a/src/PhpWord/Element/Section.php +++ b/src/PhpWord/Element/Section.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/Shape.php b/src/PhpWord/Element/Shape.php index a7a96d1884..d1334a148e 100644 --- a/src/PhpWord/Element/Shape.php +++ b/src/PhpWord/Element/Shape.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/TOC.php b/src/PhpWord/Element/TOC.php index a56d9ffe40..6f2785cafd 100644 --- a/src/PhpWord/Element/TOC.php +++ b/src/PhpWord/Element/TOC.php @@ -11,8 +11,8 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors - * @license http://www.gnu.org/licenses/lgpl.txt LGPL + * @copyright 2010-2015 PHPWord contributors + * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Element; diff --git a/src/PhpWord/Element/Table.php b/src/PhpWord/Element/Table.php index 5f0b8f7953..125955a737 100644 --- a/src/PhpWord/Element/Table.php +++ b/src/PhpWord/Element/Table.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/Text.php b/src/PhpWord/Element/Text.php index 52fccb3f28..17fb118034 100644 --- a/src/PhpWord/Element/Text.php +++ b/src/PhpWord/Element/Text.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/TextBox.php b/src/PhpWord/Element/TextBox.php index d929bf35db..d8ef0be7cb 100644 --- a/src/PhpWord/Element/TextBox.php +++ b/src/PhpWord/Element/TextBox.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/TextBreak.php b/src/PhpWord/Element/TextBreak.php index aa6ab582b2..96cb72a41e 100644 --- a/src/PhpWord/Element/TextBreak.php +++ b/src/PhpWord/Element/TextBreak.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/TextRun.php b/src/PhpWord/Element/TextRun.php index c356cfa8e1..d4e90608dc 100644 --- a/src/PhpWord/Element/TextRun.php +++ b/src/PhpWord/Element/TextRun.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/Title.php b/src/PhpWord/Element/Title.php index cf1d49c81a..90009a9b05 100644 --- a/src/PhpWord/Element/Title.php +++ b/src/PhpWord/Element/Title.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Exception/CopyFileException.php b/src/PhpWord/Exception/CopyFileException.php index 97a900e3b2..0bdc10daa7 100644 --- a/src/PhpWord/Exception/CopyFileException.php +++ b/src/PhpWord/Exception/CopyFileException.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Exception/CreateTemporaryFileException.php b/src/PhpWord/Exception/CreateTemporaryFileException.php index b68569c95d..3c5eb84938 100644 --- a/src/PhpWord/Exception/CreateTemporaryFileException.php +++ b/src/PhpWord/Exception/CreateTemporaryFileException.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Exception/Exception.php b/src/PhpWord/Exception/Exception.php index cb66d28e9f..f4313397f5 100644 --- a/src/PhpWord/Exception/Exception.php +++ b/src/PhpWord/Exception/Exception.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Exception/InvalidImageException.php b/src/PhpWord/Exception/InvalidImageException.php index 214aef6549..8c502cd30d 100644 --- a/src/PhpWord/Exception/InvalidImageException.php +++ b/src/PhpWord/Exception/InvalidImageException.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Exception/InvalidObjectException.php b/src/PhpWord/Exception/InvalidObjectException.php index 5e3d821e1e..3e6cfa4a02 100644 --- a/src/PhpWord/Exception/InvalidObjectException.php +++ b/src/PhpWord/Exception/InvalidObjectException.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Exception/InvalidStyleException.php b/src/PhpWord/Exception/InvalidStyleException.php index 4efb808abe..0ca5dbc739 100644 --- a/src/PhpWord/Exception/InvalidStyleException.php +++ b/src/PhpWord/Exception/InvalidStyleException.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Exception/UnsupportedImageTypeException.php b/src/PhpWord/Exception/UnsupportedImageTypeException.php index a18df1e3f7..2b1ed078f8 100644 --- a/src/PhpWord/Exception/UnsupportedImageTypeException.php +++ b/src/PhpWord/Exception/UnsupportedImageTypeException.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Media.php b/src/PhpWord/Media.php index baed1fbfe0..a94dbba546 100644 --- a/src/PhpWord/Media.php +++ b/src/PhpWord/Media.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Metadata/Compatibility.php b/src/PhpWord/Metadata/Compatibility.php index d78b97f1f9..84b715d913 100644 --- a/src/PhpWord/Metadata/Compatibility.php +++ b/src/PhpWord/Metadata/Compatibility.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Metadata/DocInfo.php b/src/PhpWord/Metadata/DocInfo.php index 9643685f25..54377aed6a 100644 --- a/src/PhpWord/Metadata/DocInfo.php +++ b/src/PhpWord/Metadata/DocInfo.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Metadata/Protection.php b/src/PhpWord/Metadata/Protection.php index 3556ce8c2c..086f8eecba 100644 --- a/src/PhpWord/Metadata/Protection.php +++ b/src/PhpWord/Metadata/Protection.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/PhpWord.php b/src/PhpWord/PhpWord.php index cbd87edb2d..d8f709ee7f 100644 --- a/src/PhpWord/PhpWord.php +++ b/src/PhpWord/PhpWord.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Reader/AbstractReader.php b/src/PhpWord/Reader/AbstractReader.php index 6b6b877eba..f225a6975e 100644 --- a/src/PhpWord/Reader/AbstractReader.php +++ b/src/PhpWord/Reader/AbstractReader.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Reader/HTML.php b/src/PhpWord/Reader/HTML.php index 83c38af1d7..bcbcd85959 100644 --- a/src/PhpWord/Reader/HTML.php +++ b/src/PhpWord/Reader/HTML.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Reader/ODText.php b/src/PhpWord/Reader/ODText.php index d992f7fd3c..309ebf1a2e 100644 --- a/src/PhpWord/Reader/ODText.php +++ b/src/PhpWord/Reader/ODText.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Reader/ODText/AbstractPart.php b/src/PhpWord/Reader/ODText/AbstractPart.php index 95f700847e..59376a8a10 100644 --- a/src/PhpWord/Reader/ODText/AbstractPart.php +++ b/src/PhpWord/Reader/ODText/AbstractPart.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Reader/ODText/Content.php b/src/PhpWord/Reader/ODText/Content.php index cf2fd65368..2962c9bac9 100644 --- a/src/PhpWord/Reader/ODText/Content.php +++ b/src/PhpWord/Reader/ODText/Content.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Reader/ODText/Meta.php b/src/PhpWord/Reader/ODText/Meta.php index d08ce3a679..bdfe74c51f 100644 --- a/src/PhpWord/Reader/ODText/Meta.php +++ b/src/PhpWord/Reader/ODText/Meta.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Reader/RTF.php b/src/PhpWord/Reader/RTF.php index 3dff864f37..921f67c706 100644 --- a/src/PhpWord/Reader/RTF.php +++ b/src/PhpWord/Reader/RTF.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Reader/RTF/Document.php b/src/PhpWord/Reader/RTF/Document.php index d2f850bf0f..f04e957bf9 100644 --- a/src/PhpWord/Reader/RTF/Document.php +++ b/src/PhpWord/Reader/RTF/Document.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Reader/ReaderInterface.php b/src/PhpWord/Reader/ReaderInterface.php index 361c413796..6ce2408996 100644 --- a/src/PhpWord/Reader/ReaderInterface.php +++ b/src/PhpWord/Reader/ReaderInterface.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Reader/Word2007.php b/src/PhpWord/Reader/Word2007.php index ebe6c4f765..6e7efc120d 100644 --- a/src/PhpWord/Reader/Word2007.php +++ b/src/PhpWord/Reader/Word2007.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Reader/Word2007/AbstractPart.php b/src/PhpWord/Reader/Word2007/AbstractPart.php index bf523f2676..c4411aad8d 100644 --- a/src/PhpWord/Reader/Word2007/AbstractPart.php +++ b/src/PhpWord/Reader/Word2007/AbstractPart.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Reader/Word2007/DocPropsApp.php b/src/PhpWord/Reader/Word2007/DocPropsApp.php index ddbe474f1a..f6f42852c6 100644 --- a/src/PhpWord/Reader/Word2007/DocPropsApp.php +++ b/src/PhpWord/Reader/Word2007/DocPropsApp.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Reader/Word2007/DocPropsCore.php b/src/PhpWord/Reader/Word2007/DocPropsCore.php index 54537525b6..97d0a4de32 100644 --- a/src/PhpWord/Reader/Word2007/DocPropsCore.php +++ b/src/PhpWord/Reader/Word2007/DocPropsCore.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Reader/Word2007/DocPropsCustom.php b/src/PhpWord/Reader/Word2007/DocPropsCustom.php index eb725b2ec3..060684788c 100644 --- a/src/PhpWord/Reader/Word2007/DocPropsCustom.php +++ b/src/PhpWord/Reader/Word2007/DocPropsCustom.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Reader/Word2007/Document.php b/src/PhpWord/Reader/Word2007/Document.php index e1beed0666..7275f6e3be 100644 --- a/src/PhpWord/Reader/Word2007/Document.php +++ b/src/PhpWord/Reader/Word2007/Document.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Reader/Word2007/Endnotes.php b/src/PhpWord/Reader/Word2007/Endnotes.php index c493c34790..d889e9de79 100644 --- a/src/PhpWord/Reader/Word2007/Endnotes.php +++ b/src/PhpWord/Reader/Word2007/Endnotes.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Reader/Word2007/Footnotes.php b/src/PhpWord/Reader/Word2007/Footnotes.php index 6f6adc879e..3668bd4dd5 100644 --- a/src/PhpWord/Reader/Word2007/Footnotes.php +++ b/src/PhpWord/Reader/Word2007/Footnotes.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Reader/Word2007/Numbering.php b/src/PhpWord/Reader/Word2007/Numbering.php index f1144b1a37..9037a5f75e 100644 --- a/src/PhpWord/Reader/Word2007/Numbering.php +++ b/src/PhpWord/Reader/Word2007/Numbering.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Reader/Word2007/Styles.php b/src/PhpWord/Reader/Word2007/Styles.php index 299fe1df77..ed00665897 100644 --- a/src/PhpWord/Reader/Word2007/Styles.php +++ b/src/PhpWord/Reader/Word2007/Styles.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Settings.php b/src/PhpWord/Settings.php index 14fa9077aa..a4d7fbcaa6 100644 --- a/src/PhpWord/Settings.php +++ b/src/PhpWord/Settings.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Shared/Converter.php b/src/PhpWord/Shared/Converter.php index c6727edd55..d25f2375b3 100644 --- a/src/PhpWord/Shared/Converter.php +++ b/src/PhpWord/Shared/Converter.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Shared/Font.php b/src/PhpWord/Shared/Font.php index 473ef0e47e..a3a3b63148 100644 --- a/src/PhpWord/Shared/Font.php +++ b/src/PhpWord/Shared/Font.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Shared/Html.php b/src/PhpWord/Shared/Html.php index cdc88b4396..64bcab1eb1 100644 --- a/src/PhpWord/Shared/Html.php +++ b/src/PhpWord/Shared/Html.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Shared/String.php b/src/PhpWord/Shared/String.php index be04fd0ec7..526d75247e 100644 --- a/src/PhpWord/Shared/String.php +++ b/src/PhpWord/Shared/String.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Shared/XMLReader.php b/src/PhpWord/Shared/XMLReader.php index 6af1ca9b36..7983dadd61 100644 --- a/src/PhpWord/Shared/XMLReader.php +++ b/src/PhpWord/Shared/XMLReader.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Shared/XMLWriter.php b/src/PhpWord/Shared/XMLWriter.php index 26dbcc3464..75fe35e0d8 100644 --- a/src/PhpWord/Shared/XMLWriter.php +++ b/src/PhpWord/Shared/XMLWriter.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Shared/ZipArchive.php b/src/PhpWord/Shared/ZipArchive.php index c670169201..bb2902da30 100644 --- a/src/PhpWord/Shared/ZipArchive.php +++ b/src/PhpWord/Shared/ZipArchive.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/SimpleType/Jc.php b/src/PhpWord/SimpleType/Jc.php index 37a30060b2..5cbf47522f 100644 --- a/src/PhpWord/SimpleType/Jc.php +++ b/src/PhpWord/SimpleType/Jc.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/SimpleType/JcTable.php b/src/PhpWord/SimpleType/JcTable.php index eca49d2adb..d93e56f193 100644 --- a/src/PhpWord/SimpleType/JcTable.php +++ b/src/PhpWord/SimpleType/JcTable.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style.php b/src/PhpWord/Style.php index ab03106fce..f9936246e5 100644 --- a/src/PhpWord/Style.php +++ b/src/PhpWord/Style.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/AbstractStyle.php b/src/PhpWord/Style/AbstractStyle.php index 482712e39b..418e4a3587 100644 --- a/src/PhpWord/Style/AbstractStyle.php +++ b/src/PhpWord/Style/AbstractStyle.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/Border.php b/src/PhpWord/Style/Border.php index 84116d7a70..6977f84ee3 100644 --- a/src/PhpWord/Style/Border.php +++ b/src/PhpWord/Style/Border.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/Cell.php b/src/PhpWord/Style/Cell.php index bef56390f9..529db7358c 100644 --- a/src/PhpWord/Style/Cell.php +++ b/src/PhpWord/Style/Cell.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/Chart.php b/src/PhpWord/Style/Chart.php index 13b72a33f5..83d96b8c6c 100644 --- a/src/PhpWord/Style/Chart.php +++ b/src/PhpWord/Style/Chart.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/Extrusion.php b/src/PhpWord/Style/Extrusion.php index ccbb26505b..9c544913b9 100644 --- a/src/PhpWord/Style/Extrusion.php +++ b/src/PhpWord/Style/Extrusion.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/Fill.php b/src/PhpWord/Style/Fill.php index 08c7a85739..252f9d7695 100644 --- a/src/PhpWord/Style/Fill.php +++ b/src/PhpWord/Style/Fill.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/Font.php b/src/PhpWord/Style/Font.php index 000f59fd69..a33b649bd2 100644 --- a/src/PhpWord/Style/Font.php +++ b/src/PhpWord/Style/Font.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/Frame.php b/src/PhpWord/Style/Frame.php index 13388f6bc6..ded4950a36 100644 --- a/src/PhpWord/Style/Frame.php +++ b/src/PhpWord/Style/Frame.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/Image.php b/src/PhpWord/Style/Image.php index 5308a3bae7..8397463091 100644 --- a/src/PhpWord/Style/Image.php +++ b/src/PhpWord/Style/Image.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Style; diff --git a/src/PhpWord/Style/Indentation.php b/src/PhpWord/Style/Indentation.php index 5854204a9c..81569041ea 100644 --- a/src/PhpWord/Style/Indentation.php +++ b/src/PhpWord/Style/Indentation.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/Line.php b/src/PhpWord/Style/Line.php index 44f5422991..c4ee920f1a 100644 --- a/src/PhpWord/Style/Line.php +++ b/src/PhpWord/Style/Line.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Style; diff --git a/src/PhpWord/Style/LineNumbering.php b/src/PhpWord/Style/LineNumbering.php index b93ce03f0f..5d55eb0637 100644 --- a/src/PhpWord/Style/LineNumbering.php +++ b/src/PhpWord/Style/LineNumbering.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/ListItem.php b/src/PhpWord/Style/ListItem.php index 6583f74d10..3de01f5dca 100644 --- a/src/PhpWord/Style/ListItem.php +++ b/src/PhpWord/Style/ListItem.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/Numbering.php b/src/PhpWord/Style/Numbering.php index 726af2bec7..6325d78c69 100644 --- a/src/PhpWord/Style/Numbering.php +++ b/src/PhpWord/Style/Numbering.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/NumberingLevel.php b/src/PhpWord/Style/NumberingLevel.php index 46686bf6fe..bffac472c0 100644 --- a/src/PhpWord/Style/NumberingLevel.php +++ b/src/PhpWord/Style/NumberingLevel.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/Outline.php b/src/PhpWord/Style/Outline.php index bfd14a1457..23601e9c0c 100644 --- a/src/PhpWord/Style/Outline.php +++ b/src/PhpWord/Style/Outline.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/Paper.php b/src/PhpWord/Style/Paper.php index 642666b5f1..09066951b9 100644 --- a/src/PhpWord/Style/Paper.php +++ b/src/PhpWord/Style/Paper.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/Paragraph.php b/src/PhpWord/Style/Paragraph.php index a98ca258cc..0de3713910 100644 --- a/src/PhpWord/Style/Paragraph.php +++ b/src/PhpWord/Style/Paragraph.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/Row.php b/src/PhpWord/Style/Row.php index d88af652a1..93169b8f0a 100644 --- a/src/PhpWord/Style/Row.php +++ b/src/PhpWord/Style/Row.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/Section.php b/src/PhpWord/Style/Section.php index b81e4393b4..9a5fe6fc94 100644 --- a/src/PhpWord/Style/Section.php +++ b/src/PhpWord/Style/Section.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/Shading.php b/src/PhpWord/Style/Shading.php index 5c9742c962..bfae643f8e 100644 --- a/src/PhpWord/Style/Shading.php +++ b/src/PhpWord/Style/Shading.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/Shadow.php b/src/PhpWord/Style/Shadow.php index deafbff0f8..fa871f1cfb 100644 --- a/src/PhpWord/Style/Shadow.php +++ b/src/PhpWord/Style/Shadow.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/Shape.php b/src/PhpWord/Style/Shape.php index c9809920bb..b7ae1f1e3b 100644 --- a/src/PhpWord/Style/Shape.php +++ b/src/PhpWord/Style/Shape.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/Spacing.php b/src/PhpWord/Style/Spacing.php index 9c9f3a8167..63c2258194 100644 --- a/src/PhpWord/Style/Spacing.php +++ b/src/PhpWord/Style/Spacing.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/TOC.php b/src/PhpWord/Style/TOC.php index 8f6022cfce..8632399eda 100644 --- a/src/PhpWord/Style/TOC.php +++ b/src/PhpWord/Style/TOC.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/Tab.php b/src/PhpWord/Style/Tab.php index 900e1fbdf9..500d852ac0 100644 --- a/src/PhpWord/Style/Tab.php +++ b/src/PhpWord/Style/Tab.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/Table.php b/src/PhpWord/Style/Table.php index 717a6bc168..846dd0b0e3 100644 --- a/src/PhpWord/Style/Table.php +++ b/src/PhpWord/Style/Table.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/TextBox.php b/src/PhpWord/Style/TextBox.php index 6220b74096..26cfef61e7 100644 --- a/src/PhpWord/Style/TextBox.php +++ b/src/PhpWord/Style/TextBox.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Template.php b/src/PhpWord/Template.php index 81e3186467..f99819e0b1 100644 --- a/src/PhpWord/Template.php +++ b/src/PhpWord/Template.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/TemplateProcessor.php b/src/PhpWord/TemplateProcessor.php index ce92bacfbe..9deb937b46 100644 --- a/src/PhpWord/TemplateProcessor.php +++ b/src/PhpWord/TemplateProcessor.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/AbstractWriter.php b/src/PhpWord/Writer/AbstractWriter.php index 686a4b18de..55b2023294 100644 --- a/src/PhpWord/Writer/AbstractWriter.php +++ b/src/PhpWord/Writer/AbstractWriter.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML.php b/src/PhpWord/Writer/HTML.php index 7c9aaf1ff9..bc6958e628 100644 --- a/src/PhpWord/Writer/HTML.php +++ b/src/PhpWord/Writer/HTML.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML/Element/AbstractElement.php b/src/PhpWord/Writer/HTML/Element/AbstractElement.php index 73f88d3d8d..1368142363 100644 --- a/src/PhpWord/Writer/HTML/Element/AbstractElement.php +++ b/src/PhpWord/Writer/HTML/Element/AbstractElement.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML/Element/Container.php b/src/PhpWord/Writer/HTML/Element/Container.php index 147329dd85..1efa2eecbd 100644 --- a/src/PhpWord/Writer/HTML/Element/Container.php +++ b/src/PhpWord/Writer/HTML/Element/Container.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML/Element/Endnote.php b/src/PhpWord/Writer/HTML/Element/Endnote.php index 3da8a8fb34..ba07676e3c 100644 --- a/src/PhpWord/Writer/HTML/Element/Endnote.php +++ b/src/PhpWord/Writer/HTML/Element/Endnote.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML/Element/Footnote.php b/src/PhpWord/Writer/HTML/Element/Footnote.php index f59545de10..7c5562bf13 100644 --- a/src/PhpWord/Writer/HTML/Element/Footnote.php +++ b/src/PhpWord/Writer/HTML/Element/Footnote.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML/Element/Image.php b/src/PhpWord/Writer/HTML/Element/Image.php index ab78990bd4..6cdcc75cd7 100644 --- a/src/PhpWord/Writer/HTML/Element/Image.php +++ b/src/PhpWord/Writer/HTML/Element/Image.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML/Element/Link.php b/src/PhpWord/Writer/HTML/Element/Link.php index 4e99810c7b..50c4e6af8f 100644 --- a/src/PhpWord/Writer/HTML/Element/Link.php +++ b/src/PhpWord/Writer/HTML/Element/Link.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML/Element/ListItem.php b/src/PhpWord/Writer/HTML/Element/ListItem.php index ef8eb34d75..a046a0d477 100644 --- a/src/PhpWord/Writer/HTML/Element/ListItem.php +++ b/src/PhpWord/Writer/HTML/Element/ListItem.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML/Element/PageBreak.php b/src/PhpWord/Writer/HTML/Element/PageBreak.php index 774ed9d23c..b43904a1cc 100644 --- a/src/PhpWord/Writer/HTML/Element/PageBreak.php +++ b/src/PhpWord/Writer/HTML/Element/PageBreak.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML/Element/Table.php b/src/PhpWord/Writer/HTML/Element/Table.php index 9027603b8f..6d541f81be 100644 --- a/src/PhpWord/Writer/HTML/Element/Table.php +++ b/src/PhpWord/Writer/HTML/Element/Table.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML/Element/Text.php b/src/PhpWord/Writer/HTML/Element/Text.php index 0c31df3632..f57e9c21a0 100644 --- a/src/PhpWord/Writer/HTML/Element/Text.php +++ b/src/PhpWord/Writer/HTML/Element/Text.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML/Element/TextBreak.php b/src/PhpWord/Writer/HTML/Element/TextBreak.php index 30560e9684..e091dea1b0 100644 --- a/src/PhpWord/Writer/HTML/Element/TextBreak.php +++ b/src/PhpWord/Writer/HTML/Element/TextBreak.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML/Element/TextRun.php b/src/PhpWord/Writer/HTML/Element/TextRun.php index b6bfaceaeb..6cbae3f11a 100644 --- a/src/PhpWord/Writer/HTML/Element/TextRun.php +++ b/src/PhpWord/Writer/HTML/Element/TextRun.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML/Element/Title.php b/src/PhpWord/Writer/HTML/Element/Title.php index c054ccf98b..8018178c55 100644 --- a/src/PhpWord/Writer/HTML/Element/Title.php +++ b/src/PhpWord/Writer/HTML/Element/Title.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML/Part/AbstractPart.php b/src/PhpWord/Writer/HTML/Part/AbstractPart.php index c63424fd1b..cf4da1b054 100644 --- a/src/PhpWord/Writer/HTML/Part/AbstractPart.php +++ b/src/PhpWord/Writer/HTML/Part/AbstractPart.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML/Part/Body.php b/src/PhpWord/Writer/HTML/Part/Body.php index b91ca3ad2d..cae17f6ef8 100644 --- a/src/PhpWord/Writer/HTML/Part/Body.php +++ b/src/PhpWord/Writer/HTML/Part/Body.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML/Part/Head.php b/src/PhpWord/Writer/HTML/Part/Head.php index 503f75b879..438c7ad7ea 100644 --- a/src/PhpWord/Writer/HTML/Part/Head.php +++ b/src/PhpWord/Writer/HTML/Part/Head.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML/Style/AbstractStyle.php b/src/PhpWord/Writer/HTML/Style/AbstractStyle.php index 07ef16184c..91fdd4e8d3 100644 --- a/src/PhpWord/Writer/HTML/Style/AbstractStyle.php +++ b/src/PhpWord/Writer/HTML/Style/AbstractStyle.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML/Style/Font.php b/src/PhpWord/Writer/HTML/Style/Font.php index 8645a1f402..b5f2267250 100644 --- a/src/PhpWord/Writer/HTML/Style/Font.php +++ b/src/PhpWord/Writer/HTML/Style/Font.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML/Style/Generic.php b/src/PhpWord/Writer/HTML/Style/Generic.php index df94d4922e..14e6b4280e 100644 --- a/src/PhpWord/Writer/HTML/Style/Generic.php +++ b/src/PhpWord/Writer/HTML/Style/Generic.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML/Style/Image.php b/src/PhpWord/Writer/HTML/Style/Image.php index 13be3665cd..cca838605e 100644 --- a/src/PhpWord/Writer/HTML/Style/Image.php +++ b/src/PhpWord/Writer/HTML/Style/Image.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML/Style/Paragraph.php b/src/PhpWord/Writer/HTML/Style/Paragraph.php index 4604e37481..52708dcbcd 100644 --- a/src/PhpWord/Writer/HTML/Style/Paragraph.php +++ b/src/PhpWord/Writer/HTML/Style/Paragraph.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText.php b/src/PhpWord/Writer/ODText.php index 8fa364bec9..9d5f1f59fe 100644 --- a/src/PhpWord/Writer/ODText.php +++ b/src/PhpWord/Writer/ODText.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText/Element/AbstractElement.php b/src/PhpWord/Writer/ODText/Element/AbstractElement.php index 9fb24364a3..2620721752 100644 --- a/src/PhpWord/Writer/ODText/Element/AbstractElement.php +++ b/src/PhpWord/Writer/ODText/Element/AbstractElement.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText/Element/Container.php b/src/PhpWord/Writer/ODText/Element/Container.php index 8b7807d68f..9babdffcc5 100644 --- a/src/PhpWord/Writer/ODText/Element/Container.php +++ b/src/PhpWord/Writer/ODText/Element/Container.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText/Element/Image.php b/src/PhpWord/Writer/ODText/Element/Image.php index 3cbb38542a..aaecd0496a 100644 --- a/src/PhpWord/Writer/ODText/Element/Image.php +++ b/src/PhpWord/Writer/ODText/Element/Image.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText/Element/Link.php b/src/PhpWord/Writer/ODText/Element/Link.php index adb64f8599..0db76df394 100644 --- a/src/PhpWord/Writer/ODText/Element/Link.php +++ b/src/PhpWord/Writer/ODText/Element/Link.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText/Element/Table.php b/src/PhpWord/Writer/ODText/Element/Table.php index f26960b828..18b4836840 100644 --- a/src/PhpWord/Writer/ODText/Element/Table.php +++ b/src/PhpWord/Writer/ODText/Element/Table.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText/Element/Text.php b/src/PhpWord/Writer/ODText/Element/Text.php index 4fc53bfee5..91c2452505 100644 --- a/src/PhpWord/Writer/ODText/Element/Text.php +++ b/src/PhpWord/Writer/ODText/Element/Text.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText/Element/TextBreak.php b/src/PhpWord/Writer/ODText/Element/TextBreak.php index ef3186f4f2..86d3f21a56 100644 --- a/src/PhpWord/Writer/ODText/Element/TextBreak.php +++ b/src/PhpWord/Writer/ODText/Element/TextBreak.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText/Element/TextRun.php b/src/PhpWord/Writer/ODText/Element/TextRun.php index 52240e8fc4..808a882ac5 100644 --- a/src/PhpWord/Writer/ODText/Element/TextRun.php +++ b/src/PhpWord/Writer/ODText/Element/TextRun.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText/Element/Title.php b/src/PhpWord/Writer/ODText/Element/Title.php index d45f5e12bc..8ab4c2c857 100644 --- a/src/PhpWord/Writer/ODText/Element/Title.php +++ b/src/PhpWord/Writer/ODText/Element/Title.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText/Part/AbstractPart.php b/src/PhpWord/Writer/ODText/Part/AbstractPart.php index edc8d07f4f..09e8f15dfa 100644 --- a/src/PhpWord/Writer/ODText/Part/AbstractPart.php +++ b/src/PhpWord/Writer/ODText/Part/AbstractPart.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText/Part/Content.php b/src/PhpWord/Writer/ODText/Part/Content.php index 4bde66ee97..f881e9fcca 100644 --- a/src/PhpWord/Writer/ODText/Part/Content.php +++ b/src/PhpWord/Writer/ODText/Part/Content.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText/Part/Manifest.php b/src/PhpWord/Writer/ODText/Part/Manifest.php index 7c695e9bd4..06fdc531af 100644 --- a/src/PhpWord/Writer/ODText/Part/Manifest.php +++ b/src/PhpWord/Writer/ODText/Part/Manifest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText/Part/Meta.php b/src/PhpWord/Writer/ODText/Part/Meta.php index 15c81a4e9c..6c97085c9f 100644 --- a/src/PhpWord/Writer/ODText/Part/Meta.php +++ b/src/PhpWord/Writer/ODText/Part/Meta.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText/Part/Mimetype.php b/src/PhpWord/Writer/ODText/Part/Mimetype.php index 1da4edb0b5..f62df81993 100644 --- a/src/PhpWord/Writer/ODText/Part/Mimetype.php +++ b/src/PhpWord/Writer/ODText/Part/Mimetype.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText/Part/Styles.php b/src/PhpWord/Writer/ODText/Part/Styles.php index 7522872d7e..a120c2946b 100644 --- a/src/PhpWord/Writer/ODText/Part/Styles.php +++ b/src/PhpWord/Writer/ODText/Part/Styles.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText/Style/AbstractStyle.php b/src/PhpWord/Writer/ODText/Style/AbstractStyle.php index 18d6ce1071..fcaa1f46ae 100644 --- a/src/PhpWord/Writer/ODText/Style/AbstractStyle.php +++ b/src/PhpWord/Writer/ODText/Style/AbstractStyle.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText/Style/Font.php b/src/PhpWord/Writer/ODText/Style/Font.php index 4518450555..3763838c27 100644 --- a/src/PhpWord/Writer/ODText/Style/Font.php +++ b/src/PhpWord/Writer/ODText/Style/Font.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText/Style/Image.php b/src/PhpWord/Writer/ODText/Style/Image.php index 21b9c4ee93..2ca9ab5a73 100644 --- a/src/PhpWord/Writer/ODText/Style/Image.php +++ b/src/PhpWord/Writer/ODText/Style/Image.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText/Style/Paragraph.php b/src/PhpWord/Writer/ODText/Style/Paragraph.php index f7bb47ad56..42570e5f85 100644 --- a/src/PhpWord/Writer/ODText/Style/Paragraph.php +++ b/src/PhpWord/Writer/ODText/Style/Paragraph.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText/Style/Section.php b/src/PhpWord/Writer/ODText/Style/Section.php index fa432856c7..4af397e4cf 100644 --- a/src/PhpWord/Writer/ODText/Style/Section.php +++ b/src/PhpWord/Writer/ODText/Style/Section.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText/Style/Table.php b/src/PhpWord/Writer/ODText/Style/Table.php index dbfb94ed84..0ae33b5a62 100644 --- a/src/PhpWord/Writer/ODText/Style/Table.php +++ b/src/PhpWord/Writer/ODText/Style/Table.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/PDF.php b/src/PhpWord/Writer/PDF.php index 2d3429c524..37a6d0ee6e 100644 --- a/src/PhpWord/Writer/PDF.php +++ b/src/PhpWord/Writer/PDF.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PhpWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/PDF/AbstractRenderer.php b/src/PhpWord/Writer/PDF/AbstractRenderer.php index 679d95002f..ea65f2129f 100644 --- a/src/PhpWord/Writer/PDF/AbstractRenderer.php +++ b/src/PhpWord/Writer/PDF/AbstractRenderer.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PhpWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/PDF/DomPDF.php b/src/PhpWord/Writer/PDF/DomPDF.php index 47054c4a48..304a2eba47 100644 --- a/src/PhpWord/Writer/PDF/DomPDF.php +++ b/src/PhpWord/Writer/PDF/DomPDF.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PhpWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/PDF/MPDF.php b/src/PhpWord/Writer/PDF/MPDF.php index 46d456d4f7..caacf96814 100644 --- a/src/PhpWord/Writer/PDF/MPDF.php +++ b/src/PhpWord/Writer/PDF/MPDF.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PhpWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/PDF/TCPDF.php b/src/PhpWord/Writer/PDF/TCPDF.php index 36849e24ad..8a73ddb0ac 100644 --- a/src/PhpWord/Writer/PDF/TCPDF.php +++ b/src/PhpWord/Writer/PDF/TCPDF.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PhpWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/RTF.php b/src/PhpWord/Writer/RTF.php index ae1fa243b5..e35693e56d 100644 --- a/src/PhpWord/Writer/RTF.php +++ b/src/PhpWord/Writer/RTF.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/RTF/Element/AbstractElement.php b/src/PhpWord/Writer/RTF/Element/AbstractElement.php index 73da5cbddb..9b4eb80e17 100644 --- a/src/PhpWord/Writer/RTF/Element/AbstractElement.php +++ b/src/PhpWord/Writer/RTF/Element/AbstractElement.php @@ -11,15 +11,15 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\RTF\Element; use PhpOffice\PhpWord\Shared\String; -use PhpOffice\PhpWord\Style\Font as FontStyle; use PhpOffice\PhpWord\Style; +use PhpOffice\PhpWord\Style\Font as FontStyle; use PhpOffice\PhpWord\Style\Paragraph as ParagraphStyle; use PhpOffice\PhpWord\Writer\HTML\Element\AbstractElement as HTMLAbstractElement; use PhpOffice\PhpWord\Writer\RTF\Style\Font as FontStyleWriter; diff --git a/src/PhpWord/Writer/RTF/Element/Container.php b/src/PhpWord/Writer/RTF/Element/Container.php index cb95b84bd2..00f2fb6faa 100644 --- a/src/PhpWord/Writer/RTF/Element/Container.php +++ b/src/PhpWord/Writer/RTF/Element/Container.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/RTF/Element/Image.php b/src/PhpWord/Writer/RTF/Element/Image.php index 52e705e9e2..0e83359663 100644 --- a/src/PhpWord/Writer/RTF/Element/Image.php +++ b/src/PhpWord/Writer/RTF/Element/Image.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/RTF/Element/Link.php b/src/PhpWord/Writer/RTF/Element/Link.php index adbc7976ce..a73a98d2d6 100644 --- a/src/PhpWord/Writer/RTF/Element/Link.php +++ b/src/PhpWord/Writer/RTF/Element/Link.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/RTF/Element/ListItem.php b/src/PhpWord/Writer/RTF/Element/ListItem.php index b795143cdb..e5e994f551 100644 --- a/src/PhpWord/Writer/RTF/Element/ListItem.php +++ b/src/PhpWord/Writer/RTF/Element/ListItem.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/RTF/Element/PageBreak.php b/src/PhpWord/Writer/RTF/Element/PageBreak.php index c8d16e0678..7f4a43d74c 100644 --- a/src/PhpWord/Writer/RTF/Element/PageBreak.php +++ b/src/PhpWord/Writer/RTF/Element/PageBreak.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/RTF/Element/Table.php b/src/PhpWord/Writer/RTF/Element/Table.php index 7c4329f719..665d5df9a6 100644 --- a/src/PhpWord/Writer/RTF/Element/Table.php +++ b/src/PhpWord/Writer/RTF/Element/Table.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/RTF/Element/Text.php b/src/PhpWord/Writer/RTF/Element/Text.php index 38ef4c948c..d5a5347a8c 100644 --- a/src/PhpWord/Writer/RTF/Element/Text.php +++ b/src/PhpWord/Writer/RTF/Element/Text.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/RTF/Element/TextBreak.php b/src/PhpWord/Writer/RTF/Element/TextBreak.php index 57dc634994..94b9cfa723 100644 --- a/src/PhpWord/Writer/RTF/Element/TextBreak.php +++ b/src/PhpWord/Writer/RTF/Element/TextBreak.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/RTF/Element/TextRun.php b/src/PhpWord/Writer/RTF/Element/TextRun.php index e756371633..b9686f5c2e 100644 --- a/src/PhpWord/Writer/RTF/Element/TextRun.php +++ b/src/PhpWord/Writer/RTF/Element/TextRun.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/RTF/Element/Title.php b/src/PhpWord/Writer/RTF/Element/Title.php index b9645a6897..72460e56fc 100644 --- a/src/PhpWord/Writer/RTF/Element/Title.php +++ b/src/PhpWord/Writer/RTF/Element/Title.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/RTF/Part/AbstractPart.php b/src/PhpWord/Writer/RTF/Part/AbstractPart.php index b10e5654c7..b1d97eeed8 100644 --- a/src/PhpWord/Writer/RTF/Part/AbstractPart.php +++ b/src/PhpWord/Writer/RTF/Part/AbstractPart.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/RTF/Part/Document.php b/src/PhpWord/Writer/RTF/Part/Document.php index edcdbd84a4..51b6dbc463 100644 --- a/src/PhpWord/Writer/RTF/Part/Document.php +++ b/src/PhpWord/Writer/RTF/Part/Document.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/RTF/Part/Header.php b/src/PhpWord/Writer/RTF/Part/Header.php index 31fbb7f4af..cc5d3dd4e3 100644 --- a/src/PhpWord/Writer/RTF/Part/Header.php +++ b/src/PhpWord/Writer/RTF/Part/Header.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/RTF/Style/AbstractStyle.php b/src/PhpWord/Writer/RTF/Style/AbstractStyle.php index 7b55fdc2f9..b981aa9f7a 100644 --- a/src/PhpWord/Writer/RTF/Style/AbstractStyle.php +++ b/src/PhpWord/Writer/RTF/Style/AbstractStyle.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/RTF/Style/Border.php b/src/PhpWord/Writer/RTF/Style/Border.php index 88c517ad79..d3dfc42cd8 100644 --- a/src/PhpWord/Writer/RTF/Style/Border.php +++ b/src/PhpWord/Writer/RTF/Style/Border.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/RTF/Style/Font.php b/src/PhpWord/Writer/RTF/Style/Font.php index 20c47aee08..46a80e968b 100644 --- a/src/PhpWord/Writer/RTF/Style/Font.php +++ b/src/PhpWord/Writer/RTF/Style/Font.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/RTF/Style/Paragraph.php b/src/PhpWord/Writer/RTF/Style/Paragraph.php index 84e5b8ee36..bc8d2b4ec6 100644 --- a/src/PhpWord/Writer/RTF/Style/Paragraph.php +++ b/src/PhpWord/Writer/RTF/Style/Paragraph.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/RTF/Style/Section.php b/src/PhpWord/Writer/RTF/Style/Section.php index 4169b630cc..cf74980a7d 100644 --- a/src/PhpWord/Writer/RTF/Style/Section.php +++ b/src/PhpWord/Writer/RTF/Style/Section.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007.php b/src/PhpWord/Writer/Word2007.php index 09d095093f..2e2e082036 100644 --- a/src/PhpWord/Writer/Word2007.php +++ b/src/PhpWord/Writer/Word2007.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/AbstractElement.php b/src/PhpWord/Writer/Word2007/Element/AbstractElement.php index 3b6432ed6a..5654ab7ba9 100644 --- a/src/PhpWord/Writer/Word2007/Element/AbstractElement.php +++ b/src/PhpWord/Writer/Word2007/Element/AbstractElement.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/Bookmark.php b/src/PhpWord/Writer/Word2007/Element/Bookmark.php index df5a104a18..4ba171e51b 100644 --- a/src/PhpWord/Writer/Word2007/Element/Bookmark.php +++ b/src/PhpWord/Writer/Word2007/Element/Bookmark.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/Chart.php b/src/PhpWord/Writer/Word2007/Element/Chart.php index ccd8cd77db..0df9f48d07 100644 --- a/src/PhpWord/Writer/Word2007/Element/Chart.php +++ b/src/PhpWord/Writer/Word2007/Element/Chart.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/CheckBox.php b/src/PhpWord/Writer/Word2007/Element/CheckBox.php index deafbd1de3..247c7feb7d 100644 --- a/src/PhpWord/Writer/Word2007/Element/CheckBox.php +++ b/src/PhpWord/Writer/Word2007/Element/CheckBox.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/Container.php b/src/PhpWord/Writer/Word2007/Element/Container.php index 771fe5c34e..54ef8cd376 100644 --- a/src/PhpWord/Writer/Word2007/Element/Container.php +++ b/src/PhpWord/Writer/Word2007/Element/Container.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/Endnote.php b/src/PhpWord/Writer/Word2007/Element/Endnote.php index f627c13c9d..aef646601f 100644 --- a/src/PhpWord/Writer/Word2007/Element/Endnote.php +++ b/src/PhpWord/Writer/Word2007/Element/Endnote.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/Field.php b/src/PhpWord/Writer/Word2007/Element/Field.php index b9c3c34b81..19239287c5 100644 --- a/src/PhpWord/Writer/Word2007/Element/Field.php +++ b/src/PhpWord/Writer/Word2007/Element/Field.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/Footnote.php b/src/PhpWord/Writer/Word2007/Element/Footnote.php index 5640a90db4..58d9e16fdc 100644 --- a/src/PhpWord/Writer/Word2007/Element/Footnote.php +++ b/src/PhpWord/Writer/Word2007/Element/Footnote.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/FormField.php b/src/PhpWord/Writer/Word2007/Element/FormField.php index 432dc9c23b..954d6fbd97 100644 --- a/src/PhpWord/Writer/Word2007/Element/FormField.php +++ b/src/PhpWord/Writer/Word2007/Element/FormField.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/Image.php b/src/PhpWord/Writer/Word2007/Element/Image.php index 7398842397..278c58f1b1 100644 --- a/src/PhpWord/Writer/Word2007/Element/Image.php +++ b/src/PhpWord/Writer/Word2007/Element/Image.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/Line.php b/src/PhpWord/Writer/Word2007/Element/Line.php index a6c7c24081..d08ee4872f 100644 --- a/src/PhpWord/Writer/Word2007/Element/Line.php +++ b/src/PhpWord/Writer/Word2007/Element/Line.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/Link.php b/src/PhpWord/Writer/Word2007/Element/Link.php index 2cb8407f5b..3b90db5ccc 100644 --- a/src/PhpWord/Writer/Word2007/Element/Link.php +++ b/src/PhpWord/Writer/Word2007/Element/Link.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/ListItem.php b/src/PhpWord/Writer/Word2007/Element/ListItem.php index 0f559a4e1d..17f763bd5d 100644 --- a/src/PhpWord/Writer/Word2007/Element/ListItem.php +++ b/src/PhpWord/Writer/Word2007/Element/ListItem.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/ListItemRun.php b/src/PhpWord/Writer/Word2007/Element/ListItemRun.php index 289cb05476..32e18416e5 100644 --- a/src/PhpWord/Writer/Word2007/Element/ListItemRun.php +++ b/src/PhpWord/Writer/Word2007/Element/ListItemRun.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/Object.php b/src/PhpWord/Writer/Word2007/Element/Object.php index a9cc449abf..1f1608b835 100644 --- a/src/PhpWord/Writer/Word2007/Element/Object.php +++ b/src/PhpWord/Writer/Word2007/Element/Object.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/PageBreak.php b/src/PhpWord/Writer/Word2007/Element/PageBreak.php index fb831ca7ac..f6a8885e19 100644 --- a/src/PhpWord/Writer/Word2007/Element/PageBreak.php +++ b/src/PhpWord/Writer/Word2007/Element/PageBreak.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/ParagraphAlignment.php b/src/PhpWord/Writer/Word2007/Element/ParagraphAlignment.php index 16352c1ee4..5f8d813c54 100644 --- a/src/PhpWord/Writer/Word2007/Element/ParagraphAlignment.php +++ b/src/PhpWord/Writer/Word2007/Element/ParagraphAlignment.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/PreserveText.php b/src/PhpWord/Writer/Word2007/Element/PreserveText.php index 894b3050f3..4856edc7b1 100644 --- a/src/PhpWord/Writer/Word2007/Element/PreserveText.php +++ b/src/PhpWord/Writer/Word2007/Element/PreserveText.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/SDT.php b/src/PhpWord/Writer/Word2007/Element/SDT.php index 79d7004dd6..4914469256 100644 --- a/src/PhpWord/Writer/Word2007/Element/SDT.php +++ b/src/PhpWord/Writer/Word2007/Element/SDT.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/Shape.php b/src/PhpWord/Writer/Word2007/Element/Shape.php index bd9320a258..a2cc90c67b 100644 --- a/src/PhpWord/Writer/Word2007/Element/Shape.php +++ b/src/PhpWord/Writer/Word2007/Element/Shape.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/TOC.php b/src/PhpWord/Writer/Word2007/Element/TOC.php index db2a65d07b..47c6db281a 100644 --- a/src/PhpWord/Writer/Word2007/Element/TOC.php +++ b/src/PhpWord/Writer/Word2007/Element/TOC.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/Table.php b/src/PhpWord/Writer/Word2007/Element/Table.php index f090d05c89..c93dbdda55 100644 --- a/src/PhpWord/Writer/Word2007/Element/Table.php +++ b/src/PhpWord/Writer/Word2007/Element/Table.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/TableAlignment.php b/src/PhpWord/Writer/Word2007/Element/TableAlignment.php index ad088569df..fbee67a765 100644 --- a/src/PhpWord/Writer/Word2007/Element/TableAlignment.php +++ b/src/PhpWord/Writer/Word2007/Element/TableAlignment.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/Text.php b/src/PhpWord/Writer/Word2007/Element/Text.php index cfb991c2d0..3c628cd275 100644 --- a/src/PhpWord/Writer/Word2007/Element/Text.php +++ b/src/PhpWord/Writer/Word2007/Element/Text.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/TextBox.php b/src/PhpWord/Writer/Word2007/Element/TextBox.php index fe62c644f3..15b8cd31e8 100644 --- a/src/PhpWord/Writer/Word2007/Element/TextBox.php +++ b/src/PhpWord/Writer/Word2007/Element/TextBox.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/TextBreak.php b/src/PhpWord/Writer/Word2007/Element/TextBreak.php index fb52b86e62..b984719765 100644 --- a/src/PhpWord/Writer/Word2007/Element/TextBreak.php +++ b/src/PhpWord/Writer/Word2007/Element/TextBreak.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/TextRun.php b/src/PhpWord/Writer/Word2007/Element/TextRun.php index 844e0b6bbb..fced761476 100644 --- a/src/PhpWord/Writer/Word2007/Element/TextRun.php +++ b/src/PhpWord/Writer/Word2007/Element/TextRun.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/Title.php b/src/PhpWord/Writer/Word2007/Element/Title.php index ce9aeea529..f5ece9c776 100644 --- a/src/PhpWord/Writer/Word2007/Element/Title.php +++ b/src/PhpWord/Writer/Word2007/Element/Title.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Part/AbstractPart.php b/src/PhpWord/Writer/Word2007/Part/AbstractPart.php index 71a268d92f..41ada2528e 100644 --- a/src/PhpWord/Writer/Word2007/Part/AbstractPart.php +++ b/src/PhpWord/Writer/Word2007/Part/AbstractPart.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Part/Chart.php b/src/PhpWord/Writer/Word2007/Part/Chart.php index 8423762c30..efb69a8366 100644 --- a/src/PhpWord/Writer/Word2007/Part/Chart.php +++ b/src/PhpWord/Writer/Word2007/Part/Chart.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Part/ContentTypes.php b/src/PhpWord/Writer/Word2007/Part/ContentTypes.php index 6ae4e8758e..388dc53918 100644 --- a/src/PhpWord/Writer/Word2007/Part/ContentTypes.php +++ b/src/PhpWord/Writer/Word2007/Part/ContentTypes.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Part/DocPropsApp.php b/src/PhpWord/Writer/Word2007/Part/DocPropsApp.php index 421ceefec2..8bb34a22de 100644 --- a/src/PhpWord/Writer/Word2007/Part/DocPropsApp.php +++ b/src/PhpWord/Writer/Word2007/Part/DocPropsApp.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Part/DocPropsCore.php b/src/PhpWord/Writer/Word2007/Part/DocPropsCore.php index 252be01f02..f866803497 100644 --- a/src/PhpWord/Writer/Word2007/Part/DocPropsCore.php +++ b/src/PhpWord/Writer/Word2007/Part/DocPropsCore.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Part/DocPropsCustom.php b/src/PhpWord/Writer/Word2007/Part/DocPropsCustom.php index ba6547d9b9..c4510e199a 100644 --- a/src/PhpWord/Writer/Word2007/Part/DocPropsCustom.php +++ b/src/PhpWord/Writer/Word2007/Part/DocPropsCustom.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Part/Document.php b/src/PhpWord/Writer/Word2007/Part/Document.php index ea607f09b7..77a51760d5 100644 --- a/src/PhpWord/Writer/Word2007/Part/Document.php +++ b/src/PhpWord/Writer/Word2007/Part/Document.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Part/Endnotes.php b/src/PhpWord/Writer/Word2007/Part/Endnotes.php index f07bac5f70..976ec638d5 100644 --- a/src/PhpWord/Writer/Word2007/Part/Endnotes.php +++ b/src/PhpWord/Writer/Word2007/Part/Endnotes.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Part/FontTable.php b/src/PhpWord/Writer/Word2007/Part/FontTable.php index 314cf58679..5bdc275a09 100644 --- a/src/PhpWord/Writer/Word2007/Part/FontTable.php +++ b/src/PhpWord/Writer/Word2007/Part/FontTable.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Part/Footer.php b/src/PhpWord/Writer/Word2007/Part/Footer.php index db6a2b334b..5c5335b9df 100644 --- a/src/PhpWord/Writer/Word2007/Part/Footer.php +++ b/src/PhpWord/Writer/Word2007/Part/Footer.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Part/Footnotes.php b/src/PhpWord/Writer/Word2007/Part/Footnotes.php index 9ceefd82ee..71051a9986 100644 --- a/src/PhpWord/Writer/Word2007/Part/Footnotes.php +++ b/src/PhpWord/Writer/Word2007/Part/Footnotes.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Part/Header.php b/src/PhpWord/Writer/Word2007/Part/Header.php index 638111d7f3..b1deeafefc 100644 --- a/src/PhpWord/Writer/Word2007/Part/Header.php +++ b/src/PhpWord/Writer/Word2007/Part/Header.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Part/Numbering.php b/src/PhpWord/Writer/Word2007/Part/Numbering.php index e7a354d568..6513e1b0dd 100644 --- a/src/PhpWord/Writer/Word2007/Part/Numbering.php +++ b/src/PhpWord/Writer/Word2007/Part/Numbering.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Part/Rels.php b/src/PhpWord/Writer/Word2007/Part/Rels.php index 8327f5c9c5..a84405f80a 100644 --- a/src/PhpWord/Writer/Word2007/Part/Rels.php +++ b/src/PhpWord/Writer/Word2007/Part/Rels.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Part/RelsDocument.php b/src/PhpWord/Writer/Word2007/Part/RelsDocument.php index 744e14f9a2..12fff40cd1 100644 --- a/src/PhpWord/Writer/Word2007/Part/RelsDocument.php +++ b/src/PhpWord/Writer/Word2007/Part/RelsDocument.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Part/RelsPart.php b/src/PhpWord/Writer/Word2007/Part/RelsPart.php index 627a2bcd1b..bca58224fc 100644 --- a/src/PhpWord/Writer/Word2007/Part/RelsPart.php +++ b/src/PhpWord/Writer/Word2007/Part/RelsPart.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Part/Settings.php b/src/PhpWord/Writer/Word2007/Part/Settings.php index 50399c4aa0..959be2e35e 100644 --- a/src/PhpWord/Writer/Word2007/Part/Settings.php +++ b/src/PhpWord/Writer/Word2007/Part/Settings.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Part/Styles.php b/src/PhpWord/Writer/Word2007/Part/Styles.php index 0194222948..fc030915a9 100644 --- a/src/PhpWord/Writer/Word2007/Part/Styles.php +++ b/src/PhpWord/Writer/Word2007/Part/Styles.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Part/Theme.php b/src/PhpWord/Writer/Word2007/Part/Theme.php index 62911c548d..ff33c42941 100644 --- a/src/PhpWord/Writer/Word2007/Part/Theme.php +++ b/src/PhpWord/Writer/Word2007/Part/Theme.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Part/WebSettings.php b/src/PhpWord/Writer/Word2007/Part/WebSettings.php index f800ebdeb8..d8cd033214 100644 --- a/src/PhpWord/Writer/Word2007/Part/WebSettings.php +++ b/src/PhpWord/Writer/Word2007/Part/WebSettings.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/AbstractStyle.php b/src/PhpWord/Writer/Word2007/Style/AbstractStyle.php index 16335680f0..55ad3dafb1 100644 --- a/src/PhpWord/Writer/Word2007/Style/AbstractStyle.php +++ b/src/PhpWord/Writer/Word2007/Style/AbstractStyle.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/Cell.php b/src/PhpWord/Writer/Word2007/Style/Cell.php index 0f90b3aa91..78c2de2c51 100644 --- a/src/PhpWord/Writer/Word2007/Style/Cell.php +++ b/src/PhpWord/Writer/Word2007/Style/Cell.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/Extrusion.php b/src/PhpWord/Writer/Word2007/Style/Extrusion.php index ba1ee590ec..30cf8a91de 100644 --- a/src/PhpWord/Writer/Word2007/Style/Extrusion.php +++ b/src/PhpWord/Writer/Word2007/Style/Extrusion.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/Fill.php b/src/PhpWord/Writer/Word2007/Style/Fill.php index 645f1ab053..396be61f77 100644 --- a/src/PhpWord/Writer/Word2007/Style/Fill.php +++ b/src/PhpWord/Writer/Word2007/Style/Fill.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/Font.php b/src/PhpWord/Writer/Word2007/Style/Font.php index 9371f97003..f146638142 100644 --- a/src/PhpWord/Writer/Word2007/Style/Font.php +++ b/src/PhpWord/Writer/Word2007/Style/Font.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/Frame.php b/src/PhpWord/Writer/Word2007/Style/Frame.php index ec6c1be589..ed20a874fe 100644 --- a/src/PhpWord/Writer/Word2007/Style/Frame.php +++ b/src/PhpWord/Writer/Word2007/Style/Frame.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/Image.php b/src/PhpWord/Writer/Word2007/Style/Image.php index cabf37ce3b..2b89f77978 100644 --- a/src/PhpWord/Writer/Word2007/Style/Image.php +++ b/src/PhpWord/Writer/Word2007/Style/Image.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/Indentation.php b/src/PhpWord/Writer/Word2007/Style/Indentation.php index a1b4d8d113..08d424980b 100644 --- a/src/PhpWord/Writer/Word2007/Style/Indentation.php +++ b/src/PhpWord/Writer/Word2007/Style/Indentation.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/Line.php b/src/PhpWord/Writer/Word2007/Style/Line.php index 48e27492ac..688c20d126 100644 --- a/src/PhpWord/Writer/Word2007/Style/Line.php +++ b/src/PhpWord/Writer/Word2007/Style/Line.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/LineNumbering.php b/src/PhpWord/Writer/Word2007/Style/LineNumbering.php index d06fa2d697..bf8e78ba91 100644 --- a/src/PhpWord/Writer/Word2007/Style/LineNumbering.php +++ b/src/PhpWord/Writer/Word2007/Style/LineNumbering.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/MarginBorder.php b/src/PhpWord/Writer/Word2007/Style/MarginBorder.php index 30029112f8..56eaf3c7d7 100644 --- a/src/PhpWord/Writer/Word2007/Style/MarginBorder.php +++ b/src/PhpWord/Writer/Word2007/Style/MarginBorder.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/Outline.php b/src/PhpWord/Writer/Word2007/Style/Outline.php index 06064d188a..f5fdcedbfe 100644 --- a/src/PhpWord/Writer/Word2007/Style/Outline.php +++ b/src/PhpWord/Writer/Word2007/Style/Outline.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/Paragraph.php b/src/PhpWord/Writer/Word2007/Style/Paragraph.php index cd25fdc800..b05934d873 100644 --- a/src/PhpWord/Writer/Word2007/Style/Paragraph.php +++ b/src/PhpWord/Writer/Word2007/Style/Paragraph.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/Row.php b/src/PhpWord/Writer/Word2007/Style/Row.php index 98841dd846..c2b8e27899 100644 --- a/src/PhpWord/Writer/Word2007/Style/Row.php +++ b/src/PhpWord/Writer/Word2007/Style/Row.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/Section.php b/src/PhpWord/Writer/Word2007/Style/Section.php index 486d0ed228..91ae98015b 100644 --- a/src/PhpWord/Writer/Word2007/Style/Section.php +++ b/src/PhpWord/Writer/Word2007/Style/Section.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/Shading.php b/src/PhpWord/Writer/Word2007/Style/Shading.php index 8ef8c6b184..418ef72e00 100644 --- a/src/PhpWord/Writer/Word2007/Style/Shading.php +++ b/src/PhpWord/Writer/Word2007/Style/Shading.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/Shadow.php b/src/PhpWord/Writer/Word2007/Style/Shadow.php index cc74605994..7ee0c29399 100644 --- a/src/PhpWord/Writer/Word2007/Style/Shadow.php +++ b/src/PhpWord/Writer/Word2007/Style/Shadow.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/Shape.php b/src/PhpWord/Writer/Word2007/Style/Shape.php index ba8dce5bd1..cea940a674 100644 --- a/src/PhpWord/Writer/Word2007/Style/Shape.php +++ b/src/PhpWord/Writer/Word2007/Style/Shape.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/Spacing.php b/src/PhpWord/Writer/Word2007/Style/Spacing.php index 2f7e122a22..f110991dc6 100644 --- a/src/PhpWord/Writer/Word2007/Style/Spacing.php +++ b/src/PhpWord/Writer/Word2007/Style/Spacing.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/Tab.php b/src/PhpWord/Writer/Word2007/Style/Tab.php index aa00acc788..fa2874d2a0 100644 --- a/src/PhpWord/Writer/Word2007/Style/Tab.php +++ b/src/PhpWord/Writer/Word2007/Style/Tab.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/Table.php b/src/PhpWord/Writer/Word2007/Style/Table.php index 08eec00eb6..7c247b2dae 100644 --- a/src/PhpWord/Writer/Word2007/Style/Table.php +++ b/src/PhpWord/Writer/Word2007/Style/Table.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/TextBox.php b/src/PhpWord/Writer/Word2007/Style/TextBox.php index 20c68c7421..5ef5b68f13 100644 --- a/src/PhpWord/Writer/Word2007/Style/TextBox.php +++ b/src/PhpWord/Writer/Word2007/Style/TextBox.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/WriterInterface.php b/src/PhpWord/Writer/WriterInterface.php index eda99f2788..8858097b7b 100644 --- a/src/PhpWord/Writer/WriterInterface.php +++ b/src/PhpWord/Writer/WriterInterface.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/AbstractElementTest.php b/tests/PhpWord/Element/AbstractElementTest.php index 4770fe47e0..ed051d3c17 100644 --- a/tests/PhpWord/Element/AbstractElementTest.php +++ b/tests/PhpWord/Element/AbstractElementTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/CellTest.php b/tests/PhpWord/Element/CellTest.php index 90ef203925..4beee149a2 100644 --- a/tests/PhpWord/Element/CellTest.php +++ b/tests/PhpWord/Element/CellTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/CheckBoxTest.php b/tests/PhpWord/Element/CheckBoxTest.php index e0a40ea3f6..ef84e469f0 100644 --- a/tests/PhpWord/Element/CheckBoxTest.php +++ b/tests/PhpWord/Element/CheckBoxTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/FieldTest.php b/tests/PhpWord/Element/FieldTest.php index c24fb88f52..5d6f75896a 100644 --- a/tests/PhpWord/Element/FieldTest.php +++ b/tests/PhpWord/Element/FieldTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/FooterTest.php b/tests/PhpWord/Element/FooterTest.php index 438e858b28..ccaec3f284 100644 --- a/tests/PhpWord/Element/FooterTest.php +++ b/tests/PhpWord/Element/FooterTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/FootnoteTest.php b/tests/PhpWord/Element/FootnoteTest.php index 1187ce91e7..c95b2624f6 100644 --- a/tests/PhpWord/Element/FootnoteTest.php +++ b/tests/PhpWord/Element/FootnoteTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/HeaderTest.php b/tests/PhpWord/Element/HeaderTest.php index 25b2c69e0e..b9c1de25e6 100644 --- a/tests/PhpWord/Element/HeaderTest.php +++ b/tests/PhpWord/Element/HeaderTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/ImageTest.php b/tests/PhpWord/Element/ImageTest.php index 0907ee8f9a..1c1d71b35d 100644 --- a/tests/PhpWord/Element/ImageTest.php +++ b/tests/PhpWord/Element/ImageTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/LineTest.php b/tests/PhpWord/Element/LineTest.php index 6ed2ddc752..01cfd27baf 100644 --- a/tests/PhpWord/Element/LineTest.php +++ b/tests/PhpWord/Element/LineTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/LinkTest.php b/tests/PhpWord/Element/LinkTest.php index bc6ec4d6cb..e67028b4d2 100644 --- a/tests/PhpWord/Element/LinkTest.php +++ b/tests/PhpWord/Element/LinkTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/ListItemRunTest.php b/tests/PhpWord/Element/ListItemRunTest.php index 422f5ce094..ccec75fa9a 100644 --- a/tests/PhpWord/Element/ListItemRunTest.php +++ b/tests/PhpWord/Element/ListItemRunTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/ListItemTest.php b/tests/PhpWord/Element/ListItemTest.php index e4e7ca5851..3a1a557625 100644 --- a/tests/PhpWord/Element/ListItemTest.php +++ b/tests/PhpWord/Element/ListItemTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/ObjectTest.php b/tests/PhpWord/Element/ObjectTest.php index a5fc9862ac..7729d7a372 100644 --- a/tests/PhpWord/Element/ObjectTest.php +++ b/tests/PhpWord/Element/ObjectTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/PageBreakTest.php b/tests/PhpWord/Element/PageBreakTest.php index 9aea06e47a..a160352d06 100644 --- a/tests/PhpWord/Element/PageBreakTest.php +++ b/tests/PhpWord/Element/PageBreakTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/PreserveTextTest.php b/tests/PhpWord/Element/PreserveTextTest.php index c87e3d0036..06a919c112 100644 --- a/tests/PhpWord/Element/PreserveTextTest.php +++ b/tests/PhpWord/Element/PreserveTextTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/RowTest.php b/tests/PhpWord/Element/RowTest.php index 6172360918..cec112ce23 100644 --- a/tests/PhpWord/Element/RowTest.php +++ b/tests/PhpWord/Element/RowTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/SDTTest.php b/tests/PhpWord/Element/SDTTest.php index 09bc3eb73b..e1bd871955 100644 --- a/tests/PhpWord/Element/SDTTest.php +++ b/tests/PhpWord/Element/SDTTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/SectionTest.php b/tests/PhpWord/Element/SectionTest.php index adad9daa71..9893157857 100644 --- a/tests/PhpWord/Element/SectionTest.php +++ b/tests/PhpWord/Element/SectionTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/TOCTest.php b/tests/PhpWord/Element/TOCTest.php index f6337e9842..b96fb9cb5b 100644 --- a/tests/PhpWord/Element/TOCTest.php +++ b/tests/PhpWord/Element/TOCTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/TableTest.php b/tests/PhpWord/Element/TableTest.php index 5ac97f04db..cbaa91075e 100644 --- a/tests/PhpWord/Element/TableTest.php +++ b/tests/PhpWord/Element/TableTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/TextBoxTest.php b/tests/PhpWord/Element/TextBoxTest.php index 0ddb7af702..8eecd11495 100644 --- a/tests/PhpWord/Element/TextBoxTest.php +++ b/tests/PhpWord/Element/TextBoxTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/TextBreakTest.php b/tests/PhpWord/Element/TextBreakTest.php index a2bcd5ae5b..5d59a8ec9d 100644 --- a/tests/PhpWord/Element/TextBreakTest.php +++ b/tests/PhpWord/Element/TextBreakTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/TextRunTest.php b/tests/PhpWord/Element/TextRunTest.php index a223110856..bdfa4bf53c 100644 --- a/tests/PhpWord/Element/TextRunTest.php +++ b/tests/PhpWord/Element/TextRunTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/TextTest.php b/tests/PhpWord/Element/TextTest.php index 24c51213c3..1659e5dbf0 100644 --- a/tests/PhpWord/Element/TextTest.php +++ b/tests/PhpWord/Element/TextTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/TitleTest.php b/tests/PhpWord/Element/TitleTest.php index 325d5b9a51..687a32f645 100644 --- a/tests/PhpWord/Element/TitleTest.php +++ b/tests/PhpWord/Element/TitleTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Exception/CopyFileExceptionTest.php b/tests/PhpWord/Exception/CopyFileExceptionTest.php index 3440819888..e384515835 100644 --- a/tests/PhpWord/Exception/CopyFileExceptionTest.php +++ b/tests/PhpWord/Exception/CopyFileExceptionTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Exception/CreateTemporaryFileExceptionTest.php b/tests/PhpWord/Exception/CreateTemporaryFileExceptionTest.php index 2ec59e8d83..1053de3e05 100644 --- a/tests/PhpWord/Exception/CreateTemporaryFileExceptionTest.php +++ b/tests/PhpWord/Exception/CreateTemporaryFileExceptionTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Exception/ExceptionTest.php b/tests/PhpWord/Exception/ExceptionTest.php index 55e925a9f9..967bce3c90 100644 --- a/tests/PhpWord/Exception/ExceptionTest.php +++ b/tests/PhpWord/Exception/ExceptionTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Exception/InvalidImageExceptionTest.php b/tests/PhpWord/Exception/InvalidImageExceptionTest.php index cb1850b80a..21ef77bc4e 100644 --- a/tests/PhpWord/Exception/InvalidImageExceptionTest.php +++ b/tests/PhpWord/Exception/InvalidImageExceptionTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Exception/InvalidStyleExceptionTest.php b/tests/PhpWord/Exception/InvalidStyleExceptionTest.php index edb8b59a36..974697cef4 100644 --- a/tests/PhpWord/Exception/InvalidStyleExceptionTest.php +++ b/tests/PhpWord/Exception/InvalidStyleExceptionTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Exception/UnsupportedImageTypeExceptionTest.php b/tests/PhpWord/Exception/UnsupportedImageTypeExceptionTest.php index 19b4f5534c..0277539130 100644 --- a/tests/PhpWord/Exception/UnsupportedImageTypeExceptionTest.php +++ b/tests/PhpWord/Exception/UnsupportedImageTypeExceptionTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/IOFactoryTest.php b/tests/PhpWord/IOFactoryTest.php index f4f686e7db..67cc91e15b 100644 --- a/tests/PhpWord/IOFactoryTest.php +++ b/tests/PhpWord/IOFactoryTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/MediaTest.php b/tests/PhpWord/MediaTest.php index 10d8a725b0..9b062d80ad 100644 --- a/tests/PhpWord/MediaTest.php +++ b/tests/PhpWord/MediaTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Metadata/DocInfoTest.php b/tests/PhpWord/Metadata/DocInfoTest.php index e5ec8ec7b5..1a866a5e82 100644 --- a/tests/PhpWord/Metadata/DocInfoTest.php +++ b/tests/PhpWord/Metadata/DocInfoTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/PhpWordTest.php b/tests/PhpWord/PhpWordTest.php index 8e9129e250..bbfd93899f 100644 --- a/tests/PhpWord/PhpWordTest.php +++ b/tests/PhpWord/PhpWordTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Reader/HTMLTest.php b/tests/PhpWord/Reader/HTMLTest.php index 55ac2b6491..4fbd2969b7 100644 --- a/tests/PhpWord/Reader/HTMLTest.php +++ b/tests/PhpWord/Reader/HTMLTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Reader/ODTextTest.php b/tests/PhpWord/Reader/ODTextTest.php index 91f5c83f3f..14b2d05329 100644 --- a/tests/PhpWord/Reader/ODTextTest.php +++ b/tests/PhpWord/Reader/ODTextTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Reader/RTFTest.php b/tests/PhpWord/Reader/RTFTest.php index c8c0c5e561..14706db307 100644 --- a/tests/PhpWord/Reader/RTFTest.php +++ b/tests/PhpWord/Reader/RTFTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Reader/Word2007Test.php b/tests/PhpWord/Reader/Word2007Test.php index dedc1e2d38..5c6c94a5fd 100644 --- a/tests/PhpWord/Reader/Word2007Test.php +++ b/tests/PhpWord/Reader/Word2007Test.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/SettingsTest.php b/tests/PhpWord/SettingsTest.php index e5f6f4e830..f5bdb1d9dd 100644 --- a/tests/PhpWord/SettingsTest.php +++ b/tests/PhpWord/SettingsTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Shared/ConverterTest.php b/tests/PhpWord/Shared/ConverterTest.php index 1f481e71e9..643b21529f 100644 --- a/tests/PhpWord/Shared/ConverterTest.php +++ b/tests/PhpWord/Shared/ConverterTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Shared/HtmlTest.php b/tests/PhpWord/Shared/HtmlTest.php index 91bfab1855..ee2a19f0b9 100644 --- a/tests/PhpWord/Shared/HtmlTest.php +++ b/tests/PhpWord/Shared/HtmlTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Shared/StringTest.php b/tests/PhpWord/Shared/StringTest.php index c358833d69..a12d52f9b9 100644 --- a/tests/PhpWord/Shared/StringTest.php +++ b/tests/PhpWord/Shared/StringTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Shared/XMLReaderTest.php b/tests/PhpWord/Shared/XMLReaderTest.php index 10fc855400..5ba2c8a924 100644 --- a/tests/PhpWord/Shared/XMLReaderTest.php +++ b/tests/PhpWord/Shared/XMLReaderTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Shared/XMLWriterTest.php b/tests/PhpWord/Shared/XMLWriterTest.php index 1c6d44fccd..fbb1cc45f1 100644 --- a/tests/PhpWord/Shared/XMLWriterTest.php +++ b/tests/PhpWord/Shared/XMLWriterTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Shared/ZipArchiveTest.php b/tests/PhpWord/Shared/ZipArchiveTest.php index 6a3f9d154e..edd3de9f00 100644 --- a/tests/PhpWord/Shared/ZipArchiveTest.php +++ b/tests/PhpWord/Shared/ZipArchiveTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Style/AbstractStyleTest.php b/tests/PhpWord/Style/AbstractStyleTest.php index 0c3d730bdf..de5bda3e9b 100644 --- a/tests/PhpWord/Style/AbstractStyleTest.php +++ b/tests/PhpWord/Style/AbstractStyleTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Style/CellTest.php b/tests/PhpWord/Style/CellTest.php index 4c398ce98a..b246a72a27 100644 --- a/tests/PhpWord/Style/CellTest.php +++ b/tests/PhpWord/Style/CellTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Style/FontTest.php b/tests/PhpWord/Style/FontTest.php index f4b42887b8..8c3ed4f752 100644 --- a/tests/PhpWord/Style/FontTest.php +++ b/tests/PhpWord/Style/FontTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Style/ImageTest.php b/tests/PhpWord/Style/ImageTest.php index a2481e7284..520e0fb4b3 100644 --- a/tests/PhpWord/Style/ImageTest.php +++ b/tests/PhpWord/Style/ImageTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Style/IndentationTest.php b/tests/PhpWord/Style/IndentationTest.php index 2566615580..d82968ecdd 100644 --- a/tests/PhpWord/Style/IndentationTest.php +++ b/tests/PhpWord/Style/IndentationTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Style/LineNumberingTest.php b/tests/PhpWord/Style/LineNumberingTest.php index 3195f9d7bf..dd87e4ba32 100644 --- a/tests/PhpWord/Style/LineNumberingTest.php +++ b/tests/PhpWord/Style/LineNumberingTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Style/LineTest.php b/tests/PhpWord/Style/LineTest.php index 02371cf4ee..50f9fa37b9 100644 --- a/tests/PhpWord/Style/LineTest.php +++ b/tests/PhpWord/Style/LineTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Style/ListItemTest.php b/tests/PhpWord/Style/ListItemTest.php index 3d8be66475..d81ab8472d 100644 --- a/tests/PhpWord/Style/ListItemTest.php +++ b/tests/PhpWord/Style/ListItemTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Style/NumberingLevelTest.php b/tests/PhpWord/Style/NumberingLevelTest.php index 8884ba9ea6..47dfc30e63 100644 --- a/tests/PhpWord/Style/NumberingLevelTest.php +++ b/tests/PhpWord/Style/NumberingLevelTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Style/NumberingTest.php b/tests/PhpWord/Style/NumberingTest.php index fd396280a5..999d000719 100644 --- a/tests/PhpWord/Style/NumberingTest.php +++ b/tests/PhpWord/Style/NumberingTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Style/ParagraphTest.php b/tests/PhpWord/Style/ParagraphTest.php index 694b0e7718..56180c076b 100644 --- a/tests/PhpWord/Style/ParagraphTest.php +++ b/tests/PhpWord/Style/ParagraphTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Style/RowTest.php b/tests/PhpWord/Style/RowTest.php index e02148f623..11cb0a621b 100644 --- a/tests/PhpWord/Style/RowTest.php +++ b/tests/PhpWord/Style/RowTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Style/SectionTest.php b/tests/PhpWord/Style/SectionTest.php index 3aa1e6d7a2..3b69f55ac2 100644 --- a/tests/PhpWord/Style/SectionTest.php +++ b/tests/PhpWord/Style/SectionTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Style/ShadingTest.php b/tests/PhpWord/Style/ShadingTest.php index 834564d499..ea796e10e5 100644 --- a/tests/PhpWord/Style/ShadingTest.php +++ b/tests/PhpWord/Style/ShadingTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Style/SpacingTest.php b/tests/PhpWord/Style/SpacingTest.php index b78bae8984..e552bba47b 100644 --- a/tests/PhpWord/Style/SpacingTest.php +++ b/tests/PhpWord/Style/SpacingTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Style/TOCTest.php b/tests/PhpWord/Style/TOCTest.php index fe3b533f3c..c6c1420353 100644 --- a/tests/PhpWord/Style/TOCTest.php +++ b/tests/PhpWord/Style/TOCTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Style/TabTest.php b/tests/PhpWord/Style/TabTest.php index 65333597ce..c469fb78df 100644 --- a/tests/PhpWord/Style/TabTest.php +++ b/tests/PhpWord/Style/TabTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Style/TableTest.php b/tests/PhpWord/Style/TableTest.php index 343cf8381a..580cbc1b5e 100644 --- a/tests/PhpWord/Style/TableTest.php +++ b/tests/PhpWord/Style/TableTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Style/TextBoxTest.php b/tests/PhpWord/Style/TextBoxTest.php index 2890b61a92..5afb5c9bfd 100644 --- a/tests/PhpWord/Style/TextBoxTest.php +++ b/tests/PhpWord/Style/TextBoxTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/StyleTest.php b/tests/PhpWord/StyleTest.php index 528d407d2a..fe7661f190 100644 --- a/tests/PhpWord/StyleTest.php +++ b/tests/PhpWord/StyleTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/TemplateProcessorTest.php b/tests/PhpWord/TemplateProcessorTest.php index ddb7277225..61c9da8ee2 100644 --- a/tests/PhpWord/TemplateProcessorTest.php +++ b/tests/PhpWord/TemplateProcessorTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Writer/HTML/ElementTest.php b/tests/PhpWord/Writer/HTML/ElementTest.php index 7db28cc6e9..2f0ac97f6a 100644 --- a/tests/PhpWord/Writer/HTML/ElementTest.php +++ b/tests/PhpWord/Writer/HTML/ElementTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\HTML; diff --git a/tests/PhpWord/Writer/HTML/PartTest.php b/tests/PhpWord/Writer/HTML/PartTest.php index b19b0be299..4d9eacf194 100644 --- a/tests/PhpWord/Writer/HTML/PartTest.php +++ b/tests/PhpWord/Writer/HTML/PartTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\HTML; diff --git a/tests/PhpWord/Writer/HTML/StyleTest.php b/tests/PhpWord/Writer/HTML/StyleTest.php index 4d7ac73970..c23f96f069 100644 --- a/tests/PhpWord/Writer/HTML/StyleTest.php +++ b/tests/PhpWord/Writer/HTML/StyleTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\HTML; diff --git a/tests/PhpWord/Writer/HTMLTest.php b/tests/PhpWord/Writer/HTMLTest.php index cfeef5d98f..1caae685e5 100644 --- a/tests/PhpWord/Writer/HTMLTest.php +++ b/tests/PhpWord/Writer/HTMLTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer; diff --git a/tests/PhpWord/Writer/ODText/ElementTest.php b/tests/PhpWord/Writer/ODText/ElementTest.php index 586ea2dc06..135b92cb95 100644 --- a/tests/PhpWord/Writer/ODText/ElementTest.php +++ b/tests/PhpWord/Writer/ODText/ElementTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\ODText; diff --git a/tests/PhpWord/Writer/ODText/Part/AbstractPartTest.php b/tests/PhpWord/Writer/ODText/Part/AbstractPartTest.php index 2df5f60833..6564980dd1 100644 --- a/tests/PhpWord/Writer/ODText/Part/AbstractPartTest.php +++ b/tests/PhpWord/Writer/ODText/Part/AbstractPartTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\ODText\Part; diff --git a/tests/PhpWord/Writer/ODText/Part/ContentTest.php b/tests/PhpWord/Writer/ODText/Part/ContentTest.php index b1f8f868d5..87f1527536 100644 --- a/tests/PhpWord/Writer/ODText/Part/ContentTest.php +++ b/tests/PhpWord/Writer/ODText/Part/ContentTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\ODText\Part; diff --git a/tests/PhpWord/Writer/ODText/StyleTest.php b/tests/PhpWord/Writer/ODText/StyleTest.php index 65df1be705..95e6059f07 100644 --- a/tests/PhpWord/Writer/ODText/StyleTest.php +++ b/tests/PhpWord/Writer/ODText/StyleTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\ODText; diff --git a/tests/PhpWord/Writer/ODTextTest.php b/tests/PhpWord/Writer/ODTextTest.php index 92f6bf3d82..9b64029dd8 100644 --- a/tests/PhpWord/Writer/ODTextTest.php +++ b/tests/PhpWord/Writer/ODTextTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer; diff --git a/tests/PhpWord/Writer/PDF/DomPDFTest.php b/tests/PhpWord/Writer/PDF/DomPDFTest.php index 290ac454e0..5ba36c0279 100644 --- a/tests/PhpWord/Writer/PDF/DomPDFTest.php +++ b/tests/PhpWord/Writer/PDF/DomPDFTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\PDF; diff --git a/tests/PhpWord/Writer/PDF/MPDFTest.php b/tests/PhpWord/Writer/PDF/MPDFTest.php index f03358e209..3be94f0c4c 100644 --- a/tests/PhpWord/Writer/PDF/MPDFTest.php +++ b/tests/PhpWord/Writer/PDF/MPDFTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\PDF; diff --git a/tests/PhpWord/Writer/PDF/TCPDFTest.php b/tests/PhpWord/Writer/PDF/TCPDFTest.php index 15ba156922..c10e2e16f4 100644 --- a/tests/PhpWord/Writer/PDF/TCPDFTest.php +++ b/tests/PhpWord/Writer/PDF/TCPDFTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\PDF; diff --git a/tests/PhpWord/Writer/PDFTest.php b/tests/PhpWord/Writer/PDFTest.php index a2a49f44fd..6c7d9bf3f2 100644 --- a/tests/PhpWord/Writer/PDFTest.php +++ b/tests/PhpWord/Writer/PDFTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer; diff --git a/tests/PhpWord/Writer/RTF/ElementTest.php b/tests/PhpWord/Writer/RTF/ElementTest.php index 0045867fc1..372994725e 100644 --- a/tests/PhpWord/Writer/RTF/ElementTest.php +++ b/tests/PhpWord/Writer/RTF/ElementTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\RTF; diff --git a/tests/PhpWord/Writer/RTF/StyleTest.php b/tests/PhpWord/Writer/RTF/StyleTest.php index 09561a9322..a212be5d50 100644 --- a/tests/PhpWord/Writer/RTF/StyleTest.php +++ b/tests/PhpWord/Writer/RTF/StyleTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\RTF; diff --git a/tests/PhpWord/Writer/RTFTest.php b/tests/PhpWord/Writer/RTFTest.php index 8dca3c07ec..3c05f2603d 100644 --- a/tests/PhpWord/Writer/RTFTest.php +++ b/tests/PhpWord/Writer/RTFTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer; diff --git a/tests/PhpWord/Writer/Word2007/ElementTest.php b/tests/PhpWord/Writer/Word2007/ElementTest.php index ff744f8df0..eb8db0e384 100644 --- a/tests/PhpWord/Writer/Word2007/ElementTest.php +++ b/tests/PhpWord/Writer/Word2007/ElementTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\Word2007; diff --git a/tests/PhpWord/Writer/Word2007/Part/AbstractPartTest.php b/tests/PhpWord/Writer/Word2007/Part/AbstractPartTest.php index ef42756c9e..f8948d6537 100644 --- a/tests/PhpWord/Writer/Word2007/Part/AbstractPartTest.php +++ b/tests/PhpWord/Writer/Word2007/Part/AbstractPartTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\Word2007\Part; diff --git a/tests/PhpWord/Writer/Word2007/Part/DocumentTest.php b/tests/PhpWord/Writer/Word2007/Part/DocumentTest.php index 484a5ffdfe..bf2a7aef3c 100644 --- a/tests/PhpWord/Writer/Word2007/Part/DocumentTest.php +++ b/tests/PhpWord/Writer/Word2007/Part/DocumentTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\Word2007\Part; diff --git a/tests/PhpWord/Writer/Word2007/Part/FooterTest.php b/tests/PhpWord/Writer/Word2007/Part/FooterTest.php index 96349b5ac1..82ec12dc85 100644 --- a/tests/PhpWord/Writer/Word2007/Part/FooterTest.php +++ b/tests/PhpWord/Writer/Word2007/Part/FooterTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\Word2007\Part; diff --git a/tests/PhpWord/Writer/Word2007/Part/FootnotesTest.php b/tests/PhpWord/Writer/Word2007/Part/FootnotesTest.php index 5952b4919d..b817e5194f 100644 --- a/tests/PhpWord/Writer/Word2007/Part/FootnotesTest.php +++ b/tests/PhpWord/Writer/Word2007/Part/FootnotesTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\Word2007\Part; diff --git a/tests/PhpWord/Writer/Word2007/Part/HeaderTest.php b/tests/PhpWord/Writer/Word2007/Part/HeaderTest.php index 36b8688d78..0f2a4de46b 100644 --- a/tests/PhpWord/Writer/Word2007/Part/HeaderTest.php +++ b/tests/PhpWord/Writer/Word2007/Part/HeaderTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\Word2007\Part; diff --git a/tests/PhpWord/Writer/Word2007/Part/NumberingTest.php b/tests/PhpWord/Writer/Word2007/Part/NumberingTest.php index d650386e3e..332f812541 100644 --- a/tests/PhpWord/Writer/Word2007/Part/NumberingTest.php +++ b/tests/PhpWord/Writer/Word2007/Part/NumberingTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\Word2007\Part; diff --git a/tests/PhpWord/Writer/Word2007/Part/SettingsTest.php b/tests/PhpWord/Writer/Word2007/Part/SettingsTest.php index e8b2bea85b..c83ffd22c3 100644 --- a/tests/PhpWord/Writer/Word2007/Part/SettingsTest.php +++ b/tests/PhpWord/Writer/Word2007/Part/SettingsTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\Word2007\Part; diff --git a/tests/PhpWord/Writer/Word2007/Part/StylesTest.php b/tests/PhpWord/Writer/Word2007/Part/StylesTest.php index dd652a8587..bdbf71377d 100644 --- a/tests/PhpWord/Writer/Word2007/Part/StylesTest.php +++ b/tests/PhpWord/Writer/Word2007/Part/StylesTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\Word2007\Part; diff --git a/tests/PhpWord/Writer/Word2007/PartTest.php b/tests/PhpWord/Writer/Word2007/PartTest.php index 92f56a32ec..e59951b1c7 100644 --- a/tests/PhpWord/Writer/Word2007/PartTest.php +++ b/tests/PhpWord/Writer/Word2007/PartTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\Word2007; diff --git a/tests/PhpWord/Writer/Word2007/Style/FontTest.php b/tests/PhpWord/Writer/Word2007/Style/FontTest.php index 2527436c1f..1731f90d52 100644 --- a/tests/PhpWord/Writer/Word2007/Style/FontTest.php +++ b/tests/PhpWord/Writer/Word2007/Style/FontTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\Word2007\Style; diff --git a/tests/PhpWord/Writer/Word2007/StyleTest.php b/tests/PhpWord/Writer/Word2007/StyleTest.php index fdd29c0ed8..ecb8895b01 100644 --- a/tests/PhpWord/Writer/Word2007/StyleTest.php +++ b/tests/PhpWord/Writer/Word2007/StyleTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\Word2007; diff --git a/tests/PhpWord/Writer/Word2007Test.php b/tests/PhpWord/Writer/Word2007Test.php index 873b0ae232..c87ef356ce 100644 --- a/tests/PhpWord/Writer/Word2007Test.php +++ b/tests/PhpWord/Writer/Word2007Test.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer; diff --git a/tests/PhpWord/_includes/TestHelperDOCX.php b/tests/PhpWord/_includes/TestHelperDOCX.php index 3b23055679..b8501c0590 100644 --- a/tests/PhpWord/_includes/TestHelperDOCX.php +++ b/tests/PhpWord/_includes/TestHelperDOCX.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/_includes/XmlDocument.php b/tests/PhpWord/_includes/XmlDocument.php index 4158f4abf8..f6c076e555 100644 --- a/tests/PhpWord/_includes/XmlDocument.php +++ b/tests/PhpWord/_includes/XmlDocument.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 7535d3788d..765a0cdb13 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. test bootstrap * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2014 PHPWord contributors + * @copyright 2010-2015 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ From 7bd6cbdb64a40241e1240be36752bd1c1b25c006 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 5 Dec 2015 21:28:46 +0400 Subject: [PATCH 65/99] Copyright update. --- src/PhpWord/IOFactory.php | 14 +++++++++++--- src/PhpWord/PhpWord.php | 2 +- src/PhpWord/Reader/MsDoc.php | 14 +++++++++++--- src/PhpWord/Shared/Drawing.php | 14 +++++++++++--- src/PhpWord/Shared/OLERead.php | 15 +++++++++++---- 5 files changed, 45 insertions(+), 14 deletions(-) diff --git a/src/PhpWord/IOFactory.php b/src/PhpWord/IOFactory.php index f50ee80785..6c6b31821e 100644 --- a/src/PhpWord/IOFactory.php +++ b/src/PhpWord/IOFactory.php @@ -1,10 +1,18 @@ Date: Sat, 5 Dec 2015 21:30:02 +0400 Subject: [PATCH 66/99] Copyright update. --- tests/PhpWord/Collection/CollectionTest.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/PhpWord/Collection/CollectionTest.php b/tests/PhpWord/Collection/CollectionTest.php index f50055dd01..66307c60c8 100644 --- a/tests/PhpWord/Collection/CollectionTest.php +++ b/tests/PhpWord/Collection/CollectionTest.php @@ -1,9 +1,17 @@ Date: Sat, 12 Dec 2015 21:53:27 +0400 Subject: [PATCH 67/99] #617. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b792b19b00..d766d81c47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ Place announcement text here. ### Changed - Improved error message for the case when `autoload.php` is not found. - @RomanSyroeshko #371 - Renamed the `align` option of `NumberingLevel`, `Frame`, `Table`, and `Paragraph` styles into `alignment`. - @RomanSyroeshko +- Improved performance of `TemplateProcessor::setValue()`. - @kazitanvirahsan #614, #617 ### Deprecated - `getAlign` and `setAlign` methods of `NumberingLevel`, `Frame`, `Table`, and `Paragraph` styles. From f359825cb7abdd0e92fa333237cb37d160504448 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 23 Jan 2016 19:16:34 +0400 Subject: [PATCH 68/99] Reviewed and merged #658. --- CHANGELOG.md | 9 +- composer.json | 10 +- src/PhpWord/Element/Bookmark.php | 4 +- src/PhpWord/Element/CheckBox.php | 4 +- src/PhpWord/Element/Link.php | 6 +- src/PhpWord/Element/ListItem.php | 4 +- src/PhpWord/Element/PreserveText.php | 4 +- src/PhpWord/Element/Text.php | 4 +- src/PhpWord/Element/Title.php | 4 +- src/PhpWord/Reader/MsDoc.php | 2 +- src/PhpWord/Reader/ODText.php | 2 +- src/PhpWord/Reader/ODText/Content.php | 2 +- src/PhpWord/Reader/ODText/Meta.php | 2 +- src/PhpWord/Reader/Word2007.php | 2 +- src/PhpWord/Reader/Word2007/AbstractPart.php | 18 +- src/PhpWord/Reader/Word2007/DocPropsCore.php | 2 +- .../Reader/Word2007/DocPropsCustom.php | 2 +- src/PhpWord/Reader/Word2007/Document.php | 8 +- src/PhpWord/Reader/Word2007/Footnotes.php | 2 +- src/PhpWord/Reader/Word2007/Numbering.php | 4 +- src/PhpWord/Reader/Word2007/Styles.php | 2 +- src/PhpWord/Shared/Drawing.php | 225 ------------------ src/PhpWord/Shared/Font.php | 105 -------- src/PhpWord/Shared/String.php | 195 --------------- src/PhpWord/Shared/XMLReader.php | 194 --------------- src/PhpWord/Shared/XMLWriter.php | 203 ---------------- src/PhpWord/Style/AbstractStyle.php | 4 +- src/PhpWord/Style/Paragraph.php | 4 +- src/PhpWord/TemplateProcessor.php | 4 +- .../Writer/ODText/Part/AbstractPart.php | 6 +- src/PhpWord/Writer/ODText/Part/Content.php | 6 +- src/PhpWord/Writer/ODText/Part/Meta.php | 4 +- src/PhpWord/Writer/ODText/Part/Styles.php | 10 +- .../Writer/RTF/Element/AbstractElement.php | 4 +- .../Word2007/Element/AbstractElement.php | 12 +- .../Writer/Word2007/Element/Container.php | 4 +- .../Writer/Word2007/Element/FormField.php | 8 +- src/PhpWord/Writer/Word2007/Element/Image.php | 2 +- src/PhpWord/Writer/Word2007/Element/SDT.php | 8 +- src/PhpWord/Writer/Word2007/Element/Shape.php | 12 +- src/PhpWord/Writer/Word2007/Element/TOC.php | 8 +- src/PhpWord/Writer/Word2007/Element/Table.php | 8 +- .../Writer/Word2007/Part/AbstractPart.php | 9 +- src/PhpWord/Writer/Word2007/Part/Chart.php | 14 +- .../Writer/Word2007/Part/ContentTypes.php | 4 +- src/PhpWord/Writer/Word2007/Part/Document.php | 6 +- .../Writer/Word2007/Part/Footnotes.php | 4 +- .../Writer/Word2007/Part/Numbering.php | 8 +- src/PhpWord/Writer/Word2007/Part/Rels.php | 8 +- src/PhpWord/Writer/Word2007/Part/Settings.php | 2 +- src/PhpWord/Writer/Word2007/Part/Styles.php | 10 +- .../Writer/Word2007/Style/AbstractStyle.php | 10 +- src/PhpWord/Writer/Word2007/Style/Frame.php | 4 +- .../Writer/Word2007/Style/MarginBorder.php | 4 +- .../Writer/Word2007/Style/Paragraph.php | 6 +- src/PhpWord/Writer/Word2007/Style/Table.php | 14 +- tests/PhpWord/Shared/StringTest.php | 73 ------ tests/PhpWord/Shared/XMLReaderTest.php | 73 ------ tests/PhpWord/Shared/XMLWriterTest.php | 39 --- tests/PhpWord/Writer/ODText/ElementTest.php | 2 +- tests/PhpWord/Writer/ODText/StyleTest.php | 2 +- tests/PhpWord/Writer/PDF/TCPDFTest.php | 2 +- tests/PhpWord/Writer/Word2007/ElementTest.php | 2 +- tests/PhpWord/Writer/Word2007/StyleTest.php | 2 +- 64 files changed, 162 insertions(+), 1259 deletions(-) delete mode 100644 src/PhpWord/Shared/Drawing.php delete mode 100644 src/PhpWord/Shared/Font.php delete mode 100644 src/PhpWord/Shared/String.php delete mode 100644 src/PhpWord/Shared/XMLReader.php delete mode 100644 src/PhpWord/Shared/XMLWriter.php delete mode 100644 tests/PhpWord/Shared/StringTest.php delete mode 100644 tests/PhpWord/Shared/XMLReaderTest.php delete mode 100644 tests/PhpWord/Shared/XMLWriterTest.php diff --git a/CHANGELOG.md b/CHANGELOG.md index d766d81c47..b7d6dc2e74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,12 +25,17 @@ Use the correspondent `getAlignment` and `setAlignment` methods instead. - @Roma - `left`, `right`, and `justify` alignment options for tables (now are mapped to `Jc::START`, `Jc::END`, and `Jc::CENTER`). - @RomanSyroeshko ### Removed -- `PhpOffice\PhpWord\Style\Alignment`. Style properties, which previously stored instances of this class, now deal with strings. +- `\PhpOffice\PhpWord\Style\Alignment`. Style properties, which previously stored instances of this class, now deal with strings. In each case set of available string values is defined by the correspondent simple type. - @RomanSyroeshko - Manual installation support. Since the release we have dependencies on third party libraries, so installation via ZIP-archive download is not an option anymore. To install PHPWord use [Composer](https://getcomposer.org/). - We also removed `PhpOffice\PhpWord\Autoloader`, because the latter change made it completely useless. + We also removed `\PhpOffice\PhpWord\Autoloader`, because the latter change made it completely useless. Autoloaders provided by Composer are in use now (see `bootstrap.php`). - @RomanSyroeshko +- `\PhpOffice\PhpWord\Shared\Drawing` replaced by `\PhpOffice\Common\Drawing`. - @Progi1984 #658 +- `\PhpOffice\PhpWord\Shared\Font`. - @Progi1984 #658 +- `\PhpOffice\PhpWord\Shared\String` replaced by `\PhpOffice\Common\Text`. - @Progi1984 @RomanSyroeshko #658 +- `\PhpOffice\PhpWord\Shared\XMLReader` replaced by `\PhpOffice\Common\XMLReader`. - @Progi1984 #658 +- `\PhpOffice\PhpWord\Shared\XMLWriter` replaced by `\PhpOffice\Common\XMLWriter`. - @Progi1984 @RomanSyroeshko #658 diff --git a/composer.json b/composer.json index 9629e3067c..83d437402a 100644 --- a/composer.json +++ b/composer.json @@ -34,7 +34,9 @@ "require": { "php": ">=5.3.3", "ext-xml": "*", - "zendframework/zend-validator": "2.5.*" + "zendframework/zend-validator": "2.5.*", + "zendframework/zend-stdlib": "~2.5", + "phpoffice/common": "0.2.*" }, "require-dev": { "phpunit/phpunit": "3.7.*", @@ -43,9 +45,11 @@ "phpmd/phpmd": "2.*", "phploc/phploc": "2.*", "dompdf/dompdf":"0.6.*", - "tecnick.com/tcpdf": "6.*", + "tecnickcom/tcpdf": "6.*", "mpdf/mpdf": "5.*", - "zendframework/zend-validator": "2.5.*" + "zendframework/zend-validator": "2.5.*", + "zendframework/zend-stdlib": "~2.5", + "phpoffice/common": "0.2.*" }, "suggest": { "ext-zip": "Allows writing DOCX and ODT", diff --git a/src/PhpWord/Element/Bookmark.php b/src/PhpWord/Element/Bookmark.php index 764dd605cf..0a971228d8 100644 --- a/src/PhpWord/Element/Bookmark.php +++ b/src/PhpWord/Element/Bookmark.php @@ -17,7 +17,7 @@ namespace PhpOffice\PhpWord\Element; -use PhpOffice\PhpWord\Shared\String; +use PhpOffice\Common\Text as CommonText; use PhpOffice\PhpWord\Style; /** @@ -47,7 +47,7 @@ class Bookmark extends AbstractElement public function __construct($name) { - $this->name = String::toUTF8($name); + $this->name = CommonText::toUTF8($name); return $this; } diff --git a/src/PhpWord/Element/CheckBox.php b/src/PhpWord/Element/CheckBox.php index 9362c3b17a..7c4575dac1 100644 --- a/src/PhpWord/Element/CheckBox.php +++ b/src/PhpWord/Element/CheckBox.php @@ -17,7 +17,7 @@ namespace PhpOffice\PhpWord\Element; -use PhpOffice\PhpWord\Shared\String; +use PhpOffice\Common\Text as CommonText; /** * Check box element @@ -56,7 +56,7 @@ public function __construct($name = null, $text = null, $fontStyle = null, $para */ public function setName($name) { - $this->name = String::toUTF8($name); + $this->name = CommonText::toUTF8($name); return $this; } diff --git a/src/PhpWord/Element/Link.php b/src/PhpWord/Element/Link.php index 480016f44c..139e0985c7 100644 --- a/src/PhpWord/Element/Link.php +++ b/src/PhpWord/Element/Link.php @@ -17,7 +17,7 @@ namespace PhpOffice\PhpWord\Element; -use PhpOffice\PhpWord\Shared\String; +use PhpOffice\Common\Text as CommonText; use PhpOffice\PhpWord\Style\Font; use PhpOffice\PhpWord\Style\Paragraph; @@ -78,8 +78,8 @@ class Link extends AbstractElement */ public function __construct($source, $text = null, $fontStyle = null, $paragraphStyle = null, $internal = false) { - $this->source = String::toUTF8($source); - $this->text = is_null($text) ? $this->source : String::toUTF8($text); + $this->source = CommonText::toUTF8($source); + $this->text = is_null($text) ? $this->source : CommonText::toUTF8($text); $this->fontStyle = $this->setNewStyle(new Font('text'), $fontStyle); $this->paragraphStyle = $this->setNewStyle(new Paragraph(), $paragraphStyle); $this->internal = $internal; diff --git a/src/PhpWord/Element/ListItem.php b/src/PhpWord/Element/ListItem.php index 5914f431c6..a6d0451a7c 100644 --- a/src/PhpWord/Element/ListItem.php +++ b/src/PhpWord/Element/ListItem.php @@ -17,7 +17,7 @@ namespace PhpOffice\PhpWord\Element; -use PhpOffice\PhpWord\Shared\String; +use PhpOffice\Common\Text as CommonText; use PhpOffice\PhpWord\Style\ListItem as ListItemStyle; /** @@ -57,7 +57,7 @@ class ListItem extends AbstractElement */ public function __construct($text, $depth = 0, $fontStyle = null, $listStyle = null, $paragraphStyle = null) { - $this->textObject = new Text(String::toUTF8($text), $fontStyle, $paragraphStyle); + $this->textObject = new Text(CommonText::toUTF8($text), $fontStyle, $paragraphStyle); $this->depth = $depth; // Version >= 0.10.0 will pass numbering style name. Older version will use old method diff --git a/src/PhpWord/Element/PreserveText.php b/src/PhpWord/Element/PreserveText.php index 247b3cebab..e38a8c1662 100644 --- a/src/PhpWord/Element/PreserveText.php +++ b/src/PhpWord/Element/PreserveText.php @@ -17,7 +17,7 @@ namespace PhpOffice\PhpWord\Element; -use PhpOffice\PhpWord\Shared\String; +use PhpOffice\Common\Text as CommonText; use PhpOffice\PhpWord\Style\Font; use PhpOffice\PhpWord\Style\Paragraph; @@ -61,7 +61,7 @@ public function __construct($text = null, $fontStyle = null, $paragraphStyle = n $this->fontStyle = $this->setNewStyle(new Font('text'), $fontStyle); $this->paragraphStyle = $this->setNewStyle(new Paragraph(), $paragraphStyle); - $this->text = String::toUTF8($text); + $this->text = CommonText::toUTF8($text); $matches = preg_split('/({.*?})/', $this->text, null, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); if (isset($matches[0])) { $this->text = $matches; diff --git a/src/PhpWord/Element/Text.php b/src/PhpWord/Element/Text.php index 17fb118034..ca4013622c 100644 --- a/src/PhpWord/Element/Text.php +++ b/src/PhpWord/Element/Text.php @@ -17,7 +17,7 @@ namespace PhpOffice\PhpWord\Element; -use PhpOffice\PhpWord\Shared\String; +use PhpOffice\Common\Text as CommonText; use PhpOffice\PhpWord\Style\Font; use PhpOffice\PhpWord\Style\Paragraph; @@ -136,7 +136,7 @@ public function getParagraphStyle() */ public function setText($text) { - $this->text = String::toUTF8($text); + $this->text = CommonText::toUTF8($text); return $this; } diff --git a/src/PhpWord/Element/Title.php b/src/PhpWord/Element/Title.php index 90009a9b05..faf50faa81 100644 --- a/src/PhpWord/Element/Title.php +++ b/src/PhpWord/Element/Title.php @@ -17,7 +17,7 @@ namespace PhpOffice\PhpWord\Element; -use PhpOffice\PhpWord\Shared\String; +use PhpOffice\Common\Text as CommonText; use PhpOffice\PhpWord\Style; /** @@ -61,7 +61,7 @@ class Title extends AbstractElement */ public function __construct($text, $depth = 1) { - $this->text = String::toUTF8($text); + $this->text = CommonText::toUTF8($text); $this->depth = $depth; if (array_key_exists("Heading_{$this->depth}", Style::getStyles())) { $this->style = "Heading{$this->depth}"; diff --git a/src/PhpWord/Reader/MsDoc.php b/src/PhpWord/Reader/MsDoc.php index 0fbab24566..3c7c7b955e 100644 --- a/src/PhpWord/Reader/MsDoc.php +++ b/src/PhpWord/Reader/MsDoc.php @@ -17,8 +17,8 @@ namespace PhpOffice\PhpWord\Reader; +use PhpOffice\Common\Drawing; use PhpOffice\PhpWord\PhpWord; -use PhpOffice\PhpWord\Shared\Drawing; use PhpOffice\PhpWord\Shared\OLERead; use PhpOffice\PhpWord\Style; diff --git a/src/PhpWord/Reader/ODText.php b/src/PhpWord/Reader/ODText.php index 309ebf1a2e..02d415bcfc 100644 --- a/src/PhpWord/Reader/ODText.php +++ b/src/PhpWord/Reader/ODText.php @@ -17,8 +17,8 @@ namespace PhpOffice\PhpWord\Reader; +use PhpOffice\Common\XMLReader; use PhpOffice\PhpWord\PhpWord; -use PhpOffice\PhpWord\Shared\XMLReader; /** * Reader for ODText diff --git a/src/PhpWord/Reader/ODText/Content.php b/src/PhpWord/Reader/ODText/Content.php index 2962c9bac9..5295b16a3d 100644 --- a/src/PhpWord/Reader/ODText/Content.php +++ b/src/PhpWord/Reader/ODText/Content.php @@ -17,8 +17,8 @@ namespace PhpOffice\PhpWord\Reader\ODText; +use PhpOffice\Common\XMLReader; use PhpOffice\PhpWord\PhpWord; -use PhpOffice\PhpWord\Shared\XMLReader; /** * Content reader diff --git a/src/PhpWord/Reader/ODText/Meta.php b/src/PhpWord/Reader/ODText/Meta.php index bdfe74c51f..c9d7f71dc8 100644 --- a/src/PhpWord/Reader/ODText/Meta.php +++ b/src/PhpWord/Reader/ODText/Meta.php @@ -17,8 +17,8 @@ namespace PhpOffice\PhpWord\Reader\ODText; +use PhpOffice\Common\XMLReader; use PhpOffice\PhpWord\PhpWord; -use PhpOffice\PhpWord\Shared\XMLReader; /** * Meta reader diff --git a/src/PhpWord/Reader/Word2007.php b/src/PhpWord/Reader/Word2007.php index 6e7efc120d..8387b1c20d 100644 --- a/src/PhpWord/Reader/Word2007.php +++ b/src/PhpWord/Reader/Word2007.php @@ -17,8 +17,8 @@ namespace PhpOffice\PhpWord\Reader; +use PhpOffice\Common\XMLReader; use PhpOffice\PhpWord\PhpWord; -use PhpOffice\PhpWord\Shared\XMLReader; use PhpOffice\PhpWord\Shared\ZipArchive; /** diff --git a/src/PhpWord/Reader/Word2007/AbstractPart.php b/src/PhpWord/Reader/Word2007/AbstractPart.php index c4411aad8d..a814ae1d3c 100644 --- a/src/PhpWord/Reader/Word2007/AbstractPart.php +++ b/src/PhpWord/Reader/Word2007/AbstractPart.php @@ -17,8 +17,8 @@ namespace PhpOffice\PhpWord\Reader\Word2007; +use PhpOffice\Common\XMLReader; use PhpOffice\PhpWord\PhpWord; -use PhpOffice\PhpWord\Shared\XMLReader; /** * Abstract part reader @@ -92,7 +92,7 @@ public function setRels($value) /** * Read w:p. * - * @param \PhpOffice\PhpWord\Shared\XMLReader $xmlReader + * @param \PhpOffice\Common\XMLReader $xmlReader * @param \DOMElement $domNode * @param mixed $parent * @param string $docPart @@ -183,7 +183,7 @@ protected function readParagraph(XMLReader $xmlReader, \DOMElement $domNode, $pa /** * Read w:r. * - * @param \PhpOffice\PhpWord\Shared\XMLReader $xmlReader + * @param \PhpOffice\Common\XMLReader $xmlReader * @param \DOMElement $domNode * @param mixed $parent * @param string $docPart @@ -246,7 +246,7 @@ protected function readRun(XMLReader $xmlReader, \DOMElement $domNode, $parent, /** * Read w:tbl. * - * @param \PhpOffice\PhpWord\Shared\XMLReader $xmlReader + * @param \PhpOffice\Common\XMLReader $xmlReader * @param \DOMElement $domNode * @param mixed $parent * @param string $docPart @@ -307,7 +307,7 @@ protected function readTable(XMLReader $xmlReader, \DOMElement $domNode, $parent /** * Read w:pPr. * - * @param \PhpOffice\PhpWord\Shared\XMLReader $xmlReader + * @param \PhpOffice\Common\XMLReader $xmlReader * @param \DOMElement $domNode * @return array|null */ @@ -339,7 +339,7 @@ protected function readParagraphStyle(XMLReader $xmlReader, \DOMElement $domNode /** * Read w:rPr * - * @param \PhpOffice\PhpWord\Shared\XMLReader $xmlReader + * @param \PhpOffice\Common\XMLReader $xmlReader * @param \DOMElement $domNode * @return array|null */ @@ -382,7 +382,7 @@ protected function readFontStyle(XMLReader $xmlReader, \DOMElement $domNode) /** * Read w:tblPr * - * @param \PhpOffice\PhpWord\Shared\XMLReader $xmlReader + * @param \PhpOffice\Common\XMLReader $xmlReader * @param \DOMElement $domNode * @return string|array|null * @todo Capture w:tblStylePr w:type="firstRow" @@ -418,7 +418,7 @@ protected function readTableStyle(XMLReader $xmlReader, \DOMElement $domNode) /** * Read w:tcPr * - * @param \PhpOffice\PhpWord\Shared\XMLReader $xmlReader + * @param \PhpOffice\Common\XMLReader $xmlReader * @param \DOMElement $domNode * @return array */ @@ -438,7 +438,7 @@ private function readCellStyle(XMLReader $xmlReader, \DOMElement $domNode) /** * Read style definition * - * @param \PhpOffice\PhpWord\Shared\XMLReader $xmlReader + * @param \PhpOffice\Common\XMLReader $xmlReader * @param \DOMElement $parentNode * @param array $styleDefs * @ignoreScrutinizerPatch diff --git a/src/PhpWord/Reader/Word2007/DocPropsCore.php b/src/PhpWord/Reader/Word2007/DocPropsCore.php index 97d0a4de32..e3e0dbfe77 100644 --- a/src/PhpWord/Reader/Word2007/DocPropsCore.php +++ b/src/PhpWord/Reader/Word2007/DocPropsCore.php @@ -17,8 +17,8 @@ namespace PhpOffice\PhpWord\Reader\Word2007; +use PhpOffice\Common\XMLReader; use PhpOffice\PhpWord\PhpWord; -use PhpOffice\PhpWord\Shared\XMLReader; /** * Core properties reader diff --git a/src/PhpWord/Reader/Word2007/DocPropsCustom.php b/src/PhpWord/Reader/Word2007/DocPropsCustom.php index 060684788c..47ad2b40ba 100644 --- a/src/PhpWord/Reader/Word2007/DocPropsCustom.php +++ b/src/PhpWord/Reader/Word2007/DocPropsCustom.php @@ -17,9 +17,9 @@ namespace PhpOffice\PhpWord\Reader\Word2007; +use PhpOffice\Common\XMLReader; use PhpOffice\PhpWord\Metadata\DocInfo; use PhpOffice\PhpWord\PhpWord; -use PhpOffice\PhpWord\Shared\XMLReader; /** * Custom properties reader diff --git a/src/PhpWord/Reader/Word2007/Document.php b/src/PhpWord/Reader/Word2007/Document.php index 7275f6e3be..eed5f7b8f6 100644 --- a/src/PhpWord/Reader/Word2007/Document.php +++ b/src/PhpWord/Reader/Word2007/Document.php @@ -17,9 +17,9 @@ namespace PhpOffice\PhpWord\Reader\Word2007; +use PhpOffice\Common\XMLReader; use PhpOffice\PhpWord\Element\Section; use PhpOffice\PhpWord\PhpWord; -use PhpOffice\PhpWord\Shared\XMLReader; /** * Document reader @@ -99,7 +99,7 @@ private function readHeaderFooter($settings, Section &$section) /** * Read w:sectPr * - * @param \PhpOffice\PhpWord\Shared\XMLReader $xmlReader + * @param \PhpOffice\Common\XMLReader $xmlReader * @param \DOMElement $domNode * @ignoreScrutinizerPatch * @return array @@ -142,7 +142,7 @@ private function readSectionStyle(XMLReader $xmlReader, \DOMElement $domNode) /** * Read w:p node. * - * @param \PhpOffice\PhpWord\Shared\XMLReader $xmlReader + * @param \PhpOffice\Common\XMLReader $xmlReader * @param \DOMElement $node * @param \PhpOffice\PhpWord\Element\Section &$section * @return void @@ -172,7 +172,7 @@ private function readWPNode(XMLReader $xmlReader, \DOMElement $node, Section &$s /** * Read w:sectPr node. * - * @param \PhpOffice\PhpWord\Shared\XMLReader $xmlReader + * @param \PhpOffice\Common\XMLReader $xmlReader * @param \DOMElement $node * @param \PhpOffice\PhpWord\Element\Section &$section * @return void diff --git a/src/PhpWord/Reader/Word2007/Footnotes.php b/src/PhpWord/Reader/Word2007/Footnotes.php index 3668bd4dd5..fc5c0420e5 100644 --- a/src/PhpWord/Reader/Word2007/Footnotes.php +++ b/src/PhpWord/Reader/Word2007/Footnotes.php @@ -17,8 +17,8 @@ namespace PhpOffice\PhpWord\Reader\Word2007; +use PhpOffice\Common\XMLReader; use PhpOffice\PhpWord\PhpWord; -use PhpOffice\PhpWord\Shared\XMLReader; /** * Footnotes reader diff --git a/src/PhpWord/Reader/Word2007/Numbering.php b/src/PhpWord/Reader/Word2007/Numbering.php index 9037a5f75e..beaa5f62e2 100644 --- a/src/PhpWord/Reader/Word2007/Numbering.php +++ b/src/PhpWord/Reader/Word2007/Numbering.php @@ -17,8 +17,8 @@ namespace PhpOffice\PhpWord\Reader\Word2007; +use PhpOffice\Common\XMLReader; use PhpOffice\PhpWord\PhpWord; -use PhpOffice\PhpWord\Shared\XMLReader; /** * Numbering reader @@ -90,7 +90,7 @@ public function read(PhpWord $phpWord) /** * Read numbering level definition from w:abstractNum and w:num * - * @param \PhpOffice\PhpWord\Shared\XMLReader $xmlReader + * @param \PhpOffice\Common\XMLReader $xmlReader * @param \DOMElement $subnode * @param integer $levelId * @return array diff --git a/src/PhpWord/Reader/Word2007/Styles.php b/src/PhpWord/Reader/Word2007/Styles.php index ed00665897..3a8d027f22 100644 --- a/src/PhpWord/Reader/Word2007/Styles.php +++ b/src/PhpWord/Reader/Word2007/Styles.php @@ -17,8 +17,8 @@ namespace PhpOffice\PhpWord\Reader\Word2007; +use PhpOffice\Common\XMLReader; use PhpOffice\PhpWord\PhpWord; -use PhpOffice\PhpWord\Shared\XMLReader; /** * Styles reader diff --git a/src/PhpWord/Shared/Drawing.php b/src/PhpWord/Shared/Drawing.php deleted file mode 100644 index aad28dcba2..0000000000 --- a/src/PhpWord/Shared/Drawing.php +++ /dev/null @@ -1,225 +0,0 @@ - 127 ? '\uc0{\u' . $value . '}' : chr($value); - } - } - - return $entities; - } - - /** - * Return name without underscore for < 0.10.0 variable name compatibility - * - * @param string $value - * @return string - */ - public static function removeUnderscorePrefix($value) - { - if (!is_null($value)) { - if (substr($value, 0, 1) == '_') { - $value = substr($value, 1); - } - } - - return $value; - } - - /** - * Build control characters array. - * - * @return void - */ - private static function buildControlCharacters() - { - for ($i = 0; $i <= 19; ++$i) { - if ($i != 9 && $i != 10 && $i != 13) { - $find = '_x' . sprintf('%04s', strtoupper(dechex($i))) . '_'; - $replace = chr($i); - self::$controlCharacters[$find] = $replace; - } - } - } -} diff --git a/src/PhpWord/Shared/XMLReader.php b/src/PhpWord/Shared/XMLReader.php deleted file mode 100644 index 7983dadd61..0000000000 --- a/src/PhpWord/Shared/XMLReader.php +++ /dev/null @@ -1,194 +0,0 @@ -open($zipFile); - $content = $zip->getFromName($xmlFile); - $zip->close(); - - if ($content === false) { - return false; - } else { - return $this->getDomFromString($content); - } - } - - /** - * Get DOMDocument from content string - * - * @param string $content - * @return \DOMDocument - */ - public function getDomFromString($content) - { - $this->dom = new \DOMDocument(); - $this->dom->loadXML($content); - - return $this->dom; - } - - /** - * Get elements - * - * @param string $path - * @param \DOMElement $contextNode - * @return \DOMNodeList - */ - public function getElements($path, \DOMElement $contextNode = null) - { - if ($this->dom === null) { - return array(); - } - if ($this->xpath === null) { - $this->xpath = new \DOMXpath($this->dom); - } - - if (is_null($contextNode)) { - return $this->xpath->query($path); - } else { - return $this->xpath->query($path, $contextNode); - } - } - - /** - * Get element - * - * @param string $path - * @param \DOMElement $contextNode - * @return \DOMElement|null - */ - public function getElement($path, \DOMElement $contextNode = null) - { - $elements = $this->getElements($path, $contextNode); - if ($elements->length > 0) { - return $elements->item(0); - } else { - return null; - } - } - - /** - * Get element attribute - * - * @param string $attribute - * @param \DOMElement $contextNode - * @param string $path - * @return string|null - */ - public function getAttribute($attribute, \DOMElement $contextNode = null, $path = null) - { - $return = null; - if ($path !== null) { - $elements = $this->getElements($path, $contextNode); - if ($elements->length > 0) { - /** @var \DOMElement $node Type hint */ - $node = $elements->item(0); - $return = $node->getAttribute($attribute); - } - } else { - if ($contextNode !== null) { - $return = $contextNode->getAttribute($attribute); - } - } - - return ($return == '') ? null : $return; - } - - /** - * Get element value - * - * @param string $path - * @param \DOMElement $contextNode - * @return string|null - */ - public function getValue($path, \DOMElement $contextNode = null) - { - $elements = $this->getElements($path, $contextNode); - if ($elements->length > 0) { - return $elements->item(0)->nodeValue; - } else { - return null; - } - } - - /** - * Count elements - * - * @param string $path - * @param \DOMElement $contextNode - * @return integer - */ - public function countElements($path, \DOMElement $contextNode = null) - { - $elements = $this->getElements($path, $contextNode); - - return $elements->length; - } - - /** - * Element exists - * - * @param string $path - * @param \DOMElement $contextNode - * @return boolean - */ - public function elementExists($path, \DOMElement $contextNode = null) - { - return $this->getElements($path, $contextNode)->length > 0; - } -} diff --git a/src/PhpWord/Shared/XMLWriter.php b/src/PhpWord/Shared/XMLWriter.php deleted file mode 100644 index 75fe35e0d8..0000000000 --- a/src/PhpWord/Shared/XMLWriter.php +++ /dev/null @@ -1,203 +0,0 @@ -xmlWriter = new \XMLWriter(); - - // Open temporary storage - if ($tempLocation == self::STORAGE_MEMORY) { - $this->xmlWriter->openMemory(); - } else { - // Create temporary filename - $this->tempFile = tempnam($tempFolder, 'xml'); - - // Fallback to memory when temporary file cannot be used - // @codeCoverageIgnoreStart - // Can't find any test case. Uncomment when found. - if (false === $this->tempFile || false === $this->xmlWriter->openUri($this->tempFile)) { - $this->xmlWriter->openMemory(); - } - // @codeCoverageIgnoreEnd - } - - // Set xml Compatibility - $compatibility = Settings::hasCompatibility(); - if ($compatibility) { - $this->xmlWriter->setIndent(false); - $this->xmlWriter->setIndentString(''); - } else { - $this->xmlWriter->setIndent(true); - $this->xmlWriter->setIndentString(' '); - } - } - - /** - * Destructor - */ - public function __destruct() - { - // Destruct XMLWriter - unset($this->xmlWriter); - - // Unlink temporary files - if ($this->tempFile != '') { - @unlink($this->tempFile); - } - } - - /** - * Catch function calls (and pass them to internal XMLWriter) - * - * @param mixed $function - * @param mixed $args - * - * @throws \BadMethodCallException - */ - public function __call($function, $args) - { - // Catch exception - if (method_exists($this->xmlWriter, $function) === false) { - throw new \BadMethodCallException("Method '{$function}' does not exists."); - } - - // Run method - try { - @call_user_func_array(array($this->xmlWriter, $function), $args); - } catch (\Exception $ex) { - // Do nothing! - } - } - - /** - * Get written data - * - * @return string XML data - */ - public function getData() - { - if ($this->tempFile == '') { - return $this->xmlWriter->outputMemory(true); - } else { - $this->xmlWriter->flush(); - return file_get_contents($this->tempFile); - } - } - - /** - * Write simple element and attribute(s) block - * - * There are two options: - * 1. If the `$attributes` is an array, then it's an associative array of attributes - * 2. If not, then it's a simple attribute-value pair - * - * @param string $element - * @param string|array $attributes - * @param string $value - * @return void - */ - public function writeElementBlock($element, $attributes, $value = null) - { - $this->xmlWriter->startElement($element); - if (!is_array($attributes)) { - $attributes = array($attributes => $value); - } - foreach ($attributes as $attribute => $value) { - $this->xmlWriter->writeAttribute($attribute, $value); - } - $this->xmlWriter->endElement(); - } - - /** - * Write element if ... - * - * @param bool $condition - * @param string $element - * @param string $attribute - * @param mixed $value - * @return void - */ - public function writeElementIf($condition, $element, $attribute = null, $value = null) - { - if ($condition == true) { - if (is_null($attribute)) { - $this->xmlWriter->writeElement($element, $value); - } else { - $this->xmlWriter->startElement($element); - $this->xmlWriter->writeAttribute($attribute, $value); - $this->xmlWriter->endElement(); - } - } - } - - /** - * Write attribute if ... - * - * @param bool $condition - * @param string $attribute - * @param mixed $value - * @return void - */ - public function writeAttributeIf($condition, $attribute, $value) - { - if ($condition == true) { - $this->xmlWriter->writeAttribute($attribute, $value); - } - } -} diff --git a/src/PhpWord/Style/AbstractStyle.php b/src/PhpWord/Style/AbstractStyle.php index 418e4a3587..cff813bc2d 100644 --- a/src/PhpWord/Style/AbstractStyle.php +++ b/src/PhpWord/Style/AbstractStyle.php @@ -17,7 +17,7 @@ namespace PhpOffice\PhpWord\Style; -use PhpOffice\PhpWord\Shared\String; +use PhpOffice\Common\Text; /** * Abstract style class @@ -161,7 +161,7 @@ public function setStyleValue($key, $value) if (isset($this->aliases[$key])) { $key = $this->aliases[$key]; } - $method = 'set' . String::removeUnderscorePrefix($key); + $method = 'set' . Text::removeUnderscorePrefix($key); if (method_exists($this, $method)) { $this->$method($value); } diff --git a/src/PhpWord/Style/Paragraph.php b/src/PhpWord/Style/Paragraph.php index 0de3713910..10e94a2ab8 100644 --- a/src/PhpWord/Style/Paragraph.php +++ b/src/PhpWord/Style/Paragraph.php @@ -17,8 +17,8 @@ namespace PhpOffice\PhpWord\Style; +use PhpOffice\Common\Text; use PhpOffice\PhpWord\Exception\InvalidStyleException; -use PhpOffice\PhpWord\Shared\String; use PhpOffice\PhpWord\SimpleType\Jc; /** @@ -167,7 +167,7 @@ class Paragraph extends Border */ public function setStyleValue($key, $value) { - $key = String::removeUnderscorePrefix($key); + $key = Text::removeUnderscorePrefix($key); if ('indent' == $key || 'hanging' == $key) { $value = $value * 720; } elseif ('spacing' == $key) { diff --git a/src/PhpWord/TemplateProcessor.php b/src/PhpWord/TemplateProcessor.php index aefda39556..49fbf70567 100644 --- a/src/PhpWord/TemplateProcessor.php +++ b/src/PhpWord/TemplateProcessor.php @@ -20,8 +20,8 @@ use PhpOffice\PhpWord\Exception\CopyFileException; use PhpOffice\PhpWord\Exception\CreateTemporaryFileException; use PhpOffice\PhpWord\Exception\Exception; -use PhpOffice\PhpWord\Shared\String; use PhpOffice\PhpWord\Shared\ZipArchive; +use Zend\Stdlib\StringUtils; class TemplateProcessor { @@ -148,7 +148,7 @@ public function setValue($macro, $replace, $limit = self::MAXIMUM_REPLACEMENTS_D $macro = '${' . $macro . '}'; } - if (!String::isUTF8($replace)) { + if (!StringUtils::isValidUtf8($replace)) { $replace = utf8_encode($replace); } diff --git a/src/PhpWord/Writer/ODText/Part/AbstractPart.php b/src/PhpWord/Writer/ODText/Part/AbstractPart.php index 09e8f15dfa..7cd3e95d43 100644 --- a/src/PhpWord/Writer/ODText/Part/AbstractPart.php +++ b/src/PhpWord/Writer/ODText/Part/AbstractPart.php @@ -17,8 +17,8 @@ namespace PhpOffice\PhpWord\Writer\ODText\Part; +use PhpOffice\Common\XMLWriter; use PhpOffice\PhpWord\Settings; -use PhpOffice\PhpWord\Shared\XMLWriter; use PhpOffice\PhpWord\Style; use PhpOffice\PhpWord\Style\Font; use PhpOffice\PhpWord\Writer\Word2007\Part\AbstractPart as Word2007AbstractPart; @@ -36,7 +36,7 @@ abstract class AbstractPart extends Word2007AbstractPart /** * Write common root attributes. * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @return void */ protected function writeCommonRootAttributes(XMLWriter $xmlWriter) @@ -73,7 +73,7 @@ protected function writeCommonRootAttributes(XMLWriter $xmlWriter) /** * Write font faces declaration. * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @return void */ protected function writeFontFaces(XMLWriter $xmlWriter) diff --git a/src/PhpWord/Writer/ODText/Part/Content.php b/src/PhpWord/Writer/ODText/Part/Content.php index f881e9fcca..c5de1f1584 100644 --- a/src/PhpWord/Writer/ODText/Part/Content.php +++ b/src/PhpWord/Writer/ODText/Part/Content.php @@ -17,12 +17,12 @@ namespace PhpOffice\PhpWord\Writer\ODText\Part; +use PhpOffice\Common\XMLWriter; use PhpOffice\PhpWord\Element\Image; use PhpOffice\PhpWord\Element\Table; use PhpOffice\PhpWord\Element\Text; use PhpOffice\PhpWord\Element\TextRun; use PhpOffice\PhpWord\PhpWord; -use PhpOffice\PhpWord\Shared\XMLWriter; use PhpOffice\PhpWord\Style; use PhpOffice\PhpWord\Style\Font; use PhpOffice\PhpWord\Style\Paragraph; @@ -110,7 +110,7 @@ public function write() * * @since 0.11.0 * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @return void */ private function writeAutoStyles(XMLWriter $xmlWriter) @@ -134,7 +134,7 @@ private function writeAutoStyles(XMLWriter $xmlWriter) /** * Write automatic styles. * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @return void */ private function writeTextStyles(XMLWriter $xmlWriter) diff --git a/src/PhpWord/Writer/ODText/Part/Meta.php b/src/PhpWord/Writer/ODText/Part/Meta.php index 6c97085c9f..1c71745c17 100644 --- a/src/PhpWord/Writer/ODText/Part/Meta.php +++ b/src/PhpWord/Writer/ODText/Part/Meta.php @@ -17,7 +17,7 @@ namespace PhpOffice\PhpWord\Writer\ODText\Part; -use PhpOffice\PhpWord\Shared\XMLWriter; +use PhpOffice\Common\XMLWriter; /** * ODText meta part writer: meta.xml @@ -86,7 +86,7 @@ public function write() /** * Write individual property * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param string $property * @param string $value * @return void diff --git a/src/PhpWord/Writer/ODText/Part/Styles.php b/src/PhpWord/Writer/ODText/Part/Styles.php index a120c2946b..8bb9533ea5 100644 --- a/src/PhpWord/Writer/ODText/Part/Styles.php +++ b/src/PhpWord/Writer/ODText/Part/Styles.php @@ -17,8 +17,8 @@ namespace PhpOffice\PhpWord\Writer\ODText\Part; +use PhpOffice\Common\XMLWriter; use PhpOffice\PhpWord\Settings; -use PhpOffice\PhpWord\Shared\XMLWriter; use PhpOffice\PhpWord\Style; /** @@ -63,7 +63,7 @@ public function write() /** * Write default styles. * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @return void */ private function writeDefault(XMLWriter $xmlWriter) @@ -108,7 +108,7 @@ private function writeDefault(XMLWriter $xmlWriter) /** * Write named styles. * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @return void */ private function writeNamed(XMLWriter $xmlWriter) @@ -130,7 +130,7 @@ private function writeNamed(XMLWriter $xmlWriter) /** * Write page layout styles. * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @return void */ private function writePageLayout(XMLWriter $xmlWriter) @@ -183,7 +183,7 @@ private function writePageLayout(XMLWriter $xmlWriter) /** * Write master style. * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @return void */ private function writeMaster(XMLWriter $xmlWriter) diff --git a/src/PhpWord/Writer/RTF/Element/AbstractElement.php b/src/PhpWord/Writer/RTF/Element/AbstractElement.php index 9b4eb80e17..3ac9c6e79f 100644 --- a/src/PhpWord/Writer/RTF/Element/AbstractElement.php +++ b/src/PhpWord/Writer/RTF/Element/AbstractElement.php @@ -17,7 +17,7 @@ namespace PhpOffice\PhpWord\Writer\RTF\Element; -use PhpOffice\PhpWord\Shared\String; +use PhpOffice\Common\Text as CommonText; use PhpOffice\PhpWord\Style; use PhpOffice\PhpWord\Style\Font as FontStyle; use PhpOffice\PhpWord\Style\Paragraph as ParagraphStyle; @@ -112,7 +112,7 @@ protected function writeOpening() */ protected function writeText($text) { - return String::toUnicode($text); + return CommonText::toUnicode($text); } /** diff --git a/src/PhpWord/Writer/Word2007/Element/AbstractElement.php b/src/PhpWord/Writer/Word2007/Element/AbstractElement.php index 5654ab7ba9..ead71b3406 100644 --- a/src/PhpWord/Writer/Word2007/Element/AbstractElement.php +++ b/src/PhpWord/Writer/Word2007/Element/AbstractElement.php @@ -17,9 +17,9 @@ namespace PhpOffice\PhpWord\Writer\Word2007\Element; +use PhpOffice\Common\Text as CommonText; +use PhpOffice\Common\XMLWriter; use PhpOffice\PhpWord\Element\AbstractElement as Element; -use PhpOffice\PhpWord\Shared\String; -use PhpOffice\PhpWord\Shared\XMLWriter; /** * Abstract element writer @@ -31,7 +31,7 @@ abstract class AbstractElement /** * XML writer * - * @var \PhpOffice\PhpWord\Shared\XMLWriter + * @var \PhpOffice\Common\XMLWriter */ private $xmlWriter; @@ -57,7 +57,7 @@ abstract public function write(); /** * Create new instance * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Element\AbstractElement $element * @param bool $withoutP */ @@ -71,7 +71,7 @@ public function __construct(XMLWriter $xmlWriter, Element $element, $withoutP = /** * Get XML Writer * - * @return \PhpOffice\PhpWord\Shared\XMLWriter + * @return \PhpOffice\Common\XMLWriter */ protected function getXmlWriter() { @@ -167,6 +167,6 @@ private function writeTextStyle($styleType) */ protected function getText($text) { - return String::controlCharacterPHP2OOXML($text); + return CommonText::controlCharacterPHP2OOXML($text); } } diff --git a/src/PhpWord/Writer/Word2007/Element/Container.php b/src/PhpWord/Writer/Word2007/Element/Container.php index 54ef8cd376..4a207ed5a8 100644 --- a/src/PhpWord/Writer/Word2007/Element/Container.php +++ b/src/PhpWord/Writer/Word2007/Element/Container.php @@ -17,10 +17,10 @@ namespace PhpOffice\PhpWord\Writer\Word2007\Element; +use PhpOffice\Common\XMLWriter; use PhpOffice\PhpWord\Element\AbstractContainer as ContainerElement; use PhpOffice\PhpWord\Element\AbstractElement as Element; use PhpOffice\PhpWord\Element\TextBreak as TextBreakElement; -use PhpOffice\PhpWord\Shared\XMLWriter; /** * Container element writer (section, textrun, header, footnote, cell, etc.) @@ -73,7 +73,7 @@ public function write() /** * Write individual element * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Element\AbstractElement $element * @param bool $withoutP * @return string diff --git a/src/PhpWord/Writer/Word2007/Element/FormField.php b/src/PhpWord/Writer/Word2007/Element/FormField.php index 954d6fbd97..669b8183a9 100644 --- a/src/PhpWord/Writer/Word2007/Element/FormField.php +++ b/src/PhpWord/Writer/Word2007/Element/FormField.php @@ -17,8 +17,8 @@ namespace PhpOffice\PhpWord\Writer\Word2007\Element; +use PhpOffice\Common\XMLWriter; use PhpOffice\PhpWord\Element\FormField as FormFieldElement; -use PhpOffice\PhpWord\Shared\XMLWriter; /** * FormField element writer @@ -107,7 +107,7 @@ public function write() * Write textinput. * * @link http://www.datypic.com/sc/ooxml/t-w_CT_FFTextInput.html - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Element\FormField $element * @return void */ @@ -124,7 +124,7 @@ private function writeTextInput(XMLWriter $xmlWriter, FormFieldElement $element) * Write checkbox. * * @link http://www.datypic.com/sc/ooxml/t-w_CT_FFCheckBox.html - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Element\FormField $element * @return void */ @@ -148,7 +148,7 @@ private function writeCheckBox(XMLWriter $xmlWriter, FormFieldElement $element) * Write dropdown. * * @link http://www.datypic.com/sc/ooxml/t-w_CT_FFDDList.html - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Element\FormField $element * @return void */ diff --git a/src/PhpWord/Writer/Word2007/Element/Image.php b/src/PhpWord/Writer/Word2007/Element/Image.php index 278c58f1b1..8884fecaf4 100644 --- a/src/PhpWord/Writer/Word2007/Element/Image.php +++ b/src/PhpWord/Writer/Word2007/Element/Image.php @@ -17,8 +17,8 @@ namespace PhpOffice\PhpWord\Writer\Word2007\Element; +use PhpOffice\Common\XMLWriter; use PhpOffice\PhpWord\Element\Image as ImageElement; -use PhpOffice\PhpWord\Shared\XMLWriter; use PhpOffice\PhpWord\Writer\Word2007\Style\Image as ImageStyleWriter; /** diff --git a/src/PhpWord/Writer/Word2007/Element/SDT.php b/src/PhpWord/Writer/Word2007/Element/SDT.php index 4914469256..2d639242a3 100644 --- a/src/PhpWord/Writer/Word2007/Element/SDT.php +++ b/src/PhpWord/Writer/Word2007/Element/SDT.php @@ -17,8 +17,8 @@ namespace PhpOffice\PhpWord\Writer\Word2007\Element; +use PhpOffice\Common\XMLWriter; use PhpOffice\PhpWord\Element\SDT as SDTElement; -use PhpOffice\PhpWord\Shared\XMLWriter; /** * Structured document tag element writer @@ -73,7 +73,7 @@ public function write() * Write combo box. * * @link http://www.datypic.com/sc/ooxml/t-w_CT_SdtComboBox.html - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Element\SDT $element * @return void */ @@ -93,7 +93,7 @@ private function writeComboBox(XMLWriter $xmlWriter, SDTElement $element) * Write drop down list. * * @link http://www.datypic.com/sc/ooxml/t-w_CT_SdtDropDownList.html - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Element\SDT $element * @return void */ @@ -106,7 +106,7 @@ private function writeDropDownList(XMLWriter $xmlWriter, SDTElement $element) * Write date. * * @link http://www.datypic.com/sc/ooxml/t-w_CT_SdtDate.html - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Element\SDT $element * @return void */ diff --git a/src/PhpWord/Writer/Word2007/Element/Shape.php b/src/PhpWord/Writer/Word2007/Element/Shape.php index a2cc90c67b..dfedaaa904 100644 --- a/src/PhpWord/Writer/Word2007/Element/Shape.php +++ b/src/PhpWord/Writer/Word2007/Element/Shape.php @@ -17,8 +17,8 @@ namespace PhpOffice\PhpWord\Writer\Word2007\Element; +use PhpOffice\Common\XMLWriter; use PhpOffice\PhpWord\Element\Shape as ShapeElement; -use PhpOffice\PhpWord\Shared\XMLWriter; use PhpOffice\PhpWord\Style\Shape as ShapeStyle; use PhpOffice\PhpWord\Writer\Word2007\Style\Shape as ShapeStyleWriter; @@ -78,7 +78,7 @@ public function write() /** * Write arc. * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Style\Shape $style * @return void */ @@ -93,7 +93,7 @@ private function writeArc(XMLWriter $xmlWriter, ShapeStyle $style) /** * Write curve. * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Style\Shape $style * @return void */ @@ -109,7 +109,7 @@ private function writeCurve(XMLWriter $xmlWriter, ShapeStyle $style) /** * Write line. * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Style\Shape $style * @return void */ @@ -124,7 +124,7 @@ private function writeLine(XMLWriter $xmlWriter, ShapeStyle $style) /** * Write polyline. * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Style\Shape $style * @return void */ @@ -136,7 +136,7 @@ private function writePolyline(XMLWriter $xmlWriter, ShapeStyle $style) /** * Write rectangle. * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Style\Shape $style * @return void */ diff --git a/src/PhpWord/Writer/Word2007/Element/TOC.php b/src/PhpWord/Writer/Word2007/Element/TOC.php index 47c6db281a..fcc90886df 100644 --- a/src/PhpWord/Writer/Word2007/Element/TOC.php +++ b/src/PhpWord/Writer/Word2007/Element/TOC.php @@ -17,8 +17,8 @@ namespace PhpOffice\PhpWord\Writer\Word2007\Element; +use PhpOffice\Common\XMLWriter; use PhpOffice\PhpWord\Element\TOC as TOCElement; -use PhpOffice\PhpWord\Shared\XMLWriter; use PhpOffice\PhpWord\Style\Font; use PhpOffice\PhpWord\Writer\Word2007\Style\Font as FontStyleWriter; use PhpOffice\PhpWord\Writer\Word2007\Style\Paragraph as ParagraphStyleWriter; @@ -66,7 +66,7 @@ public function write() /** * Write title * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Element\TOC $element * @param \PhpOffice\PhpWord\Element\Title $title * @param bool $writeFieldMark @@ -135,7 +135,7 @@ private function writeTitle(XMLWriter $xmlWriter, TOCElement $element, $title, $ /** * Write style * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Element\TOC $element * @param int $indent * @return void @@ -182,7 +182,7 @@ private function writeStyle(XMLWriter $xmlWriter, TOCElement $element, $indent) /** * Write TOC Field. * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Element\TOC $element * @return void */ diff --git a/src/PhpWord/Writer/Word2007/Element/Table.php b/src/PhpWord/Writer/Word2007/Element/Table.php index c93dbdda55..86bfe302c0 100644 --- a/src/PhpWord/Writer/Word2007/Element/Table.php +++ b/src/PhpWord/Writer/Word2007/Element/Table.php @@ -17,10 +17,10 @@ namespace PhpOffice\PhpWord\Writer\Word2007\Element; +use PhpOffice\Common\XMLWriter; use PhpOffice\PhpWord\Element\Cell as CellElement; use PhpOffice\PhpWord\Element\Row as RowElement; use PhpOffice\PhpWord\Element\Table as TableElement; -use PhpOffice\PhpWord\Shared\XMLWriter; use PhpOffice\PhpWord\Style\Cell as CellStyle; use PhpOffice\PhpWord\Style\Row as RowStyle; use PhpOffice\PhpWord\Writer\Word2007\Style\Cell as CellStyleWriter; @@ -73,7 +73,7 @@ public function write() /** * Write column. * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Element\Table $element * @return void */ @@ -110,7 +110,7 @@ private function writeColumns(XMLWriter $xmlWriter, TableElement $element) /** * Write row. * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Element\Row $row * @return void */ @@ -137,7 +137,7 @@ private function writeRow(XMLWriter $xmlWriter, RowElement $row) /** * Write cell. * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Element\Cell $cell * @return void */ diff --git a/src/PhpWord/Writer/Word2007/Part/AbstractPart.php b/src/PhpWord/Writer/Word2007/Part/AbstractPart.php index 41ada2528e..5b8947a491 100644 --- a/src/PhpWord/Writer/Word2007/Part/AbstractPart.php +++ b/src/PhpWord/Writer/Word2007/Part/AbstractPart.php @@ -17,8 +17,9 @@ namespace PhpOffice\PhpWord\Writer\Word2007\Part; +use PhpOffice\Common\XMLWriter; use PhpOffice\PhpWord\Exception\Exception; -use PhpOffice\PhpWord\Shared\XMLWriter; +use PhpOffice\PhpWord\Settings; use PhpOffice\PhpWord\Writer\AbstractWriter; /** @@ -75,7 +76,7 @@ public function getParentWriter() /** * Get XML Writer * - * @return \PhpOffice\PhpWord\Shared\XMLWriter + * @return \PhpOffice\Common\XMLWriter */ protected function getXmlWriter() { @@ -86,9 +87,9 @@ protected function getXmlWriter() } } if ($useDiskCaching) { - return new XMLWriter(XMLWriter::STORAGE_DISK, $this->parentWriter->getDiskCachingDirectory()); + return new XMLWriter(XMLWriter::STORAGE_DISK, $this->parentWriter->getDiskCachingDirectory(), Settings::hasCompatibility()); } else { - return new XMLWriter(XMLWriter::STORAGE_MEMORY); + return new XMLWriter(XMLWriter::STORAGE_MEMORY, './', Settings::hasCompatibility()); } } } diff --git a/src/PhpWord/Writer/Word2007/Part/Chart.php b/src/PhpWord/Writer/Word2007/Part/Chart.php index efb69a8366..78f2ca24e3 100644 --- a/src/PhpWord/Writer/Word2007/Part/Chart.php +++ b/src/PhpWord/Writer/Word2007/Part/Chart.php @@ -17,8 +17,8 @@ namespace PhpOffice\PhpWord\Writer\Word2007\Part; +use PhpOffice\Common\XMLWriter; use PhpOffice\PhpWord\Element\Chart as ChartElement; -use PhpOffice\PhpWord\Shared\XMLWriter; /** * Word2007 chart part writer: word/charts/chartx.xml @@ -96,7 +96,7 @@ public function write() * Write chart * * @link http://www.datypic.com/sc/ooxml/t-draw-chart_CT_Chart.html - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @return void */ private function writeChart(XMLWriter $xmlWriter) @@ -121,7 +121,7 @@ private function writeChart(XMLWriter $xmlWriter) * @link http://www.datypic.com/sc/ooxml/t-draw-chart_CT_AreaChart.html * @link http://www.datypic.com/sc/ooxml/t-draw-chart_CT_RadarChart.html * @link http://www.datypic.com/sc/ooxml/t-draw-chart_CT_ScatterChart.html - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @return void */ private function writePlotArea(XMLWriter $xmlWriter) @@ -180,7 +180,7 @@ private function writePlotArea(XMLWriter $xmlWriter) /** * Write series. * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param bool $scatter * @return void */ @@ -219,7 +219,7 @@ private function writeSeries(XMLWriter $xmlWriter, $scatter = false) /** * Write series items. * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param string $type * @param array $values * @return void @@ -258,7 +258,7 @@ private function writeSeriesItem(XMLWriter $xmlWriter, $type, $values) * Write axis * * @link http://www.datypic.com/sc/ooxml/t-draw-chart_CT_CatAx.html - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param string $type * @return void */ @@ -301,7 +301,7 @@ private function writeAxis(XMLWriter $xmlWriter, $type) * Write shape * * @link http://www.datypic.com/sc/ooxml/t-a_CT_ShapeProperties.html - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param bool $line * @return void */ diff --git a/src/PhpWord/Writer/Word2007/Part/ContentTypes.php b/src/PhpWord/Writer/Word2007/Part/ContentTypes.php index 388dc53918..871ecc1041 100644 --- a/src/PhpWord/Writer/Word2007/Part/ContentTypes.php +++ b/src/PhpWord/Writer/Word2007/Part/ContentTypes.php @@ -17,7 +17,7 @@ namespace PhpOffice\PhpWord\Writer\Word2007\Part; -use PhpOffice\PhpWord\Shared\XMLWriter; +use PhpOffice\Common\XMLWriter; /** * Word2007 contenttypes part writer: [Content_Types].xml @@ -79,7 +79,7 @@ public function write() /** * Write content types element * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter XML Writer + * @param \PhpOffice\Common\XMLWriter $xmlWriter XML Writer * @param array $parts * @param boolean $isDefault * @return void diff --git a/src/PhpWord/Writer/Word2007/Part/Document.php b/src/PhpWord/Writer/Word2007/Part/Document.php index 77a51760d5..aad7c2e51a 100644 --- a/src/PhpWord/Writer/Word2007/Part/Document.php +++ b/src/PhpWord/Writer/Word2007/Part/Document.php @@ -17,8 +17,8 @@ namespace PhpOffice\PhpWord\Writer\Word2007\Part; +use PhpOffice\Common\XMLWriter; use PhpOffice\PhpWord\Element\Section; -use PhpOffice\PhpWord\Shared\XMLWriter; use PhpOffice\PhpWord\Writer\Word2007\Element\Container; use PhpOffice\PhpWord\Writer\Word2007\Style\Section as SectionStyleWriter; @@ -81,7 +81,7 @@ public function write() /** * Write begin section. * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Element\Section $section * @return void */ @@ -97,7 +97,7 @@ private function writeSection(XMLWriter $xmlWriter, Section $section) /** * Write end section. * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Element\Section $section * @return void */ diff --git a/src/PhpWord/Writer/Word2007/Part/Footnotes.php b/src/PhpWord/Writer/Word2007/Part/Footnotes.php index 71051a9986..e0faf6ac81 100644 --- a/src/PhpWord/Writer/Word2007/Part/Footnotes.php +++ b/src/PhpWord/Writer/Word2007/Part/Footnotes.php @@ -17,8 +17,8 @@ namespace PhpOffice\PhpWord\Writer\Word2007\Part; +use PhpOffice\Common\XMLWriter; use PhpOffice\PhpWord\Element\Footnote; -use PhpOffice\PhpWord\Shared\XMLWriter; use PhpOffice\PhpWord\Writer\Word2007\Element\Container; use PhpOffice\PhpWord\Writer\Word2007\Style\Paragraph as ParagraphStyleWriter; @@ -135,7 +135,7 @@ public function setElements($elements) /** * Write note item. * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Element\Footnote|\PhpOffice\PhpWord\Element\Endnote $element * @return void */ diff --git a/src/PhpWord/Writer/Word2007/Part/Numbering.php b/src/PhpWord/Writer/Word2007/Part/Numbering.php index 6513e1b0dd..dc43a76c75 100644 --- a/src/PhpWord/Writer/Word2007/Part/Numbering.php +++ b/src/PhpWord/Writer/Word2007/Part/Numbering.php @@ -17,7 +17,7 @@ namespace PhpOffice\PhpWord\Writer\Word2007\Part; -use PhpOffice\PhpWord\Shared\XMLWriter; +use PhpOffice\Common\XMLWriter; use PhpOffice\PhpWord\Style; use PhpOffice\PhpWord\Style\Numbering as NumberingStyle; use PhpOffice\PhpWord\Style\NumberingLevel; @@ -97,7 +97,7 @@ public function write() /** * Write level. * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Style\NumberingLevel $level * @return void */ @@ -138,7 +138,7 @@ private function writeLevel(XMLWriter $xmlWriter, NumberingLevel $level) * * @since 0.11.0 * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Style\NumberingLevel $level * @return void * @todo Use paragraph style writer @@ -171,7 +171,7 @@ private function writeParagraph(XMLWriter $xmlWriter, NumberingLevel $level) * * @since 0.11.0 * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Style\NumberingLevel $level * @return void * @todo Use font style writer diff --git a/src/PhpWord/Writer/Word2007/Part/Rels.php b/src/PhpWord/Writer/Word2007/Part/Rels.php index a84405f80a..064446484e 100644 --- a/src/PhpWord/Writer/Word2007/Part/Rels.php +++ b/src/PhpWord/Writer/Word2007/Part/Rels.php @@ -17,8 +17,8 @@ namespace PhpOffice\PhpWord\Writer\Word2007\Part; +use PhpOffice\Common\XMLWriter; use PhpOffice\PhpWord\Exception\Exception; -use PhpOffice\PhpWord\Shared\XMLWriter; /** * Word2007 main relationship writer: _rels/.rels @@ -49,7 +49,7 @@ public function write() /** * Write relationships. * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param array $xmlRels * @param array $mediaRels * @param int $relId @@ -77,7 +77,7 @@ protected function writeRels(XMLWriter $xmlWriter, $xmlRels = array(), $mediaRel /** * Write media relationships. * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param int $relId * @param array $mediaRel * @return void @@ -103,7 +103,7 @@ private function writeMediaRel(XMLWriter $xmlWriter, $relId, $mediaRel) * Format: * * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param int $relId Relationship ID * @param string $type Relationship type * @param string $target Relationship target diff --git a/src/PhpWord/Writer/Word2007/Part/Settings.php b/src/PhpWord/Writer/Word2007/Part/Settings.php index 959be2e35e..436328530c 100644 --- a/src/PhpWord/Writer/Word2007/Part/Settings.php +++ b/src/PhpWord/Writer/Word2007/Part/Settings.php @@ -64,7 +64,7 @@ public function write() /** * Write indivual setting, recursive to any child settings. * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param string $settingKey * @param array|string $settingValue * @return void diff --git a/src/PhpWord/Writer/Word2007/Part/Styles.php b/src/PhpWord/Writer/Word2007/Part/Styles.php index fc030915a9..f220e2318a 100644 --- a/src/PhpWord/Writer/Word2007/Part/Styles.php +++ b/src/PhpWord/Writer/Word2007/Part/Styles.php @@ -17,8 +17,8 @@ namespace PhpOffice\PhpWord\Writer\Word2007\Part; +use PhpOffice\Common\XMLWriter; use PhpOffice\PhpWord\Settings as PhpWordSettings; -use PhpOffice\PhpWord\Shared\XMLWriter; use PhpOffice\PhpWord\Style; use PhpOffice\PhpWord\Style\Font as FontStyle; use PhpOffice\PhpWord\Style\Paragraph as ParagraphStyle; @@ -77,7 +77,7 @@ public function write() /** * Write default font and other default styles. * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Style\AbstractStyle[] $styles * @return void */ @@ -142,7 +142,7 @@ private function writeDefaultStyles(XMLWriter $xmlWriter, $styles) /** * Write font style. * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param string $styleName * @param \PhpOffice\PhpWord\Style\Font $style * @return void @@ -196,7 +196,7 @@ private function writeFontStyle(XMLWriter $xmlWriter, $styleName, FontStyle $sty /** * Write paragraph style. * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param string $styleName * @param \PhpOffice\PhpWord\Style\Paragraph $style * @return void @@ -229,7 +229,7 @@ private function writeParagraphStyle(XMLWriter $xmlWriter, $styleName, Paragraph /** * Write table style. * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param string $styleName * @param \PhpOffice\PhpWord\Style\Table $style * @return void diff --git a/src/PhpWord/Writer/Word2007/Style/AbstractStyle.php b/src/PhpWord/Writer/Word2007/Style/AbstractStyle.php index 55ad3dafb1..07bae121fa 100644 --- a/src/PhpWord/Writer/Word2007/Style/AbstractStyle.php +++ b/src/PhpWord/Writer/Word2007/Style/AbstractStyle.php @@ -17,8 +17,8 @@ namespace PhpOffice\PhpWord\Writer\Word2007\Style; +use PhpOffice\Common\XMLWriter; use PhpOffice\PhpWord\Settings; -use PhpOffice\PhpWord\Shared\XMLWriter; /** * Style writer @@ -30,7 +30,7 @@ abstract class AbstractStyle /** * XML writer * - * @var \PhpOffice\PhpWord\Shared\XMLWriter + * @var \PhpOffice\Common\XMLWriter */ private $xmlWriter; @@ -49,7 +49,7 @@ abstract public function write(); /** * Create new instance. * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param string|\PhpOffice\PhpWord\Style\AbstractStyle $style */ public function __construct(XMLWriter $xmlWriter, $style = null) @@ -61,7 +61,7 @@ public function __construct(XMLWriter $xmlWriter, $style = null) /** * Get XML Writer * - * @return \PhpOffice\PhpWord\Shared\XMLWriter + * @return \PhpOffice\Common\XMLWriter */ protected function getXmlWriter() { @@ -106,7 +106,7 @@ protected function convertTwip($value, $default = 0) /** * Write child style. * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param string $name * @param mixed $value * @return void diff --git a/src/PhpWord/Writer/Word2007/Style/Frame.php b/src/PhpWord/Writer/Word2007/Style/Frame.php index ed20a874fe..f7c7344e6b 100644 --- a/src/PhpWord/Writer/Word2007/Style/Frame.php +++ b/src/PhpWord/Writer/Word2007/Style/Frame.php @@ -17,7 +17,7 @@ namespace PhpOffice\PhpWord\Writer\Word2007\Style; -use PhpOffice\PhpWord\Shared\XMLWriter; +use PhpOffice\Common\XMLWriter; use PhpOffice\PhpWord\Style\Frame as FrameStyle; use PhpOffice\PhpWord\Writer\Word2007\Element\ParagraphAlignment; @@ -105,7 +105,7 @@ public function writeAlignment() /** * Write wrap. * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Style\Frame $style * @param string $wrap * @return void diff --git a/src/PhpWord/Writer/Word2007/Style/MarginBorder.php b/src/PhpWord/Writer/Word2007/Style/MarginBorder.php index 56eaf3c7d7..a309be0770 100644 --- a/src/PhpWord/Writer/Word2007/Style/MarginBorder.php +++ b/src/PhpWord/Writer/Word2007/Style/MarginBorder.php @@ -17,7 +17,7 @@ namespace PhpOffice\PhpWord\Writer\Word2007\Style; -use PhpOffice\PhpWord\Shared\XMLWriter; +use PhpOffice\Common\XMLWriter; /** * Margin border style writer @@ -72,7 +72,7 @@ public function write() /** * Write side. * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param string $side * @param int $width * @param string $color diff --git a/src/PhpWord/Writer/Word2007/Style/Paragraph.php b/src/PhpWord/Writer/Word2007/Style/Paragraph.php index b05934d873..25fc298d5c 100644 --- a/src/PhpWord/Writer/Word2007/Style/Paragraph.php +++ b/src/PhpWord/Writer/Word2007/Style/Paragraph.php @@ -17,7 +17,7 @@ namespace PhpOffice\PhpWord\Writer\Word2007\Style; -use PhpOffice\PhpWord\Shared\XMLWriter; +use PhpOffice\Common\XMLWriter; use PhpOffice\PhpWord\Style; use PhpOffice\PhpWord\Style\Paragraph as ParagraphStyle; use PhpOffice\PhpWord\Writer\Word2007\Element\ParagraphAlignment; @@ -138,7 +138,7 @@ private function writeStyle() /** * Write tabs. * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Style\Tab[] $tabs * @return void */ @@ -157,7 +157,7 @@ private function writeTabs(XMLWriter $xmlWriter, $tabs) /** * Write numbering. * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param array $numbering * @return void */ diff --git a/src/PhpWord/Writer/Word2007/Style/Table.php b/src/PhpWord/Writer/Word2007/Style/Table.php index 7c247b2dae..bd68f6dec7 100644 --- a/src/PhpWord/Writer/Word2007/Style/Table.php +++ b/src/PhpWord/Writer/Word2007/Style/Table.php @@ -17,7 +17,7 @@ namespace PhpOffice\PhpWord\Writer\Word2007\Style; -use PhpOffice\PhpWord\Shared\XMLWriter; +use PhpOffice\Common\XMLWriter; use PhpOffice\PhpWord\Style\Table as TableStyle; use PhpOffice\PhpWord\Writer\Word2007\Element\TableAlignment; @@ -60,7 +60,7 @@ public function write() /** * Write full style. * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Style\Table $style * @return void */ @@ -97,7 +97,7 @@ private function writeStyle(XMLWriter $xmlWriter, TableStyle $style) /** * Write width. * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param int $width * @param string $unit * @return void @@ -113,7 +113,7 @@ private function writeWidth(XMLWriter $xmlWriter, $width, $unit) /** * Write margin. * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Style\Table $style * @return void */ @@ -133,7 +133,7 @@ private function writeMargin(XMLWriter $xmlWriter, TableStyle $style) /** * Write border. * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Style\Table $style * @return void */ @@ -154,7 +154,7 @@ private function writeBorder(XMLWriter $xmlWriter, TableStyle $style) /** * Write row style. * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Style\Table $style * @return void */ @@ -174,7 +174,7 @@ private function writeFirstRow(XMLWriter $xmlWriter, TableStyle $style) /** * Write shading. * - * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter + * @param \PhpOffice\Common\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Style\Table $style * @return void */ diff --git a/tests/PhpWord/Shared/StringTest.php b/tests/PhpWord/Shared/StringTest.php deleted file mode 100644 index a12d52f9b9..0000000000 --- a/tests/PhpWord/Shared/StringTest.php +++ /dev/null @@ -1,73 +0,0 @@ -assertTrue(String::isUTF8('')); - $this->assertTrue(String::isUTF8('éééé')); - $this->assertFalse(String::isUTF8(utf8_decode('éééé'))); - } - - /** - * OOXML to PHP control character - */ - public function testControlCharacterOOXML2PHP() - { - $this->assertEquals('', String::controlCharacterOOXML2PHP('')); - $this->assertEquals(chr(0x08), String::controlCharacterOOXML2PHP('_x0008_')); - } - - /** - * PHP to OOXML control character - */ - public function testControlCharacterPHP2OOXML() - { - $this->assertEquals('', String::controlCharacterPHP2OOXML('')); - $this->assertEquals('_x0008_', String::controlCharacterPHP2OOXML(chr(0x08))); - } - - /** - * Test unicode conversion - */ - public function testToUnicode() - { - $this->assertEquals('a', String::toUnicode('a')); - $this->assertEquals('\uc0{\u8364}', String::toUnicode('€')); - $this->assertEquals('\uc0{\u233}', String::toUnicode('é')); - } - - /** - * Test remove underscore prefix - */ - public function testRemoveUnderscorePrefix() - { - $this->assertEquals('item', String::removeUnderscorePrefix('_item')); - } -} diff --git a/tests/PhpWord/Shared/XMLReaderTest.php b/tests/PhpWord/Shared/XMLReaderTest.php deleted file mode 100644 index 5ba2c8a924..0000000000 --- a/tests/PhpWord/Shared/XMLReaderTest.php +++ /dev/null @@ -1,73 +0,0 @@ -getDomFromZip($filename, 'yadayadaya'); - } - - /** - * Test get DOMDocument from ZipArchive returns false - */ - public function testGetDomFromZipReturnsFalse() - { - $filename = __DIR__ . '/../_files/documents/reader.docx.zip'; - $object = new XMLReader(); - $this->assertFalse($object->getDomFromZip($filename, 'yadayadaya')); - } - - /** - * Test get elements returns empty - */ - public function testGetElementsReturnsEmpty() - { - $object = new XMLReader(); - $this->assertEquals(array(), $object->getElements('w:document')); - } - - /** - * Test get element returns null - */ - public function testGetElementReturnsNull() - { - $filename = __DIR__ . '/../_files/documents/reader.docx.zip'; - - $object = new XMLReader(); - $object->getDomFromZip($filename, '[Content_Types].xml'); - $element = $object->getElements('*')->item(0); - - $this->assertNull($object->getElement('yadayadaya', $element)); - } -} diff --git a/tests/PhpWord/Shared/XMLWriterTest.php b/tests/PhpWord/Shared/XMLWriterTest.php deleted file mode 100644 index fbb1cc45f1..0000000000 --- a/tests/PhpWord/Shared/XMLWriterTest.php +++ /dev/null @@ -1,39 +0,0 @@ -foo(); - } -} diff --git a/tests/PhpWord/Writer/ODText/ElementTest.php b/tests/PhpWord/Writer/ODText/ElementTest.php index 135b92cb95..24acf5fb27 100644 --- a/tests/PhpWord/Writer/ODText/ElementTest.php +++ b/tests/PhpWord/Writer/ODText/ElementTest.php @@ -16,7 +16,7 @@ */ namespace PhpOffice\PhpWord\Writer\ODText; -use PhpOffice\PhpWord\Shared\XMLWriter; +use PhpOffice\Common\XMLWriter; /** * Test class for PhpOffice\PhpWord\Writer\ODText\Element subnamespace diff --git a/tests/PhpWord/Writer/ODText/StyleTest.php b/tests/PhpWord/Writer/ODText/StyleTest.php index 95e6059f07..aa921a47a4 100644 --- a/tests/PhpWord/Writer/ODText/StyleTest.php +++ b/tests/PhpWord/Writer/ODText/StyleTest.php @@ -16,7 +16,7 @@ */ namespace PhpOffice\PhpWord\Writer\ODText; -use PhpOffice\PhpWord\Shared\XMLWriter; +use PhpOffice\Common\XMLWriter; /** * Test class for PhpOffice\PhpWord\Writer\ODText\Style subnamespace diff --git a/tests/PhpWord/Writer/PDF/TCPDFTest.php b/tests/PhpWord/Writer/PDF/TCPDFTest.php index c10e2e16f4..3f2bf766e6 100644 --- a/tests/PhpWord/Writer/PDF/TCPDFTest.php +++ b/tests/PhpWord/Writer/PDF/TCPDFTest.php @@ -39,7 +39,7 @@ public function testConstruct() $section->addText(htmlspecialchars('Test 1', ENT_COMPAT, 'UTF-8')); $rendererName = Settings::PDF_RENDERER_TCPDF; - $rendererLibraryPath = realpath(PHPWORD_TESTS_BASE_DIR . '/../vendor/tecnick.com/tcpdf'); + $rendererLibraryPath = realpath(PHPWORD_TESTS_BASE_DIR . '/../vendor/tecnickcom/tcpdf'); Settings::setPdfRenderer($rendererName, $rendererLibraryPath); $writer = new PDF($phpWord); $writer->save($file); diff --git a/tests/PhpWord/Writer/Word2007/ElementTest.php b/tests/PhpWord/Writer/Word2007/ElementTest.php index eb8db0e384..789d00f2f5 100644 --- a/tests/PhpWord/Writer/Word2007/ElementTest.php +++ b/tests/PhpWord/Writer/Word2007/ElementTest.php @@ -16,8 +16,8 @@ */ namespace PhpOffice\PhpWord\Writer\Word2007; +use PhpOffice\Common\XMLWriter; use PhpOffice\PhpWord\PhpWord; -use PhpOffice\PhpWord\Shared\XMLWriter; use PhpOffice\PhpWord\TestHelperDOCX; /** diff --git a/tests/PhpWord/Writer/Word2007/StyleTest.php b/tests/PhpWord/Writer/Word2007/StyleTest.php index ecb8895b01..5719558c3f 100644 --- a/tests/PhpWord/Writer/Word2007/StyleTest.php +++ b/tests/PhpWord/Writer/Word2007/StyleTest.php @@ -16,7 +16,7 @@ */ namespace PhpOffice\PhpWord\Writer\Word2007; -use PhpOffice\PhpWord\Shared\XMLWriter; +use PhpOffice\Common\XMLWriter; /** * Test class for PhpOffice\PhpWord\Writer\Word2007\Style subnamespace From 3981e014892e556dbb0b7235976baa9e250da6d9 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 23 Jan 2016 19:25:59 +0400 Subject: [PATCH 69/99] Add PHP 7.0 into the build script. --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index c39a05c460..0712f73461 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,10 +5,12 @@ php: - 5.4 - 5.5 - 5.6 + - 7.0 - hhvm matrix: allow_failures: + - php: 7.0 - php: hhvm env: From ea4388def5318ee3f9cc333043a0cf13daf76d6c Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 23 Jan 2016 21:06:09 +0400 Subject: [PATCH 70/99] Improved coverage for `\PhpOffice\PhpWord\Element\Section` (#665). --- src/PhpWord/Element/Section.php | 16 ++++++++++------ tests/PhpWord/Element/SectionTest.php | 8 ++++---- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/PhpWord/Element/Section.php b/src/PhpWord/Element/Section.php index f8db87d703..9713018674 100644 --- a/src/PhpWord/Element/Section.php +++ b/src/PhpWord/Element/Section.php @@ -17,12 +17,8 @@ namespace PhpOffice\PhpWord\Element; -use PhpOffice\PhpWord\Exception\Exception; use PhpOffice\PhpWord\Style\Section as SectionStyle; -/** - * Section - */ class Section extends AbstractContainer { /** @@ -91,8 +87,12 @@ public function getStyle() /** * Add header * + * @since 0.10.0 + * * @param string $type + * * @return Header + * * @since 0.10.0 */ public function addHeader($type = Header::AUTO) @@ -103,8 +103,12 @@ public function addHeader($type = Header::AUTO) /** * Add footer * + * @since 0.10.0 + * * @param string $type + * * @return Footer + * * @since 0.10.0 */ public function addFooter($type = Header::AUTO) @@ -160,7 +164,7 @@ public function hasDifferentFirstPage() * * @return Header|Footer * - * @throws \PhpOffice\PhpWord\Exception\Exception + * @throws \Exception */ private function addHeaderFooter($type = Header::AUTO, $header = true) { @@ -178,7 +182,7 @@ private function addHeaderFooter($type = Header::AUTO, $header = true) $collection[$index] = $container; return $container; } else { - throw new Exception('Invalid header/footer type.'); + throw new \Exception('Invalid header/footer type.'); } } diff --git a/tests/PhpWord/Element/SectionTest.php b/tests/PhpWord/Element/SectionTest.php index 9893157857..dce6c1ebac 100644 --- a/tests/PhpWord/Element/SectionTest.php +++ b/tests/PhpWord/Element/SectionTest.php @@ -150,15 +150,15 @@ public function testAddTitleWithStyle() } /** - * Create header footer + * Add header footer */ - public function testCreateHeaderFooter() + public function testAddHeaderFooter() { $object = new Section(0); $elements = array('Header', 'Footer'); foreach ($elements as $element) { - $method = "create{$element}"; + $method = "add{$element}"; $this->assertInstanceOf("PhpOffice\\PhpWord\\Element\\{$element}", $object->$method()); } $this->assertFalse($object->hasDifferentFirstPage()); @@ -179,7 +179,7 @@ public function testHasDifferentFirstPage() * Add header exception * * @expectedException Exception - * @expectedExceptionMesssage Invalid header/footer type. + * @expectedExceptionMessage Invalid header/footer type. */ public function testAddHeaderException() { From a621447993d8ff46e43f81d4e1548649ccb600bb Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 23 Jan 2016 21:35:04 +0400 Subject: [PATCH 71/99] Improved coverage for `\PhpOffice\PhpWord\Element\Section` (#665). --- src/PhpWord/Element/AbstractContainer.php | 2 + src/PhpWord/Element/Section.php | 10 ++-- tests/PhpWord/Element/SectionTest.php | 63 +++++------------------ tests/PhpWord/TemplateProcessorTest.php | 2 +- 4 files changed, 23 insertions(+), 54 deletions(-) diff --git a/src/PhpWord/Element/AbstractContainer.php b/src/PhpWord/Element/AbstractContainer.php index c24cdd63f1..d211ae07b7 100644 --- a/src/PhpWord/Element/AbstractContainer.php +++ b/src/PhpWord/Element/AbstractContainer.php @@ -158,6 +158,8 @@ protected function addElement($elementName) * Get all elements * * @return array + * + * @codeCoverageIgnore */ public function getElements() { diff --git a/src/PhpWord/Element/Section.php b/src/PhpWord/Element/Section.php index 9713018674..6bf58c6f73 100644 --- a/src/PhpWord/Element/Section.php +++ b/src/PhpWord/Element/Section.php @@ -78,6 +78,8 @@ public function setStyle($style = null) * Get section style * * @return \PhpOffice\PhpWord\Style\Section + * + * @codeCoverageIgnore */ public function getStyle() { @@ -92,8 +94,6 @@ public function getStyle() * @param string $type * * @return Header - * - * @since 0.10.0 */ public function addHeader($type = Header::AUTO) { @@ -108,8 +108,6 @@ public function addHeader($type = Header::AUTO) * @param string $type * * @return Footer - * - * @since 0.10.0 */ public function addFooter($type = Header::AUTO) { @@ -120,6 +118,8 @@ public function addFooter($type = Header::AUTO) * Get header elements * * @return Header[] + * + * @codeCoverageIgnore */ public function getHeaders() { @@ -130,6 +130,8 @@ public function getHeaders() * Get footer elements * * @return Footer[] + * + * @codeCoverageIgnore */ public function getFooters() { diff --git a/tests/PhpWord/Element/SectionTest.php b/tests/PhpWord/Element/SectionTest.php index dce6c1ebac..b09c0b78ee 100644 --- a/tests/PhpWord/Element/SectionTest.php +++ b/tests/PhpWord/Element/SectionTest.php @@ -17,55 +17,18 @@ namespace PhpOffice\PhpWord\Element; -use PhpOffice\PhpWord\Exception\Exception; use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\Style; /** - * Test class for PhpOffice\PhpWord\Element\Section - * + * @covers \PhpOffice\PhpWord\Element\Section + * @coversDefaultClass \PhpOffice\PhpWord\Element\Section * @runTestsInSeparateProcesses */ class SectionTest extends \PHPUnit_Framework_TestCase { /** - * Get style - */ - public function testGetStyle() - { - $oSection = new Section(0); - $this->assertAttributeEquals($oSection->getStyle(), 'style', $oSection); - } - - /** - * Get elements - */ - public function testGetElements() - { - $oSection = new Section(0); - $this->assertAttributeEquals($oSection->getElements(), 'elements', $oSection); - } - - /** - * Get footer - */ - public function testGetFooters() - { - $oSection = new Section(0); - $this->assertAttributeEquals($oSection->getFooters(), 'footers', $oSection); - } - - /** - * Get headers - */ - public function testGetHeaders() - { - $oSection = new Section(0); - $this->assertAttributeEquals($oSection->getHeaders(), 'headers', $oSection); - } - - /** - * Set settings + * @covers ::setStyle */ public function testSetStyle() { @@ -76,13 +39,12 @@ public function testSetStyle() } /** - * Add elements + * @coversNothing */ public function testAddElements() { $objectSource = __DIR__ . '/../_files/documents/reader.docx'; $imageSource = __DIR__ . '/../_files/images/PhpWord.png'; - // $imageUrl = 'http://php.net//images/logos/php-med-trans-light.gif'; $section = new Section(0); $section->setPhpWord(new PhpWord()); @@ -124,8 +86,7 @@ public function testAddElements() } /** - * Test add object exception - * + * @coversNothing * @expectedException \PhpOffice\PhpWord\Exception\InvalidObjectException */ public function testAddObjectException() @@ -137,6 +98,8 @@ public function testAddObjectException() /** * Add title with predefined style + * + * @coversNothing */ public function testAddTitleWithStyle() { @@ -150,7 +113,9 @@ public function testAddTitleWithStyle() } /** - * Add header footer + * @covers ::addHeader + * @covers ::addFooter + * @covers ::hasDifferentFirstPage */ public function testAddHeaderFooter() { @@ -165,7 +130,8 @@ public function testAddHeaderFooter() } /** - * Add header has different first page + * @covers ::addHeader + * @covers ::hasDifferentFirstPage */ public function testHasDifferentFirstPage() { @@ -176,9 +142,8 @@ public function testHasDifferentFirstPage() } /** - * Add header exception - * - * @expectedException Exception + * @covers ::addHeader + * @expectedException \Exception * @expectedExceptionMessage Invalid header/footer type. */ public function testAddHeaderException() diff --git a/tests/PhpWord/TemplateProcessorTest.php b/tests/PhpWord/TemplateProcessorTest.php index 61c9da8ee2..9a475017ef 100644 --- a/tests/PhpWord/TemplateProcessorTest.php +++ b/tests/PhpWord/TemplateProcessorTest.php @@ -142,7 +142,7 @@ final public function testXslStyleSheetCanNotBeAppliedOnFailureOfLoadingXmlFromT } /** - * @civers ::setValue + * @covers ::setValue * @covers ::cloneRow * @covers ::saveAs * @test From 8bc236460af3f1d84f2e242f1bc517f651d8e40d Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 23 Jan 2016 22:10:13 +0400 Subject: [PATCH 72/99] Improved coverage for `\PhpOffice\PhpWord\Element\Section` (#665). --- src/PhpWord/Element/Footnote.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/PhpWord/Element/Footnote.php b/src/PhpWord/Element/Footnote.php index 917b6cc901..c378c1027b 100644 --- a/src/PhpWord/Element/Footnote.php +++ b/src/PhpWord/Element/Footnote.php @@ -58,6 +58,8 @@ public function __construct($paragraphStyle = null) * Get paragraph style * * @return string|\PhpOffice\PhpWord\Style\Paragraph + * + * @codeCoverageIgnore */ public function getParagraphStyle() { From 995dc6870698b62c67ca7a3f1472d5dda4625bdd Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 23 Jan 2016 22:19:06 +0400 Subject: [PATCH 73/99] Improved coverage for `\PhpOffice\PhpWord\Element\Section` (#665). --- src/PhpWord/Element/Footnote.php | 8 +------- tests/PhpWord/Writer/Word2007/Part/FootnotesTest.php | 9 +-------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/src/PhpWord/Element/Footnote.php b/src/PhpWord/Element/Footnote.php index c378c1027b..ea467c5f6a 100644 --- a/src/PhpWord/Element/Footnote.php +++ b/src/PhpWord/Element/Footnote.php @@ -20,7 +20,7 @@ use PhpOffice\PhpWord\Style\Paragraph; /** - * Footnote element + * @codeCoverageIgnore */ class Footnote extends AbstractContainer { @@ -58,8 +58,6 @@ public function __construct($paragraphStyle = null) * Get paragraph style * * @return string|\PhpOffice\PhpWord\Style\Paragraph - * - * @codeCoverageIgnore */ public function getParagraphStyle() { @@ -72,8 +70,6 @@ public function getParagraphStyle() * @deprecated 0.10.0 * * @return int - * - * @codeCoverageIgnore */ public function getReferenceId() { @@ -86,8 +82,6 @@ public function getReferenceId() * @deprecated 0.10.0 * * @param int $rId - * - * @codeCoverageIgnore */ public function setReferenceId($rId) { diff --git a/tests/PhpWord/Writer/Word2007/Part/FootnotesTest.php b/tests/PhpWord/Writer/Word2007/Part/FootnotesTest.php index b817e5194f..c89311cfb0 100644 --- a/tests/PhpWord/Writer/Word2007/Part/FootnotesTest.php +++ b/tests/PhpWord/Writer/Word2007/Part/FootnotesTest.php @@ -21,23 +21,16 @@ use PhpOffice\PhpWord\TestHelperDOCX; /** - * Test class for PhpOffice\PhpWord\Writer\Word2007\Part\Notes - * + * @coversNothing * @runTestsInSeparateProcesses */ class FootnotesTest extends \PHPUnit_Framework_TestCase { - /** - * Executed before each method of the class - */ public function tearDown() { TestHelperDOCX::clear(); } - /** - * Write footnotes - */ public function testWriteFootnotes() { $phpWord = new PhpWord(); From 53a53695ff3798949f63c1b33d84bef1e51ba339 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 6 Feb 2016 22:14:29 +0400 Subject: [PATCH 74/99] Reviewed and merged #612. --- CHANGELOG.md | 3 +++ src/PhpWord/Reader/MsDoc.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b7d6dc2e74..03e3fe6094 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,9 @@ so installation via ZIP-archive download is not an option anymore. To install PH - `\PhpOffice\PhpWord\Shared\XMLReader` replaced by `\PhpOffice\Common\XMLReader`. - @Progi1984 #658 - `\PhpOffice\PhpWord\Shared\XMLWriter` replaced by `\PhpOffice\Common\XMLWriter`. - @Progi1984 @RomanSyroeshko #658 +### Fixed +- `Undefined property` error while reading MS-DOC documents. - @jaberu #503 #612 + 0.12.1 (30 August 2015) diff --git a/src/PhpWord/Reader/MsDoc.php b/src/PhpWord/Reader/MsDoc.php index 3c7c7b955e..00659aeaf8 100644 --- a/src/PhpWord/Reader/MsDoc.php +++ b/src/PhpWord/Reader/MsDoc.php @@ -149,7 +149,7 @@ private function loadOLE($filename) // Get Summary Information data $this->_SummaryInformation = $ole->getStream($ole->summaryInformation); // Get Document Summary Information data - $this->_DocumentSummaryInformation = $ole->getStream($ole->documentSummaryInformation); + $this->_DocumentSummaryInformation = $ole->getStream($ole->docSummaryInfos); } private function getNumInLcb($lcb, $iSize) From 16495a0a0d527cc6c9bb16f276a50f17b4802f07 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 6 Feb 2016 22:48:37 +0400 Subject: [PATCH 75/99] Reviewed and merged #612. --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 03e3fe6094..6bc157f2aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,7 +38,7 @@ so installation via ZIP-archive download is not an option anymore. To install PH - `\PhpOffice\PhpWord\Shared\XMLWriter` replaced by `\PhpOffice\Common\XMLWriter`. - @Progi1984 @RomanSyroeshko #658 ### Fixed -- `Undefined property` error while reading MS-DOC documents. - @jaberu #503 #612 +- `Undefined property` error while reading MS-DOC documents. - @jaberu #610 From 28f801b5d063995e4251ee9b02704b0f9013d56a Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Tue, 23 Feb 2016 19:02:35 +0400 Subject: [PATCH 76/99] #704. --- docs/styles.rst | 9 ++++++--- src/PhpWord/SimpleType/Jc.php | 20 +++++++++++++++++--- src/PhpWord/SimpleType/JcTable.php | 17 +++-------------- src/PhpWord/Style/Frame.php | 19 +------------------ src/PhpWord/Style/NumberingLevel.php | 19 +------------------ src/PhpWord/Style/Paragraph.php | 19 +------------------ src/PhpWord/Style/Table.php | 22 +++------------------- 7 files changed, 32 insertions(+), 93 deletions(-) diff --git a/docs/styles.rst b/docs/styles.rst index a0e9c7ff0e..2b5fcbc5d0 100644 --- a/docs/styles.rst +++ b/docs/styles.rst @@ -63,7 +63,8 @@ Paragraph Available Paragraph style options: -- ``alignment``. Supports all alignment modes provided by third edition of ISO/IEC 29500 standard. See ``\PhpOffice\PhpWord\SimpleType\Jc`` class for the details. +- ``alignment``. Supports all alignment modes since 1st Edition of ECMA-376 standard up till ISO/IEC 29500:2012. +See ``\PhpOffice\PhpWord\SimpleType\Jc`` class for the details. - ``basedOn``. Parent style. - ``hanging``. Hanging by how much. - ``indent``. Indent by how much. @@ -84,7 +85,8 @@ Table Available Table style options: -- ``alignment``. Supports all alignment modes provided by third edition of ISO/IEC 29500 standard. See ``\PhpOffice\PhpWord\SimpleType\JcTable`` class for the details. +- ``alignment``. Supports all alignment modes since 1st Edition of ECMA-376 standard up till ISO/IEC 29500:2012. +See ``\PhpOffice\PhpWord\SimpleType\JcTable`` and ``\PhpOffice\PhpWord\SimpleType\Jc`` classes for the details. - ``bgColor``. Background color, e.g. '9966CC'. - ``border(Top|Right|Bottom|Left)Color``. Border color, e.g. '9966CC'. - ``border(Top|Right|Bottom|Left)Size``. Border size in twips. @@ -129,7 +131,8 @@ Numbering level Available NumberingLevel style options: -- ``alignment``. Supports all alignment modes provided by third edition of ISO/IEC 29500 standard. See ``\PhpOffice\PhpWord\SimpleType\Jc`` class for the details. +- ``alignment``. Supports all alignment modes since 1st Edition of ECMA-376 standard up till ISO/IEC 29500:2012. +See ``\PhpOffice\PhpWord\SimpleType\Jc`` class for the details. - ``font``. Font name. - ``format``. Numbering format bullet\|decimal\|upperRoman\|lowerRoman\|upperLetter\|lowerLetter. - ``hanging``. See paragraph style. diff --git a/src/PhpWord/SimpleType/Jc.php b/src/PhpWord/SimpleType/Jc.php index 5cbf47522f..ede2f2fc23 100644 --- a/src/PhpWord/SimpleType/Jc.php +++ b/src/PhpWord/SimpleType/Jc.php @@ -22,8 +22,13 @@ /** * Horizontal Alignment Type. * + * Introduced in 1st Edition of ECMA-376. Initially it was intended to align paragraphs and tables. + * Since ISO/IEC-29500:2008 the type must not be used for table alignment. + * * @since 0.13.0 * + * @see \PhpOffice\PhpWord\SimpleType\JcTable For table alignment modes available since ISO/IEC-29500:2008. + * * @codeCoverageIgnore */ final class Jc @@ -40,15 +45,24 @@ final class Jc const THAI_DISTRIBUTE = 'thaiDistribute'; /** - * @deprecated 0.13.0 Use `START` instead. + * Kept for compatibility with 1st edition of ECMA-376 standard. + * Microsoft Word 2007 and WPS Writer 2016 still rely on it. + * + * @deprecated 0.13.0 For documents based on ISO/IEC 29500:2008 and later use `START` instead. */ const LEFT = 'left'; /** - * @deprecated 0.13.0 Use `END` instead. + * Kept for compatibility with 1st edition of ECMA-376 standard. + * Microsoft Word 2007 and WPS Writer 2016 still rely on it. + * + * @deprecated 0.13.0 For documents based on ISO/IEC 29500:2008 and later use `END` instead. */ const RIGHT = 'right'; /** - * @deprecated 0.13.0 Use `BOTH` instead. + * Kept for compatibility with 1st edition of ECMA-376 standard. + * Microsoft Word 2007 and WPS Writer 2016 still rely on it. + * + * @deprecated 0.13.0 For documents based on ISO/IEC 29500:2008 and later use `BOTH` instead. */ const JUSTIFY = 'justify'; diff --git a/src/PhpWord/SimpleType/JcTable.php b/src/PhpWord/SimpleType/JcTable.php index d93e56f193..38e72cc3de 100644 --- a/src/PhpWord/SimpleType/JcTable.php +++ b/src/PhpWord/SimpleType/JcTable.php @@ -22,6 +22,8 @@ /** * Table Alignment Type. * + * Introduced in ISO/IEC-29500:2008. + * * @since 0.13.0 * * @codeCoverageIgnore @@ -32,19 +34,6 @@ final class JcTable const CENTER = 'center'; const END = 'end'; - /** - * @deprecated 0.13.0 Use `START` instead. - */ - const LEFT = 'left'; - /** - * @deprecated 0.13.0 Use `END` instead. - */ - const RIGHT = 'right'; - /** - * @deprecated 0.13.0 Use `CENTER` instead. - */ - const JUSTIFY = 'justify'; - /** * @since 0.13.0 * @@ -55,7 +44,7 @@ final public static function getValidator() // todo: consider caching validator instances. return new InArray( array ( - 'haystack' => array(self::START, self::CENTER, self::END, self::LEFT, self::RIGHT, self::JUSTIFY), + 'haystack' => array(self::START, self::CENTER, self::END), 'strict' => InArray::COMPARE_STRICT, ) ); diff --git a/src/PhpWord/Style/Frame.php b/src/PhpWord/Style/Frame.php index ded4950a36..d6ba9d0cc4 100644 --- a/src/PhpWord/Style/Frame.php +++ b/src/PhpWord/Style/Frame.php @@ -201,24 +201,7 @@ public function getAlignment() public function setAlignment($value) { if (Jc::getValidator()->isValid($value)) { - $alignment = ''; - - switch ($value) { - case Jc::LEFT: - $alignment = Jc::START; - break; - case Jc::RIGHT: - $alignment = Jc::END; - break; - case Jc::JUSTIFY: - $alignment = Jc::BOTH; - break; - default: - $alignment = $value; - break; - } - - $this->alignment = $alignment; + $this->alignment = $value; } return $this; diff --git a/src/PhpWord/Style/NumberingLevel.php b/src/PhpWord/Style/NumberingLevel.php index bffac472c0..2ed8e4ec6a 100644 --- a/src/PhpWord/Style/NumberingLevel.php +++ b/src/PhpWord/Style/NumberingLevel.php @@ -299,24 +299,7 @@ public function getAlignment() public function setAlignment($value) { if (Jc::getValidator()->isValid($value)) { - $alignment = ''; - - switch ($value) { - case Jc::LEFT: - $alignment = Jc::START; - break; - case Jc::RIGHT: - $alignment = Jc::END; - break; - case Jc::JUSTIFY: - $alignment = Jc::BOTH; - break; - default: - $alignment = $value; - break; - } - - $this->alignment = $alignment; + $this->alignment = $value; } return $this; diff --git a/src/PhpWord/Style/Paragraph.php b/src/PhpWord/Style/Paragraph.php index 10e94a2ab8..50f9607c9e 100644 --- a/src/PhpWord/Style/Paragraph.php +++ b/src/PhpWord/Style/Paragraph.php @@ -233,24 +233,7 @@ public function getAlignment() public function setAlignment($value) { if (Jc::getValidator()->isValid($value)) { - $alignment = ''; - - switch ($value) { - case Jc::LEFT: - $alignment = Jc::START; - break; - case Jc::RIGHT: - $alignment = Jc::END; - break; - case Jc::JUSTIFY: - $alignment = Jc::BOTH; - break; - default: - $alignment = $value; - break; - } - - $this->alignment = $alignment; + $this->alignment = $value; } return $this; diff --git a/src/PhpWord/Style/Table.php b/src/PhpWord/Style/Table.php index 846dd0b0e3..bbbd670882 100644 --- a/src/PhpWord/Style/Table.php +++ b/src/PhpWord/Style/Table.php @@ -17,6 +17,7 @@ namespace PhpOffice\PhpWord\Style; +use PhpOffice\PhpWord\SimpleType\Jc; use PhpOffice\PhpWord\SimpleType\JcTable; class Table extends Border @@ -509,25 +510,8 @@ public function getAlignment() */ public function setAlignment($value) { - if (JcTable::getValidator()->isValid($value)) { - $alignment = ''; - - switch ($value) { - case JcTable::LEFT: - $alignment = JcTable::START; - break; - case JcTable::RIGHT: - $alignment = JcTable::END; - break; - case JcTable::JUSTIFY: - $alignment = JcTable::CENTER; - break; - default: - $alignment = $value; - break; - } - - $this->alignment = $alignment; + if (JcTable::getValidator()->isValid($value) || Jc::getValidator()->isValid($value)) { + $this->alignment = $value; } return $this; From 1c5bb3a91154008ecedec1830f96d7be35ef04ac Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 9 Apr 2016 22:03:21 +0400 Subject: [PATCH 77/99] #548. --- CHANGELOG.md | 2 ++ src/PhpWord/TemplateProcessor.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6bc157f2aa..8993a81812 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,8 @@ so installation via ZIP-archive download is not an option anymore. To install PH ### Fixed - `Undefined property` error while reading MS-DOC documents. - @jaberu #610 +- Corrupted OOXML template issue in case when its macro is broken immediately after `$` sign. +That case wasn't taken into account in implementation of `TemplateProcessor::fixBrokenMacros()`. - @RomanSyroeshko @d-damien #548 diff --git a/src/PhpWord/TemplateProcessor.php b/src/PhpWord/TemplateProcessor.php index 49fbf70567..20e81cd423 100644 --- a/src/PhpWord/TemplateProcessor.php +++ b/src/PhpWord/TemplateProcessor.php @@ -385,7 +385,7 @@ protected function fixBrokenMacros($documentPart) $fixedDocumentPart = $documentPart; $fixedDocumentPart = preg_replace_callback( - '|\$\{([^\}]+)\}|U', + '|\$[^{]*\{[^}]*\}|U', function ($match) { return strip_tags($match[0]); }, From d57973693d67a4a576b29bb0ac8532428620e9b9 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 23 Apr 2016 19:49:10 +0400 Subject: [PATCH 78/99] #618. --- CHANGELOG.md | 3 +- composer.json | 4 +- docs/templates-processing.rst | 6 +-- src/PhpWord/Escaper/EscaperInterface.php | 31 +++++++++++ src/PhpWord/Escaper/RegExp.php | 49 +++++++++++++++++ src/PhpWord/TemplateProcessor.php | 67 +++++++++++++++++------- tests/PhpWord/TemplateProcessorTest.php | 14 ++--- 7 files changed, 143 insertions(+), 31 deletions(-) create mode 100644 src/PhpWord/Escaper/EscaperInterface.php create mode 100644 src/PhpWord/Escaper/RegExp.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 8993a81812..ebf9818464 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ Place announcement text here. - Introduced the `\PhpOffice\PhpWord\SimpleType\JcTable` simple type. - @RomanSyroeshko - Introduced writer for the "Paragraph Alignment" element (see `\PhpOffice\PhpWord\Writer\Word2007\Element\ParagraphAlignment`). - @RomanSyroeshko - Introduced writer for the "Table Alignment" element (see `\PhpOffice\PhpWord\Writer\Word2007\Element\TableAlignment`). - @RomanSyroeshko +- Supported indexed arrays in arguments of `TemplateProcessor::setValue()`. - @RomanSyroeshko #618 ### Changed - Improved error message for the case when `autoload.php` is not found. - @RomanSyroeshko #371 @@ -39,7 +40,7 @@ so installation via ZIP-archive download is not an option anymore. To install PH ### Fixed - `Undefined property` error while reading MS-DOC documents. - @jaberu #610 -- Corrupted OOXML template issue in case when its macro is broken immediately after `$` sign. +- Corrupted OOXML template issue in case when its names is broken immediately after `$` sign. That case wasn't taken into account in implementation of `TemplateProcessor::fixBrokenMacros()`. - @RomanSyroeshko @d-damien #548 diff --git a/composer.json b/composer.json index 83d437402a..48d39adadf 100644 --- a/composer.json +++ b/composer.json @@ -34,8 +34,8 @@ "require": { "php": ">=5.3.3", "ext-xml": "*", - "zendframework/zend-validator": "2.5.*", "zendframework/zend-stdlib": "~2.5", + "zendframework/zend-validator": "2.5.*", "phpoffice/common": "0.2.*" }, "require-dev": { @@ -47,8 +47,8 @@ "dompdf/dompdf":"0.6.*", "tecnickcom/tcpdf": "6.*", "mpdf/mpdf": "5.*", - "zendframework/zend-validator": "2.5.*", "zendframework/zend-stdlib": "~2.5", + "zendframework/zend-validator": "2.5.*", "phpoffice/common": "0.2.*" }, "suggest": { diff --git a/docs/templates-processing.rst b/docs/templates-processing.rst index 6a65ea0d57..1c0b8b03e4 100644 --- a/docs/templates-processing.rst +++ b/docs/templates-processing.rst @@ -3,7 +3,7 @@ Templates processing ==================== -You can create a .docx document template with included search-patterns which can be replaced by any value you wish. Only single-line values can be replaced. +You can create an OOXML document template with included search-patterns (macros) which can be replaced by any value you wish. Only single-line values can be replaced. To deal with a template file, use ``new TemplateProcessor`` statement. After TemplateProcessor instance creation the document template is copied into the temporary directory. Then you can use ``TemplateProcessor::setValue`` method to change the value of a search pattern. The search-pattern model is: ``${search-pattern}``. @@ -12,8 +12,8 @@ Example: .. code-block:: php $templateProcessor = new TemplateProcessor('Template.docx'); - $templateProcessor->setValue('Name', 'Somebody someone'); - $templateProcessor->setValue('Street', 'Coming-Undone-Street 32'); + $templateProcessor->setValue('Name', 'John Doe'); + $templateProcessor->setValue(array('City', 'Street'), array('Detroit', '12th Street')); It is not possible to directly add new OOXML elements to the template file being processed, but it is possible to transform main document part of the template using XSLT (see ``TemplateProcessor::applyXslStyleSheet``). diff --git a/src/PhpWord/Escaper/EscaperInterface.php b/src/PhpWord/Escaper/EscaperInterface.php new file mode 100644 index 0000000000..2d86050066 --- /dev/null +++ b/src/PhpWord/Escaper/EscaperInterface.php @@ -0,0 +1,31 @@ +tempDocumentHeaders as $index => $headerXML) { - $this->tempDocumentHeaders[$index] = $this->setValueForPart($this->tempDocumentHeaders[$index], $macro, $replace, $limit); + /** + * @param string $subject + * + * @return string + */ + protected static function ensureUtf8Encoded($subject) + { + if (!StringUtils::isValidUtf8($subject)) { + $subject = utf8_encode($subject); } - $this->tempDocumentMainPart = $this->setValueForPart($this->tempDocumentMainPart, $macro, $replace, $limit); + return $subject; + } - foreach ($this->tempDocumentFooters as $index => $headerXML) { - $this->tempDocumentFooters[$index] = $this->setValueForPart($this->tempDocumentFooters[$index], $macro, $replace, $limit); + /** + * @param mixed $search + * @param mixed $replace + * @param integer $limit + * + * @return void + */ + public function setValue($search, $replace, $limit = self::MAXIMUM_REPLACEMENTS_DEFAULT) + { + if (is_array($search)) { + foreach ($search as &$item) { + $item = self::ensureMacroCompleted($item); + } + } else { + $search = self::ensureMacroCompleted($search); } + + if (is_array($replace)) { + foreach ($replace as &$item) { + $item = self::ensureUtf8Encoded($item); + } + } else { + $replace = self::ensureUtf8Encoded($replace); + } + + $this->tempDocumentHeaders = $this->setValueForPart($search, $replace, $this->tempDocumentHeaders, $limit); + $this->tempDocumentMainPart = $this->setValueForPart($search, $replace, $this->tempDocumentMainPart, $limit); + $this->tempDocumentFooters = $this->setValueForPart($search, $replace, $this->tempDocumentFooters, $limit); } /** @@ -398,22 +429,20 @@ function ($match) { /** * Find and replace macros in the given XML section. * + * @param mixed $search + * @param mixed $replace * @param string $documentPartXML - * @param string $search - * @param string $replace * @param integer $limit * * @return string */ - protected function setValueForPart($documentPartXML, $search, $replace, $limit) + protected function setValueForPart($search, $replace, $documentPartXML, $limit) { // Note: we can't use the same function for both cases here, because of performance considerations. if (self::MAXIMUM_REPLACEMENTS_DEFAULT === $limit) { return str_replace($search, $replace, $documentPartXML); } else { - $regExpDelim = '/'; - $escapedSearch = preg_quote($search, $regExpDelim); - return preg_replace("{$regExpDelim}{$escapedSearch}{$regExpDelim}u", $replace, $documentPartXML, $limit); + return preg_replace(RegExp::escape($search), $replace, $documentPartXML, $limit); } } diff --git a/tests/PhpWord/TemplateProcessorTest.php b/tests/PhpWord/TemplateProcessorTest.php index 9a475017ef..82c1b75472 100644 --- a/tests/PhpWord/TemplateProcessorTest.php +++ b/tests/PhpWord/TemplateProcessorTest.php @@ -175,15 +175,17 @@ public function testMacrosCanBeReplacedInHeaderAndFooter() { $templateProcessor = new TemplateProcessor(__DIR__ . '/_files/templates/header-footer.docx'); - $this->assertEquals( - array('documentContent', 'headerValue', 'footerValue'), - $templateProcessor->getVariables() + $this->assertEquals(array('documentContent', 'headerValue', 'footerValue'), $templateProcessor->getVariables()); + + $macroNames = array('headerValue', 'documentContent', 'footerValue'); + $macroValues = array( + htmlspecialchars('Header Value', ENT_COMPAT, 'UTF-8'), + htmlspecialchars('Document text.', ENT_COMPAT, 'UTF-8'), + htmlspecialchars('Footer Value', ENT_COMPAT, 'UTF-8') ); + $templateProcessor->setValue($macroNames, $macroValues); $docName = 'header-footer-test-result.docx'; - $templateProcessor->setValue('headerValue', htmlspecialchars('Header Value', ENT_COMPAT, 'UTF-8')); - $templateProcessor->setValue('documentContent', htmlspecialchars('Document text.', ENT_COMPAT, 'UTF-8')); - $templateProcessor->setValue('footerValue', htmlspecialchars('Footer Value', ENT_COMPAT, 'UTF-8')); $templateProcessor->saveAs($docName); $docFound = file_exists($docName); unlink($docName); From 40984dcc88d6bc47442304de88baf89f6e267f04 Mon Sep 17 00:00:00 2001 From: Evgeniy Tkachenko Date: Tue, 24 May 2016 08:57:24 +0300 Subject: [PATCH 79/99] Update DOC: Add note about direction of text inside cell --- docs/styles.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/styles.rst b/docs/styles.rst index 2b5fcbc5d0..b71059a69a 100644 --- a/docs/styles.rst +++ b/docs/styles.rst @@ -105,7 +105,7 @@ Available Cell style options: - ``border(Top|Right|Bottom|Left)Color``. Border color, e.g. '9966CC'. - ``border(Top|Right|Bottom|Left)Size``. Border size in twips. - ``gridSpan``. Number of columns spanned. -- ``textDirection``. Direction of text. +- ``textDirection(btLr|tbRl)``. Direction of text. You can use constants ``\PhpOffice\PhpWord\Style\Cell::TEXT_DIR_BTLR`` and ``\PhpOffice\PhpWord\Style\Cell::TEXT_DIR_TBRL`` - ``valign``. Vertical alignment, *top*, *center*, *both*, *bottom*. - ``vMerge``. *restart* or *continue*. - ``width``. Cell width in twips. @@ -142,4 +142,4 @@ See ``\PhpOffice\PhpWord\SimpleType\Jc`` class for the details. - ``start``. Starting value. - ``suffix``. Content between numbering symbol and paragraph text tab\|space\|nothing. - ``tabPos``. See paragraph style. -- ``text``. Numbering level text e.g. %1 for nonbullet or bullet character. \ No newline at end of file +- ``text``. Numbering level text e.g. %1 for nonbullet or bullet character. From d9627e19fdd2ef7a26c80a069a25648e2fdfff18 Mon Sep 17 00:00:00 2001 From: Evgeniy Tkachenko Date: Wed, 25 May 2016 14:36:57 +0300 Subject: [PATCH 80/99] Update Sample_09_Tables.php --- samples/Sample_09_Tables.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/samples/Sample_09_Tables.php b/samples/Sample_09_Tables.php index e78fe297ab..92407a57c7 100644 --- a/samples/Sample_09_Tables.php +++ b/samples/Sample_09_Tables.php @@ -49,7 +49,14 @@ $table->addCell(500)->addText(htmlspecialchars($text, ENT_COMPAT, 'UTF-8')); } -// 3. colspan (gridSpan) and rowspan (vMerge) +/** + * 3. colspan (gridSpan) and rowspan (vMerge) + * --------------------- + * | | B | | + * | A |--------| E | + * | | C | D | | + * --------------------- + */ $section->addPageBreak(); $section->addText(htmlspecialchars('Table with colspan and rowspan', ENT_COMPAT, 'UTF-8'), $header); From d3f3a4a1723d6f4f60f089c4996cb67ff4122f2e Mon Sep 17 00:00:00 2001 From: Evgeniy Tkachenko Date: Mon, 30 May 2016 12:36:24 +0300 Subject: [PATCH 81/99] Update Sample_09_Tables.php --- samples/Sample_09_Tables.php | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/samples/Sample_09_Tables.php b/samples/Sample_09_Tables.php index 92407a57c7..d2e903be5a 100644 --- a/samples/Sample_09_Tables.php +++ b/samples/Sample_09_Tables.php @@ -91,7 +91,41 @@ $table->addCell(2000, $cellVCentered)->addText(htmlspecialchars('D', ENT_COMPAT, 'UTF-8'), null, $cellHCentered); $table->addCell(null, $cellRowContinue); -// 4. Nested table +/** + * 4. colspan (gridSpan) and rowspan (vMerge) + * --------------------- + * | | B | 1 | + * | A | |----| + * | | | 2 | + * | |---|----|----| + * | | C | D | 3 | + * --------------------- + * @see https://github.com/PHPOffice/PHPWord/issues/806 + */ +$section->addPageBreak(); +$section->addText(htmlspecialchars('Table with colspan and rowspan', ENT_COMPAT, 'UTF-8'), $header); + +$styleTable = ['borderSize' => 6, 'borderColor' => '999999']; +$phpWord->addTableStyle('Colspan Rowspan', $styleTable); +$table = $section->addTable('Colspan Rowspan'); + +$row = $table->addRow(); + +$row->addCell(null, ['vMerge' => 'restart'])->addText('A'); +$row->addCell(null, ['gridSpan' => 2, 'vMerge' => 'restart',])->addText('B'); +$row->addCell()->addText('1'); + +$row = $table->addRow(); +$row->addCell(null, ['vMerge' => 'continue']); +$row->addCell(null, ['vMerge' => 'continue','gridSpan' => 2,]); +$row->addCell()->addText('2'); +$row = $table->addRow(); +$row->addCell(null, ['vMerge' => 'continue']); +$row->addCell()->addText('C'); +$row->addCell()->addText('D'); +$row->addCell()->addText('3'); + +// 5. Nested table $section->addTextBreak(2); $section->addText(htmlspecialchars('Nested table in a centered and 50% width table.', ENT_COMPAT, 'UTF-8'), $header); From ec3c62b0518b1f472e28dddf49fe563875c34ddb Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 4 Jun 2016 20:06:37 +0400 Subject: [PATCH 82/99] #483. Output escaping for OOXML. --- README.md | 28 ++---- docs/general.rst | 50 +++++----- phpword.ini.dist | 11 ++- samples/Sample_01_SimpleText.php | 83 ++++++++-------- samples/Sample_02_TabStops.php | 25 +++-- samples/Sample_03_Sections.php | 18 ++-- samples/Sample_04_Textrun.php | 52 +++++----- samples/Sample_05_Multicolumn.php | 10 +- samples/Sample_06_Footnote.php | 54 +++++------ samples/Sample_07_TemplateCloneRow.php | 72 +++++++------- samples/Sample_08_ParagraphPagination.php | 64 +++++-------- samples/Sample_09_Tables.php | 74 ++++++++------- samples/Sample_10_EastAsianFontStyle.php | 2 +- samples/Sample_12_HeaderFooter.php | 20 ++-- samples/Sample_13_Images.php | 16 ++-- samples/Sample_14_ListItem.php | 94 ++++++++++--------- samples/Sample_15_Link.php | 14 +-- samples/Sample_16_Object.php | 2 +- samples/Sample_17_TitleTOC.php | 57 ++++++----- samples/Sample_18_Watermark.php | 3 +- samples/Sample_19_TextBreak.php | 38 ++++---- samples/Sample_20_BGColor.php | 11 +-- samples/Sample_21_TableRowRules.php | 30 ++---- samples/Sample_22_CheckBox.php | 10 +- samples/Sample_25_TextBox.php | 21 +++-- samples/Sample_27_Field.php | 12 +-- samples/Sample_29_Line.php | 10 +- samples/Sample_31_Shape.php | 18 ++-- samples/Sample_32_Chart.php | 7 +- samples/Sample_33_FormField.php | 11 ++- samples/Sample_34_SDT.php | 7 +- samples/Sample_35_InternalLink.php | 8 +- samples/Sample_36_RTL.php | 6 +- samples/Sample_Header.php | 3 + src/PhpWord/Escaper/AbstractEscaper.php | 46 +++++++++ src/PhpWord/Escaper/EscaperInterface.php | 4 +- src/PhpWord/Escaper/RegExp.php | 24 +---- src/PhpWord/Escaper/Xml.php | 32 +++++++ src/PhpWord/Settings.php | 33 +++++++ src/PhpWord/TemplateProcessor.php | 12 ++- .../Writer/Word2007/Element/CheckBox.php | 9 +- src/PhpWord/Writer/Word2007/Element/Field.php | 4 +- .../Writer/Word2007/Element/FormField.php | 9 +- src/PhpWord/Writer/Word2007/Element/Link.php | 7 +- .../Writer/Word2007/Element/PreserveText.php | 13 ++- src/PhpWord/Writer/Word2007/Element/SDT.php | 4 +- src/PhpWord/Writer/Word2007/Element/TOC.php | 15 ++- src/PhpWord/Writer/Word2007/Element/Text.php | 7 +- src/PhpWord/Writer/Word2007/Element/Title.php | 11 ++- src/PhpWord/Writer/Word2007/Part/Chart.php | 12 ++- .../Writer/Word2007/Part/DocPropsCore.php | 4 +- .../Writer/Word2007/Part/DocPropsCustom.php | 4 +- .../Writer/Word2007/Part/Footnotes.php | 2 +- tests/PhpWord/Element/CellTest.php | 30 +++--- tests/PhpWord/Element/CheckBoxTest.php | 12 +-- tests/PhpWord/Element/FooterTest.php | 16 ++-- tests/PhpWord/Element/FootnoteTest.php | 2 +- tests/PhpWord/Element/HeaderTest.php | 18 ++-- tests/PhpWord/Element/LinkTest.php | 4 +- tests/PhpWord/Element/ListItemRunTest.php | 12 +-- tests/PhpWord/Element/ListItemTest.php | 11 +-- tests/PhpWord/Element/PreserveTextTest.php | 10 +- tests/PhpWord/Element/SectionTest.php | 12 +-- tests/PhpWord/Element/TOCTest.php | 2 +- tests/PhpWord/Element/TextRunTest.php | 12 +-- tests/PhpWord/Element/TextTest.php | 10 +- tests/PhpWord/Element/TitleTest.php | 6 +- tests/PhpWord/SettingsTest.php | 13 +-- tests/PhpWord/Style/FontTest.php | 6 +- tests/PhpWord/Style/ParagraphTest.php | 2 +- tests/PhpWord/TemplateProcessorTest.php | 12 +-- tests/PhpWord/Writer/PDF/DomPDFTest.php | 2 +- tests/PhpWord/Writer/PDF/MPDFTest.php | 2 +- tests/PhpWord/Writer/PDF/TCPDFTest.php | 2 +- tests/PhpWord/Writer/Word2007/ElementTest.php | 4 +- .../Writer/Word2007/Part/DocumentTest.php | 64 ++++++------- .../Writer/Word2007/Part/FooterTest.php | 6 +- .../Writer/Word2007/Part/FootnotesTest.php | 6 +- .../Writer/Word2007/Part/HeaderTest.php | 6 +- .../Writer/Word2007/Style/FontTest.php | 2 +- tests/PhpWord/Writer/Word2007Test.php | 10 +- 81 files changed, 790 insertions(+), 697 deletions(-) create mode 100644 src/PhpWord/Escaper/AbstractEscaper.php create mode 100644 src/PhpWord/Escaper/Xml.php diff --git a/README.md b/README.md index b3bfa53a45..d18561d7e6 100644 --- a/README.md +++ b/README.md @@ -93,11 +93,9 @@ $phpWord = new \PhpOffice\PhpWord\PhpWord(); $section = $phpWord->addSection(); // Adding Text element to the Section having font styled by default... $section->addText( - htmlspecialchars( - '"Learn from yesterday, live for today, hope for tomorrow. ' - . 'The important thing is not to stop questioning." ' - . '(Albert Einstein)' - ) + '"Learn from yesterday, live for today, hope for tomorrow. ' + . 'The important thing is not to stop questioning." ' + . '(Albert Einstein)' ); /* @@ -109,11 +107,9 @@ $section->addText( // Adding Text element with font customized inline... $section->addText( - htmlspecialchars( - '"Great achievement is usually born of great sacrifice, ' - . 'and is never the result of selfishness." ' - . '(Napoleon Hill)' - ), + '"Great achievement is usually born of great sacrifice, ' + . 'and is never the result of selfishness." ' + . '(Napoleon Hill)', array('name' => 'Tahoma', 'size' => 10) ); @@ -124,11 +120,9 @@ $phpWord->addFontStyle( array('name' => 'Tahoma', 'size' => 10, 'color' => '1B2232', 'bold' => true) ); $section->addText( - htmlspecialchars( - '"The greatest accomplishment is not in never falling, ' - . 'but in rising again after you fall." ' - . '(Vince Lombardi)' - ), + '"The greatest accomplishment is not in never falling, ' + . 'but in rising again after you fall." ' + . '(Vince Lombardi)', $fontStyleName ); @@ -137,9 +131,7 @@ $fontStyle = new \PhpOffice\PhpWord\Style\Font(); $fontStyle->setBold(true); $fontStyle->setName('Tahoma'); $fontStyle->setSize(13); -$myTextElement = $section->addText( - htmlspecialchars('"Believe you can and you\'re halfway there." (Theodor Roosevelt)') -); +$myTextElement = $section->addText('"Believe you can and you\'re halfway there." (Theodor Roosevelt)'); $myTextElement->setFontStyle($fontStyle); // Saving the document as OOXML file... diff --git a/docs/general.rst b/docs/general.rst index 13bb1a7b69..27d0448abd 100644 --- a/docs/general.rst +++ b/docs/general.rst @@ -24,13 +24,9 @@ folder `__. $section = $phpWord->addSection(); // Adding Text element to the Section having font styled by default... $section->addText( - htmlspecialchars( - '"Learn from yesterday, live for today, hope for tomorrow. ' - . 'The important thing is not to stop questioning." ' - . '(Albert Einstein)', - ENT_COMPAT, - 'UTF-8' - ) + '"Learn from yesterday, live for today, hope for tomorrow. ' + . 'The important thing is not to stop questioning." ' + . '(Albert Einstein)' ); /* @@ -42,13 +38,9 @@ folder `__. // Adding Text element with font customized inline... $section->addText( - htmlspecialchars( - '"Great achievement is usually born of great sacrifice, ' - . 'and is never the result of selfishness." ' - . '(Napoleon Hill)', - ENT_COMPAT, - 'UTF-8' - ), + '"Great achievement is usually born of great sacrifice, ' + . 'and is never the result of selfishness." ' + . '(Napoleon Hill)', array('name' => 'Tahoma', 'size' => 10) ); @@ -59,13 +51,9 @@ folder `__. array('name' => 'Tahoma', 'size' => 10, 'color' => '1B2232', 'bold' => true) ); $section->addText( - htmlspecialchars( - '"The greatest accomplishment is not in never falling, ' - . 'but in rising again after you fall." ' - . '(Vince Lombardi)', - ENT_COMPAT, - 'UTF-8' - ), + '"The greatest accomplishment is not in never falling, ' + . 'but in rising again after you fall." ' + . '(Vince Lombardi)', $fontStyleName ); @@ -74,9 +62,7 @@ folder `__. $fontStyle->setBold(true); $fontStyle->setName('Tahoma'); $fontStyle->setSize(13); - $myTextElement = $section->addText( - htmlspecialchars('"Believe you can and you\'re halfway there." (Theodor Roosevelt)', ENT_COMPAT, 'UTF-8') - ); + $myTextElement = $section->addText('"Believe you can and you\'re halfway there." (Theodor Roosevelt)'); $myTextElement->setFontStyle($fontStyle); // Saving the document as OOXML file... @@ -130,8 +116,22 @@ included with PHPWord. \PhpOffice\PhpWord\Settings::setZipClass(\PhpOffice\PhpWord\Settings::PCLZIP); +Output escaping +~~~~~~~~~~~~~~~ + +Writing documents of some formats, especially XML-based, requires correct output escaping. +Without it your document may become broken when you put special characters like ampersand, quotes, and others in it. + +Escaping can be performed in two ways: outside of the library by a software developer and inside of the library by built-in mechanism. +By default, the built-in mechanism is disabled for backward compatibility with versions prior to v0.13.0. +To turn it on set ``outputEscapingEnabled`` option to ``true`` in your PHPWord configuration file or use the following instruction at runtime: + +.. code-block:: php + + \PhpOffice\PhpWord\Settings::setOutputEscapingEnabled(true); + Default font ------------- +~~~~~~~~~~~~ By default, every text appears in Arial 10 point. You can alter the default font by using the following two functions: diff --git a/phpword.ini.dist b/phpword.ini.dist index f8eafb6a78..0f4cc358df 100644 --- a/phpword.ini.dist +++ b/phpword.ini.dist @@ -3,11 +3,12 @@ [General] -compatibility = true -zipClass = ZipArchive -pdfRendererName = DomPDF -pdfRendererPath = -; tempDir = "C:\PhpWordTemp" +compatibility = true +zipClass = ZipArchive +pdfRendererName = DomPDF +pdfRendererPath = +; tempDir = "C:\PhpWordTemp" +outputEscapingEnabled = false [Font] diff --git a/samples/Sample_01_SimpleText.php b/samples/Sample_01_SimpleText.php index d8d5915ab5..1e51b2c072 100644 --- a/samples/Sample_01_SimpleText.php +++ b/samples/Sample_01_SimpleText.php @@ -4,24 +4,29 @@ // New Word Document echo date('H:i:s') , ' Create new PhpWord object' , EOL; $phpWord = new \PhpOffice\PhpWord\PhpWord(); -$phpWord->addFontStyle('rStyle', array('bold' => true, 'italic' => true, 'size' => 16, 'allCaps' => true, 'doubleStrikethrough' => true)); -$phpWord->addParagraphStyle('pStyle', array('alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER, 'spaceAfter' => 100)); + +$fontStyleName = 'rStyle'; +$phpWord->addFontStyle($fontStyleName, array('bold' => true, 'italic' => true, 'size' => 16, 'allCaps' => true, 'doubleStrikethrough' => true)); + +$paragraphStyleName = 'pStyle'; +$phpWord->addParagraphStyle($paragraphStyleName, array('alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER, 'spaceAfter' => 100)); + $phpWord->addTitleStyle(1, array('bold' => true), array('spaceAfter' => 240)); // New portrait section $section = $phpWord->addSection(); // Simple text -$section->addTitle(htmlspecialchars('Welcome to PhpWord', ENT_COMPAT, 'UTF-8'), 1); -$section->addText(htmlspecialchars('Hello World!', ENT_COMPAT, 'UTF-8')); +$section->addTitle('Welcome to PhpWord', 1); +$section->addText('Hello World!'); // Two text break $section->addTextBreak(2); -// Defined style -$section->addText(htmlspecialchars('I am styled by a font style definition.', ENT_COMPAT, 'UTF-8'), 'rStyle'); -$section->addText(htmlspecialchars('I am styled by a paragraph style definition.', ENT_COMPAT, 'UTF-8'), null, 'pStyle'); -$section->addText(htmlspecialchars('I am styled by both font and paragraph style.', ENT_COMPAT, 'UTF-8'), 'rStyle', 'pStyle'); +// Define styles +$section->addText('I am styled by a font style definition.', $fontStyleName); +$section->addText('I am styled by a paragraph style definition.', null, $paragraphStyleName); +$section->addText('I am styled by both font and paragraph style.', $fontStyleName, $paragraphStyleName); $section->addTextBreak(); @@ -30,39 +35,39 @@ $fontStyle['size'] = 20; $textrun = $section->addTextRun(); -$textrun->addText(htmlspecialchars('I am inline styled ', ENT_COMPAT, 'UTF-8'), $fontStyle); -$textrun->addText(htmlspecialchars('with ', ENT_COMPAT, 'UTF-8')); -$textrun->addText(htmlspecialchars('color', ENT_COMPAT, 'UTF-8'), array('color' => '996699')); -$textrun->addText(htmlspecialchars(', ', ENT_COMPAT, 'UTF-8')); -$textrun->addText(htmlspecialchars('bold', ENT_COMPAT, 'UTF-8'), array('bold' => true)); -$textrun->addText(htmlspecialchars(', ', ENT_COMPAT, 'UTF-8')); -$textrun->addText(htmlspecialchars('italic', ENT_COMPAT, 'UTF-8'), array('italic' => true)); -$textrun->addText(htmlspecialchars(', ', ENT_COMPAT, 'UTF-8')); -$textrun->addText(htmlspecialchars('underline', ENT_COMPAT, 'UTF-8'), array('underline' => 'dash')); -$textrun->addText(htmlspecialchars(', ', ENT_COMPAT, 'UTF-8')); -$textrun->addText(htmlspecialchars('strikethrough', ENT_COMPAT, 'UTF-8'), array('strikethrough' => true)); -$textrun->addText(htmlspecialchars(', ', ENT_COMPAT, 'UTF-8')); -$textrun->addText(htmlspecialchars('doubleStrikethrough', ENT_COMPAT, 'UTF-8'), array('doubleStrikethrough' => true)); -$textrun->addText(htmlspecialchars(', ', ENT_COMPAT, 'UTF-8')); -$textrun->addText(htmlspecialchars('superScript', ENT_COMPAT, 'UTF-8'), array('superScript' => true)); -$textrun->addText(htmlspecialchars(', ', ENT_COMPAT, 'UTF-8')); -$textrun->addText(htmlspecialchars('subScript', ENT_COMPAT, 'UTF-8'), array('subScript' => true)); -$textrun->addText(htmlspecialchars(', ', ENT_COMPAT, 'UTF-8')); -$textrun->addText(htmlspecialchars('smallCaps', ENT_COMPAT, 'UTF-8'), array('smallCaps' => true)); -$textrun->addText(htmlspecialchars(', ', ENT_COMPAT, 'UTF-8')); -$textrun->addText(htmlspecialchars('allCaps', ENT_COMPAT, 'UTF-8'), array('allCaps' => true)); -$textrun->addText(htmlspecialchars(', ', ENT_COMPAT, 'UTF-8')); -$textrun->addText(htmlspecialchars('fgColor', ENT_COMPAT, 'UTF-8'), array('fgColor' => 'yellow')); -$textrun->addText(htmlspecialchars(', ', ENT_COMPAT, 'UTF-8')); -$textrun->addText(htmlspecialchars('scale', ENT_COMPAT, 'UTF-8'), array('scale' => 200)); -$textrun->addText(htmlspecialchars(', ', ENT_COMPAT, 'UTF-8')); -$textrun->addText(htmlspecialchars('spacing', ENT_COMPAT, 'UTF-8'), array('spacing' => 120)); -$textrun->addText(htmlspecialchars(', ', ENT_COMPAT, 'UTF-8')); -$textrun->addText(htmlspecialchars('kerning', ENT_COMPAT, 'UTF-8'), array('kerning' => 10)); -$textrun->addText(htmlspecialchars('. ', ENT_COMPAT, 'UTF-8')); +$textrun->addText('I am inline styled ', $fontStyle); +$textrun->addText('with '); +$textrun->addText('color', array('color' => '996699')); +$textrun->addText(', '); +$textrun->addText('bold', array('bold' => true)); +$textrun->addText(', '); +$textrun->addText('italic', array('italic' => true)); +$textrun->addText(', '); +$textrun->addText('underline', array('underline' => 'dash')); +$textrun->addText(', '); +$textrun->addText('strikethrough', array('strikethrough' => true)); +$textrun->addText(', '); +$textrun->addText('doubleStrikethrough', array('doubleStrikethrough' => true)); +$textrun->addText(', '); +$textrun->addText('superScript', array('superScript' => true)); +$textrun->addText(', '); +$textrun->addText('subScript', array('subScript' => true)); +$textrun->addText(', '); +$textrun->addText('smallCaps', array('smallCaps' => true)); +$textrun->addText(', '); +$textrun->addText('allCaps', array('allCaps' => true)); +$textrun->addText(', '); +$textrun->addText('fgColor', array('fgColor' => 'yellow')); +$textrun->addText(', '); +$textrun->addText('scale', array('scale' => 200)); +$textrun->addText(', '); +$textrun->addText('spacing', array('spacing' => 120)); +$textrun->addText(', '); +$textrun->addText('kerning', array('kerning' => 10)); +$textrun->addText('. '); // Link -$section->addLink('https://github.com/PHPOffice/PHPWord', htmlspecialchars('PHPWord on GitHub', ENT_COMPAT, 'UTF-8')); +$section->addLink('https://github.com/PHPOffice/PHPWord', 'PHPWord on GitHub'); $section->addTextBreak(); // Image diff --git a/samples/Sample_02_TabStops.php b/samples/Sample_02_TabStops.php index 618454b299..1702198751 100644 --- a/samples/Sample_02_TabStops.php +++ b/samples/Sample_02_TabStops.php @@ -5,9 +5,10 @@ echo date('H:i:s'), ' Create new PhpWord object', EOL; $phpWord = new \PhpOffice\PhpWord\PhpWord(); -// Ads styles +// Define styles +$multipleTabsStyleName = 'multipleTab'; $phpWord->addParagraphStyle( - 'multipleTab', + $multipleTabsStyleName, array( 'tabs' => array( new \PhpOffice\PhpWord\Style\Tab('left', 1550), @@ -16,22 +17,20 @@ ) ) ); -$phpWord->addParagraphStyle( - 'rightTab', - array('tabs' => array(new \PhpOffice\PhpWord\Style\Tab('right', 9090))) -); -$phpWord->addParagraphStyle( - 'centerTab', - array('tabs' => array(new \PhpOffice\PhpWord\Style\Tab('center', 4680))) -); + +$rightTabStyleName = 'rightTab'; +$phpWord->addParagraphStyle($rightTabStyleName, array('tabs' => array(new \PhpOffice\PhpWord\Style\Tab('right', 9090)))); + +$leftTabStyleName = 'centerTab'; +$phpWord->addParagraphStyle($leftTabStyleName, array('tabs' => array(new \PhpOffice\PhpWord\Style\Tab('center', 4680)))); // New portrait section $section = $phpWord->addSection(); // Add listitem elements -$section->addText(htmlspecialchars("Multiple Tabs:\tOne\tTwo\tThree", ENT_COMPAT, 'UTF-8'), null, 'multipleTab'); -$section->addText(htmlspecialchars("Left Aligned\tRight Aligned", ENT_COMPAT, 'UTF-8'), null, 'rightTab'); -$section->addText(htmlspecialchars("\tCenter Aligned", ENT_COMPAT, 'UTF-8'), null, 'centerTab'); +$section->addText("Multiple Tabs:\tOne\tTwo\tThree", null, $multipleTabsStyleName); +$section->addText("Left Aligned\tRight Aligned", null, $rightTabStyleName); +$section->addText("\tCenter Aligned", null, $leftTabStyleName); // Save file echo write($phpWord, basename(__FILE__, '.php'), $writers); diff --git a/samples/Sample_03_Sections.php b/samples/Sample_03_Sections.php index 3a7ea19ec6..a7b5b13d6d 100644 --- a/samples/Sample_03_Sections.php +++ b/samples/Sample_03_Sections.php @@ -7,17 +7,11 @@ // New portrait section $section = $phpWord->addSection(array('borderColor' => '00FF00', 'borderSize' => 12)); -$section->addText(htmlspecialchars('I am placed on a default section.', ENT_COMPAT, 'UTF-8')); +$section->addText('I am placed on a default section.'); // New landscape section $section = $phpWord->addSection(array('orientation' => 'landscape')); -$section->addText( - htmlspecialchars( - 'I am placed on a landscape section. Every page starting from this section will be landscape style.', - ENT_COMPAT, - 'UTF-8' - ) -); +$section->addText('I am placed on a landscape section. Every page starting from this section will be landscape style.'); $section->addPageBreak(); $section->addPageBreak(); @@ -25,7 +19,7 @@ $section = $phpWord->addSection( array('paperSize' => 'Folio', 'marginLeft' => 600, 'marginRight' => 600, 'marginTop' => 600, 'marginBottom' => 600) ); -$section->addText(htmlspecialchars('This section uses other margins with folio papersize.', ENT_COMPAT, 'UTF-8')); +$section->addText('This section uses other margins with folio papersize.'); // New portrait section with Header & Footer $section = $phpWord->addSection( @@ -38,9 +32,9 @@ 'footerHeight' => 50, ) ); -$section->addText(htmlspecialchars('This section and we play with header/footer height.', ENT_COMPAT, 'UTF-8')); -$section->addHeader()->addText(htmlspecialchars('Header', ENT_COMPAT, 'UTF-8')); -$section->addFooter()->addText(htmlspecialchars('Footer', ENT_COMPAT, 'UTF-8')); +$section->addText('This section and we play with header/footer height.'); +$section->addHeader()->addText('Header'); +$section->addFooter()->addText('Footer'); // Save file echo write($phpWord, basename(__FILE__, '.php'), $writers); diff --git a/samples/Sample_04_Textrun.php b/samples/Sample_04_Textrun.php index 9590f6df37..48978dd36b 100644 --- a/samples/Sample_04_Textrun.php +++ b/samples/Sample_04_Textrun.php @@ -5,39 +5,39 @@ echo date('H:i:s'), ' Create new PhpWord object', EOL; $phpWord = new \PhpOffice\PhpWord\PhpWord(); -// Ads styles -$phpWord->addParagraphStyle('pStyle', array('spacing' => 100)); -$phpWord->addFontStyle('BoldText', array('bold' => true)); -$phpWord->addFontStyle('ColoredText', array('color' => 'FF8080', 'bgColor' => 'FFFFCC')); -$phpWord->addLinkStyle( - 'NLink', - array('color' => '0000FF', 'underline' => \PhpOffice\PhpWord\Style\Font::UNDERLINE_SINGLE) -); +// Define styles +$paragraphStyleName = 'pStyle'; +$phpWord->addParagraphStyle($paragraphStyleName, array('spacing' => 100)); + +$boldFontStyleName = 'BoldText'; +$phpWord->addFontStyle($boldFontStyleName, array('bold' => true)); + +$coloredFontStyleName = 'ColoredText'; +$phpWord->addFontStyle($coloredFontStyleName, array('color' => 'FF8080', 'bgColor' => 'FFFFCC')); + +$linkFontStyleName = 'NLink'; +$phpWord->addLinkStyle($linkFontStyleName, array('color' => '0000FF', 'underline' => \PhpOffice\PhpWord\Style\Font::UNDERLINE_SINGLE)); // New portrait section $section = $phpWord->addSection(); // Add text run -$textrun = $section->addTextRun('pStyle'); - -$textrun->addText(htmlspecialchars('Each textrun can contain native text, link elements or an image.', ENT_COMPAT, 'UTF-8')); -$textrun->addText(htmlspecialchars(' No break is placed after adding an element.', ENT_COMPAT, 'UTF-8'), 'BoldText'); -$textrun->addText(htmlspecialchars(' Both ', ENT_COMPAT, 'UTF-8')); -$textrun->addText(htmlspecialchars('superscript', ENT_COMPAT, 'UTF-8'), array('superScript' => true)); -$textrun->addText(htmlspecialchars(' and ', ENT_COMPAT, 'UTF-8')); -$textrun->addText(htmlspecialchars('subscript', ENT_COMPAT, 'UTF-8'), array('subScript' => true)); -$textrun->addText(htmlspecialchars(' are also available.', ENT_COMPAT, 'UTF-8')); -$textrun->addText( - htmlspecialchars(' All elements are placed inside a paragraph with the optionally given p-Style.', ENT_COMPAT, 'UTF-8'), - 'ColoredText' -); -$textrun->addText(htmlspecialchars(' Sample Link: ', ENT_COMPAT, 'UTF-8')); -$textrun->addLink('https://github.com/PHPOffice/PHPWord', htmlspecialchars('PHPWord on GitHub', ENT_COMPAT, 'UTF-8'), 'NLink'); -$textrun->addText(htmlspecialchars(' Sample Image: ', ENT_COMPAT, 'UTF-8')); +$textrun = $section->addTextRun($paragraphStyleName); +$textrun->addText('Each textrun can contain native text, link elements or an image.'); +$textrun->addText(' No break is placed after adding an element.', $boldFontStyleName); +$textrun->addText(' Both '); +$textrun->addText('superscript', array('superScript' => true)); +$textrun->addText(' and '); +$textrun->addText('subscript', array('subScript' => true)); +$textrun->addText(' are also available.'); +$textrun->addText(' All elements are placed inside a paragraph with the optionally given paragraph style.', $coloredFontStyleName); +$textrun->addText(' Sample Link: '); +$textrun->addLink('https://github.com/PHPOffice/PHPWord', 'PHPWord on GitHub', $linkFontStyleName); +$textrun->addText(' Sample Image: '); $textrun->addImage('resources/_earth.jpg', array('width' => 18, 'height' => 18)); -$textrun->addText(htmlspecialchars(' Sample Object: ', ENT_COMPAT, 'UTF-8')); +$textrun->addText(' Sample Object: '); $textrun->addObject('resources/_sheet.xls'); -$textrun->addText(htmlspecialchars(' Here is some more text. ', ENT_COMPAT, 'UTF-8')); +$textrun->addText(' Here is some more text. '); // Save file echo write($phpWord, basename(__FILE__, '.php'), $writers); diff --git a/samples/Sample_05_Multicolumn.php b/samples/Sample_05_Multicolumn.php index 5c0367294c..f7cefa58d3 100644 --- a/samples/Sample_05_Multicolumn.php +++ b/samples/Sample_05_Multicolumn.php @@ -11,7 +11,7 @@ // Normal $section = $phpWord->addSection(); -$section->addText(htmlspecialchars("Normal paragraph. {$filler}", ENT_COMPAT, 'UTF-8')); +$section->addText("Normal paragraph. {$filler}"); // Two columns $section = $phpWord->addSection( @@ -21,11 +21,11 @@ 'breakType' => 'continuous', ) ); -$section->addText(htmlspecialchars("Two columns, one inch (1440 twips) spacing. {$filler}", ENT_COMPAT, 'UTF-8')); +$section->addText("Two columns, one inch (1440 twips) spacing. {$filler}"); // Normal $section = $phpWord->addSection(array('breakType' => 'continuous')); -$section->addText(htmlspecialchars("Normal paragraph again. {$filler}", ENT_COMPAT, 'UTF-8')); +$section->addText("Normal paragraph again. {$filler}"); // Three columns $section = $phpWord->addSection( @@ -35,11 +35,11 @@ 'breakType' => 'continuous', ) ); -$section->addText(htmlspecialchars("Three columns, half inch (720 twips) spacing. {$filler}", ENT_COMPAT, 'UTF-8')); +$section->addText("Three columns, half inch (720 twips) spacing. {$filler}"); // Normal $section = $phpWord->addSection(array('breakType' => 'continuous')); -$section->addText(htmlspecialchars('Normal paragraph again.', ENT_COMPAT, 'UTF-8')); +$section->addText("Normal paragraph again. {$filler}"); // Save file echo write($phpWord, basename(__FILE__, '.php'), $writers); diff --git a/samples/Sample_06_Footnote.php b/samples/Sample_06_Footnote.php index 71c1ff1de9..30afcf815b 100644 --- a/samples/Sample_06_Footnote.php +++ b/samples/Sample_06_Footnote.php @@ -6,46 +6,46 @@ $phpWord = new \PhpOffice\PhpWord\PhpWord(); \PhpOffice\PhpWord\Settings::setCompatibility(false); +// Define styles +$paragraphStyleName = 'pStyle'; +$phpWord->addParagraphStyle($paragraphStyleName, array('spacing' => 100)); + +$boldFontStyleName = 'BoldText'; +$phpWord->addFontStyle($boldFontStyleName, array('bold' => true)); + +$coloredFontStyleName = 'ColoredText'; +$phpWord->addFontStyle($coloredFontStyleName, array('color' => 'FF8080', 'bgColor' => 'FFFFCC')); + +$linkFontStyleName = 'NLink'; +$phpWord->addLinkStyle($linkFontStyleName, array('color' => '0000FF', 'underline' => \PhpOffice\PhpWord\Style\Font::UNDERLINE_SINGLE)); + // New portrait section $section = $phpWord->addSection(); -// Add style definitions -$phpWord->addParagraphStyle('pStyle', array('spacing' => 100)); -$phpWord->addFontStyle('BoldText', array('bold' => true)); -$phpWord->addFontStyle('ColoredText', array('color' => 'FF8080')); -$phpWord->addLinkStyle( - 'NLink', - array('color' => '0000FF', 'underline' => \PhpOffice\PhpWord\Style\Font::UNDERLINE_SINGLE) -); - // Add text elements -$textrun = $section->addTextRun('pStyle'); -$textrun->addText(htmlspecialchars('This is some lead text in a paragraph with a following footnote. ', ENT_COMPAT, 'UTF-8'), 'pStyle'); +$textrun = $section->addTextRun($paragraphStyleName); +$textrun->addText('This is some lead text in a paragraph with a following footnote. ', $paragraphStyleName); $footnote = $textrun->addFootnote(); -$footnote->addText(htmlspecialchars('Just like a textrun, a footnote can contain native texts. ', ENT_COMPAT, 'UTF-8')); -$footnote->addText(htmlspecialchars('No break is placed after adding an element. ', ENT_COMPAT, 'UTF-8'), 'BoldText'); -$footnote->addText(htmlspecialchars('All elements are placed inside a paragraph. ', ENT_COMPAT, 'UTF-8'), 'ColoredText'); +$footnote->addText('Just like a textrun, a footnote can contain native texts. '); +$footnote->addText('No break is placed after adding an element. ', $boldFontStyleName); +$footnote->addText('All elements are placed inside a paragraph. ', $coloredFontStyleName); $footnote->addTextBreak(); -$footnote->addText(htmlspecialchars('But you can insert a manual text break like above, ', ENT_COMPAT, 'UTF-8')); -$footnote->addText(htmlspecialchars('links like ', ENT_COMPAT, 'UTF-8')); -$footnote->addLink('https://github.com/PHPOffice/PHPWord', htmlspecialchars('PHPWord on GitHub', ENT_COMPAT, 'UTF-8'), 'NLink'); -$footnote->addText(htmlspecialchars(', image like ', ENT_COMPAT, 'UTF-8')); +$footnote->addText('But you can insert a manual text break like above, '); +$footnote->addText('links like '); +$footnote->addLink('https://github.com/PHPOffice/PHPWord', 'PHPWord on GitHub', $linkFontStyleName); +$footnote->addText(', image like '); $footnote->addImage('resources/_earth.jpg', array('width' => 18, 'height' => 18)); -$footnote->addText(htmlspecialchars(', or object like ', ENT_COMPAT, 'UTF-8')); +$footnote->addText(', or object like '); $footnote->addObject('resources/_sheet.xls'); -$footnote->addText(htmlspecialchars('But you can only put footnote in section, not in header or footer.', ENT_COMPAT, 'UTF-8')); +$footnote->addText('But you can only put footnote in section, not in header or footer.'); $section->addText( - htmlspecialchars( - 'You can also create the footnote directly from the section making it wrap in a paragraph ' - . 'like the footnote below this paragraph. But is is best used from within a textrun.', - ENT_COMPAT, - 'UTF-8' - ) + 'You can also create the footnote directly from the section making it wrap in a paragraph ' + . 'like the footnote below this paragraph. But is is best used from within a textrun.' ); $footnote = $section->addFootnote(); -$footnote->addText(htmlspecialchars('The reference for this is wrapped in its own line', ENT_COMPAT, 'UTF-8')); +$footnote->addText('The reference for this is wrapped in its own line'); // Save file echo write($phpWord, basename(__FILE__, '.php'), $writers); diff --git a/samples/Sample_07_TemplateCloneRow.php b/samples/Sample_07_TemplateCloneRow.php index c227a67488..22a68537c6 100644 --- a/samples/Sample_07_TemplateCloneRow.php +++ b/samples/Sample_07_TemplateCloneRow.php @@ -6,52 +6,52 @@ $templateProcessor = new \PhpOffice\PhpWord\TemplateProcessor('resources/Sample_07_TemplateCloneRow.docx'); // Variables on different parts of document -$templateProcessor->setValue('weekday', htmlspecialchars(date('l'), ENT_COMPAT, 'UTF-8')); // On section/content -$templateProcessor->setValue('time', htmlspecialchars(date('H:i'), ENT_COMPAT, 'UTF-8')); // On footer -$templateProcessor->setValue('serverName', htmlspecialchars(realpath(__DIR__), ENT_COMPAT, 'UTF-8')); // On header +$templateProcessor->setValue('weekday', date('l')); // On section/content +$templateProcessor->setValue('time', date('H:i')); // On footer +$templateProcessor->setValue('serverName', realpath(__DIR__)); // On header // Simple table $templateProcessor->cloneRow('rowValue', 10); -$templateProcessor->setValue('rowValue#1', htmlspecialchars('Sun', ENT_COMPAT, 'UTF-8')); -$templateProcessor->setValue('rowValue#2', htmlspecialchars('Mercury', ENT_COMPAT, 'UTF-8')); -$templateProcessor->setValue('rowValue#3', htmlspecialchars('Venus', ENT_COMPAT, 'UTF-8')); -$templateProcessor->setValue('rowValue#4', htmlspecialchars('Earth', ENT_COMPAT, 'UTF-8')); -$templateProcessor->setValue('rowValue#5', htmlspecialchars('Mars', ENT_COMPAT, 'UTF-8')); -$templateProcessor->setValue('rowValue#6', htmlspecialchars('Jupiter', ENT_COMPAT, 'UTF-8')); -$templateProcessor->setValue('rowValue#7', htmlspecialchars('Saturn', ENT_COMPAT, 'UTF-8')); -$templateProcessor->setValue('rowValue#8', htmlspecialchars('Uranus', ENT_COMPAT, 'UTF-8')); -$templateProcessor->setValue('rowValue#9', htmlspecialchars('Neptun', ENT_COMPAT, 'UTF-8')); -$templateProcessor->setValue('rowValue#10', htmlspecialchars('Pluto', ENT_COMPAT, 'UTF-8')); - -$templateProcessor->setValue('rowNumber#1', htmlspecialchars('1', ENT_COMPAT, 'UTF-8')); -$templateProcessor->setValue('rowNumber#2', htmlspecialchars('2', ENT_COMPAT, 'UTF-8')); -$templateProcessor->setValue('rowNumber#3', htmlspecialchars('3', ENT_COMPAT, 'UTF-8')); -$templateProcessor->setValue('rowNumber#4', htmlspecialchars('4', ENT_COMPAT, 'UTF-8')); -$templateProcessor->setValue('rowNumber#5', htmlspecialchars('5', ENT_COMPAT, 'UTF-8')); -$templateProcessor->setValue('rowNumber#6', htmlspecialchars('6', ENT_COMPAT, 'UTF-8')); -$templateProcessor->setValue('rowNumber#7', htmlspecialchars('7', ENT_COMPAT, 'UTF-8')); -$templateProcessor->setValue('rowNumber#8', htmlspecialchars('8', ENT_COMPAT, 'UTF-8')); -$templateProcessor->setValue('rowNumber#9', htmlspecialchars('9', ENT_COMPAT, 'UTF-8')); -$templateProcessor->setValue('rowNumber#10', htmlspecialchars('10', ENT_COMPAT, 'UTF-8')); +$templateProcessor->setValue('rowValue#1', 'Sun'); +$templateProcessor->setValue('rowValue#2', 'Mercury'); +$templateProcessor->setValue('rowValue#3', 'Venus'); +$templateProcessor->setValue('rowValue#4', 'Earth'); +$templateProcessor->setValue('rowValue#5', 'Mars'); +$templateProcessor->setValue('rowValue#6', 'Jupiter'); +$templateProcessor->setValue('rowValue#7', 'Saturn'); +$templateProcessor->setValue('rowValue#8', 'Uranus'); +$templateProcessor->setValue('rowValue#9', 'Neptun'); +$templateProcessor->setValue('rowValue#10', 'Pluto'); + +$templateProcessor->setValue('rowNumber#1', '1'); +$templateProcessor->setValue('rowNumber#2', '2'); +$templateProcessor->setValue('rowNumber#3', '3'); +$templateProcessor->setValue('rowNumber#4', '4'); +$templateProcessor->setValue('rowNumber#5', '5'); +$templateProcessor->setValue('rowNumber#6', '6'); +$templateProcessor->setValue('rowNumber#7', '7'); +$templateProcessor->setValue('rowNumber#8', '8'); +$templateProcessor->setValue('rowNumber#9', '9'); +$templateProcessor->setValue('rowNumber#10', '10'); // Table with a spanned cell $templateProcessor->cloneRow('userId', 3); -$templateProcessor->setValue('userId#1', htmlspecialchars('1', ENT_COMPAT, 'UTF-8')); -$templateProcessor->setValue('userFirstName#1', htmlspecialchars('James', ENT_COMPAT, 'UTF-8')); -$templateProcessor->setValue('userName#1', htmlspecialchars('Taylor', ENT_COMPAT, 'UTF-8')); -$templateProcessor->setValue('userPhone#1', htmlspecialchars('+1 428 889 773', ENT_COMPAT, 'UTF-8')); +$templateProcessor->setValue('userId#1', '1'); +$templateProcessor->setValue('userFirstName#1', 'James'); +$templateProcessor->setValue('userName#1', 'Taylor'); +$templateProcessor->setValue('userPhone#1', '+1 428 889 773'); -$templateProcessor->setValue('userId#2', htmlspecialchars('2', ENT_COMPAT, 'UTF-8')); -$templateProcessor->setValue('userFirstName#2', htmlspecialchars('Robert', ENT_COMPAT, 'UTF-8')); -$templateProcessor->setValue('userName#2', htmlspecialchars('Bell', ENT_COMPAT, 'UTF-8')); -$templateProcessor->setValue('userPhone#2', htmlspecialchars('+1 428 889 774', ENT_COMPAT, 'UTF-8')); +$templateProcessor->setValue('userId#2', '2'); +$templateProcessor->setValue('userFirstName#2', 'Robert'); +$templateProcessor->setValue('userName#2', 'Bell'); +$templateProcessor->setValue('userPhone#2', '+1 428 889 774'); -$templateProcessor->setValue('userId#3', htmlspecialchars('3', ENT_COMPAT, 'UTF-8')); -$templateProcessor->setValue('userFirstName#3', htmlspecialchars('Michael', ENT_COMPAT, 'UTF-8')); -$templateProcessor->setValue('userName#3', htmlspecialchars('Ray', ENT_COMPAT, 'UTF-8')); -$templateProcessor->setValue('userPhone#3', htmlspecialchars('+1 428 889 775', ENT_COMPAT, 'UTF-8')); +$templateProcessor->setValue('userId#3', '3'); +$templateProcessor->setValue('userFirstName#3', 'Michael'); +$templateProcessor->setValue('userName#3', 'Ray'); +$templateProcessor->setValue('userPhone#3', '+1 428 889 775'); echo date('H:i:s'), ' Saving the result document...', EOL; $templateProcessor->saveAs('results/Sample_07_TemplateCloneRow.docx'); diff --git a/samples/Sample_08_ParagraphPagination.php b/samples/Sample_08_ParagraphPagination.php index 1a802f32df..f91b1c56b4 100644 --- a/samples/Sample_08_ParagraphPagination.php +++ b/samples/Sample_08_ParagraphPagination.php @@ -12,72 +12,52 @@ ) ); -// Sample +// New section $section = $phpWord->addSection(); $section->addText( - htmlspecialchars( - 'Below are the samples on how to control your paragraph ' - . 'pagination. See "Line and Page Break" tab on paragraph properties ' - . 'window to see the attribute set by these controls.', - ENT_COMPAT, - 'UTF-8' - ), + 'Below are the samples on how to control your paragraph ' + . 'pagination. See "Line and Page Break" tab on paragraph properties ' + . 'window to see the attribute set by these controls.', array('bold' => true), array('space' => array('before' => 360, 'after' => 480)) ); $section->addText( - htmlspecialchars( - 'Paragraph with widowControl = false (default: true). ' - . 'A "widow" is the last line of a paragraph printed by itself at the top ' - . 'of a page. An "orphan" is the first line of a paragraph printed by ' - . 'itself at the bottom of a page. Set this option to "false" if you want ' - . 'to disable this automatic control.', - ENT_COMPAT, - 'UTF-8' - ), + 'Paragraph with widowControl = false (default: true). ' + . 'A "widow" is the last line of a paragraph printed by itself at the top ' + . 'of a page. An "orphan" is the first line of a paragraph printed by ' + . 'itself at the bottom of a page. Set this option to "false" if you want ' + . 'to disable this automatic control.', null, array('widowControl' => false, 'indentation' => array('left' => 240, 'right' => 120)) ); $section->addText( - htmlspecialchars( - 'Paragraph with keepNext = true (default: false). ' - . '"Keep with next" is used to prevent Word from inserting automatic page ' - . 'breaks between paragraphs. Set this option to "true" if you do not want ' - . 'your paragraph to be separated with the next paragraph.', - ENT_COMPAT, - 'UTF-8' - ), + 'Paragraph with keepNext = true (default: false). ' + . '"Keep with next" is used to prevent Word from inserting automatic page ' + . 'breaks between paragraphs. Set this option to "true" if you do not want ' + . 'your paragraph to be separated with the next paragraph.', null, array('keepNext' => true, 'indentation' => array('firstLine' => 240)) ); $section->addText( - htmlspecialchars( - 'Paragraph with keepLines = true (default: false). ' - . '"Keep lines together" will prevent Word from inserting an automatic page ' - . 'break within a paragraph. Set this option to "true" if you do not want ' - . 'all lines of your paragraph to be in the same page.', - ENT_COMPAT, - 'UTF-8' - ), + 'Paragraph with keepLines = true (default: false). ' + . '"Keep lines together" will prevent Word from inserting an automatic page ' + . 'break within a paragraph. Set this option to "true" if you do not want ' + . 'all lines of your paragraph to be in the same page.', null, array('keepLines' => true, 'indentation' => array('left' => 240, 'hanging' => 240)) ); -$section->addText(htmlspecialchars('Keep scrolling. More below.', ENT_COMPAT, 'UTF-8')); +$section->addText('Keep scrolling. More below.'); $section->addText( - htmlspecialchars( - 'Paragraph with pageBreakBefore = true (default: false). ' - . 'Different with all other control above, "page break before" separates ' - . 'your paragraph into the next page. This option is most useful for ' - . 'heading styles.', - ENT_COMPAT, - 'UTF-8' - ), + 'Paragraph with pageBreakBefore = true (default: false). ' + . 'Different with all other control above, "page break before" separates ' + . 'your paragraph into the next page. This option is most useful for ' + . 'heading styles.', null, array('pageBreakBefore' => true) ); diff --git a/samples/Sample_09_Tables.php b/samples/Sample_09_Tables.php index d2e903be5a..53d32e0888 100644 --- a/samples/Sample_09_Tables.php +++ b/samples/Sample_09_Tables.php @@ -11,42 +11,43 @@ $rows = 10; $cols = 5; -$section->addText(htmlspecialchars('Basic table', ENT_COMPAT, 'UTF-8'), $header); +$section->addText('Basic table', $header); $table = $section->addTable(); for ($r = 1; $r <= 8; $r++) { $table->addRow(); for ($c = 1; $c <= 5; $c++) { - $table->addCell(1750)->addText(htmlspecialchars("Row {$r}, Cell {$c}", ENT_COMPAT, 'UTF-8')); + $table->addCell(1750)->addText("Row {$r}, Cell {$c}"); } } // 2. Advanced table $section->addTextBreak(1); -$section->addText(htmlspecialchars('Fancy table', ENT_COMPAT, 'UTF-8'), $header); - -$styleTable = array('borderSize' => 6, 'borderColor' => '006699', 'cellMargin' => 80, 'alignment' => \PhpOffice\PhpWord\SimpleType\JcTable::CENTER); -$styleFirstRow = array('borderBottomSize' => 18, 'borderBottomColor' => '0000FF', 'bgColor' => '66BBFF'); -$styleCell = array('valign' => 'center'); -$styleCellBTLR = array('valign' => 'center', 'textDirection' => \PhpOffice\PhpWord\Style\Cell::TEXT_DIR_BTLR); -$fontStyle = array('bold' => true); -$phpWord->addTableStyle('Fancy Table', $styleTable, $styleFirstRow); -$table = $section->addTable('Fancy Table'); +$section->addText('Fancy table', $header); + +$fancyTableStyleName = 'Fancy Table'; +$fancyTableStyle = array('borderSize' => 6, 'borderColor' => '006699', 'cellMargin' => 80, 'alignment' => \PhpOffice\PhpWord\SimpleType\JcTable::CENTER); +$fancyTableFirstRowStyle = array('borderBottomSize' => 18, 'borderBottomColor' => '0000FF', 'bgColor' => '66BBFF'); +$fancyTableCellStyle = array('valign' => 'center'); +$fancyTableCellBtlrStyle = array('valign' => 'center', 'textDirection' => \PhpOffice\PhpWord\Style\Cell::TEXT_DIR_BTLR); +$fancyTableFontStyle = array('bold' => true); +$phpWord->addTableStyle($fancyTableStyleName, $fancyTableStyle, $fancyTableFirstRowStyle); +$table = $section->addTable($fancyTableStyleName); $table->addRow(900); -$table->addCell(2000, $styleCell)->addText(htmlspecialchars('Row 1', ENT_COMPAT, 'UTF-8'), $fontStyle); -$table->addCell(2000, $styleCell)->addText(htmlspecialchars('Row 2', ENT_COMPAT, 'UTF-8'), $fontStyle); -$table->addCell(2000, $styleCell)->addText(htmlspecialchars('Row 3', ENT_COMPAT, 'UTF-8'), $fontStyle); -$table->addCell(2000, $styleCell)->addText(htmlspecialchars('Row 4', ENT_COMPAT, 'UTF-8'), $fontStyle); -$table->addCell(500, $styleCellBTLR)->addText(htmlspecialchars('Row 5', ENT_COMPAT, 'UTF-8'), $fontStyle); +$table->addCell(2000, $fancyTableCellStyle)->addText('Row 1', $fancyTableFontStyle); +$table->addCell(2000, $fancyTableCellStyle)->addText('Row 2', $fancyTableFontStyle); +$table->addCell(2000, $fancyTableCellStyle)->addText('Row 3', $fancyTableFontStyle); +$table->addCell(2000, $fancyTableCellStyle)->addText('Row 4', $fancyTableFontStyle); +$table->addCell(500, $fancyTableCellBtlrStyle)->addText('Row 5', $fancyTableFontStyle); for ($i = 1; $i <= 8; $i++) { $table->addRow(); - $table->addCell(2000)->addText(htmlspecialchars("Cell {$i}", ENT_COMPAT, 'UTF-8')); - $table->addCell(2000)->addText(htmlspecialchars("Cell {$i}", ENT_COMPAT, 'UTF-8')); - $table->addCell(2000)->addText(htmlspecialchars("Cell {$i}", ENT_COMPAT, 'UTF-8')); - $table->addCell(2000)->addText(htmlspecialchars("Cell {$i}", ENT_COMPAT, 'UTF-8')); + $table->addCell(2000)->addText("Cell {$i}"); + $table->addCell(2000)->addText("Cell {$i}"); + $table->addCell(2000)->addText("Cell {$i}"); + $table->addCell(2000)->addText("Cell {$i}"); $text = (0== $i % 2) ? 'X' : ''; - $table->addCell(500)->addText(htmlspecialchars($text, ENT_COMPAT, 'UTF-8')); + $table->addCell(500)->addText($text); } /** @@ -59,36 +60,37 @@ */ $section->addPageBreak(); -$section->addText(htmlspecialchars('Table with colspan and rowspan', ENT_COMPAT, 'UTF-8'), $header); +$section->addText('Table with colspan and rowspan', $header); -$styleTable = array('borderSize' => 6, 'borderColor' => '999999'); +$fancyTableStyle = array('borderSize' => 6, 'borderColor' => '999999'); $cellRowSpan = array('vMerge' => 'restart', 'valign' => 'center', 'bgColor' => 'FFFF00'); $cellRowContinue = array('vMerge' => 'continue'); $cellColSpan = array('gridSpan' => 2, 'valign' => 'center'); $cellHCentered = array('alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER); $cellVCentered = array('valign' => 'center'); -$phpWord->addTableStyle('Colspan Rowspan', $styleTable); -$table = $section->addTable('Colspan Rowspan'); +$spanTableStyleName = 'Colspan Rowspan'; +$phpWord->addTableStyle($spanTableStyleName, $fancyTableStyle); +$table = $section->addTable($spanTableStyleName); $table->addRow(); $cell1 = $table->addCell(2000, $cellRowSpan); $textrun1 = $cell1->addTextRun($cellHCentered); -$textrun1->addText(htmlspecialchars('A', ENT_COMPAT, 'UTF-8')); -$textrun1->addFootnote()->addText(htmlspecialchars('Row span', ENT_COMPAT, 'UTF-8')); +$textrun1->addText('A'); +$textrun1->addFootnote()->addText('Row span'); $cell2 = $table->addCell(4000, $cellColSpan); $textrun2 = $cell2->addTextRun($cellHCentered); -$textrun2->addText(htmlspecialchars('B', ENT_COMPAT, 'UTF-8')); -$textrun2->addFootnote()->addText(htmlspecialchars('Colspan span', ENT_COMPAT, 'UTF-8')); +$textrun2->addText('B'); +$textrun2->addFootnote()->addText('Column span'); -$table->addCell(2000, $cellRowSpan)->addText(htmlspecialchars('E', ENT_COMPAT, 'UTF-8'), null, $cellHCentered); +$table->addCell(2000, $cellRowSpan)->addText('E', null, $cellHCentered); $table->addRow(); $table->addCell(null, $cellRowContinue); -$table->addCell(2000, $cellVCentered)->addText(htmlspecialchars('C', ENT_COMPAT, 'UTF-8'), null, $cellHCentered); -$table->addCell(2000, $cellVCentered)->addText(htmlspecialchars('D', ENT_COMPAT, 'UTF-8'), null, $cellHCentered); +$table->addCell(2000, $cellVCentered)->addText('C', null, $cellHCentered); +$table->addCell(2000, $cellVCentered)->addText('D', null, $cellHCentered); $table->addCell(null, $cellRowContinue); /** @@ -103,7 +105,7 @@ * @see https://github.com/PHPOffice/PHPWord/issues/806 */ $section->addPageBreak(); -$section->addText(htmlspecialchars('Table with colspan and rowspan', ENT_COMPAT, 'UTF-8'), $header); +$section->addText('Table with colspan and rowspan', $header); $styleTable = ['borderSize' => 6, 'borderColor' => '999999']; $phpWord->addTableStyle('Colspan Rowspan', $styleTable); @@ -128,13 +130,13 @@ // 5. Nested table $section->addTextBreak(2); -$section->addText(htmlspecialchars('Nested table in a centered and 50% width table.', ENT_COMPAT, 'UTF-8'), $header); +$section->addText('Nested table in a centered and 50% width table.', $header); $table = $section->addTable(array('width' => 50 * 50, 'unit' => 'pct', 'alignment' => \PhpOffice\PhpWord\SimpleType\JcTable::CENTER)); $cell = $table->addRow()->addCell(); -$cell->addText(htmlspecialchars('This cell contains nested table.', ENT_COMPAT, 'UTF-8')); +$cell->addText('This cell contains nested table.'); $innerCell = $cell->addTable(array('alignment' => \PhpOffice\PhpWord\SimpleType\JcTable::CENTER))->addRow()->addCell(); -$innerCell->addText(htmlspecialchars('Inside nested table', ENT_COMPAT, 'UTF-8')); +$innerCell->addText('Inside nested table'); // Save file echo write($phpWord, basename(__FILE__, '.php'), $writers); diff --git a/samples/Sample_10_EastAsianFontStyle.php b/samples/Sample_10_EastAsianFontStyle.php index e4cda63695..2541af86dc 100644 --- a/samples/Sample_10_EastAsianFontStyle.php +++ b/samples/Sample_10_EastAsianFontStyle.php @@ -7,7 +7,7 @@ $section = $phpWord->addSection(); $header = array('size' => 16, 'bold' => true); //1.Use EastAisa FontStyle -$section->addText(htmlspecialchars('中文楷体样式测试', ENT_COMPAT, 'UTF-8'), array('name' => '楷体', 'size' => 16, 'color' => '1B2232')); +$section->addText('中文楷体样式测试', array('name' => '楷体', 'size' => 16, 'color' => '1B2232')); // Save file echo write($phpWord, basename(__FILE__, '.php'), $writers); diff --git a/samples/Sample_12_HeaderFooter.php b/samples/Sample_12_HeaderFooter.php index 4ea3e2872c..b99d81f8dd 100644 --- a/samples/Sample_12_HeaderFooter.php +++ b/samples/Sample_12_HeaderFooter.php @@ -15,47 +15,47 @@ $table->addRow(); $cell = $table->addCell(4500); $textrun = $cell->addTextRun(); -$textrun->addText(htmlspecialchars('This is the header with ', ENT_COMPAT, 'UTF-8')); -$textrun->addLink('https://github.com/PHPOffice/PHPWord', htmlspecialchars('PHPWord on GitHub', ENT_COMPAT, 'UTF-8')); +$textrun->addText('This is the header with '); +$textrun->addLink('https://github.com/PHPOffice/PHPWord', 'PHPWord on GitHub'); $table->addCell(4500)->addImage('resources/PhpWord.png', array('width' => 80, 'height' => 80, 'alignment' => \PhpOffice\PhpWord\SimpleType\Jc::END)); // Add header for all other pages $subsequent = $section->addHeader(); -$subsequent->addText(htmlspecialchars('Subsequent pages in Section 1 will Have this!', ENT_COMPAT, 'UTF-8')); +$subsequent->addText('Subsequent pages in Section 1 will Have this!'); $subsequent->addImage('resources/_mars.jpg', array('width' => 80, 'height' => 80)); // Add footer $footer = $section->addFooter(); -$footer->addPreserveText(htmlspecialchars('Page {PAGE} of {NUMPAGES}.', ENT_COMPAT, 'UTF-8'), null, array('alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER)); -$footer->addLink('https://github.com/PHPOffice/PHPWord', htmlspecialchars('PHPWord on GitHub', ENT_COMPAT, 'UTF-8')); +$footer->addPreserveText('Page {PAGE} of {NUMPAGES}.', null, array('alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER)); +$footer->addLink('https://github.com/PHPOffice/PHPWord', 'PHPWord on GitHub'); // Write some text $section->addTextBreak(); -$section->addText(htmlspecialchars('Some text...', ENT_COMPAT, 'UTF-8')); +$section->addText('Some text...'); // Create a second page $section->addPageBreak(); // Write some text $section->addTextBreak(); -$section->addText(htmlspecialchars('Some text...', ENT_COMPAT, 'UTF-8')); +$section->addText('Some text...'); // Create a third page $section->addPageBreak(); // Write some text $section->addTextBreak(); -$section->addText(htmlspecialchars('Some text...', ENT_COMPAT, 'UTF-8')); +$section->addText('Some text...'); // New portrait section $section2 = $phpWord->addSection(); $sec2Header = $section2->addHeader(); -$sec2Header->addText(htmlspecialchars('All pages in Section 2 will Have this!', ENT_COMPAT, 'UTF-8')); +$sec2Header->addText('All pages in Section 2 will Have this!'); // Write some text $section2->addTextBreak(); -$section2->addText(htmlspecialchars('Some text...', ENT_COMPAT, 'UTF-8')); +$section2->addText('Some text...'); // Save file echo write($phpWord, basename(__FILE__, '.php'), $writers); diff --git a/samples/Sample_13_Images.php b/samples/Sample_13_Images.php index 0088acbd92..a3c2af23a9 100644 --- a/samples/Sample_13_Images.php +++ b/samples/Sample_13_Images.php @@ -7,17 +7,17 @@ // Begin code $section = $phpWord->addSection(); -$section->addText(htmlspecialchars('Local image without any styles:', ENT_COMPAT, 'UTF-8')); +$section->addText('Local image without any styles:'); $section->addImage('resources/_mars.jpg'); $section->addTextBreak(2); -$section->addText(htmlspecialchars('Local image with styles:', ENT_COMPAT, 'UTF-8')); +$section->addText('Local image with styles:'); $section->addImage('resources/_earth.jpg', array('width' => 210, 'height' => 210, 'alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER)); $section->addTextBreak(2); // Remote image $source = 'http://php.net/images/logos/php-med-trans-light.gif'; -$section->addText(htmlspecialchars("Remote image from: {$source}", ENT_COMPAT, 'UTF-8')); +$section->addText("Remote image from: {$source}"); $section->addImage($source); //Wrapping style @@ -25,7 +25,7 @@ $wrappingStyles = array('inline', 'behind', 'infront', 'square', 'tight'); foreach ($wrappingStyles as $wrappingStyle) { $section->addTextBreak(5); - $section->addText(htmlspecialchars("Wrapping style {$wrappingStyle}", ENT_COMPAT, 'UTF-8')); + $section->addText("Wrapping style {$wrappingStyle}"); $section->addImage( 'resources/_earth.jpg', array( @@ -37,12 +37,12 @@ 'wrappingStyle' => $wrappingStyle, ) ); - $section->addText(htmlspecialchars($text, ENT_COMPAT, 'UTF-8')); + $section->addText($text); } //Absolute positioning $section->addTextBreak(3); -$section->addText(htmlspecialchars('Absolute positioning: see top right corner of page', ENT_COMPAT, 'UTF-8')); +$section->addText('Absolute positioning: see top right corner of page'); $section->addImage( 'resources/_mars.jpg', array( @@ -59,8 +59,8 @@ //Relative positioning $section->addTextBreak(3); -$section->addText(htmlspecialchars('Relative positioning: Horizontal position center relative to column,', ENT_COMPAT, 'UTF-8')); -$section->addText(htmlspecialchars('Vertical position top relative to line', ENT_COMPAT, 'UTF-8')); +$section->addText('Relative positioning: Horizontal position center relative to column,'); +$section->addText('Vertical position top relative to line'); $section->addImage( 'resources/_mars.jpg', array( diff --git a/samples/Sample_14_ListItem.php b/samples/Sample_14_ListItem.php index df5ffee3fd..689ac3d3eb 100644 --- a/samples/Sample_14_ListItem.php +++ b/samples/Sample_14_ListItem.php @@ -5,15 +5,16 @@ echo date('H:i:s'), ' Create new PhpWord object', EOL; $phpWord = new \PhpOffice\PhpWord\PhpWord(); -// Begin code -$section = $phpWord->addSection(); +// Define styles +$fontStyleName = 'myOwnStyle'; +$phpWord->addFontStyle($fontStyleName, array('color' => 'FF0000')); -// Style definition +$paragraphStyleName = 'P-Style'; +$phpWord->addParagraphStyle($paragraphStyleName, array('spaceAfter' => 95)); -$phpWord->addFontStyle('myOwnStyle', array('color' => 'FF0000')); -$phpWord->addParagraphStyle('P-Style', array('spaceAfter' => 95)); +$multilevelNumberingStyleName = 'multilevel'; $phpWord->addNumberingStyle( - 'multilevel', + $multilevelNumberingStyleName, array( 'type' => 'multilevel', 'levels' => array( @@ -22,56 +23,59 @@ ), ) ); -$predefinedMultilevel = array('listType' => \PhpOffice\PhpWord\Style\ListItem::TYPE_NUMBER_NESTED); -// Lists +$predefinedMultilevelStyle = array('listType' => \PhpOffice\PhpWord\Style\ListItem::TYPE_NUMBER_NESTED); + +// New section +$section = $phpWord->addSection(); -$section->addText(htmlspecialchars('Multilevel list.', ENT_COMPAT, 'UTF-8')); -$section->addListItem(htmlspecialchars('List Item I', ENT_COMPAT, 'UTF-8'), 0, null, 'multilevel'); -$section->addListItem(htmlspecialchars('List Item I.a', ENT_COMPAT, 'UTF-8'), 1, null, 'multilevel'); -$section->addListItem(htmlspecialchars('List Item I.b', ENT_COMPAT, 'UTF-8'), 1, null, 'multilevel'); -$section->addListItem(htmlspecialchars('List Item II', ENT_COMPAT, 'UTF-8'), 0, null, 'multilevel'); -$section->addListItem(htmlspecialchars('List Item II.a', ENT_COMPAT, 'UTF-8'), 1, null, 'multilevel'); -$section->addListItem(htmlspecialchars('List Item III', ENT_COMPAT, 'UTF-8'), 0, null, 'multilevel'); +// Lists +$section->addText('Multilevel list.'); +$section->addListItem('List Item I', 0, null, $multilevelNumberingStyleName); +$section->addListItem('List Item I.a', 1, null, $multilevelNumberingStyleName); +$section->addListItem('List Item I.b', 1, null, $multilevelNumberingStyleName); +$section->addListItem('List Item II', 0, null, $multilevelNumberingStyleName); +$section->addListItem('List Item II.a', 1, null, $multilevelNumberingStyleName); +$section->addListItem('List Item III', 0, null, $multilevelNumberingStyleName); $section->addTextBreak(2); -$section->addText(htmlspecialchars('Basic simple bulleted list.', ENT_COMPAT, 'UTF-8')); -$section->addListItem(htmlspecialchars('List Item 1', ENT_COMPAT, 'UTF-8')); -$section->addListItem(htmlspecialchars('List Item 2', ENT_COMPAT, 'UTF-8')); -$section->addListItem(htmlspecialchars('List Item 3', ENT_COMPAT, 'UTF-8')); +$section->addText('Basic simple bulleted list.'); +$section->addListItem('List Item 1'); +$section->addListItem('List Item 2'); +$section->addListItem('List Item 3'); $section->addTextBreak(2); -$section->addText(htmlspecialchars('Continue from multilevel list above.', ENT_COMPAT, 'UTF-8')); -$section->addListItem(htmlspecialchars('List Item IV', ENT_COMPAT, 'UTF-8'), 0, null, 'multilevel'); -$section->addListItem(htmlspecialchars('List Item IV.a', ENT_COMPAT, 'UTF-8'), 1, null, 'multilevel'); +$section->addText('Continue from multilevel list above.'); +$section->addListItem('List Item IV', 0, null, $multilevelNumberingStyleName); +$section->addListItem('List Item IV.a', 1, null, $multilevelNumberingStyleName); $section->addTextBreak(2); -$section->addText(htmlspecialchars('Multilevel predefined list.', ENT_COMPAT, 'UTF-8')); -$section->addListItem(htmlspecialchars('List Item 1', ENT_COMPAT, 'UTF-8'), 0, 'myOwnStyle', $predefinedMultilevel, 'P-Style'); -$section->addListItem(htmlspecialchars('List Item 2', ENT_COMPAT, 'UTF-8'), 0, 'myOwnStyle', $predefinedMultilevel, 'P-Style'); -$section->addListItem(htmlspecialchars('List Item 3', ENT_COMPAT, 'UTF-8'), 1, 'myOwnStyle', $predefinedMultilevel, 'P-Style'); -$section->addListItem(htmlspecialchars('List Item 4', ENT_COMPAT, 'UTF-8'), 1, 'myOwnStyle', $predefinedMultilevel, 'P-Style'); -$section->addListItem(htmlspecialchars('List Item 5', ENT_COMPAT, 'UTF-8'), 2, 'myOwnStyle', $predefinedMultilevel, 'P-Style'); -$section->addListItem(htmlspecialchars('List Item 6', ENT_COMPAT, 'UTF-8'), 1, 'myOwnStyle', $predefinedMultilevel, 'P-Style'); -$section->addListItem(htmlspecialchars('List Item 7', ENT_COMPAT, 'UTF-8'), 0, 'myOwnStyle', $predefinedMultilevel, 'P-Style'); +$section->addText('Multilevel predefined list.'); +$section->addListItem('List Item 1', 0, $fontStyleName, $predefinedMultilevelStyle, $paragraphStyleName); +$section->addListItem('List Item 2', 0, $fontStyleName, $predefinedMultilevelStyle, $paragraphStyleName); +$section->addListItem('List Item 3', 1, $fontStyleName, $predefinedMultilevelStyle, $paragraphStyleName); +$section->addListItem('List Item 4', 1, $fontStyleName, $predefinedMultilevelStyle, $paragraphStyleName); +$section->addListItem('List Item 5', 2, $fontStyleName, $predefinedMultilevelStyle, $paragraphStyleName); +$section->addListItem('List Item 6', 1, $fontStyleName, $predefinedMultilevelStyle, $paragraphStyleName); +$section->addListItem('List Item 7', 0, $fontStyleName, $predefinedMultilevelStyle, $paragraphStyleName); $section->addTextBreak(2); -$section->addText(htmlspecialchars('List with inline formatting.', ENT_COMPAT, 'UTF-8')); +$section->addText('List with inline formatting.'); $listItemRun = $section->addListItemRun(); -$listItemRun->addText(htmlspecialchars('List item 1', ENT_COMPAT, 'UTF-8')); -$listItemRun->addText(htmlspecialchars(' in bold', ENT_COMPAT, 'UTF-8'), array('bold' => true)); +$listItemRun->addText('List item 1'); +$listItemRun->addText(' in bold', array('bold' => true)); $listItemRun = $section->addListItemRun(); -$listItemRun->addText(htmlspecialchars('List item 2', ENT_COMPAT, 'UTF-8')); -$listItemRun->addText(htmlspecialchars(' in italic', ENT_COMPAT, 'UTF-8'), array('italic' => true)); +$listItemRun->addText('List item 2'); +$listItemRun->addText(' in italic', array('italic' => true)); $listItemRun = $section->addListItemRun(); -$listItemRun->addText(htmlspecialchars('List item 3', ENT_COMPAT, 'UTF-8')); -$listItemRun->addText(htmlspecialchars(' underlined', ENT_COMPAT, 'UTF-8'), array('underline' => 'dash')); +$listItemRun->addText('List item 3'); +$listItemRun->addText(' underlined', array('underline' => 'dash')); $section->addTextBreak(2); // Numbered heading - +$headingNumberingStyleName = 'headingNumbering'; $phpWord->addNumberingStyle( - 'headingNumbering', + $headingNumberingStyleName, array('type' => 'multilevel', 'levels' => array( array('pStyle' => 'Heading1', 'format' => 'decimal', 'text' => '%1'), @@ -80,13 +84,13 @@ ), ) ); -$phpWord->addTitleStyle(1, array('size' => 16), array('numStyle' => 'headingNumbering', 'numLevel' => 0)); -$phpWord->addTitleStyle(2, array('size' => 14), array('numStyle' => 'headingNumbering', 'numLevel' => 1)); -$phpWord->addTitleStyle(3, array('size' => 12), array('numStyle' => 'headingNumbering', 'numLevel' => 2)); +$phpWord->addTitleStyle(1, array('size' => 16), array('numStyle' => $headingNumberingStyleName, 'numLevel' => 0)); +$phpWord->addTitleStyle(2, array('size' => 14), array('numStyle' => $headingNumberingStyleName, 'numLevel' => 1)); +$phpWord->addTitleStyle(3, array('size' => 12), array('numStyle' => $headingNumberingStyleName, 'numLevel' => 2)); -$section->addTitle(htmlspecialchars('Heading 1', ENT_COMPAT, 'UTF-8'), 1); -$section->addTitle(htmlspecialchars('Heading 2', ENT_COMPAT, 'UTF-8'), 2); -$section->addTitle(htmlspecialchars('Heading 3', ENT_COMPAT, 'UTF-8'), 3); +$section->addTitle('Heading 1', 1); +$section->addTitle('Heading 2', 2); +$section->addTitle('Heading 3', 3); // Save file echo write($phpWord, basename(__FILE__, '.php'), $writers); diff --git a/samples/Sample_15_Link.php b/samples/Sample_15_Link.php index b55db21cae..86c7973bc1 100644 --- a/samples/Sample_15_Link.php +++ b/samples/Sample_15_Link.php @@ -5,20 +5,22 @@ echo date('H:i:s'), ' Create new PhpWord object', EOL; $phpWord = new \PhpOffice\PhpWord\PhpWord(); -// Begin code +// Define styles +$linkFontStyleName = 'myOwnLinStyle'; +$phpWord->addLinkStyle($linkFontStyleName, array('bold' => true, 'color' => '808000')); + +// New section $section = $phpWord->addSection(); // Add hyperlink elements $section->addLink( 'https://github.com/PHPOffice/PHPWord', - htmlspecialchars('PHPWord on GitHub', ENT_COMPAT, 'UTF-8'), + 'PHPWord on GitHub', array('color' => '0000FF', 'underline' => \PhpOffice\PhpWord\Style\Font::UNDERLINE_SINGLE) ); $section->addTextBreak(2); - -$phpWord->addLinkStyle('myOwnLinkStyle', array('bold' => true, 'color' => '808000')); -$section->addLink('http://www.bing.com', null, 'myOwnLinkStyle'); -$section->addLink('http://www.yahoo.com', null, 'myOwnLinkStyle'); +$section->addLink('http://www.bing.com', null, $linkFontStyleName); +$section->addLink('http://www.yahoo.com', null, $linkFontStyleName); // Save file echo write($phpWord, basename(__FILE__, '.php'), $writers); diff --git a/samples/Sample_16_Object.php b/samples/Sample_16_Object.php index 950f7743df..8b05b9e8ac 100644 --- a/samples/Sample_16_Object.php +++ b/samples/Sample_16_Object.php @@ -7,7 +7,7 @@ // Begin code $section = $phpWord->addSection(); -$section->addText(htmlspecialchars('You can open this OLE object by double clicking on the icon:', ENT_COMPAT, 'UTF-8')); +$section->addText('You can open this OLE object by double clicking on the icon:'); $section->addTextBreak(2); $section->addObject('resources/_sheet.xls'); diff --git a/samples/Sample_17_TitleTOC.php b/samples/Sample_17_TitleTOC.php index 6fcf671500..306595eb39 100644 --- a/samples/Sample_17_TitleTOC.php +++ b/samples/Sample_17_TitleTOC.php @@ -5,66 +5,63 @@ echo date('H:i:s'), ' Create new PhpWord object', EOL; $phpWord = new \PhpOffice\PhpWord\PhpWord(); -// Begin code +// New section $section = $phpWord->addSection(); -// Define the TOC font style -$fontStyle = array('spaceAfter' => 60, 'size' => 12); -$fontStyle2 = array('size' => 10); - -// Add title styles +// Define styles +$fontStyle12 = array('spaceAfter' => 60, 'size' => 12); +$fontStyle10 = array('size' => 10); $phpWord->addTitleStyle(1, array('size' => 20, 'color' => '333333', 'bold' => true)); $phpWord->addTitleStyle(2, array('size' => 16, 'color' => '666666')); $phpWord->addTitleStyle(3, array('size' => 14, 'italic' => true)); $phpWord->addTitleStyle(4, array('size' => 12)); // Add text elements -$section->addText(htmlspecialchars('Table of contents 1', ENT_COMPAT, 'UTF-8')); +$section->addText('Table of contents 1'); $section->addTextBreak(2); // Add TOC #1 -$toc = $section->addTOC($fontStyle); +$toc = $section->addTOC($fontStyle12); $section->addTextBreak(2); // Filler -$section->addText(htmlspecialchars('Text between TOC', ENT_COMPAT, 'UTF-8')); +$section->addText('Text between TOC'); $section->addTextBreak(2); // Add TOC #1 -$section->addText(htmlspecialchars('Table of contents 2', ENT_COMPAT, 'UTF-8')); +$section->addText('Table of contents 2'); $section->addTextBreak(2); -$toc2 = $section->addTOC($fontStyle2); +$toc2 = $section->addTOC($fontStyle10); $toc2->setMinDepth(2); $toc2->setMaxDepth(3); - // Add Titles $section->addPageBreak(); -$section->addTitle(htmlspecialchars('Foo & Bar', ENT_COMPAT, 'UTF-8'), 1); -$section->addText(htmlspecialchars('Some text...', ENT_COMPAT, 'UTF-8')); +$section->addTitle('Foo n Bar', 1); +$section->addText('Some text...'); $section->addTextBreak(2); -$section->addTitle(htmlspecialchars('I am a Subtitle of Title 1', ENT_COMPAT, 'UTF-8'), 2); +$section->addTitle('I am a Subtitle of Title 1', 2); $section->addTextBreak(2); -$section->addText(htmlspecialchars('Some more text...', ENT_COMPAT, 'UTF-8')); +$section->addText('Some more text...'); $section->addTextBreak(2); -$section->addTitle(htmlspecialchars('Another Title (Title 2)', ENT_COMPAT, 'UTF-8'), 1); -$section->addText(htmlspecialchars('Some text...', ENT_COMPAT, 'UTF-8')); +$section->addTitle('Another Title (Title 2)', 1); +$section->addText('Some text...'); $section->addPageBreak(); -$section->addTitle(htmlspecialchars('I am Title 3', ENT_COMPAT, 'UTF-8'), 1); -$section->addText(htmlspecialchars('And more text...', ENT_COMPAT, 'UTF-8')); +$section->addTitle('I am Title 3', 1); +$section->addText('And more text...'); $section->addTextBreak(2); -$section->addTitle(htmlspecialchars('I am a Subtitle of Title 3', ENT_COMPAT, 'UTF-8'), 2); -$section->addText(htmlspecialchars('Again and again, more text...', ENT_COMPAT, 'UTF-8')); -$section->addTitle(htmlspecialchars('Subtitle 3.1.1', ENT_COMPAT, 'UTF-8'), 3); -$section->addText(htmlspecialchars('Text', ENT_COMPAT, 'UTF-8')); -$section->addTitle(htmlspecialchars('Subtitle 3.1.1.1', ENT_COMPAT, 'UTF-8'), 4); -$section->addText(htmlspecialchars('Text', ENT_COMPAT, 'UTF-8')); -$section->addTitle(htmlspecialchars('Subtitle 3.1.1.2', ENT_COMPAT, 'UTF-8'), 4); -$section->addText(htmlspecialchars('Text', ENT_COMPAT, 'UTF-8')); -$section->addTitle(htmlspecialchars('Subtitle 3.1.2', ENT_COMPAT, 'UTF-8'), 3); -$section->addText(htmlspecialchars('Text', ENT_COMPAT, 'UTF-8')); +$section->addTitle('I am a Subtitle of Title 3', 2); +$section->addText('Again and again, more text...'); +$section->addTitle('Subtitle 3.1.1', 3); +$section->addText('Text'); +$section->addTitle('Subtitle 3.1.1.1', 4); +$section->addText('Text'); +$section->addTitle('Subtitle 3.1.1.2', 4); +$section->addText('Text'); +$section->addTitle('Subtitle 3.1.2', 3); +$section->addText('Text'); echo date('H:i:s'), ' Note: Please refresh TOC manually.', EOL; diff --git a/samples/Sample_18_Watermark.php b/samples/Sample_18_Watermark.php index 5a26fd0465..dbab2b7f26 100644 --- a/samples/Sample_18_Watermark.php +++ b/samples/Sample_18_Watermark.php @@ -6,11 +6,10 @@ $phpWord = new \PhpOffice\PhpWord\PhpWord(); // Begin code - $section = $phpWord->addSection(); $header = $section->addHeader(); $header->addWatermark('resources/_earth.jpg', array('marginTop' => 200, 'marginLeft' => 55)); -$section->addText(htmlspecialchars('The header reference to the current section includes a watermark image.', ENT_COMPAT, 'UTF-8')); +$section->addText('The header reference to the current section includes a watermark image.'); // Save file echo write($phpWord, basename(__FILE__, '.php'), $writers); diff --git a/samples/Sample_19_TextBreak.php b/samples/Sample_19_TextBreak.php index b0405b6c72..17e2b1cbd7 100644 --- a/samples/Sample_19_TextBreak.php +++ b/samples/Sample_19_TextBreak.php @@ -5,25 +5,31 @@ echo date('H:i:s'), ' Create new PhpWord object', EOL; $phpWord = new \PhpOffice\PhpWord\PhpWord(); -// Begin code -$fontStyle = array('size' => 24); -$paragraphStyle = array('spacing' => 240, 'size' => 24); -$phpWord->addFontStyle('fontStyle', array('size' => 9)); -$phpWord->addParagraphStyle('paragraphStyle', array('spacing' => 480)); -$fontStyle = array('size' => 24); +// Define styles +$fontStyle24 = array('size' => 24); +$paragraphStyle24 = array('spacing' => 240, 'size' => 24); + +$fontStyleName = 'fontStyle'; +$phpWord->addFontStyle($fontStyleName, array('size' => 9)); + +$paragraphStyleName = 'paragraphStyle'; +$phpWord->addParagraphStyle($paragraphStyleName, array('spacing' => 480)); + +// New section $section = $phpWord->addSection(); -$section->addText(htmlspecialchars('Text break with no style:', ENT_COMPAT, 'UTF-8')); + +$section->addText('Text break with no style:'); $section->addTextBreak(); -$section->addText(htmlspecialchars('Text break with defined font style:', ENT_COMPAT, 'UTF-8')); -$section->addTextBreak(1, 'fontStyle'); -$section->addText(htmlspecialchars('Text break with defined paragraph style:', ENT_COMPAT, 'UTF-8')); -$section->addTextBreak(1, null, 'paragraphStyle'); -$section->addText(htmlspecialchars('Text break with inline font style:', ENT_COMPAT, 'UTF-8')); -$section->addTextBreak(1, $fontStyle); -$section->addText(htmlspecialchars('Text break with inline paragraph style:', ENT_COMPAT, 'UTF-8')); -$section->addTextBreak(1, null, $paragraphStyle); -$section->addText(htmlspecialchars('Done.', ENT_COMPAT, 'UTF-8')); +$section->addText('Text break with defined font style:'); +$section->addTextBreak(1, $fontStyleName); +$section->addText('Text break with defined paragraph style:'); +$section->addTextBreak(1, null, $paragraphStyleName); +$section->addText('Text break with inline font style:'); +$section->addTextBreak(1, $fontStyle24); +$section->addText('Text break with inline paragraph style:'); +$section->addTextBreak(1, null, $paragraphStyle24); +$section->addText('Done.'); // Save file echo write($phpWord, basename(__FILE__, '.php'), $writers); diff --git a/samples/Sample_20_BGColor.php b/samples/Sample_20_BGColor.php index 143189ad86..628ae8902e 100644 --- a/samples/Sample_20_BGColor.php +++ b/samples/Sample_20_BGColor.php @@ -4,17 +4,16 @@ // New Word document echo date('H:i:s'), ' Create new PhpWord object', EOL; $phpWord = new \PhpOffice\PhpWord\PhpWord(); + +// New section $section = $phpWord->addSection(); $section->addText( - htmlspecialchars('This is some text highlighted using fgColor (limited to 15 colors) ', ENT_COMPAT, 'UTF-8'), + 'This is some text highlighted using fgColor (limited to 15 colors)', array('fgColor' => \PhpOffice\PhpWord\Style\Font::FGCOLOR_YELLOW) ); -$section->addText( - htmlspecialchars('This one uses bgColor and is using hex value (0xfbbb10)', ENT_COMPAT, 'UTF-8'), - array('bgColor' => 'fbbb10') -); -$section->addText(htmlspecialchars('Compatible with font colors', ENT_COMPAT, 'UTF-8'), array('color' => '0000ff', 'bgColor' => 'fbbb10')); +$section->addText('This one uses bgColor and is using hex value (0xfbbb10)', array('bgColor' => 'fbbb10')); +$section->addText('Compatible with font colors', array('color' => '0000ff', 'bgColor' => 'fbbb10')); // Save file echo write($phpWord, basename(__FILE__, '.php'), $writers); diff --git a/samples/Sample_21_TableRowRules.php b/samples/Sample_21_TableRowRules.php index a1414dc14c..ca33de3bcd 100644 --- a/samples/Sample_21_TableRowRules.php +++ b/samples/Sample_21_TableRowRules.php @@ -4,19 +4,15 @@ // New Word document echo date('H:i:s'), ' Create new PhpWord object', EOL; $phpWord = new \PhpOffice\PhpWord\PhpWord(); + +// New section $section = $phpWord->addSection(); -$section->addText(htmlspecialchars('By default, when you insert an image, it adds a textbreak after its content.', ENT_COMPAT, 'UTF-8')); +$section->addText('By default, when you insert an image, it adds a textbreak after its content.'); +$section->addText('If we want a simple border around an image, we wrap the image inside a table->row->cell'); $section->addText( - htmlspecialchars('If we want a simple border around an image, we wrap the image inside a table->row->cell', ENT_COMPAT, 'UTF-8') -); -$section->addText( - htmlspecialchars( - 'On the image with the red border, even if we set the row height to the height of the image, ' - . 'the textbreak is still there:', - ENT_COMPAT, - 'UTF-8' - ) + 'On the image with the red border, even if we set the row height to the height of the image, ' + . 'the textbreak is still there:' ); $table1 = $section->addTable(array('cellMargin' => 0, 'cellMarginRight' => 0, 'cellMarginBottom' => 0, 'cellMarginLeft' => 0)); @@ -25,13 +21,7 @@ $cell1->addImage('./resources/_earth.jpg', array('width' => 250, 'height' => 250, 'alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER)); $section->addTextBreak(); -$section->addText( - htmlspecialchars( - "But if we set the rowStyle 'exactHeight' to true, the real row height is used, removing the textbreak:", - ENT_COMPAT, - 'UTF-8' - ) -); +$section->addText("But if we set the rowStyle 'exactHeight' to true, the real row height is used, removing the textbreak:"); $table2 = $section->addTable( array( @@ -46,10 +36,8 @@ $cell2->addImage('./resources/_earth.jpg', array('width' => 250, 'height' => 250, 'alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER)); $section->addTextBreak(); -$section->addText( - htmlspecialchars('In this example, image is 250px height. Rows are calculated in twips, and 1px = 15twips.', ENT_COMPAT, 'UTF-8') -); -$section->addText(htmlspecialchars('So: $' . "table2->addRow(3750, array('exactHeight'=>true));", ENT_COMPAT, 'UTF-8')); +$section->addText('In this example, image is 250px height. Rows are calculated in twips, and 1px = 15twips.'); +$section->addText('So: $' . "table2->addRow(3750, array('exactHeight'=>true));"); // Save file echo write($phpWord, basename(__FILE__, '.php'), $writers); diff --git a/samples/Sample_22_CheckBox.php b/samples/Sample_22_CheckBox.php index 9c8c05a71a..5a2ac3e2cc 100644 --- a/samples/Sample_22_CheckBox.php +++ b/samples/Sample_22_CheckBox.php @@ -5,14 +5,16 @@ echo date('H:i:s'), ' Create new PhpWord object', EOL; $phpWord = new \PhpOffice\PhpWord\PhpWord(); +// New section $section = $phpWord->addSection(); -$section->addText(htmlspecialchars('Check box in section', ENT_COMPAT, 'UTF-8')); -$section->addCheckBox('chkBox1', htmlspecialchars('Checkbox 1', ENT_COMPAT, 'UTF-8')); -$section->addText(htmlspecialchars('Check box in table cell', ENT_COMPAT, 'UTF-8')); + +$section->addText('Check box in section'); +$section->addCheckBox('chkBox1', 'Checkbox 1'); +$section->addText('Check box in table cell'); $table = $section->addTable(); $table->addRow(); $cell = $table->addCell(); -$cell->addCheckBox('chkBox2', htmlspecialchars('Checkbox 2', ENT_COMPAT, 'UTF-8')); +$cell->addCheckBox('chkBox2', 'Checkbox 2'); // Save file echo write($phpWord, basename(__FILE__, '.php'), $writers); diff --git a/samples/Sample_25_TextBox.php b/samples/Sample_25_TextBox.php index 36bd171840..7655e25f9d 100644 --- a/samples/Sample_25_TextBox.php +++ b/samples/Sample_25_TextBox.php @@ -5,6 +5,7 @@ echo date('H:i:s'), ' Create new PhpWord object', EOL; $phpWord = new \PhpOffice\PhpWord\PhpWord(); +// New section $section = $phpWord->addSection(); // In section @@ -17,28 +18,28 @@ 'borderColor' => '#FF0000', ) ); -$textbox->addText(htmlspecialchars('Text box content in section.', ENT_COMPAT, 'UTF-8')); -$textbox->addText(htmlspecialchars('Another line.', ENT_COMPAT, 'UTF-8')); +$textbox->addText('Text box content in section.'); +$textbox->addText('Another line.'); $cell = $textbox->addTable()->addRow()->addCell(); -$cell->addText(htmlspecialchars('Table inside textbox', ENT_COMPAT, 'UTF-8')); +$cell->addText('Table inside textbox'); // Inside table $section->addTextBreak(2); $cell = $section->addTable()->addRow()->addCell(300); $textbox = $cell->addTextBox(array('borderSize' => 1, 'borderColor' => '#0000FF', 'innerMargin' => 100)); -$textbox->addText(htmlspecialchars('Textbox inside table', ENT_COMPAT, 'UTF-8')); +$textbox->addText('Textbox inside table'); // Inside header with textrun $header = $section->addHeader(); $textbox = $header->addTextBox(array('width' => 600, 'borderSize' => 1, 'borderColor' => '#00FF00')); $textrun = $textbox->addTextRun(); -$textrun->addText(htmlspecialchars('TextBox in header. TextBox can contain a TextRun ', ENT_COMPAT, 'UTF-8')); -$textrun->addText(htmlspecialchars('with bold text', ENT_COMPAT, 'UTF-8'), array('bold' => true)); -$textrun->addText(htmlspecialchars(', ', ENT_COMPAT, 'UTF-8')); -$textrun->addLink('https://github.com/PHPOffice/PHPWord', htmlspecialchars('PHPWord on GitHub', ENT_COMPAT, 'UTF-8')); -$textrun->addText(htmlspecialchars(', and image ', ENT_COMPAT, 'UTF-8')); +$textrun->addText('TextBox in header. TextBox can contain a TextRun '); +$textrun->addText('with bold text', array('bold' => true)); +$textrun->addText(', '); +$textrun->addLink('https://github.com/PHPOffice/PHPWord', 'PHPWord on GitHub'); +$textrun->addText(', and image '); $textrun->addImage('resources/_earth.jpg', array('width' => 18, 'height' => 18)); -$textrun->addText(htmlspecialchars('.', ENT_COMPAT, 'UTF-8')); +$textrun->addText('.'); // Save file echo write($phpWord, basename(__FILE__, '.php'), $writers); diff --git a/samples/Sample_27_Field.php b/samples/Sample_27_Field.php index 479342e3dd..5774789561 100644 --- a/samples/Sample_27_Field.php +++ b/samples/Sample_27_Field.php @@ -5,24 +5,24 @@ echo date('H:i:s'), ' Create new PhpWord object', EOL; $phpWord = new \PhpOffice\PhpWord\PhpWord(); -// Begin code +// New section $section = $phpWord->addSection(); // Add Field elements // See Element/Field.php for all options -$section->addText(htmlspecialchars('Date field:', ENT_COMPAT, 'UTF-8')); +$section->addText('Date field:'); $section->addField('DATE', array('dateformat' => 'dddd d MMMM yyyy H:mm:ss'), array('PreserveFormat')); -$section->addText(htmlspecialchars('Page field:', ENT_COMPAT, 'UTF-8')); +$section->addText('Page field:'); $section->addField('PAGE', array('format' => 'ArabicDash')); -$section->addText(htmlspecialchars('Number of pages field:', ENT_COMPAT, 'UTF-8')); +$section->addText('Number of pages field:'); $section->addField('NUMPAGES', array('format' => 'Arabic', 'numformat' => '0,00'), array('PreserveFormat')); $textrun = $section->addTextRun(array('alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER)); -$textrun->addText(htmlspecialchars('This is the date of lunar calendar ', ENT_COMPAT, 'UTF-8')); +$textrun->addText('This is the date of lunar calendar '); $textrun->addField('DATE', array('dateformat' => 'd-M-yyyy H:mm:ss'), array('PreserveFormat', 'LunarCalendar')); -$textrun->addText(htmlspecialchars(' written in a textrun.', ENT_COMPAT, 'UTF-8')); +$textrun->addText(' written in a textrun.'); // Save file echo write($phpWord, basename(__FILE__, '.php'), $writers); diff --git a/samples/Sample_29_Line.php b/samples/Sample_29_Line.php index 5b288803a4..030308eef1 100644 --- a/samples/Sample_29_Line.php +++ b/samples/Sample_29_Line.php @@ -5,12 +5,12 @@ echo date('H:i:s'), ' Create new PhpWord object', EOL; $phpWord = new \PhpOffice\PhpWord\PhpWord(); -// Begin code +// New section $section = $phpWord->addSection(); // Add Line elements // See Element/Line.php for all options -$section->addText(htmlspecialchars('Horizontal Line (Inline style):', ENT_COMPAT, 'UTF-8')); +$section->addText('Horizontal Line (Inline style):'); $section->addLine( array( 'width' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(4), @@ -18,7 +18,7 @@ 'positioning' => 'absolute', ) ); -$section->addText(htmlspecialchars('Vertical Line (Inline style):', ENT_COMPAT, 'UTF-8')); +$section->addText('Vertical Line (Inline style):'); $section->addLine( array( 'width' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(0), @@ -29,7 +29,7 @@ // Two text break $section->addTextBreak(1); -$section->addText(htmlspecialchars('Positioned Line (red):', ENT_COMPAT, 'UTF-8')); +$section->addText('Positioned Line (red):'); $section->addLine( array( 'width' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(4), @@ -44,7 +44,7 @@ ) ); -$section->addText(htmlspecialchars('Horizontal Formatted Line', ENT_COMPAT, 'UTF-8')); +$section->addText('Horizontal Formatted Line'); $section->addLine( array( 'width' => \PhpOffice\PhpWord\Shared\Converter::cmToPixel(15), diff --git a/samples/Sample_31_Shape.php b/samples/Sample_31_Shape.php index d8c4e4f208..33628fcea4 100644 --- a/samples/Sample_31_Shape.php +++ b/samples/Sample_31_Shape.php @@ -3,14 +3,16 @@ // New Word document echo date('H:i:s'), ' Create new PhpWord object', EOL; - $phpWord = new \PhpOffice\PhpWord\PhpWord(); -$phpWord->addTitleStyle(1, array('size' => 14, 'bold' => true)); +// New section $section = $phpWord->addSection(); +// Define styles +$phpWord->addTitleStyle(1, array('size' => 14, 'bold' => true)); + // Arc -$section->addTitle(htmlspecialchars('Arc', ENT_COMPAT, 'UTF-8'), 1); +$section->addTitle('Arc', 1); $section->addShape( 'arc', array( @@ -21,7 +23,7 @@ ); // Curve -$section->addTitle(htmlspecialchars('Curve', ENT_COMPAT, 'UTF-8'), 1); +$section->addTitle('Curve', 1); $section->addShape( 'curve', array( @@ -38,7 +40,7 @@ ); // Line -$section->addTitle(htmlspecialchars('Line', ENT_COMPAT, 'UTF-8'), 1); +$section->addTitle('Line', 1); $section->addShape( 'line', array( @@ -54,7 +56,7 @@ ); // Polyline -$section->addTitle(htmlspecialchars('Polyline', ENT_COMPAT, 'UTF-8'), 1); +$section->addTitle('Polyline', 1); $section->addShape( 'polyline', array( @@ -64,7 +66,7 @@ ); // Rectangle -$section->addTitle(htmlspecialchars('Rectangle', ENT_COMPAT, 'UTF-8'), 1); +$section->addTitle('Rectangle', 1); $section->addShape( 'rect', array( @@ -77,7 +79,7 @@ ); // Oval -$section->addTitle(htmlspecialchars('Oval', ENT_COMPAT, 'UTF-8'), 1); +$section->addTitle('Oval', 1); $section->addShape( 'oval', array( diff --git a/samples/Sample_32_Chart.php b/samples/Sample_32_Chart.php index bc18392ef9..2c6458ca4a 100644 --- a/samples/Sample_32_Chart.php +++ b/samples/Sample_32_Chart.php @@ -5,14 +5,15 @@ // New Word document echo date('H:i:s'), ' Create new PhpWord object', EOL; - $phpWord = new \PhpOffice\PhpWord\PhpWord(); + +// Define styles $phpWord->addTitleStyle(1, array('size' => 14, 'bold' => true), array('keepNext' => true, 'spaceBefore' => 240)); $phpWord->addTitleStyle(2, array('size' => 14, 'bold' => true), array('keepNext' => true, 'spaceBefore' => 240)); // 2D charts $section = $phpWord->addSection(); -$section->addTitle(htmlspecialchars('2D charts', ENT_COMPAT, 'UTF-8'), 1); +$section->addTitle('2D charts', 1); $section = $phpWord->addSection(array('colsNum' => 2, 'breakType' => 'continuous')); $chartTypes = array('pie', 'doughnut', 'bar', 'column', 'line', 'area', 'scatter', 'radar'); @@ -38,7 +39,7 @@ // 3D charts $section = $phpWord->addSection(array('breakType' => 'continuous')); -$section->addTitle(htmlspecialchars('3D charts', ENT_COMPAT, 'UTF-8'), 1); +$section->addTitle('3D charts', 1); $section = $phpWord->addSection(array('colsNum' => 2, 'breakType' => 'continuous')); $chartTypes = array('pie', 'bar', 'column', 'line', 'area'); diff --git a/samples/Sample_33_FormField.php b/samples/Sample_33_FormField.php index df7fcb7ae9..a855d42a02 100644 --- a/samples/Sample_33_FormField.php +++ b/samples/Sample_33_FormField.php @@ -6,18 +6,19 @@ $phpWord = new \PhpOffice\PhpWord\PhpWord(); $phpWord->getProtection()->setEditing('forms'); +// New section $section = $phpWord->addSection(); $textrun = $section->addTextRun(); -$textrun->addText(htmlspecialchars('Form fields can be added in a text run and can be in form of textinput ', ENT_COMPAT, 'UTF-8')); +$textrun->addText('Form fields can be added in a text run and can be in form of textinput '); $textrun->addFormField('textinput')->setName('MyTextBox'); -$textrun->addText(htmlspecialchars(', checkbox ', ENT_COMPAT, 'UTF-8')); +$textrun->addText(', checkbox '); $textrun->addFormField('checkbox')->setDefault(true); -$textrun->addText(htmlspecialchars(', or dropdown ', ENT_COMPAT, 'UTF-8')); +$textrun->addText(', or dropdown '); $textrun->addFormField('dropdown')->setEntries(array('Choice 1', 'Choice 2', 'Choice 3')); -$textrun->addText(htmlspecialchars('. You have to set document protection to "forms" to enable dropdown.', ENT_COMPAT, 'UTF-8')); +$textrun->addText('. You have to set document protection to "forms" to enable dropdown.'); -$section->addText(htmlspecialchars('They can also be added as a stand alone paragraph.', ENT_COMPAT, 'UTF-8')); +$section->addText('They can also be added as a stand alone paragraph.'); $section->addFormField('textinput')->setValue('Your name'); // Save file diff --git a/samples/Sample_34_SDT.php b/samples/Sample_34_SDT.php index 3f2cdcc154..a50422796e 100644 --- a/samples/Sample_34_SDT.php +++ b/samples/Sample_34_SDT.php @@ -5,18 +5,19 @@ echo date('H:i:s'), ' Create new PhpWord object', EOL; $phpWord = new \PhpOffice\PhpWord\PhpWord(); +// New section $section = $phpWord->addSection(); $textrun = $section->addTextRun(); -$textrun->addText(htmlspecialchars('Combobox: ', ENT_COMPAT, 'UTF-8')); +$textrun->addText('Combobox: '); $textrun->addSDT('comboBox')->setListItems(array('1' => 'Choice 1', '2' => 'Choice 2')); $textrun = $section->addTextRun(); -$textrun->addText(htmlspecialchars('Date: ', ENT_COMPAT, 'UTF-8')); +$textrun->addText('Date: '); $textrun->addSDT('date'); $textrun = $section->addTextRun(); -$textrun->addText(htmlspecialchars('Drop down list: ', ENT_COMPAT, 'UTF-8')); +$textrun->addText('Drop down list: '); $textrun->addSDT('dropDownList')->setListItems(array('1' => 'Choice 1', '2' => 'Choice 2')); // Save file diff --git a/samples/Sample_35_InternalLink.php b/samples/Sample_35_InternalLink.php index 90bae238ef..5ab7d9b4d9 100644 --- a/samples/Sample_35_InternalLink.php +++ b/samples/Sample_35_InternalLink.php @@ -6,13 +6,13 @@ $phpWord = new \PhpOffice\PhpWord\PhpWord(); $section = $phpWord->addSection(); -$section->addTitle(htmlspecialchars('This is page 1', ENT_COMPAT, 'UTF-8'), 1); +$section->addTitle('This is page 1', 1); $linkIsInternal = true; -$section->addLink('MyBookmark', htmlspecialchars('Take me to page 3', ENT_COMPAT, 'UTF-8'), null, null, $linkIsInternal); +$section->addLink('MyBookmark', 'Take me to page 3', null, null, $linkIsInternal); $section->addPageBreak(); -$section->addTitle(htmlspecialchars('This is page 2', ENT_COMPAT, 'UTF-8'), 1); +$section->addTitle('This is page 2', 1); $section->addPageBreak(); -$section->addTitle(htmlspecialchars('This is page 3', ENT_COMPAT, 'UTF-8'), 1); +$section->addTitle('This is page 3', 1); $section->addBookmark('MyBookmark'); // Save file diff --git a/samples/Sample_36_RTL.php b/samples/Sample_36_RTL.php index 3121e4d06b..615557d78e 100644 --- a/samples/Sample_36_RTL.php +++ b/samples/Sample_36_RTL.php @@ -5,12 +5,14 @@ echo date('H:i:s'), ' Create new PhpWord object', EOL; $phpWord = new \PhpOffice\PhpWord\PhpWord(); +// New section $section = $phpWord->addSection(); + $textrun = $section->addTextRun(); -$textrun->addText(htmlspecialchars('This is a Left to Right paragraph.', ENT_COMPAT, 'UTF-8')); +$textrun->addText('This is a Left to Right paragraph.'); $textrun = $section->addTextRun(array('alignment' => \PhpOffice\PhpWord\SimpleType\Jc::END)); -$textrun->addText(htmlspecialchars('سلام این یک پاراگراف راست به چپ است', ENT_COMPAT, 'UTF-8'), array('rtl' => true)); +$textrun->addText('سلام این یک پاراگراف راست به چپ است', array('rtl' => true)); // Save file echo write($phpWord, basename(__FILE__, '.php'), $writers); diff --git a/samples/Sample_Header.php b/samples/Sample_Header.php index 80af0f888d..90bdf4fa11 100644 --- a/samples/Sample_Header.php +++ b/samples/Sample_Header.php @@ -20,6 +20,9 @@ $writers['PDF'] = null; } +// Turn output escaping on +Settings::setOutputEscapingEnabled(true); + // Return to the caller script when runs by CLI if (CLI) { return; diff --git a/src/PhpWord/Escaper/AbstractEscaper.php b/src/PhpWord/Escaper/AbstractEscaper.php new file mode 100644 index 0000000000..7055da3182 --- /dev/null +++ b/src/PhpWord/Escaper/AbstractEscaper.php @@ -0,0 +1,46 @@ +escapeSingleValue($item); + } + } else { + $subject = $this->escapeSingleValue($subject); + } + + return $subject; + } +} diff --git a/src/PhpWord/Escaper/EscaperInterface.php b/src/PhpWord/Escaper/EscaperInterface.php index 2d86050066..39ddf9b424 100644 --- a/src/PhpWord/Escaper/EscaperInterface.php +++ b/src/PhpWord/Escaper/EscaperInterface.php @@ -19,6 +19,8 @@ /** * @since 0.13.0 + * + * @codeCoverageIgnore */ interface EscaperInterface { @@ -27,5 +29,5 @@ interface EscaperInterface * * @return mixed */ - public static function escape($subject); + public function escape($subject); } diff --git a/src/PhpWord/Escaper/RegExp.php b/src/PhpWord/Escaper/RegExp.php index 5f6d129867..30d799d96a 100644 --- a/src/PhpWord/Escaper/RegExp.php +++ b/src/PhpWord/Escaper/RegExp.php @@ -19,31 +19,15 @@ /** * @since 0.13.0 + * + * @codeCoverageIgnore */ -class RegExp implements EscaperInterface +class RegExp extends AbstractEscaper { const REG_EXP_DELIMITER = '/'; - /** - * @param string $subject - * - * @return string - */ - protected static function escapeSingleItem($subject) + protected function escapeSingleValue($subject) { return self::REG_EXP_DELIMITER . preg_quote($subject, self::REG_EXP_DELIMITER) . self::REG_EXP_DELIMITER . 'u'; } - - public static function escape($subject) - { - if (is_array($subject)) { - foreach ($subject as &$item) { - $item = self::escapeSingleItem($item); - } - } else { - $subject = self::escapeSingleItem($subject); - } - - return $subject; - } } diff --git a/src/PhpWord/Escaper/Xml.php b/src/PhpWord/Escaper/Xml.php new file mode 100644 index 0000000000..6cbdceca1f --- /dev/null +++ b/src/PhpWord/Escaper/Xml.php @@ -0,0 +1,32 @@ +escape($replace); + } + $this->tempDocumentHeaders = $this->setValueForPart($search, $replace, $this->tempDocumentHeaders, $limit); $this->tempDocumentMainPart = $this->setValueForPart($search, $replace, $this->tempDocumentMainPart, $limit); $this->tempDocumentFooters = $this->setValueForPart($search, $replace, $this->tempDocumentFooters, $limit); @@ -442,7 +451,8 @@ protected function setValueForPart($search, $replace, $documentPartXML, $limit) if (self::MAXIMUM_REPLACEMENTS_DEFAULT === $limit) { return str_replace($search, $replace, $documentPartXML); } else { - return preg_replace(RegExp::escape($search), $replace, $documentPartXML, $limit); + $regExpEscaper = new RegExp(); + return preg_replace($regExpEscaper->escape($search), $replace, $documentPartXML, $limit); } } diff --git a/src/PhpWord/Writer/Word2007/Element/CheckBox.php b/src/PhpWord/Writer/Word2007/Element/CheckBox.php index 247c7feb7d..5d2e7302b9 100644 --- a/src/PhpWord/Writer/Word2007/Element/CheckBox.php +++ b/src/PhpWord/Writer/Word2007/Element/CheckBox.php @@ -16,6 +16,7 @@ */ namespace PhpOffice\PhpWord\Writer\Word2007\Element; +use PhpOffice\PhpWord\Settings; /** * CheckBox element writer @@ -63,7 +64,7 @@ public function write() $xmlWriter->startElement('w:r'); $xmlWriter->startElement('w:instrText'); $xmlWriter->writeAttribute('xml:space', 'preserve'); - $xmlWriter->writeRaw(' FORMCHECKBOX '); + $xmlWriter->text(' FORMCHECKBOX '); $xmlWriter->endElement();// w:instrText $xmlWriter->endElement(); // w:r $xmlWriter->startElement('w:r'); @@ -83,7 +84,11 @@ public function write() $xmlWriter->startElement('w:t'); $xmlWriter->writeAttribute('xml:space', 'preserve'); - $xmlWriter->writeRaw($this->getText($element->getText())); + if (Settings::isOutputEscapingEnabled()) { + $xmlWriter->text($this->getText($element->getText())); + } else { + $xmlWriter->writeRaw($this->getText($element->getText())); + } $xmlWriter->endElement(); // w:t $xmlWriter->endElement(); // w:r diff --git a/src/PhpWord/Writer/Word2007/Element/Field.php b/src/PhpWord/Writer/Word2007/Element/Field.php index 19239287c5..5dadfadfed 100644 --- a/src/PhpWord/Writer/Word2007/Element/Field.php +++ b/src/PhpWord/Writer/Word2007/Element/Field.php @@ -79,9 +79,7 @@ public function write() $xmlWriter->endElement(); // w:noProof $xmlWriter->endElement(); // w:rPr - $xmlWriter->startElement('w:t'); - $xmlWriter->writeRaw('1'); - $xmlWriter->endElement(); // w:t + $xmlWriter->writeElement('w:t', '1'); $xmlWriter->endElement(); // w:r $xmlWriter->endElement(); // w:fldSimple diff --git a/src/PhpWord/Writer/Word2007/Element/FormField.php b/src/PhpWord/Writer/Word2007/Element/FormField.php index 669b8183a9..9b22e60741 100644 --- a/src/PhpWord/Writer/Word2007/Element/FormField.php +++ b/src/PhpWord/Writer/Word2007/Element/FormField.php @@ -19,6 +19,7 @@ use PhpOffice\Common\XMLWriter; use PhpOffice\PhpWord\Element\FormField as FormFieldElement; +use PhpOffice\PhpWord\Settings; /** * FormField element writer @@ -78,7 +79,7 @@ public function write() $this->writeFontStyle(); $xmlWriter->startElement('w:instrText'); $xmlWriter->writeAttribute('xml:space', 'preserve'); - $xmlWriter->writeRaw("{$instruction}"); + $xmlWriter->text("{$instruction}"); $xmlWriter->endElement();// w:instrText $xmlWriter->endElement(); // w:r @@ -91,7 +92,11 @@ public function write() $this->writeFontStyle(); $xmlWriter->startElement('w:t'); $xmlWriter->writeAttribute('xml:space', 'preserve'); - $xmlWriter->writeRaw($value); + if (Settings::isOutputEscapingEnabled()) { + $xmlWriter->text($value); + } else { + $xmlWriter->writeRaw($value); + } $xmlWriter->endElement(); // w:t $xmlWriter->endElement(); // w:r diff --git a/src/PhpWord/Writer/Word2007/Element/Link.php b/src/PhpWord/Writer/Word2007/Element/Link.php index 3b90db5ccc..b504a94b25 100644 --- a/src/PhpWord/Writer/Word2007/Element/Link.php +++ b/src/PhpWord/Writer/Word2007/Element/Link.php @@ -16,6 +16,7 @@ */ namespace PhpOffice\PhpWord\Writer\Word2007\Element; +use PhpOffice\PhpWord\Settings; /** * Link element writer @@ -54,7 +55,11 @@ public function write() $xmlWriter->startElement('w:t'); $xmlWriter->writeAttribute('xml:space', 'preserve'); - $xmlWriter->writeRaw($element->getText()); + if (Settings::isOutputEscapingEnabled()) { + $xmlWriter->text($element->getText()); + } else { + $xmlWriter->writeRaw($element->getText()); + } $xmlWriter->endElement(); // w:t $xmlWriter->endElement(); // w:r $xmlWriter->endElement(); // w:hyperlink diff --git a/src/PhpWord/Writer/Word2007/Element/PreserveText.php b/src/PhpWord/Writer/Word2007/Element/PreserveText.php index 4856edc7b1..5c1c493b12 100644 --- a/src/PhpWord/Writer/Word2007/Element/PreserveText.php +++ b/src/PhpWord/Writer/Word2007/Element/PreserveText.php @@ -16,6 +16,7 @@ */ namespace PhpOffice\PhpWord\Writer\Word2007\Element; +use PhpOffice\PhpWord\Settings; /** * PreserveText element writer @@ -60,7 +61,11 @@ public function write() $xmlWriter->startElement('w:instrText'); $xmlWriter->writeAttribute('xml:space', 'preserve'); - $xmlWriter->writeRaw($text); + if (Settings::isOutputEscapingEnabled()) { + $xmlWriter->text($text); + } else { + $xmlWriter->writeRaw($text); + } $xmlWriter->endElement(); $xmlWriter->endElement(); @@ -82,7 +87,11 @@ public function write() $xmlWriter->startElement('w:t'); $xmlWriter->writeAttribute('xml:space', 'preserve'); - $xmlWriter->writeRaw($this->getText($text)); + if (Settings::isOutputEscapingEnabled()) { + $xmlWriter->text($this->getText($text)); + } else { + $xmlWriter->writeRaw($this->getText($text)); + } $xmlWriter->endElement(); $xmlWriter->endElement(); } diff --git a/src/PhpWord/Writer/Word2007/Element/SDT.php b/src/PhpWord/Writer/Word2007/Element/SDT.php index 2d639242a3..706eefdebb 100644 --- a/src/PhpWord/Writer/Word2007/Element/SDT.php +++ b/src/PhpWord/Writer/Word2007/Element/SDT.php @@ -58,9 +58,7 @@ public function write() // Content $xmlWriter->startElement('w:sdtContent'); $xmlWriter->startElement('w:r'); - $xmlWriter->startElement('w:t'); - $xmlWriter->writeRaw('Pick value'); - $xmlWriter->endElement(); // w:t + $xmlWriter->writeElement('w:t', 'Pick value'); $xmlWriter->endElement(); // w:r $xmlWriter->endElement(); // w:sdtContent diff --git a/src/PhpWord/Writer/Word2007/Element/TOC.php b/src/PhpWord/Writer/Word2007/Element/TOC.php index fcc90886df..cf839127b0 100644 --- a/src/PhpWord/Writer/Word2007/Element/TOC.php +++ b/src/PhpWord/Writer/Word2007/Element/TOC.php @@ -19,6 +19,7 @@ use PhpOffice\Common\XMLWriter; use PhpOffice\PhpWord\Element\TOC as TOCElement; +use PhpOffice\PhpWord\Settings; use PhpOffice\PhpWord\Style\Font; use PhpOffice\PhpWord\Writer\Word2007\Style\Font as FontStyleWriter; use PhpOffice\PhpWord\Writer\Word2007\Style\Paragraph as ParagraphStyleWriter; @@ -99,9 +100,13 @@ private function writeTitle(XMLWriter $xmlWriter, TOCElement $element, $title, $ $styleWriter = new FontStyleWriter($xmlWriter, $fontStyle); $styleWriter->write(); } - $xmlWriter->startElement('w:t'); - $xmlWriter->writeRaw($title->getText()); - $xmlWriter->endElement(); + if (Settings::isOutputEscapingEnabled()) { + $xmlWriter->writeElement('w:t', $title->getText()); + } else { + $xmlWriter->startElement('w:t'); + $xmlWriter->writeRaw($title->getText()); + $xmlWriter->endElement(); + } $xmlWriter->endElement(); // w:r $xmlWriter->startElement('w:r'); @@ -117,7 +122,7 @@ private function writeTitle(XMLWriter $xmlWriter, TOCElement $element, $title, $ $xmlWriter->startElement('w:r'); $xmlWriter->startElement('w:instrText'); $xmlWriter->writeAttribute('xml:space', 'preserve'); - $xmlWriter->writeRaw("PAGEREF _Toc{$rId} \h"); + $xmlWriter->text("PAGEREF _Toc{$rId} \h"); $xmlWriter->endElement(); $xmlWriter->endElement(); @@ -200,7 +205,7 @@ private function writeFieldMark(XMLWriter $xmlWriter, TOCElement $element) $xmlWriter->startElement('w:r'); $xmlWriter->startElement('w:instrText'); $xmlWriter->writeAttribute('xml:space', 'preserve'); - $xmlWriter->writeRaw("TOC \o {$minDepth}-{$maxDepth} \h \z \u"); + $xmlWriter->text("TOC \o {$minDepth}-{$maxDepth} \h \z \u"); $xmlWriter->endElement(); $xmlWriter->endElement(); diff --git a/src/PhpWord/Writer/Word2007/Element/Text.php b/src/PhpWord/Writer/Word2007/Element/Text.php index 3c628cd275..97fd17754c 100644 --- a/src/PhpWord/Writer/Word2007/Element/Text.php +++ b/src/PhpWord/Writer/Word2007/Element/Text.php @@ -16,6 +16,7 @@ */ namespace PhpOffice\PhpWord\Writer\Word2007\Element; +use PhpOffice\PhpWord\Settings; /** * Text element writer @@ -45,7 +46,11 @@ public function write() $xmlWriter->startElement('w:t'); $xmlWriter->writeAttribute('xml:space', 'preserve'); - $xmlWriter->writeRaw($this->getText($element->getText())); + if (Settings::isOutputEscapingEnabled()) { + $xmlWriter->text($this->getText($element->getText())); + } else { + $xmlWriter->writeRaw($this->getText($element->getText())); + } $xmlWriter->endElement(); $xmlWriter->endElement(); // w:r diff --git a/src/PhpWord/Writer/Word2007/Element/Title.php b/src/PhpWord/Writer/Word2007/Element/Title.php index f5ece9c776..3865f59aa9 100644 --- a/src/PhpWord/Writer/Word2007/Element/Title.php +++ b/src/PhpWord/Writer/Word2007/Element/Title.php @@ -16,6 +16,7 @@ */ namespace PhpOffice\PhpWord\Writer\Word2007\Element; +use PhpOffice\PhpWord\Settings; /** * TextRun element writer @@ -60,9 +61,13 @@ public function write() // Actual text $xmlWriter->startElement('w:r'); - $xmlWriter->startElement('w:t'); - $xmlWriter->writeRaw($this->getText($element->getText())); - $xmlWriter->endElement(); + if (Settings::isOutputEscapingEnabled()) { + $xmlWriter->writeElement('w:t', $this->getText($element->getText())); + } else { + $xmlWriter->startElement('w:t'); + $xmlWriter->writeRaw($this->getText($element->getText())); + $xmlWriter->endElement(); + } $xmlWriter->endElement(); // Bookmark end diff --git a/src/PhpWord/Writer/Word2007/Part/Chart.php b/src/PhpWord/Writer/Word2007/Part/Chart.php index 78f2ca24e3..f7d1c2ce14 100644 --- a/src/PhpWord/Writer/Word2007/Part/Chart.php +++ b/src/PhpWord/Writer/Word2007/Part/Chart.php @@ -241,11 +241,13 @@ private function writeSeriesItem(XMLWriter $xmlWriter, $type, $values) foreach ($values as $value) { $xmlWriter->startElement('c:pt'); $xmlWriter->writeAttribute('idx', $index); - - $xmlWriter->startElement('c:v'); - $xmlWriter->writeRaw($value); - $xmlWriter->endElement(); // c:v - + if (\PhpOffice\PhpWord\Settings::isOutputEscapingEnabled()) { + $xmlWriter->writeElement('c:v', $value); + } else { + $xmlWriter->startElement('c:v'); + $xmlWriter->writeRaw($value); + $xmlWriter->endElement(); + } $xmlWriter->endElement(); // c:pt $index++; } diff --git a/src/PhpWord/Writer/Word2007/Part/DocPropsCore.php b/src/PhpWord/Writer/Word2007/Part/DocPropsCore.php index f866803497..96faae2e39 100644 --- a/src/PhpWord/Writer/Word2007/Part/DocPropsCore.php +++ b/src/PhpWord/Writer/Word2007/Part/DocPropsCore.php @@ -54,13 +54,13 @@ public function write() // dcterms:created $xmlWriter->startElement('dcterms:created'); $xmlWriter->writeAttribute('xsi:type', 'dcterms:W3CDTF'); - $xmlWriter->writeRaw(date($this->dateFormat, $phpWord->getDocInfo()->getCreated())); + $xmlWriter->text(date($this->dateFormat, $phpWord->getDocInfo()->getCreated())); $xmlWriter->endElement(); // dcterms:modified $xmlWriter->startElement('dcterms:modified'); $xmlWriter->writeAttribute('xsi:type', 'dcterms:W3CDTF'); - $xmlWriter->writeRaw(date($this->dateFormat, $phpWord->getDocInfo()->getModified())); + $xmlWriter->text(date($this->dateFormat, $phpWord->getDocInfo()->getModified())); $xmlWriter->endElement(); $xmlWriter->endElement(); // cp:coreProperties diff --git a/src/PhpWord/Writer/Word2007/Part/DocPropsCustom.php b/src/PhpWord/Writer/Word2007/Part/DocPropsCustom.php index c4510e199a..6c404ce930 100644 --- a/src/PhpWord/Writer/Word2007/Part/DocPropsCustom.php +++ b/src/PhpWord/Writer/Word2007/Part/DocPropsCustom.php @@ -60,9 +60,7 @@ public function write() $xmlWriter->writeElement('vt:bool', ($propertyValue) ? 'true' : 'false'); break; case 'd': - $xmlWriter->startElement('vt:filetime'); - $xmlWriter->writeRaw(date($this->dateFormat, $propertyValue)); - $xmlWriter->endElement(); + $xmlWriter->writeElement('vt:filetime', date($this->dateFormat, $propertyValue)); break; default: $xmlWriter->writeElement('vt:lpwstr', $propertyValue); diff --git a/src/PhpWord/Writer/Word2007/Part/Footnotes.php b/src/PhpWord/Writer/Word2007/Part/Footnotes.php index e0faf6ac81..0de413002b 100644 --- a/src/PhpWord/Writer/Word2007/Part/Footnotes.php +++ b/src/PhpWord/Writer/Word2007/Part/Footnotes.php @@ -164,7 +164,7 @@ protected function writeNote(XMLWriter $xmlWriter, $element) $xmlWriter->startElement('w:r'); $xmlWriter->startElement('w:t'); $xmlWriter->writeAttribute('xml:space', 'preserve'); - $xmlWriter->writeRaw(' '); + $xmlWriter->text(' '); $xmlWriter->endElement(); // w:t $xmlWriter->endElement(); // w:r diff --git a/tests/PhpWord/Element/CellTest.php b/tests/PhpWord/Element/CellTest.php index 4beee149a2..4c122f9e94 100644 --- a/tests/PhpWord/Element/CellTest.php +++ b/tests/PhpWord/Element/CellTest.php @@ -52,7 +52,7 @@ public function testConstructWithStyleArray() public function testAddText() { $oCell = new Cell(); - $element = $oCell->addText(htmlspecialchars('text', ENT_COMPAT, 'UTF-8')); + $element = $oCell->addText('text'); $this->assertCount(1, $oCell->getElements()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Text', $element); @@ -64,11 +64,11 @@ public function testAddText() public function testAddTextNotUTF8() { $oCell = new Cell(); - $element = $oCell->addText(utf8_decode(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8'))); + $element = $oCell->addText(utf8_decode('ééé')); $this->assertCount(1, $oCell->getElements()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Text', $element); - $this->assertEquals(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8'), $element->getText()); + $this->assertEquals('ééé', $element->getText()); } /** @@ -77,7 +77,7 @@ public function testAddTextNotUTF8() public function testAddLink() { $oCell = new Cell(); - $element = $oCell->addLink(utf8_decode('ééé'), utf8_decode(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8'))); + $element = $oCell->addLink(utf8_decode('ééé'), utf8_decode('ééé')); $this->assertCount(1, $oCell->getElements()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Link', $element); @@ -100,11 +100,11 @@ public function testAddTextBreak() public function testAddListItem() { $oCell = new Cell(); - $element = $oCell->addListItem(htmlspecialchars('text', ENT_COMPAT, 'UTF-8')); + $element = $oCell->addListItem('text'); $this->assertCount(1, $oCell->getElements()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\ListItem', $element); - $this->assertEquals(htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), $element->getTextObject()->getText()); + $this->assertEquals('text', $element->getTextObject()->getText()); } /** @@ -113,11 +113,11 @@ public function testAddListItem() public function testAddListItemNotUTF8() { $oCell = new Cell(); - $element = $oCell->addListItem(utf8_decode(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8'))); + $element = $oCell->addListItem(utf8_decode('ééé')); $this->assertCount(1, $oCell->getElements()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\ListItem', $element); - $this->assertEquals(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8'), $element->getTextObject()->getText()); + $this->assertEquals('ééé', $element->getTextObject()->getText()); } /** @@ -165,9 +165,7 @@ public function testAddImageFooter() public function testAddImageSectionByUrl() { $oCell = new Cell(); - $element = $oCell->addImage( - 'http://php.net/images/logos/php-med-trans-light.gif' - ); + $element = $oCell->addImage('http://php.net/images/logos/php-med-trans-light.gif'); $this->assertCount(1, $oCell->getElements()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Image', $element); @@ -205,7 +203,7 @@ public function testAddPreserveText() { $oCell = new Cell(); $oCell->setDocPart('Header', 1); - $element = $oCell->addPreserveText(htmlspecialchars('text', ENT_COMPAT, 'UTF-8')); + $element = $oCell->addPreserveText('text'); $this->assertCount(1, $oCell->getElements()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\PreserveText', $element); @@ -218,11 +216,11 @@ public function testAddPreserveTextNotUTF8() { $oCell = new Cell(); $oCell->setDocPart('Header', 1); - $element = $oCell->addPreserveText(utf8_decode(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8'))); + $element = $oCell->addPreserveText(utf8_decode('ééé')); $this->assertCount(1, $oCell->getElements()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\PreserveText', $element); - $this->assertEquals(array(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8')), $element->getText()); + $this->assertEquals(array('ééé'), $element->getText()); } /** @@ -234,7 +232,7 @@ public function testAddPreserveTextException() { $oCell = new Cell(); $oCell->setDocPart('Section', 1); - $oCell->addPreserveText(htmlspecialchars('text', ENT_COMPAT, 'UTF-8')); + $oCell->addPreserveText('text'); } /** @@ -255,7 +253,7 @@ public function testCreateTextRun() public function testAddCheckBox() { $oCell = new Cell(); - $element = $oCell->addCheckBox(utf8_decode(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8')), utf8_decode(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8'))); + $element = $oCell->addCheckBox(utf8_decode('ééé'), utf8_decode('ééé')); $this->assertCount(1, $oCell->getElements()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\CheckBox', $element); diff --git a/tests/PhpWord/Element/CheckBoxTest.php b/tests/PhpWord/Element/CheckBoxTest.php index ef84e469f0..fd0969020f 100644 --- a/tests/PhpWord/Element/CheckBoxTest.php +++ b/tests/PhpWord/Element/CheckBoxTest.php @@ -45,10 +45,10 @@ public function testConstruct() */ public function testCheckBox() { - $oCheckBox = new CheckBox(htmlspecialchars('chkBox', ENT_COMPAT, 'UTF-8'), htmlspecialchars('CheckBox', ENT_COMPAT, 'UTF-8')); + $oCheckBox = new CheckBox('chkBox', 'CheckBox'); - $this->assertEquals(htmlspecialchars('chkBox', ENT_COMPAT, 'UTF-8'), $oCheckBox->getName()); - $this->assertEquals(htmlspecialchars('CheckBox', ENT_COMPAT, 'UTF-8'), $oCheckBox->getText()); + $this->assertEquals('chkBox', $oCheckBox->getName()); + $this->assertEquals('CheckBox', $oCheckBox->getText()); } /** @@ -56,7 +56,7 @@ public function testCheckBox() */ public function testFont() { - $oCheckBox = new CheckBox(htmlspecialchars('chkBox', ENT_COMPAT, 'UTF-8'), htmlspecialchars('CheckBox', ENT_COMPAT, 'UTF-8'), 'fontStyle'); + $oCheckBox = new CheckBox('chkBox', 'CheckBox', 'fontStyle'); $this->assertEquals('fontStyle', $oCheckBox->getFontStyle()); $oCheckBox->setFontStyle(array('bold' => true, 'italic' => true, 'size' => 16)); @@ -69,7 +69,7 @@ public function testFont() public function testFontObject() { $font = new Font(); - $oCheckBox = new CheckBox(htmlspecialchars('chkBox', ENT_COMPAT, 'UTF-8'), htmlspecialchars('CheckBox', ENT_COMPAT, 'UTF-8'), $font); + $oCheckBox = new CheckBox('chkBox', 'CheckBox', $font); $this->assertEquals($font, $oCheckBox->getFontStyle()); } @@ -78,7 +78,7 @@ public function testFontObject() */ public function testParagraph() { - $oCheckBox = new CheckBox(htmlspecialchars('chkBox', ENT_COMPAT, 'UTF-8'), htmlspecialchars('CheckBox', ENT_COMPAT, 'UTF-8'), 'fontStyle', 'paragraphStyle'); + $oCheckBox = new CheckBox('chkBox', 'CheckBox', 'fontStyle', 'paragraphStyle'); $this->assertEquals('paragraphStyle', $oCheckBox->getParagraphStyle()); $oCheckBox->setParagraphStyle(array('alignment' => Jc::CENTER, 'spaceAfter' => 100)); diff --git a/tests/PhpWord/Element/FooterTest.php b/tests/PhpWord/Element/FooterTest.php index ccaec3f284..c6d10469db 100644 --- a/tests/PhpWord/Element/FooterTest.php +++ b/tests/PhpWord/Element/FooterTest.php @@ -42,7 +42,7 @@ public function testConstruct() public function testAddText() { $oFooter = new Footer(1); - $element = $oFooter->addText(htmlspecialchars('text', ENT_COMPAT, 'UTF-8')); + $element = $oFooter->addText('text'); $this->assertCount(1, $oFooter->getElements()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Text', $element); @@ -54,11 +54,11 @@ public function testAddText() public function testAddTextNotUTF8() { $oFooter = new Footer(1); - $element = $oFooter->addText(utf8_decode(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8'))); + $element = $oFooter->addText(utf8_decode('ééé')); $this->assertCount(1, $oFooter->getElements()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Text', $element); - $this->assertEquals(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8'), $element->getText()); + $this->assertEquals('ééé', $element->getText()); } /** @@ -116,9 +116,7 @@ public function testAddImage() public function testAddImageByUrl() { $oFooter = new Footer(1); - $element = $oFooter->addImage( - 'http://php.net/images/logos/php-med-trans-light.gif' - ); + $element = $oFooter->addImage('http://php.net/images/logos/php-med-trans-light.gif'); $this->assertCount(1, $oFooter->getElements()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Image', $element); @@ -130,7 +128,7 @@ public function testAddImageByUrl() public function testAddPreserveText() { $oFooter = new Footer(1); - $element = $oFooter->addPreserveText(htmlspecialchars('text', ENT_COMPAT, 'UTF-8')); + $element = $oFooter->addPreserveText('text'); $this->assertCount(1, $oFooter->getElements()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\PreserveText', $element); @@ -142,11 +140,11 @@ public function testAddPreserveText() public function testAddPreserveTextNotUTF8() { $oFooter = new Footer(1); - $element = $oFooter->addPreserveText(utf8_decode(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8'))); + $element = $oFooter->addPreserveText(utf8_decode('ééé')); $this->assertCount(1, $oFooter->getElements()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\PreserveText', $element); - $this->assertEquals(array(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8')), $element->getText()); + $this->assertEquals(array('ééé'), $element->getText()); } /** diff --git a/tests/PhpWord/Element/FootnoteTest.php b/tests/PhpWord/Element/FootnoteTest.php index c95b2624f6..17625c80be 100644 --- a/tests/PhpWord/Element/FootnoteTest.php +++ b/tests/PhpWord/Element/FootnoteTest.php @@ -65,7 +65,7 @@ public function testConstructArray() public function testAddText() { $oFootnote = new Footnote(); - $element = $oFootnote->addText(htmlspecialchars('text', ENT_COMPAT, 'UTF-8')); + $element = $oFootnote->addText('text'); $this->assertCount(1, $oFootnote->getElements()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Text', $element); diff --git a/tests/PhpWord/Element/HeaderTest.php b/tests/PhpWord/Element/HeaderTest.php index b9c1de25e6..4de82556d3 100644 --- a/tests/PhpWord/Element/HeaderTest.php +++ b/tests/PhpWord/Element/HeaderTest.php @@ -43,11 +43,11 @@ public function testConstructDefault() public function testAddText() { $oHeader = new Header(1); - $element = $oHeader->addText(htmlspecialchars('text', ENT_COMPAT, 'UTF-8')); + $element = $oHeader->addText('text'); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Text', $element); $this->assertCount(1, $oHeader->getElements()); - $this->assertEquals(htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), $element->getText()); + $this->assertEquals('text', $element->getText()); } /** @@ -56,11 +56,11 @@ public function testAddText() public function testAddTextNotUTF8() { $oHeader = new Header(1); - $element = $oHeader->addText(utf8_decode(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8'))); + $element = $oHeader->addText(utf8_decode('ééé')); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Text', $element); $this->assertCount(1, $oHeader->getElements()); - $this->assertEquals(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8'), $element->getText()); + $this->assertEquals('ééé', $element->getText()); } /** @@ -125,9 +125,7 @@ public function testAddImage() public function testAddImageByUrl() { $oHeader = new Header(1); - $element = $oHeader->addImage( - 'http://php.net/images/logos/php-med-trans-light.gif' - ); + $element = $oHeader->addImage('http://php.net/images/logos/php-med-trans-light.gif'); $this->assertCount(1, $oHeader->getElements()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Image', $element); @@ -139,7 +137,7 @@ public function testAddImageByUrl() public function testAddPreserveText() { $oHeader = new Header(1); - $element = $oHeader->addPreserveText(htmlspecialchars('text', ENT_COMPAT, 'UTF-8')); + $element = $oHeader->addPreserveText('text'); $this->assertCount(1, $oHeader->getElements()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\PreserveText', $element); @@ -151,11 +149,11 @@ public function testAddPreserveText() public function testAddPreserveTextNotUTF8() { $oHeader = new Header(1); - $element = $oHeader->addPreserveText(utf8_decode(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8'))); + $element = $oHeader->addPreserveText(utf8_decode('ééé')); $this->assertCount(1, $oHeader->getElements()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\PreserveText', $element); - $this->assertEquals(array(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8')), $element->getText()); + $this->assertEquals(array('ééé'), $element->getText()); } /** diff --git a/tests/PhpWord/Element/LinkTest.php b/tests/PhpWord/Element/LinkTest.php index e67028b4d2..7f9c0178a9 100644 --- a/tests/PhpWord/Element/LinkTest.php +++ b/tests/PhpWord/Element/LinkTest.php @@ -48,14 +48,14 @@ public function testConstructWithParamsArray() { $oLink = new Link( 'https://github.com/PHPOffice/PHPWord', - htmlspecialchars('PHPWord on GitHub', ENT_COMPAT, 'UTF-8'), + 'PHPWord on GitHub', array('color' => '0000FF', 'underline' => Font::UNDERLINE_SINGLE), array('marginLeft' => 600, 'marginRight' => 600, 'marginTop' => 600, 'marginBottom' => 600) ); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Link', $oLink); $this->assertEquals('https://github.com/PHPOffice/PHPWord', $oLink->getSource()); - $this->assertEquals(htmlspecialchars('PHPWord on GitHub', ENT_COMPAT, 'UTF-8'), $oLink->getText()); + $this->assertEquals('PHPWord on GitHub', $oLink->getText()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Font', $oLink->getFontStyle()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Paragraph', $oLink->getParagraphStyle()); } diff --git a/tests/PhpWord/Element/ListItemRunTest.php b/tests/PhpWord/Element/ListItemRunTest.php index ccec75fa9a..84f3ec890b 100644 --- a/tests/PhpWord/Element/ListItemRunTest.php +++ b/tests/PhpWord/Element/ListItemRunTest.php @@ -99,11 +99,11 @@ public function testDepth() public function testAddText() { $oListItemRun = new ListItemRun(); - $element = $oListItemRun->addText(htmlspecialchars('text', ENT_COMPAT, 'UTF-8')); + $element = $oListItemRun->addText('text'); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Text', $element); $this->assertCount(1, $oListItemRun->getElements()); - $this->assertEquals(htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), $element->getText()); + $this->assertEquals('text', $element->getText()); } /** @@ -112,11 +112,11 @@ public function testAddText() public function testAddTextNotUTF8() { $oListItemRun = new ListItemRun(); - $element = $oListItemRun->addText(utf8_decode(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8'))); + $element = $oListItemRun->addText(utf8_decode('ééé')); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Text', $element); $this->assertCount(1, $oListItemRun->getElements()); - $this->assertEquals(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8'), $element->getText()); + $this->assertEquals('ééé', $element->getText()); } /** @@ -138,12 +138,12 @@ public function testAddLink() public function testAddLinkWithName() { $oListItemRun = new ListItemRun(); - $element = $oListItemRun->addLink('https://github.com/PHPOffice/PHPWord', htmlspecialchars('PHPWord on GitHub', ENT_COMPAT, 'UTF-8')); + $element = $oListItemRun->addLink('https://github.com/PHPOffice/PHPWord', 'PHPWord on GitHub'); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Link', $element); $this->assertCount(1, $oListItemRun->getElements()); $this->assertEquals('https://github.com/PHPOffice/PHPWord', $element->getSource()); - $this->assertEquals(htmlspecialchars('PHPWord on GitHub', ENT_COMPAT, 'UTF-8'), $element->getText()); + $this->assertEquals('PHPWord on GitHub', $element->getText()); } /** diff --git a/tests/PhpWord/Element/ListItemTest.php b/tests/PhpWord/Element/ListItemTest.php index 3a1a557625..4f055620f3 100644 --- a/tests/PhpWord/Element/ListItemTest.php +++ b/tests/PhpWord/Element/ListItemTest.php @@ -30,7 +30,7 @@ class ListItemTest extends \PHPUnit_Framework_TestCase */ public function testText() { - $oListItem = new ListItem(htmlspecialchars('text', ENT_COMPAT, 'UTF-8')); + $oListItem = new ListItem('text'); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Text', $oListItem->getTextObject()); } @@ -40,12 +40,7 @@ public function testText() */ public function testStyle() { - $oListItem = new ListItem( - htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), - 1, - null, - array('listType' => \PhpOffice\PhpWord\Style\ListItem::TYPE_NUMBER) - ); + $oListItem = new ListItem('text', 1, null, array('listType' => \PhpOffice\PhpWord\Style\ListItem::TYPE_NUMBER)); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\ListItem', $oListItem->getStyle()); $this->assertEquals(\PhpOffice\PhpWord\Style\ListItem::TYPE_NUMBER, $oListItem->getStyle()->getListType()); @@ -57,7 +52,7 @@ public function testStyle() public function testDepth() { $iVal = rand(1, 1000); - $oListItem = new ListItem(htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), $iVal); + $oListItem = new ListItem('text', $iVal); $this->assertEquals($iVal, $oListItem->getDepth()); } diff --git a/tests/PhpWord/Element/PreserveTextTest.php b/tests/PhpWord/Element/PreserveTextTest.php index 06a919c112..71299264f3 100644 --- a/tests/PhpWord/Element/PreserveTextTest.php +++ b/tests/PhpWord/Element/PreserveTextTest.php @@ -44,8 +44,8 @@ public function testConstruct() */ public function testConstructWithString() { - $oPreserveText = new PreserveText(htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), 'styleFont', 'styleParagraph'); - $this->assertEquals(array(htmlspecialchars('text', ENT_COMPAT, 'UTF-8')), $oPreserveText->getText()); + $oPreserveText = new PreserveText('text', 'styleFont', 'styleParagraph'); + $this->assertEquals(array('text'), $oPreserveText->getText()); $this->assertEquals('styleFont', $oPreserveText->getFontStyle()); $this->assertEquals('styleParagraph', $oPreserveText->getParagraphStyle()); } @@ -55,11 +55,7 @@ public function testConstructWithString() */ public function testConstructWithArray() { - $oPreserveText = new PreserveText( - htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), - array('size' => 16, 'color' => '1B2232'), - array('alignment' => Jc::CENTER) - ); + $oPreserveText = new PreserveText('text', array('size' => 16, 'color' => '1B2232'), array('alignment' => Jc::CENTER)); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Font', $oPreserveText->getFontStyle()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Paragraph', $oPreserveText->getParagraphStyle()); } diff --git a/tests/PhpWord/Element/SectionTest.php b/tests/PhpWord/Element/SectionTest.php index b09c0b78ee..9cfba74b2c 100644 --- a/tests/PhpWord/Element/SectionTest.php +++ b/tests/PhpWord/Element/SectionTest.php @@ -48,18 +48,18 @@ public function testAddElements() $section = new Section(0); $section->setPhpWord(new PhpWord()); - $section->addText(utf8_decode(htmlspecialchars('ä', ENT_COMPAT, 'UTF-8'))); - $section->addLink(utf8_decode('http://äää.com'), utf8_decode(htmlspecialchars('ä', ENT_COMPAT, 'UTF-8'))); + $section->addText(utf8_decode('ä')); + $section->addLink(utf8_decode('http://äää.com'), utf8_decode('ä')); $section->addTextBreak(); $section->addPageBreak(); $section->addTable(); - $section->addListItem(utf8_decode(htmlspecialchars('ä', ENT_COMPAT, 'UTF-8'))); + $section->addListItem(utf8_decode('ä')); $section->addObject($objectSource); $section->addImage($imageSource); - $section->addTitle(utf8_decode(htmlspecialchars('ä', ENT_COMPAT, 'UTF-8')), 1); + $section->addTitle(utf8_decode('ä'), 1); $section->addTextRun(); $section->addFootnote(); - $section->addCheckBox(utf8_decode(htmlspecialchars('chkä', ENT_COMPAT, 'UTF-8')), utf8_decode(htmlspecialchars('Contentä', ENT_COMPAT, 'UTF-8'))); + $section->addCheckBox(utf8_decode('chkä'), utf8_decode('Contentä')); $section->addTOC(); $elementCollection = $section->getElements(); @@ -106,7 +106,7 @@ public function testAddTitleWithStyle() Style::addTitleStyle(1, array('size' => 14)); $section = new Section(0); $section->setPhpWord(new PhpWord()); - $section->addTitle(htmlspecialchars('Test', ENT_COMPAT, 'UTF-8'), 1); + $section->addTitle('Test', 1); $elementCollection = $section->getElements(); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Title', $elementCollection[0]); diff --git a/tests/PhpWord/Element/TOCTest.php b/tests/PhpWord/Element/TOCTest.php index b96fb9cb5b..6cb8524232 100644 --- a/tests/PhpWord/Element/TOCTest.php +++ b/tests/PhpWord/Element/TOCTest.php @@ -84,7 +84,7 @@ public function testSetGetMinMaxDepth() $phpWord = new PhpWord(); foreach ($titles as $text => $depth) { - $phpWord->addTitle(new Title(htmlspecialchars($text, ENT_COMPAT, 'UTF-8'), $depth)); + $phpWord->addTitle(new Title($text, $depth)); } $toc = new TOC(); $toc->setPhpWord($phpWord); diff --git a/tests/PhpWord/Element/TextRunTest.php b/tests/PhpWord/Element/TextRunTest.php index bdfa4bf53c..e47d42af64 100644 --- a/tests/PhpWord/Element/TextRunTest.php +++ b/tests/PhpWord/Element/TextRunTest.php @@ -68,11 +68,11 @@ public function testConstructArray() public function testAddText() { $oTextRun = new TextRun(); - $element = $oTextRun->addText(htmlspecialchars('text', ENT_COMPAT, 'UTF-8')); + $element = $oTextRun->addText('text'); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Text', $element); $this->assertCount(1, $oTextRun->getElements()); - $this->assertEquals(htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), $element->getText()); + $this->assertEquals('text', $element->getText()); } /** @@ -81,11 +81,11 @@ public function testAddText() public function testAddTextNotUTF8() { $oTextRun = new TextRun(); - $element = $oTextRun->addText(utf8_decode(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8'))); + $element = $oTextRun->addText(utf8_decode('ééé')); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Text', $element); $this->assertCount(1, $oTextRun->getElements()); - $this->assertEquals(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8'), $element->getText()); + $this->assertEquals('ééé', $element->getText()); } /** @@ -107,12 +107,12 @@ public function testAddLink() public function testAddLinkWithName() { $oTextRun = new TextRun(); - $element = $oTextRun->addLink('https://github.com/PHPOffice/PHPWord', htmlspecialchars('PHPWord on GitHub', ENT_COMPAT, 'UTF-8')); + $element = $oTextRun->addLink('https://github.com/PHPOffice/PHPWord', 'PHPWord on GitHub'); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Link', $element); $this->assertCount(1, $oTextRun->getElements()); $this->assertEquals('https://github.com/PHPOffice/PHPWord', $element->getSource()); - $this->assertEquals(htmlspecialchars('PHPWord on GitHub', ENT_COMPAT, 'UTF-8'), $element->getText()); + $this->assertEquals('PHPWord on GitHub', $element->getText()); } /** diff --git a/tests/PhpWord/Element/TextTest.php b/tests/PhpWord/Element/TextTest.php index 1659e5dbf0..f5e3cc8192 100644 --- a/tests/PhpWord/Element/TextTest.php +++ b/tests/PhpWord/Element/TextTest.php @@ -45,9 +45,9 @@ public function testConstruct() */ public function testText() { - $oText = new Text(htmlspecialchars('text', ENT_COMPAT, 'UTF-8')); + $oText = new Text('text'); - $this->assertEquals(htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), $oText->getText()); + $this->assertEquals('text', $oText->getText()); } /** @@ -55,7 +55,7 @@ public function testText() */ public function testFont() { - $oText = new Text(htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), 'fontStyle'); + $oText = new Text('text', 'fontStyle'); $this->assertEquals('fontStyle', $oText->getFontStyle()); $oText->setFontStyle(array('bold' => true, 'italic' => true, 'size' => 16)); @@ -68,7 +68,7 @@ public function testFont() public function testFontObject() { $font = new Font(); - $oText = new Text(htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), $font); + $oText = new Text('text', $font); $this->assertEquals($font, $oText->getFontStyle()); } @@ -77,7 +77,7 @@ public function testFontObject() */ public function testParagraph() { - $oText = new Text(htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), 'fontStyle', 'paragraphStyle'); + $oText = new Text('text', 'fontStyle', 'paragraphStyle'); $this->assertEquals('paragraphStyle', $oText->getParagraphStyle()); $oText->setParagraphStyle(array('alignment' => Jc::CENTER, 'spaceAfter' => 100)); diff --git a/tests/PhpWord/Element/TitleTest.php b/tests/PhpWord/Element/TitleTest.php index 687a32f645..3b6f190f21 100644 --- a/tests/PhpWord/Element/TitleTest.php +++ b/tests/PhpWord/Element/TitleTest.php @@ -30,10 +30,10 @@ class TitleTest extends \PHPUnit_Framework_TestCase */ public function testConstruct() { - $oTitle = new Title(htmlspecialchars('text', ENT_COMPAT, 'UTF-8')); + $oTitle = new Title('text'); $this->assertInstanceOf('PhpOffice\\PhpWord\\Element\\Title', $oTitle); - $this->assertEquals(htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), $oTitle->getText()); + $this->assertEquals('text', $oTitle->getText()); } /** @@ -41,7 +41,7 @@ public function testConstruct() */ public function testStyleNull() { - $oTitle = new Title(htmlspecialchars('text', ENT_COMPAT, 'UTF-8')); + $oTitle = new Title('text'); $this->assertNull($oTitle->getStyle()); } diff --git a/tests/PhpWord/SettingsTest.php b/tests/PhpWord/SettingsTest.php index f5bdb1d9dd..483535b9ae 100644 --- a/tests/PhpWord/SettingsTest.php +++ b/tests/PhpWord/SettingsTest.php @@ -120,12 +120,13 @@ public function testSetGetDefaultFontSize() public function testLoadConfig() { $expected = array( - 'compatibility' => true, - 'zipClass' => 'ZipArchive', - 'pdfRendererName' => 'DomPDF', - 'pdfRendererPath' => '', - 'defaultFontName' => 'Arial', - 'defaultFontSize' => 10, + 'compatibility' => true, + 'zipClass' => 'ZipArchive', + 'pdfRendererName' => 'DomPDF', + 'pdfRendererPath' => '', + 'defaultFontName' => 'Arial', + 'defaultFontSize' => 10, + 'outputEscapingEnabled' => false, ); // Test default value diff --git a/tests/PhpWord/Style/FontTest.php b/tests/PhpWord/Style/FontTest.php index 8c3ed4f752..1108bd3a50 100644 --- a/tests/PhpWord/Style/FontTest.php +++ b/tests/PhpWord/Style/FontTest.php @@ -41,9 +41,9 @@ public function tearDown() */ public function testInitiation() { - $object = new Font(htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), array('alignment' => Jc::BOTH)); + $object = new Font('text', array('alignment' => Jc::BOTH)); - $this->assertEquals(htmlspecialchars('text', ENT_COMPAT, 'UTF-8'), $object->getStyleType()); + $this->assertEquals('text', $object->getStyleType()); $this->assertInstanceOf('PhpOffice\\PhpWord\\Style\\Paragraph', $object->getParagraphStyle()); $this->assertTrue(is_array($object->getStyleValues())); } @@ -129,7 +129,7 @@ public function testLineHeight() $section = $phpWord->addSection(); // Test style array - $text = $section->addText(htmlspecialchars('This is a test', ENT_COMPAT, 'UTF-8'), array('line-height' => 2.0)); + $text = $section->addText('This is a test', array('line-height' => 2.0)); $doc = TestHelperDOCX::getDocument($phpWord); $element = $doc->getElement('/w:document/w:body/w:p/w:pPr/w:spacing'); diff --git a/tests/PhpWord/Style/ParagraphTest.php b/tests/PhpWord/Style/ParagraphTest.php index 56180c076b..b8c387a792 100644 --- a/tests/PhpWord/Style/ParagraphTest.php +++ b/tests/PhpWord/Style/ParagraphTest.php @@ -124,7 +124,7 @@ public function testLineHeight() $section = $phpWord->addSection(); // Test style array - $text = $section->addText(htmlspecialchars('This is a test', ENT_COMPAT, 'UTF-8'), array(), array('line-height' => 2.0)); + $text = $section->addText('This is a test', array(), array('line-height' => 2.0)); $doc = TestHelperDOCX::getDocument($phpWord); $element = $doc->getElement('/w:document/w:body/w:p/w:pPr/w:spacing'); diff --git a/tests/PhpWord/TemplateProcessorTest.php b/tests/PhpWord/TemplateProcessorTest.php index 82c1b75472..c5a4b1a32f 100644 --- a/tests/PhpWord/TemplateProcessorTest.php +++ b/tests/PhpWord/TemplateProcessorTest.php @@ -116,7 +116,7 @@ final public function testXslStyleSheetCanNotBeAppliedOnFailureOfSettingParamete * We have to use error control below, because \XSLTProcessor::setParameter omits warning on failure. * This warning fails the test. */ - @$templateProcessor->applyXslStyleSheet($xslDOMDocument, array(1 => htmlspecialchars('somevalue', ENT_COMPAT, 'UTF-8'))); + @$templateProcessor->applyXslStyleSheet($xslDOMDocument, array(1 => 'somevalue')); } /** @@ -157,9 +157,9 @@ public function testCloneRow() ); $docName = 'clone-test-result.docx'; - $templateProcessor->setValue('tableHeader', utf8_decode(htmlspecialchars('ééé', ENT_COMPAT, 'UTF-8'))); + $templateProcessor->setValue('tableHeader', utf8_decode('ééé')); $templateProcessor->cloneRow('userId', 1); - $templateProcessor->setValue('userId#1', htmlspecialchars('Test', ENT_COMPAT, 'UTF-8')); + $templateProcessor->setValue('userId#1', 'Test'); $templateProcessor->saveAs($docName); $docFound = file_exists($docName); unlink($docName); @@ -178,11 +178,7 @@ public function testMacrosCanBeReplacedInHeaderAndFooter() $this->assertEquals(array('documentContent', 'headerValue', 'footerValue'), $templateProcessor->getVariables()); $macroNames = array('headerValue', 'documentContent', 'footerValue'); - $macroValues = array( - htmlspecialchars('Header Value', ENT_COMPAT, 'UTF-8'), - htmlspecialchars('Document text.', ENT_COMPAT, 'UTF-8'), - htmlspecialchars('Footer Value', ENT_COMPAT, 'UTF-8') - ); + $macroValues = array('Header Value', 'Document text.', 'Footer Value'); $templateProcessor->setValue($macroNames, $macroValues); $docName = 'header-footer-test-result.docx'; diff --git a/tests/PhpWord/Writer/PDF/DomPDFTest.php b/tests/PhpWord/Writer/PDF/DomPDFTest.php index 5ba36c0279..7484125674 100644 --- a/tests/PhpWord/Writer/PDF/DomPDFTest.php +++ b/tests/PhpWord/Writer/PDF/DomPDFTest.php @@ -37,7 +37,7 @@ public function testConstruct() $phpWord = new PhpWord(); $section = $phpWord->addSection(); - $section->addText(htmlspecialchars('Test 1', ENT_COMPAT, 'UTF-8')); + $section->addText('Test 1'); $rendererName = Settings::PDF_RENDERER_DOMPDF; $rendererLibraryPath = realpath(PHPWORD_TESTS_BASE_DIR . '/../vendor/dompdf/dompdf'); diff --git a/tests/PhpWord/Writer/PDF/MPDFTest.php b/tests/PhpWord/Writer/PDF/MPDFTest.php index 3be94f0c4c..5d5e8bf623 100644 --- a/tests/PhpWord/Writer/PDF/MPDFTest.php +++ b/tests/PhpWord/Writer/PDF/MPDFTest.php @@ -36,7 +36,7 @@ public function testConstruct() $phpWord = new PhpWord(); $section = $phpWord->addSection(); - $section->addText(htmlspecialchars('Test 1', ENT_COMPAT, 'UTF-8')); + $section->addText('Test 1'); $rendererName = Settings::PDF_RENDERER_MPDF; $rendererLibraryPath = realpath(PHPWORD_TESTS_BASE_DIR . '/../vendor/mpdf/mpdf'); diff --git a/tests/PhpWord/Writer/PDF/TCPDFTest.php b/tests/PhpWord/Writer/PDF/TCPDFTest.php index 3f2bf766e6..62c55fb64d 100644 --- a/tests/PhpWord/Writer/PDF/TCPDFTest.php +++ b/tests/PhpWord/Writer/PDF/TCPDFTest.php @@ -36,7 +36,7 @@ public function testConstruct() $phpWord = new PhpWord(); $section = $phpWord->addSection(); - $section->addText(htmlspecialchars('Test 1', ENT_COMPAT, 'UTF-8')); + $section->addText('Test 1'); $rendererName = Settings::PDF_RENDERER_TCPDF; $rendererLibraryPath = realpath(PHPWORD_TESTS_BASE_DIR . '/../vendor/tecnickcom/tcpdf'); diff --git a/tests/PhpWord/Writer/Word2007/ElementTest.php b/tests/PhpWord/Writer/Word2007/ElementTest.php index 789d00f2f5..8e73ccdfd1 100644 --- a/tests/PhpWord/Writer/Word2007/ElementTest.php +++ b/tests/PhpWord/Writer/Word2007/ElementTest.php @@ -202,9 +202,7 @@ public function testFormFieldElements() $section->addFormField('textinput')->setName('MyTextBox'); $section->addFormField('checkbox')->setDefault(true)->setValue('Your name'); - $section->addFormField('dropdown')->setEntries( - array(htmlspecialchars('Choice 1', ENT_COMPAT, 'UTF-8'), htmlspecialchars('Choice 2', ENT_COMPAT, 'UTF-8'), htmlspecialchars('Choice 3', ENT_COMPAT, 'UTF-8')) - ); + $section->addFormField('dropdown')->setEntries(array('Choice 1', 'Choice 2', 'Choice 3')); $doc = TestHelperDOCX::getDocument($phpWord); diff --git a/tests/PhpWord/Writer/Word2007/Part/DocumentTest.php b/tests/PhpWord/Writer/Word2007/Part/DocumentTest.php index bf2a7aef3c..bf5e7edb19 100644 --- a/tests/PhpWord/Writer/Word2007/Part/DocumentTest.php +++ b/tests/PhpWord/Writer/Word2007/Part/DocumentTest.php @@ -70,14 +70,14 @@ public function testElements() $section = $phpWord->addSection(); $section->addTOC(); $section->addPageBreak(); - $section->addText(htmlspecialchars('After page break.', ENT_COMPAT, 'UTF-8')); - $section->addTitle(htmlspecialchars('Title 1', ENT_COMPAT, 'UTF-8'), 1); - $section->addListItem(htmlspecialchars('List Item 1', ENT_COMPAT, 'UTF-8'), 0); - $section->addListItem(htmlspecialchars('List Item 2', ENT_COMPAT, 'UTF-8'), 0); - $section->addListItem(htmlspecialchars('List Item 3', ENT_COMPAT, 'UTF-8'), 0); + $section->addText('After page break.'); + $section->addTitle('Title 1', 1); + $section->addListItem('List Item 1', 0); + $section->addListItem('List Item 2', 0); + $section->addListItem('List Item 3', 0); $section = $phpWord->addSection(); - $section->addTitle(htmlspecialchars('Title 2', ENT_COMPAT, 'UTF-8'), 2); + $section->addTitle('Title 2', 2); $section->addObject($objectSrc); $section->addTextBox(array()); $section->addTextBox( @@ -92,7 +92,7 @@ public function testElements() ) ); $section->addTextBox(array('wrappingStyle' => 'tight', 'positioning' => 'absolute', 'alignment' => Jc::CENTER)); - $section->addListItemRun()->addText(htmlspecialchars('List item run 1', ENT_COMPAT, 'UTF-8')); + $section->addListItemRun()->addText('List item run 1'); $section->addField( 'DATE', array('dateformat' => 'dddd d MMMM yyyy H:mm:ss'), @@ -180,10 +180,10 @@ public function testElementStyles() $fontStyle = new Font('text', array('alignment' => Jc::CENTER)); $section = $phpWord->addSection(); - $section->addListItem(htmlspecialchars('List Item', ENT_COMPAT, 'UTF-8'), 0, null, null, 'pStyle'); // Style #5 + $section->addListItem('List Item', 0, null, null, 'pStyle'); // Style #5 $section->addObject($objectSrc, array('alignment' => Jc::CENTER)); $section->addTOC($fontStyle); - $section->addTitle(htmlspecialchars('Title 1', ENT_COMPAT, 'UTF-8'), 1); + $section->addTitle('Title 1', 1); $section->addTOC('fStyle'); $table = $section->addTable('tStyle'); $table->setWidth(100); @@ -216,7 +216,7 @@ public function testWriteText() $phpWord->addFontStyle($rStyle, array('bold' => true)); $phpWord->addParagraphStyle($pStyle, array('hanging' => 120, 'indent' => 120)); $section = $phpWord->addSection(); - $section->addText(htmlspecialchars('Test', ENT_COMPAT, 'UTF-8'), $rStyle, $pStyle); + $section->addText('Test', $rStyle, $pStyle); $doc = TestHelperDOCX::getDocument($phpWord); $element = '/w:document/w:body/w:p/w:r/w:rPr/w:rStyle'; @@ -236,9 +236,9 @@ public function testWriteTextRun() $phpWord = new PhpWord(); $phpWord->addParagraphStyle($pStyle, $aStyle); - $section = $phpWord->addSection(htmlspecialchars('Test', ENT_COMPAT, 'UTF-8')); + $section = $phpWord->addSection('Test'); $textrun = $section->addTextRun($pStyle); - $textrun->addText(htmlspecialchars('Test', ENT_COMPAT, 'UTF-8')); + $textrun->addText('Test'); $textrun->addTextBreak(); $textrun = $section->addTextRun($aStyle); $textrun->addLink('https://github.com/PHPOffice/PHPWord'); @@ -263,24 +263,14 @@ public function testWriteLink() $paragraphStyleName = 'Paragraph Style'; $expected = 'PHPWord on GitHub'; - $section->addLink('https://github.com/PHPOffice/PHPWord', htmlspecialchars($expected, ENT_COMPAT, 'UTF-8')); - $section->addLink( - 'https://github.com/PHPOffice/PHPWord', - htmlspecialchars('Test', ENT_COMPAT, 'UTF-8'), - $fontStyleArray, - $paragraphStyleArray - ); - $section->addLink( - 'https://github.com/PHPOffice/PHPWord', - htmlspecialchars('Test', ENT_COMPAT, 'UTF-8'), - $fontStyleName, - $paragraphStyleName - ); + $section->addLink('https://github.com/PHPOffice/PHPWord', $expected); + $section->addLink('https://github.com/PHPOffice/PHPWord', 'Test', $fontStyleArray, $paragraphStyleArray); + $section->addLink('https://github.com/PHPOffice/PHPWord', 'Test', $fontStyleName, $paragraphStyleName); $doc = TestHelperDOCX::getDocument($phpWord); $element = $doc->getElement('/w:document/w:body/w:p/w:hyperlink/w:r/w:t'); - $this->assertEquals(htmlspecialchars($expected, ENT_COMPAT, 'UTF-8'), $element->nodeValue); + $this->assertEquals($expected, $element->nodeValue); } /** @@ -296,9 +286,9 @@ public function testWritePreserveText() $paragraphStyleArray = array('alignment' => Jc::END); $paragraphStyleName = 'Paragraph'; - $footer->addPreserveText(htmlspecialchars('Page {PAGE}', ENT_COMPAT, 'UTF-8')); - $footer->addPreserveText(htmlspecialchars('{PAGE}', ENT_COMPAT, 'UTF-8'), $fontStyleArray, $paragraphStyleArray); - $footer->addPreserveText(htmlspecialchars('{PAGE}', ENT_COMPAT, 'UTF-8'), $fontStyleName, $paragraphStyleName); + $footer->addPreserveText('Page {PAGE}'); + $footer->addPreserveText('{PAGE}', $fontStyleArray, $paragraphStyleArray); + $footer->addPreserveText('{PAGE}', $fontStyleName, $paragraphStyleName); $doc = TestHelperDOCX::getDocument($phpWord); $preserve = $doc->getElement('w:p/w:r[2]/w:instrText', 'word/footer1.xml'); @@ -387,7 +377,7 @@ public function testWriteTitle() { $phpWord = new PhpWord(); $phpWord->addTitleStyle(1, array('bold' => true), array('spaceAfter' => 240)); - $phpWord->addSection()->addTitle(htmlspecialchars('Test', ENT_COMPAT, 'UTF-8'), 1); + $phpWord->addSection()->addTitle('Test', 1); $doc = TestHelperDOCX::getDocument($phpWord); $element = '/w:document/w:body/w:p/w:pPr/w:pStyle'; @@ -406,11 +396,11 @@ public function testWriteCheckbox() // $phpWord->addFontStyle($rStyle, array('bold' => true)); // $phpWord->addParagraphStyle($pStyle, array('hanging' => 120, 'indent' => 120)); $section = $phpWord->addSection(); - $section->addCheckBox(htmlspecialchars('Check1', ENT_COMPAT, 'UTF-8'), htmlspecialchars('Test', ENT_COMPAT, 'UTF-8'), $rStyle, $pStyle); + $section->addCheckBox('Check1', 'Test', $rStyle, $pStyle); $doc = TestHelperDOCX::getDocument($phpWord); $element = '/w:document/w:body/w:p/w:r/w:fldChar/w:ffData/w:name'; - $this->assertEquals(htmlspecialchars('Check1', ENT_COMPAT, 'UTF-8'), $doc->getElementAttribute($element, 'w:val')); + $this->assertEquals('Check1', $doc->getElementAttribute($element, 'w:val')); } /** @@ -429,7 +419,7 @@ public function testWriteParagraphStyle() 'pageBreakBefore' => true, ); foreach ($attributes as $attribute => $value) { - $section->addText(htmlspecialchars('Test', ENT_COMPAT, 'UTF-8'), null, array($attribute => $value)); + $section->addText('Test', null, array($attribute => $value)); } $doc = TestHelperDOCX::getDocument($phpWord); @@ -467,7 +457,7 @@ public function testWriteFontStyle() $styles['smallCaps'] = true; $section = $phpWord->addSection(); - $section->addText(htmlspecialchars('Test', ENT_COMPAT, 'UTF-8'), $styles); + $section->addText('Test', $styles); $doc = TestHelperDOCX::getDocument($phpWord); $parent = '/w:document/w:body/w:p/w:r/w:rPr'; @@ -519,14 +509,14 @@ public function testWriteTableStyle() $table->setWidth = 100; $table->addRow($rHeight, $rStyles); $cell = $table->addCell($cWidth, $cStyles); - $cell->addText(htmlspecialchars('Test', ENT_COMPAT, 'UTF-8')); + $cell->addText('Test'); $cell->addTextBreak(); $cell->addLink('https://github.com/PHPOffice/PHPWord'); - $cell->addListItem(htmlspecialchars('Test', ENT_COMPAT, 'UTF-8')); + $cell->addListItem('Test'); $cell->addImage($imageSrc); $cell->addObject($objectSrc); $textrun = $cell->addTextRun(); - $textrun->addText(htmlspecialchars('Test', ENT_COMPAT, 'UTF-8')); + $textrun->addText('Test'); $doc = TestHelperDOCX::getDocument($phpWord); diff --git a/tests/PhpWord/Writer/Word2007/Part/FooterTest.php b/tests/PhpWord/Writer/Word2007/Part/FooterTest.php index 82ec12dc85..dc32ebc929 100644 --- a/tests/PhpWord/Writer/Word2007/Part/FooterTest.php +++ b/tests/PhpWord/Writer/Word2007/Part/FooterTest.php @@ -33,11 +33,11 @@ public function testWriteFooter() { $imageSrc = __DIR__ . '/../../../_files/images/PhpWord.png'; $container = new \PhpOffice\PhpWord\Element\Footer(1); - $container->addText(htmlspecialchars('', ENT_COMPAT, 'UTF-8')); - $container->addPreserveText(htmlspecialchars('', ENT_COMPAT, 'UTF-8')); + $container->addText(''); + $container->addPreserveText(''); $container->addTextBreak(); $container->addTextRun(); - $container->addTable()->addRow()->addCell()->addText(htmlspecialchars('', ENT_COMPAT, 'UTF-8')); + $container->addTable()->addRow()->addCell()->addText(''); $container->addImage($imageSrc); $writer = new Word2007(); diff --git a/tests/PhpWord/Writer/Word2007/Part/FootnotesTest.php b/tests/PhpWord/Writer/Word2007/Part/FootnotesTest.php index c89311cfb0..9f4f8f9fbe 100644 --- a/tests/PhpWord/Writer/Word2007/Part/FootnotesTest.php +++ b/tests/PhpWord/Writer/Word2007/Part/FootnotesTest.php @@ -36,13 +36,13 @@ public function testWriteFootnotes() $phpWord = new PhpWord(); $phpWord->addParagraphStyle('pStyle', array('alignment' => Jc::START)); $section = $phpWord->addSection(); - $section->addText(htmlspecialchars('Text', ENT_COMPAT, 'UTF-8')); + $section->addText('Text'); $footnote1 = $section->addFootnote('pStyle'); - $footnote1->addText(htmlspecialchars('Footnote', ENT_COMPAT, 'UTF-8')); + $footnote1->addText('Footnote'); $footnote1->addTextBreak(); $footnote1->addLink('https://github.com/PHPOffice/PHPWord'); $footnote2 = $section->addEndnote(array('alignment' => Jc::START)); - $footnote2->addText(htmlspecialchars('Endnote', ENT_COMPAT, 'UTF-8')); + $footnote2->addText('Endnote'); $doc = TestHelperDOCX::getDocument($phpWord); $this->assertTrue($doc->elementExists('/w:document/w:body/w:p/w:r/w:footnoteReference')); diff --git a/tests/PhpWord/Writer/Word2007/Part/HeaderTest.php b/tests/PhpWord/Writer/Word2007/Part/HeaderTest.php index 0f2a4de46b..4db0de7bcd 100644 --- a/tests/PhpWord/Writer/Word2007/Part/HeaderTest.php +++ b/tests/PhpWord/Writer/Word2007/Part/HeaderTest.php @@ -33,11 +33,11 @@ public function testWriteHeader() $imageSrc = __DIR__ . '/../../../_files/images/PhpWord.png'; $container = new \PhpOffice\PhpWord\Element\Header(1); - $container->addText(htmlspecialchars('Test', ENT_COMPAT, 'UTF-8')); - $container->addPreserveText(htmlspecialchars('', ENT_COMPAT, 'UTF-8')); + $container->addText('Test'); + $container->addPreserveText(''); $container->addTextBreak(); $container->addTextRun(); - $container->addTable()->addRow()->addCell()->addText(htmlspecialchars('', ENT_COMPAT, 'UTF-8')); + $container->addTable()->addRow()->addCell()->addText(''); $container->addImage($imageSrc); $container->addWatermark($imageSrc); diff --git a/tests/PhpWord/Writer/Word2007/Style/FontTest.php b/tests/PhpWord/Writer/Word2007/Style/FontTest.php index 1731f90d52..5a482cbe01 100644 --- a/tests/PhpWord/Writer/Word2007/Style/FontTest.php +++ b/tests/PhpWord/Writer/Word2007/Style/FontTest.php @@ -42,7 +42,7 @@ public function testFontRTL() $phpWord = new \PhpOffice\PhpWord\PhpWord(); $section = $phpWord->addSection(); $textrun = $section->addTextRun(); - $textrun->addText(htmlspecialchars('سلام این یک پاراگراف راست به چپ است', ENT_COMPAT, 'UTF-8'), array('rtl' => true)); + $textrun->addText('سلام این یک پاراگراف راست به چپ است', array('rtl' => true)); $doc = TestHelperDOCX::getDocument($phpWord, 'Word2007'); $file = 'word/document.xml'; diff --git a/tests/PhpWord/Writer/Word2007Test.php b/tests/PhpWord/Writer/Word2007Test.php index c87ef356ce..00072181b0 100644 --- a/tests/PhpWord/Writer/Word2007Test.php +++ b/tests/PhpWord/Writer/Word2007Test.php @@ -79,12 +79,12 @@ public function testSave() $phpWord->addFontStyle('Font', array('size' => 11)); $phpWord->addParagraphStyle('Paragraph', array('alignment' => Jc::CENTER)); $section = $phpWord->addSection(); - $section->addText(htmlspecialchars('Test 1', ENT_COMPAT, 'UTF-8'), 'Font', 'Paragraph'); + $section->addText('Test 1', 'Font', 'Paragraph'); $section->addTextBreak(); - $section->addText(htmlspecialchars('Test 2', ENT_COMPAT, 'UTF-8')); + $section->addText('Test 2'); $section = $phpWord->addSection(); $textrun = $section->addTextRun(); - $textrun->addText(htmlspecialchars('Test 3', ENT_COMPAT, 'UTF-8')); + $textrun->addText('Test 3'); $footnote = $textrun->addFootnote(); $footnote->addLink('https://github.com/PHPOffice/PHPWord'); $header = $section->addHeader(); @@ -108,9 +108,9 @@ public function testSaveUseDiskCaching() { $phpWord = new PhpWord(); $section = $phpWord->addSection(); - $section->addText(htmlspecialchars('Test', ENT_COMPAT, 'UTF-8')); + $section->addText('Test'); $footnote = $section->addFootnote(); - $footnote->addText(htmlspecialchars('Test', ENT_COMPAT, 'UTF-8')); + $footnote->addText('Test'); $writer = new Word2007($phpWord); $writer->setUseDiskCaching(true); From a07dc6cdf015b40d7b0c0e9668f7ca6de6de2d54 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 4 Jun 2016 20:21:54 +0400 Subject: [PATCH 83/99] #483. Output escaping for OOXML. --- README.md | 2 +- src/PhpWord/Escaper/AbstractEscaper.php | 2 +- src/PhpWord/Writer/Word2007/Element/CheckBox.php | 1 + src/PhpWord/Writer/Word2007/Element/Link.php | 1 + src/PhpWord/Writer/Word2007/Element/PreserveText.php | 1 + src/PhpWord/Writer/Word2007/Element/Text.php | 1 + src/PhpWord/Writer/Word2007/Element/Title.php | 1 + 7 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d18561d7e6..00babe5f8c 100644 --- a/README.md +++ b/README.md @@ -149,7 +149,7 @@ $objWriter->save('helloWorld.html'); /* Note: we skip RTF, because it's not XML-based and requires a different example. */ /* Note: we skip PDF, because "HTML-to-PDF" approach is used to create PDF documents. */ ``` -:warning: Escape any string you pass to OOXML/ODF/HTML document, otherwise it may get broken. +:warning: Escape any string you pass to ODF/HTML document, otherwise it may get broken. More examples are provided in the [samples folder](samples/). You can also read the [Developers' Documentation](http://phpword.readthedocs.org/) and the [API Documentation](http://phpoffice.github.io/PHPWord/docs/master/) for more detail. diff --git a/src/PhpWord/Escaper/AbstractEscaper.php b/src/PhpWord/Escaper/AbstractEscaper.php index 7055da3182..37b82dffe6 100644 --- a/src/PhpWord/Escaper/AbstractEscaper.php +++ b/src/PhpWord/Escaper/AbstractEscaper.php @@ -22,7 +22,7 @@ * * @codeCoverageIgnore */ -abstract class AbstractEscaper implements EscaperInterface +abstract class AbstractEscaper implements EscaperInterface { /** * @param string $subject diff --git a/src/PhpWord/Writer/Word2007/Element/CheckBox.php b/src/PhpWord/Writer/Word2007/Element/CheckBox.php index 5d2e7302b9..dc498ddfb1 100644 --- a/src/PhpWord/Writer/Word2007/Element/CheckBox.php +++ b/src/PhpWord/Writer/Word2007/Element/CheckBox.php @@ -16,6 +16,7 @@ */ namespace PhpOffice\PhpWord\Writer\Word2007\Element; + use PhpOffice\PhpWord\Settings; /** diff --git a/src/PhpWord/Writer/Word2007/Element/Link.php b/src/PhpWord/Writer/Word2007/Element/Link.php index b504a94b25..46ef28e78c 100644 --- a/src/PhpWord/Writer/Word2007/Element/Link.php +++ b/src/PhpWord/Writer/Word2007/Element/Link.php @@ -16,6 +16,7 @@ */ namespace PhpOffice\PhpWord\Writer\Word2007\Element; + use PhpOffice\PhpWord\Settings; /** diff --git a/src/PhpWord/Writer/Word2007/Element/PreserveText.php b/src/PhpWord/Writer/Word2007/Element/PreserveText.php index 5c1c493b12..4c5c90bfb1 100644 --- a/src/PhpWord/Writer/Word2007/Element/PreserveText.php +++ b/src/PhpWord/Writer/Word2007/Element/PreserveText.php @@ -16,6 +16,7 @@ */ namespace PhpOffice\PhpWord\Writer\Word2007\Element; + use PhpOffice\PhpWord\Settings; /** diff --git a/src/PhpWord/Writer/Word2007/Element/Text.php b/src/PhpWord/Writer/Word2007/Element/Text.php index 97fd17754c..0c1ff8b22d 100644 --- a/src/PhpWord/Writer/Word2007/Element/Text.php +++ b/src/PhpWord/Writer/Word2007/Element/Text.php @@ -16,6 +16,7 @@ */ namespace PhpOffice\PhpWord\Writer\Word2007\Element; + use PhpOffice\PhpWord\Settings; /** diff --git a/src/PhpWord/Writer/Word2007/Element/Title.php b/src/PhpWord/Writer/Word2007/Element/Title.php index 3865f59aa9..b662572e9d 100644 --- a/src/PhpWord/Writer/Word2007/Element/Title.php +++ b/src/PhpWord/Writer/Word2007/Element/Title.php @@ -16,6 +16,7 @@ */ namespace PhpOffice\PhpWord\Writer\Word2007\Element; + use PhpOffice\PhpWord\Settings; /** From a2d307936dd559dfb87931bba1d47c3f30730211 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 4 Jun 2016 20:56:06 +0400 Subject: [PATCH 84/99] Fixed build. --- phpmd.xml.dist | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/phpmd.xml.dist b/phpmd.xml.dist index 5eb348ecfe..44b3efdf66 100644 --- a/phpmd.xml.dist +++ b/phpmd.xml.dist @@ -4,7 +4,14 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd" xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"> - + + + + + + + + From ebbb3a525e0c61ce7b824ee8dd99315f4d75f800 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Mon, 13 Jun 2016 20:14:54 +0400 Subject: [PATCH 85/99] #483. Output escaping for ODF. --- README.md | 2 +- src/PhpWord/Writer/ODText/Element/Link.php | 7 +++++- src/PhpWord/Writer/ODText/Element/Text.php | 13 ++++++++-- src/PhpWord/Writer/ODText/Element/Title.php | 7 +++++- src/PhpWord/Writer/ODText/Part/Meta.php | 7 +++++- .../Writer/ODText/Part/ContentTest.php | 24 +++++++++---------- tests/PhpWord/Writer/ODTextTest.php | 14 +++++------ 7 files changed, 49 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 00babe5f8c..1d7a480296 100644 --- a/README.md +++ b/README.md @@ -149,7 +149,7 @@ $objWriter->save('helloWorld.html'); /* Note: we skip RTF, because it's not XML-based and requires a different example. */ /* Note: we skip PDF, because "HTML-to-PDF" approach is used to create PDF documents. */ ``` -:warning: Escape any string you pass to ODF/HTML document, otherwise it may get broken. +:warning: Escape any string you pass to HTML document, otherwise it may get broken. More examples are provided in the [samples folder](samples/). You can also read the [Developers' Documentation](http://phpword.readthedocs.org/) and the [API Documentation](http://phpoffice.github.io/PHPWord/docs/master/) for more detail. diff --git a/src/PhpWord/Writer/ODText/Element/Link.php b/src/PhpWord/Writer/ODText/Element/Link.php index 0db76df394..97b977f22d 100644 --- a/src/PhpWord/Writer/ODText/Element/Link.php +++ b/src/PhpWord/Writer/ODText/Element/Link.php @@ -16,6 +16,7 @@ */ namespace PhpOffice\PhpWord\Writer\ODText\Element; +use PhpOffice\PhpWord\Settings; /** * Text element writer @@ -42,7 +43,11 @@ public function write() $xmlWriter->startElement('text:a'); $xmlWriter->writeAttribute('xlink:type', 'simple'); $xmlWriter->writeAttribute('xlink:href', $element->getSource()); - $xmlWriter->writeRaw($element->getText()); + if (Settings::isOutputEscapingEnabled()) { + $xmlWriter->text($element->getText()); + } else { + $xmlWriter->writeRaw($element->getText()); + } $xmlWriter->endElement(); // text:a if (!$this->withoutP) { diff --git a/src/PhpWord/Writer/ODText/Element/Text.php b/src/PhpWord/Writer/ODText/Element/Text.php index 91c2452505..57ca807469 100644 --- a/src/PhpWord/Writer/ODText/Element/Text.php +++ b/src/PhpWord/Writer/ODText/Element/Text.php @@ -18,6 +18,7 @@ namespace PhpOffice\PhpWord\Writer\ODText\Element; use PhpOffice\PhpWord\Exception\Exception; +use PhpOffice\PhpWord\Settings; /** * Text element writer @@ -56,7 +57,11 @@ public function write() } elseif (is_string($paragraphStyle)) { $xmlWriter->writeAttribute('text:style-name', $paragraphStyle); } - $xmlWriter->writeRaw($element->getText()); + if (Settings::isOutputEscapingEnabled()) { + $xmlWriter->text($element->getText()); + } else { + $xmlWriter->writeRaw($element->getText()); + } } else { if (empty($paragraphStyle)) { $xmlWriter->writeAttribute('text:style-name', 'Standard'); @@ -68,7 +73,11 @@ public function write() if (is_string($fontStyle)) { $xmlWriter->writeAttribute('text:style-name', $fontStyle); } - $xmlWriter->writeRaw($element->getText()); + if (Settings::isOutputEscapingEnabled()) { + $xmlWriter->text($element->getText()); + } else { + $xmlWriter->writeRaw($element->getText()); + } $xmlWriter->endElement(); } if (!$this->withoutP) { diff --git a/src/PhpWord/Writer/ODText/Element/Title.php b/src/PhpWord/Writer/ODText/Element/Title.php index 8ab4c2c857..b6ff9522ff 100644 --- a/src/PhpWord/Writer/ODText/Element/Title.php +++ b/src/PhpWord/Writer/ODText/Element/Title.php @@ -16,6 +16,7 @@ */ namespace PhpOffice\PhpWord\Writer\ODText\Element; +use PhpOffice\PhpWord\Settings; /** * Title element writer @@ -37,7 +38,11 @@ public function write() $xmlWriter->startElement('text:h'); $xmlWriter->writeAttribute('text:outline-level', $element->getDepth()); - $xmlWriter->writeRaw($element->getText()); + if (Settings::isOutputEscapingEnabled()) { + $xmlWriter->text($element->getText()); + } else { + $xmlWriter->writeRaw($element->getText()); + } $xmlWriter->endElement(); // text:h } } diff --git a/src/PhpWord/Writer/ODText/Part/Meta.php b/src/PhpWord/Writer/ODText/Part/Meta.php index 1c71745c17..bbef1a0867 100644 --- a/src/PhpWord/Writer/ODText/Part/Meta.php +++ b/src/PhpWord/Writer/ODText/Part/Meta.php @@ -18,6 +18,7 @@ namespace PhpOffice\PhpWord\Writer\ODText\Part; use PhpOffice\Common\XMLWriter; +use PhpOffice\PhpWord\Settings; /** * ODText meta part writer: meta.xml @@ -100,7 +101,11 @@ private function writeCustomProperty(XMLWriter $xmlWriter, $property, $value) // if ($type !== null) { // $xmlWriter->writeAttribute('meta:value-type', $type); // } - $xmlWriter->writeRaw($value); + if (Settings::isOutputEscapingEnabled()) { + $xmlWriter->text($value); + } else { + $xmlWriter->writeRaw($value); + } $xmlWriter->endElement(); // meta:user-defined } } diff --git a/tests/PhpWord/Writer/ODText/Part/ContentTest.php b/tests/PhpWord/Writer/ODText/Part/ContentTest.php index 87f1527536..33684dfa26 100644 --- a/tests/PhpWord/Writer/ODText/Part/ContentTest.php +++ b/tests/PhpWord/Writer/ODText/Part/ContentTest.php @@ -56,35 +56,35 @@ public function testWriteContent() $phpWord->addTableStyle('tblStyle', array('width' => 100)); $section = $phpWord->addSection(array('colsNum' => 2)); - $section->addText(htmlspecialchars($expected, ENT_COMPAT, 'UTF-8')); - $section->addText(htmlspecialchars('Test font style', ENT_COMPAT, 'UTF-8'), 'Font'); - $section->addText(htmlspecialchars('Test paragraph style', ENT_COMPAT, 'UTF-8'), null, 'Paragraph'); - $section->addLink('https://github.com/PHPOffice/PHPWord', htmlspecialchars('PHPWord on GitHub', ENT_COMPAT, 'UTF-8')); - $section->addTitle(htmlspecialchars('Test title', ENT_COMPAT, 'UTF-8'), 1); + $section->addText($expected); + $section->addText('Test font style', 'Font'); + $section->addText('Test paragraph style', null, 'Paragraph'); + $section->addLink('https://github.com/PHPOffice/PHPWord', 'PHPWord on GitHub'); + $section->addTitle('Test title', 1); $section->addTextBreak(); $section->addPageBreak(); - $section->addListItem(htmlspecialchars('Test list item', ENT_COMPAT, 'UTF-8')); + $section->addListItem('Test list item'); $section->addImage($imageSrc, array('width' => 50)); $section->addObject($objectSrc); $section->addTOC(); $textrun = $section->addTextRun(); - $textrun->addText(htmlspecialchars('Test text run', ENT_COMPAT, 'UTF-8')); + $textrun->addText('Test text run'); $table = $section->addTable(array('width' => 50)); $cell = $table->addRow()->addCell(); $cell = $table->addRow()->addCell(); - $cell->addText(htmlspecialchars('Test', ENT_COMPAT, 'UTF-8')); - $cell->addLink('https://github.com/PHPOffice/PHPWord', htmlspecialchars('PHPWord on GitHub', ENT_COMPAT, 'UTF-8')); + $cell->addText('Test'); + $cell->addLink('https://github.com/PHPOffice/PHPWord', 'PHPWord on GitHub'); $cell->addTextBreak(); - $cell->addListItem(htmlspecialchars('Test list item', ENT_COMPAT, 'UTF-8')); + $cell->addListItem('Test list item'); $cell->addImage($imageSrc); $cell->addObject($objectSrc); $textrun = $cell->addTextRun(); - $textrun->addText(htmlspecialchars('Test text run', ENT_COMPAT, 'UTF-8')); + $textrun->addText('Test text run'); $footer = $section->addFooter(); - $footer->addPreserveText(htmlspecialchars('{PAGE}', ENT_COMPAT, 'UTF-8')); + $footer->addPreserveText('{PAGE}'); $table = $section->addTable('tblStyle')->addRow()->addCell(); diff --git a/tests/PhpWord/Writer/ODTextTest.php b/tests/PhpWord/Writer/ODTextTest.php index 9b64029dd8..11cecc62fd 100644 --- a/tests/PhpWord/Writer/ODTextTest.php +++ b/tests/PhpWord/Writer/ODTextTest.php @@ -73,20 +73,20 @@ public function testSave() $phpWord->addFontStyle('Font', array('size' => 11)); $phpWord->addParagraphStyle('Paragraph', array('alignment' => Jc::CENTER)); $section = $phpWord->addSection(); - $section->addText(htmlspecialchars('Test 1', ENT_COMPAT, 'UTF-8'), 'Font'); + $section->addText('Test 1', 'Font'); $section->addTextBreak(); - $section->addText(htmlspecialchars('Test 2', ENT_COMPAT, 'UTF-8'), null, 'Paragraph'); + $section->addText('Test 2', null, 'Paragraph'); $section->addLink('https://github.com/PHPOffice/PHPWord'); - $section->addTitle(htmlspecialchars('Test', ENT_COMPAT, 'UTF-8'), 1); + $section->addTitle('Test', 1); $section->addPageBreak(); - $section->addTable()->addRow()->addCell()->addText(htmlspecialchars('Test', ENT_COMPAT, 'UTF-8')); - $section->addListItem(htmlspecialchars('Test', ENT_COMPAT, 'UTF-8')); + $section->addTable()->addRow()->addCell()->addText('Test'); + $section->addListItem('Test'); $section->addImage($imageSrc); $section->addObject($objectSrc); $section->addTOC(); $section = $phpWord->addSection(); $textrun = $section->addTextRun(); - $textrun->addText(htmlspecialchars('Test 3', ENT_COMPAT, 'UTF-8')); + $textrun->addText('Test 3'); $writer = new ODText($phpWord); $writer->save($file); @@ -104,7 +104,7 @@ public function testSavePhpOutput() { $phpWord = new PhpWord(); $section = $phpWord->addSection(); - $section->addText(htmlspecialchars('Test', ENT_COMPAT, 'UTF-8')); + $section->addText('Test'); $writer = new ODText($phpWord); $writer->save('php://output'); } From 508d6194fca7a2f9a7646f696ff386abd38d6749 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Mon, 13 Jun 2016 20:31:33 +0400 Subject: [PATCH 86/99] Fixed build. --- src/PhpWord/Writer/ODText/Element/Link.php | 1 + src/PhpWord/Writer/ODText/Element/Title.php | 1 + src/PhpWord/Writer/ODText/Part/Meta.php | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/PhpWord/Writer/ODText/Element/Link.php b/src/PhpWord/Writer/ODText/Element/Link.php index 97b977f22d..fb4b33ecfd 100644 --- a/src/PhpWord/Writer/ODText/Element/Link.php +++ b/src/PhpWord/Writer/ODText/Element/Link.php @@ -16,6 +16,7 @@ */ namespace PhpOffice\PhpWord\Writer\ODText\Element; + use PhpOffice\PhpWord\Settings; /** diff --git a/src/PhpWord/Writer/ODText/Element/Title.php b/src/PhpWord/Writer/ODText/Element/Title.php index b6ff9522ff..ed1fa736da 100644 --- a/src/PhpWord/Writer/ODText/Element/Title.php +++ b/src/PhpWord/Writer/ODText/Element/Title.php @@ -16,6 +16,7 @@ */ namespace PhpOffice\PhpWord\Writer\ODText\Element; + use PhpOffice\PhpWord\Settings; /** diff --git a/src/PhpWord/Writer/ODText/Part/Meta.php b/src/PhpWord/Writer/ODText/Part/Meta.php index bbef1a0867..536902b585 100644 --- a/src/PhpWord/Writer/ODText/Part/Meta.php +++ b/src/PhpWord/Writer/ODText/Part/Meta.php @@ -102,7 +102,7 @@ private function writeCustomProperty(XMLWriter $xmlWriter, $property, $value) // $xmlWriter->writeAttribute('meta:value-type', $type); // } if (Settings::isOutputEscapingEnabled()) { - $xmlWriter->text($value); + $xmlWriter->text($value); } else { $xmlWriter->writeRaw($value); } From 4c7e1399fed7905c86aa6a1c9d0f767dac0dc6c6 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Tue, 28 Jun 2016 21:37:36 +0400 Subject: [PATCH 87/99] #483. Output escaping for HTML. --- README.md | 11 +++--- composer.json | 20 +++++----- docs/installing.rst | 4 +- docs/intro.rst | 4 +- .../Writer/HTML/Element/AbstractElement.php | 7 ++++ src/PhpWord/Writer/HTML/Element/Link.php | 7 +++- src/PhpWord/Writer/HTML/Element/ListItem.php | 8 +++- src/PhpWord/Writer/HTML/Element/Text.php | 14 ++++++- src/PhpWord/Writer/HTML/Element/Title.php | 7 +++- src/PhpWord/Writer/HTML/Part/AbstractPart.php | 11 ++++++ src/PhpWord/Writer/HTML/Part/Head.php | 19 +++++----- src/PhpWord/Writer/HTML/Style/Paragraph.php | 37 ++++++++++++++++++- 12 files changed, 114 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index 1d7a480296..3c2bd5c1d6 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Read more about PHPWord: ## Features -With PHPWord, you can create DOCX, ODT, or RTF documents dynamically using your PHP 5.3+ scripts. Below are some of the things that you can do with PHPWord library: +With PHPWord, you can create OOXML, ODF, or RTF documents dynamically using your PHP 5.3.3+ scripts. Below are some of the things that you can do with PHPWord library: - Set document properties, e.g. title, subject, and creator. - Create document sections with different settings, e.g. portrait/landscape, page size, and page numbering @@ -52,12 +52,14 @@ With PHPWord, you can create DOCX, ODT, or RTF documents dynamically using your PHPWord requires the following: -- PHP 5.3+ +- PHP 5.3.3+ - [XML Parser extension](http://www.php.net/manual/en/xml.installation.php) +- [Zend\Escaper component](http://framework.zend.com/manual/current/en/modules/zend.escaper.introduction.html) +- Zend\Stdlib component - [Zend\Validator component](http://framework.zend.com/manual/current/en/modules/zend.validator.html) -- [Zip extension](http://php.net/manual/en/book.zip.php) (optional, used to write DOCX and ODT) +- [Zip extension](http://php.net/manual/en/book.zip.php) (optional, used to write OOXML and ODF) - [GD extension](http://php.net/manual/en/book.image.php) (optional, used to add images) -- [XMLWriter extension](http://php.net/manual/en/book.xmlwriter.php) (optional, used to write DOCX and ODT) +- [XMLWriter extension](http://php.net/manual/en/book.xmlwriter.php) (optional, used to write OOXML and ODF) - [XSL extension](http://php.net/manual/en/book.xsl.php) (optional, used to apply XSL style sheet to template ) - [dompdf library](https://github.com/dompdf/dompdf) (optional, used to write PDF) @@ -149,7 +151,6 @@ $objWriter->save('helloWorld.html'); /* Note: we skip RTF, because it's not XML-based and requires a different example. */ /* Note: we skip PDF, because "HTML-to-PDF" approach is used to create PDF documents. */ ``` -:warning: Escape any string you pass to HTML document, otherwise it may get broken. More examples are provided in the [samples folder](samples/). You can also read the [Developers' Documentation](http://phpword.readthedocs.org/) and the [API Documentation](http://phpoffice.github.io/PHPWord/docs/master/) for more detail. diff --git a/composer.json b/composer.json index 48d39adadf..e939991457 100644 --- a/composer.json +++ b/composer.json @@ -1,10 +1,10 @@ { "name": "phpoffice/phpword", - "description": "PHPWord - A pure PHP library for reading and writing word processing documents (DOCX, ODT, RTF, HTML, PDF)", + "description": "PHPWord - A pure PHP library for reading and writing word processing documents (OOXML, ODF, RTF, HTML, PDF)", "keywords": [ - "PHP", "PhpOffice", "office", "PhpWord", "word", "template", "template processor", "reader", "writer", + "PHP", "PHPOffice", "office", "PHPWord", "word", "template", "template processor", "reader", "writer", "docx", "OOXML", "OpenXML", "Office Open XML", "ISO IEC 29500", "WordprocessingML", - "RTF", "Rich Text Format", "doc", "odt", "OpenDocument", "PDF", "HTML" + "RTF", "Rich Text Format", "doc", "odt", "ODF", "OpenDocument", "PDF", "HTML" ], "homepage": "http://phpoffice.github.io", "type": "library", @@ -34,8 +34,9 @@ "require": { "php": ">=5.3.3", "ext-xml": "*", - "zendframework/zend-stdlib": "~2.5", - "zendframework/zend-validator": "2.5.*", + "zendframework/zend-escaper": "2.4.*", + "zendframework/zend-stdlib": "2.4.*", + "zendframework/zend-validator": "2.4.*", "phpoffice/common": "0.2.*" }, "require-dev": { @@ -46,15 +47,12 @@ "phploc/phploc": "2.*", "dompdf/dompdf":"0.6.*", "tecnickcom/tcpdf": "6.*", - "mpdf/mpdf": "5.*", - "zendframework/zend-stdlib": "~2.5", - "zendframework/zend-validator": "2.5.*", - "phpoffice/common": "0.2.*" + "mpdf/mpdf": "5.*" }, "suggest": { - "ext-zip": "Allows writing DOCX and ODT", + "ext-zip": "Allows writing OOXML and ODF", "ext-gd2": "Allows adding images", - "ext-xmlwriter": "Allows writing DOCX and ODT", + "ext-xmlwriter": "Allows writing OOXML and ODF", "ext-xsl": "Allows applying XSL style sheet to main document part of OOXML template", "dompdf/dompdf": "Allows writing PDF" }, diff --git a/docs/installing.rst b/docs/installing.rst index dc1f40f384..9593484a55 100644 --- a/docs/installing.rst +++ b/docs/installing.rst @@ -8,8 +8,10 @@ Requirements Mandatory: -- PHP 5.3+ +- PHP 5.3.3+ - `XML Parser `__ extension +- `Zend\\Escaper `__ component +- Zend\\Stdlib component - `Zend\\Validator `__ component Optional: diff --git a/docs/intro.rst b/docs/intro.rst index 8e3d2d0559..0ef27c9fe6 100644 --- a/docs/intro.rst +++ b/docs/intro.rst @@ -63,7 +63,7 @@ Writers ~~~~~~~ +---------------------------+----------------------+--------+-------+-------+--------+-------+ -| Features | | DOCX | ODT | RTF | HTML | PDF | +| Features | | OOXML | ODF | RTF | HTML | PDF | +===========================+======================+========+=======+=======+========+=======+ | **Document Properties** | Standard | ✓ | ✓ | ✓ | ✓ | ✓ | +---------------------------+----------------------+--------+-------+-------+--------+-------+ @@ -122,7 +122,7 @@ Readers ~~~~~~~ +---------------------------+----------------------+--------+-------+-------+-------+-------+ -| Features | | DOCX | DOC | ODT | RTF | HTML | +| Features | | OOXML | DOC | ODF | RTF | HTML | +===========================+======================+========+=======+=======+=======+=======+ | **Document Properties** | Standard | ✓ | | | | | +---------------------------+----------------------+--------+-------+-------+-------+-------+ diff --git a/src/PhpWord/Writer/HTML/Element/AbstractElement.php b/src/PhpWord/Writer/HTML/Element/AbstractElement.php index 1368142363..9eae024ca8 100644 --- a/src/PhpWord/Writer/HTML/Element/AbstractElement.php +++ b/src/PhpWord/Writer/HTML/Element/AbstractElement.php @@ -19,6 +19,7 @@ use PhpOffice\PhpWord\Element\AbstractElement as Element; use PhpOffice\PhpWord\Writer\AbstractWriter; +use Zend\Escaper\Escaper; /** * Abstract HTML element writer @@ -48,6 +49,11 @@ abstract class AbstractElement */ protected $withoutP = false; + /** + * @var \Zend\Escaper\Escaper + */ + protected $escaper; + /** * Write element */ @@ -65,6 +71,7 @@ public function __construct(AbstractWriter $parentWriter, Element $element, $wit $this->parentWriter = $parentWriter; $this->element = $element; $this->withoutP = $withoutP; + $this->escaper = new Escaper(); } /** diff --git a/src/PhpWord/Writer/HTML/Element/Link.php b/src/PhpWord/Writer/HTML/Element/Link.php index 50c4e6af8f..ec0e1746fd 100644 --- a/src/PhpWord/Writer/HTML/Element/Link.php +++ b/src/PhpWord/Writer/HTML/Element/Link.php @@ -16,6 +16,7 @@ */ namespace PhpOffice\PhpWord\Writer\HTML\Element; +use PhpOffice\PhpWord\Settings; /** * Link element HTML writer @@ -37,7 +38,11 @@ public function write() $content = ''; $content .= $this->writeOpening(); - $content .= "element->getSource()}\">{$this->element->getText()}"; + if (Settings::isOutputEscapingEnabled()) { + $content .= "escaper->escapeHtmlAttr($this->element->getSource())}\">{$this->escaper->escapeHtml($this->element->getText())}"; + } else { + $content .= "element->getSource()}\">{$this->element->getText()}"; + } $content .= $this->writeClosing(); return $content; diff --git a/src/PhpWord/Writer/HTML/Element/ListItem.php b/src/PhpWord/Writer/HTML/Element/ListItem.php index a046a0d477..d1d0ae9bed 100644 --- a/src/PhpWord/Writer/HTML/Element/ListItem.php +++ b/src/PhpWord/Writer/HTML/Element/ListItem.php @@ -16,6 +16,7 @@ */ namespace PhpOffice\PhpWord\Writer\HTML\Element; +use PhpOffice\PhpWord\Settings; /** * ListItem element HTML writer @@ -35,8 +36,11 @@ public function write() return ''; } - $text = $this->element->getTextObject()->getText(); - $content = '

' . $text . '

' . PHP_EOL; + if (Settings::isOutputEscapingEnabled()) { + $content = '

' . $this->escaper->escapeHtml($this->element->getTextObject()->getText()) . '

' . PHP_EOL; + } else { + $content = '

' . $this->element->getTextObject()->getText() . '

' . PHP_EOL; + } return $content; } diff --git a/src/PhpWord/Writer/HTML/Element/Text.php b/src/PhpWord/Writer/HTML/Element/Text.php index f57e9c21a0..66455c1f6c 100644 --- a/src/PhpWord/Writer/HTML/Element/Text.php +++ b/src/PhpWord/Writer/HTML/Element/Text.php @@ -17,6 +17,7 @@ namespace PhpOffice\PhpWord\Writer\HTML\Element; +use PhpOffice\PhpWord\Settings; use PhpOffice\PhpWord\Style\Font; use PhpOffice\PhpWord\Style\Paragraph; use PhpOffice\PhpWord\Writer\HTML\Style\Font as FontStyleWriter; @@ -72,7 +73,11 @@ public function write() $content .= $this->writeOpening(); $content .= $this->openingText; $content .= $this->openingTags; - $content .= $element->getText(); + if (Settings::isOutputEscapingEnabled()) { + $content .= $this->escaper->escapeHtml($element->getText()); + } else { + $content .= $element->getText(); + } $content .= $this->closingTags; $content .= $this->closingText; $content .= $this->writeClosing(); @@ -130,7 +135,12 @@ protected function writeClosing() { $content = ''; if (!$this->withoutP) { - $content .= $this->closingText; + if (Settings::isOutputEscapingEnabled()) { + $content .= $this->escaper->escapeHtml($this->closingText); + } else { + $content .= $this->closingText; + } + $content .= "

" . PHP_EOL; } diff --git a/src/PhpWord/Writer/HTML/Element/Title.php b/src/PhpWord/Writer/HTML/Element/Title.php index 8018178c55..b46746122a 100644 --- a/src/PhpWord/Writer/HTML/Element/Title.php +++ b/src/PhpWord/Writer/HTML/Element/Title.php @@ -16,6 +16,7 @@ */ namespace PhpOffice\PhpWord\Writer\HTML\Element; +use PhpOffice\PhpWord\Settings; /** * TextRun element HTML writer @@ -36,7 +37,11 @@ public function write() } $tag = 'h' . $this->element->getDepth(); - $text = $this->element->getText(); + if (Settings::isOutputEscapingEnabled()) { + $text = $this->escaper->escapeHtml($this->element->getText()); + } else { + $text = $this->element->getText(); + } $content = "<{$tag}>{$text}" . PHP_EOL; return $content; diff --git a/src/PhpWord/Writer/HTML/Part/AbstractPart.php b/src/PhpWord/Writer/HTML/Part/AbstractPart.php index cf4da1b054..4c5f66e95e 100644 --- a/src/PhpWord/Writer/HTML/Part/AbstractPart.php +++ b/src/PhpWord/Writer/HTML/Part/AbstractPart.php @@ -19,6 +19,7 @@ use PhpOffice\PhpWord\Exception\Exception; use PhpOffice\PhpWord\Writer\AbstractWriter; +use Zend\Escaper\Escaper; /** * Abstract HTML part writer @@ -34,6 +35,16 @@ abstract class AbstractPart */ private $parentWriter; + /** + * @var \Zend\Escaper\Escaper + */ + protected $escaper; + + public function __construct() + { + $this->escaper = new Escaper(); + } + /** * Write part * diff --git a/src/PhpWord/Writer/HTML/Part/Head.php b/src/PhpWord/Writer/HTML/Part/Head.php index 438c7ad7ea..c9f947cfd4 100644 --- a/src/PhpWord/Writer/HTML/Part/Head.php +++ b/src/PhpWord/Writer/HTML/Part/Head.php @@ -41,14 +41,14 @@ public function write() { $docProps = $this->getParentWriter()->getPhpWord()->getDocInfo(); $propertiesMapping = array( - 'creator' => 'author', - 'title' => '', + 'creator' => 'author', + 'title' => '', 'description' => '', - 'subject' => '', - 'keywords' => '', - 'category' => '', - 'company' => '', - 'manager' => '' + 'subject' => '', + 'keywords' => '', + 'category' => '', + 'company' => '', + 'manager' => '' ); $title = $docProps->getTitle(); $title = ($title != '') ? $title : 'PHPWord'; @@ -62,8 +62,9 @@ public function write() $value = ($value == '') ? $key : $value; $method = "get" . $key; if ($docProps->$method() != '') { - $content .= '' . PHP_EOL; + $content .= '' . PHP_EOL; } } $content .= $this->writeStyles(); diff --git a/src/PhpWord/Writer/HTML/Style/Paragraph.php b/src/PhpWord/Writer/HTML/Style/Paragraph.php index 52708dcbcd..78a6f4bbcf 100644 --- a/src/PhpWord/Writer/HTML/Style/Paragraph.php +++ b/src/PhpWord/Writer/HTML/Style/Paragraph.php @@ -17,6 +17,8 @@ namespace PhpOffice\PhpWord\Writer\HTML\Style; +use PhpOffice\PhpWord\SimpleType\Jc; + /** * Paragraph style HTML writer * @@ -39,7 +41,40 @@ public function write() // Alignment if ('' !== $style->getAlignment()) { - $css['text-align'] = $style->getAlignment(); // todo: convert OpenXml to Html values + $textAlign = ''; + + switch ($style->getAlignment()) { + case Jc::START: + case Jc::NUM_TAB: + case Jc::LEFT: + $textAlign = 'left'; + break; + + case Jc::CENTER: + $textAlign = 'center'; + break; + + case Jc::END: + case Jc::MEDIUM_KASHIDA: + case Jc::HIGH_KASHIDA: + case Jc::LOW_KASHIDA: + case Jc::RIGHT: + $textAlign = 'right'; + break; + + case Jc::BOTH: + case Jc::DISTRIBUTE: + case Jc::THAI_DISTRIBUTE: + case Jc::JUSTIFY: + $textAlign = 'justify'; + break; + + default: + $textAlign = 'left'; + break; + } + + $css['text-align'] = $textAlign; } // Spacing From 649da97a429c0e253ffab4815314b3d0da998952 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Tue, 28 Jun 2016 21:50:02 +0400 Subject: [PATCH 88/99] Fixed build. --- src/PhpWord/Writer/HTML/Element/Link.php | 1 + src/PhpWord/Writer/HTML/Element/ListItem.php | 1 + src/PhpWord/Writer/HTML/Element/Title.php | 1 + 3 files changed, 3 insertions(+) diff --git a/src/PhpWord/Writer/HTML/Element/Link.php b/src/PhpWord/Writer/HTML/Element/Link.php index ec0e1746fd..b8953cddb3 100644 --- a/src/PhpWord/Writer/HTML/Element/Link.php +++ b/src/PhpWord/Writer/HTML/Element/Link.php @@ -16,6 +16,7 @@ */ namespace PhpOffice\PhpWord\Writer\HTML\Element; + use PhpOffice\PhpWord\Settings; /** diff --git a/src/PhpWord/Writer/HTML/Element/ListItem.php b/src/PhpWord/Writer/HTML/Element/ListItem.php index d1d0ae9bed..707b761999 100644 --- a/src/PhpWord/Writer/HTML/Element/ListItem.php +++ b/src/PhpWord/Writer/HTML/Element/ListItem.php @@ -16,6 +16,7 @@ */ namespace PhpOffice\PhpWord\Writer\HTML\Element; + use PhpOffice\PhpWord\Settings; /** diff --git a/src/PhpWord/Writer/HTML/Element/Title.php b/src/PhpWord/Writer/HTML/Element/Title.php index b46746122a..3f78b56fac 100644 --- a/src/PhpWord/Writer/HTML/Element/Title.php +++ b/src/PhpWord/Writer/HTML/Element/Title.php @@ -16,6 +16,7 @@ */ namespace PhpOffice\PhpWord\Writer\HTML\Element; + use PhpOffice\PhpWord\Settings; /** From 3f1e0ac4a777faa55eefb5fdee3534aa1852f192 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Fri, 8 Jul 2016 22:56:59 +0400 Subject: [PATCH 89/99] #483. Output escaping for RTF. --- CHANGELOG.md | 1 + src/PhpWord/Escaper/AbstractEscaper.php | 14 +-- src/PhpWord/Escaper/EscaperInterface.php | 4 +- src/PhpWord/Escaper/RegExp.php | 4 +- src/PhpWord/Escaper/Rtf.php | 88 +++++++++++++++++++ src/PhpWord/Escaper/Xml.php | 4 +- src/PhpWord/Writer/HTML/Part/AbstractPart.php | 11 +-- .../Writer/RTF/Element/AbstractElement.php | 17 +++- src/PhpWord/Writer/RTF/Part/AbstractPart.php | 51 ++++++++++- src/PhpWord/Writer/RTF/Part/Document.php | 7 +- src/PhpWord/Writer/RTF/Part/Header.php | 2 +- 11 files changed, 172 insertions(+), 31 deletions(-) create mode 100644 src/PhpWord/Escaper/Rtf.php diff --git a/CHANGELOG.md b/CHANGELOG.md index ebf9818464..7f9745d780 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ Place announcement text here. - Introduced writer for the "Paragraph Alignment" element (see `\PhpOffice\PhpWord\Writer\Word2007\Element\ParagraphAlignment`). - @RomanSyroeshko - Introduced writer for the "Table Alignment" element (see `\PhpOffice\PhpWord\Writer\Word2007\Element\TableAlignment`). - @RomanSyroeshko - Supported indexed arrays in arguments of `TemplateProcessor::setValue()`. - @RomanSyroeshko #618 +- Introduced automatic output escaping for OOXML, ODF, HTML, and RTF. To turn the feature on use `phpword.ini` or `\PhpOffice\PhpWord\Settings`. - @RomanSyroeshko #483 ### Changed - Improved error message for the case when `autoload.php` is not found. - @RomanSyroeshko #371 diff --git a/src/PhpWord/Escaper/AbstractEscaper.php b/src/PhpWord/Escaper/AbstractEscaper.php index 37b82dffe6..6ddcbb51b2 100644 --- a/src/PhpWord/Escaper/AbstractEscaper.php +++ b/src/PhpWord/Escaper/AbstractEscaper.php @@ -25,22 +25,22 @@ abstract class AbstractEscaper implements EscaperInterface { /** - * @param string $subject + * @param string $input * * @return string */ - abstract protected function escapeSingleValue($subject); + abstract protected function escapeSingleValue($input); - public function escape($subject) + public function escape($input) { - if (is_array($subject)) { - foreach ($subject as &$item) { + if (is_array($input)) { + foreach ($input as &$item) { $item = $this->escapeSingleValue($item); } } else { - $subject = $this->escapeSingleValue($subject); + $input = $this->escapeSingleValue($input); } - return $subject; + return $input; } } diff --git a/src/PhpWord/Escaper/EscaperInterface.php b/src/PhpWord/Escaper/EscaperInterface.php index 39ddf9b424..c34cf370af 100644 --- a/src/PhpWord/Escaper/EscaperInterface.php +++ b/src/PhpWord/Escaper/EscaperInterface.php @@ -25,9 +25,9 @@ interface EscaperInterface { /** - * @param mixed $subject + * @param mixed $input * * @return mixed */ - public function escape($subject); + public function escape($input); } diff --git a/src/PhpWord/Escaper/RegExp.php b/src/PhpWord/Escaper/RegExp.php index 30d799d96a..de510bcf01 100644 --- a/src/PhpWord/Escaper/RegExp.php +++ b/src/PhpWord/Escaper/RegExp.php @@ -26,8 +26,8 @@ class RegExp extends AbstractEscaper { const REG_EXP_DELIMITER = '/'; - protected function escapeSingleValue($subject) + protected function escapeSingleValue($input) { - return self::REG_EXP_DELIMITER . preg_quote($subject, self::REG_EXP_DELIMITER) . self::REG_EXP_DELIMITER . 'u'; + return self::REG_EXP_DELIMITER . preg_quote($input, self::REG_EXP_DELIMITER) . self::REG_EXP_DELIMITER . 'u'; } } diff --git a/src/PhpWord/Escaper/Rtf.php b/src/PhpWord/Escaper/Rtf.php new file mode 100644 index 0000000000..9385e63e74 --- /dev/null +++ b/src/PhpWord/Escaper/Rtf.php @@ -0,0 +1,88 @@ + $code || $code >= 80) { + return '{\u' . $code . '}'; + } else { + return chr($code); + } + } + + protected function escapeMultibyteCharacter($code) { + return '\uc0{\u' . $code . '}'; + } + + /** + * @see http://www.randomchaos.com/documents/?source=php_and_unicode + */ + protected function escapeSingleValue($input) + { + $escapedValue = ''; + + $numberOfBytes = 1; + $bytes = array(); + for ($i = 0; $i < strlen($input); ++$i) { + $character = $input[$i]; + $asciiCode = ord($character); + + if ($asciiCode < 128) { + $escapedValue .= $this->escapeAsciiCharacter($asciiCode); + } else { + if (0 == count($bytes)) { + if ($asciiCode < 224) { + $numberOfBytes = 2; + } else if ($asciiCode < 240) { + $numberOfBytes = 3; + } else if ($asciiCode < 248) { + $numberOfBytes = 4; + } + } + + $bytes[] = $asciiCode; + + if ($numberOfBytes == count($bytes)) { + if (4 == $numberOfBytes) { + $multibyteCode = ($bytes[0] % 8) * 262144 + ($bytes[1] % 64) * 4096 + ($bytes[2] % 64) * 64 + ($bytes[3] % 64); + } elseif (3 == $numberOfBytes) { + $multibyteCode = ($bytes[0] % 16) * 4096 + ($bytes[1] % 64) * 64 + ($bytes[2] % 64); + } else { + $multibyteCode = ($bytes[0] % 32) * 64 + ($bytes[1] % 64); + } + + if (65279 != $multibyteCode) { + $escapedValue .= $multibyteCode < 128 ? $this->escapeAsciiCharacter($multibyteCode) : $this->escapeMultibyteCharacter($multibyteCode); + } + + $numberOfBytes = 1; + $bytes = array(); + } + } + } + + return $escapedValue; + } +} diff --git a/src/PhpWord/Escaper/Xml.php b/src/PhpWord/Escaper/Xml.php index 6cbdceca1f..274cade5b0 100644 --- a/src/PhpWord/Escaper/Xml.php +++ b/src/PhpWord/Escaper/Xml.php @@ -24,9 +24,9 @@ */ class Xml extends AbstractEscaper { - protected function escapeSingleValue($subject) + protected function escapeSingleValue($input) { // todo: omit encoding parameter after migration onto PHP 5.4 - return htmlspecialchars($subject, ENT_QUOTES, 'UTF-8'); + return htmlspecialchars($input, ENT_QUOTES, 'UTF-8'); } } diff --git a/src/PhpWord/Writer/HTML/Part/AbstractPart.php b/src/PhpWord/Writer/HTML/Part/AbstractPart.php index 4c5f66e95e..8dcd2e4b50 100644 --- a/src/PhpWord/Writer/HTML/Part/AbstractPart.php +++ b/src/PhpWord/Writer/HTML/Part/AbstractPart.php @@ -22,15 +22,11 @@ use Zend\Escaper\Escaper; /** - * Abstract HTML part writer - * * @since 0.11.0 */ abstract class AbstractPart { /** - * Parent writer - * * @var \PhpOffice\PhpWord\Writer\AbstractWriter */ private $parentWriter; @@ -46,16 +42,13 @@ public function __construct() } /** - * Write part - * * @return string */ abstract public function write(); /** - * Set parent writer. - * * @param \PhpOffice\PhpWord\Writer\AbstractWriter $writer + * * @return void */ public function setParentWriter(AbstractWriter $writer = null) @@ -64,8 +57,6 @@ public function setParentWriter(AbstractWriter $writer = null) } /** - * Get parent writer - * * @return \PhpOffice\PhpWord\Writer\AbstractWriter * * @throws \PhpOffice\PhpWord\Exception\Exception diff --git a/src/PhpWord/Writer/RTF/Element/AbstractElement.php b/src/PhpWord/Writer/RTF/Element/AbstractElement.php index 3ac9c6e79f..b185cd921a 100644 --- a/src/PhpWord/Writer/RTF/Element/AbstractElement.php +++ b/src/PhpWord/Writer/RTF/Element/AbstractElement.php @@ -18,9 +18,13 @@ namespace PhpOffice\PhpWord\Writer\RTF\Element; use PhpOffice\Common\Text as CommonText; +use PhpOffice\PhpWord\Element\AbstractElement as Element; +use PhpOffice\PhpWord\Escaper\Rtf; +use PhpOffice\PhpWord\Settings; use PhpOffice\PhpWord\Style; use PhpOffice\PhpWord\Style\Font as FontStyle; use PhpOffice\PhpWord\Style\Paragraph as ParagraphStyle; +use PhpOffice\PhpWord\Writer\AbstractWriter; use PhpOffice\PhpWord\Writer\HTML\Element\AbstractElement as HTMLAbstractElement; use PhpOffice\PhpWord\Writer\RTF\Style\Font as FontStyleWriter; use PhpOffice\PhpWord\Writer\RTF\Style\Paragraph as ParagraphStyleWriter; @@ -46,6 +50,13 @@ abstract class AbstractElement extends HTMLAbstractElement */ private $paragraphStyle; + public function __construct(AbstractWriter $parentWriter, Element $element, $withoutP) + { + parent::__construct($parentWriter, $element, $withoutP); + + $this->escaper = new Rtf(); + } + /** * Get font and paragraph styles. * @@ -112,7 +123,11 @@ protected function writeOpening() */ protected function writeText($text) { - return CommonText::toUnicode($text); + if (Settings::isOutputEscapingEnabled()) { + return $this->escaper->escape($text); + } else { + return CommonText::toUnicode($text); + } } /** diff --git a/src/PhpWord/Writer/RTF/Part/AbstractPart.php b/src/PhpWord/Writer/RTF/Part/AbstractPart.php index b1d97eeed8..b1cd1fb3be 100644 --- a/src/PhpWord/Writer/RTF/Part/AbstractPart.php +++ b/src/PhpWord/Writer/RTF/Part/AbstractPart.php @@ -17,13 +17,56 @@ namespace PhpOffice\PhpWord\Writer\RTF\Part; -use PhpOffice\PhpWord\Writer\HTML\Part\AbstractPart as HTMLAbstractPart; +use PhpOffice\PhpWord\Escaper\Rtf; +use PhpOffice\PhpWord\Exception\Exception; +use PhpOffice\PhpWord\Writer\AbstractWriter; /** - * Abstract RTF part writer - * * @since 0.11.0 */ -abstract class AbstractPart extends HTMLAbstractPart +abstract class AbstractPart { + /** + * @var \PhpOffice\PhpWord\Writer\AbstractWriter + */ + private $parentWriter; + + /** + * @var \PhpOffice\PhpWord\Escaper\EscaperInterface + */ + protected $escaper; + + public function __construct() + { + $this->escaper = new Rtf(); + } + + /** + * @return string + */ + abstract public function write(); + + /** + * @param \PhpOffice\PhpWord\Writer\AbstractWriter $writer + * + * @return void + */ + public function setParentWriter(AbstractWriter $writer = null) + { + $this->parentWriter = $writer; + } + + /** + * @return \PhpOffice\PhpWord\Writer\AbstractWriter + * + * @throws \PhpOffice\PhpWord\Exception\Exception + */ + public function getParentWriter() + { + if ($this->parentWriter !== null) { + return $this->parentWriter; + } else { + throw new Exception('No parent WriterInterface assigned.'); + } + } } diff --git a/src/PhpWord/Writer/RTF/Part/Document.php b/src/PhpWord/Writer/RTF/Part/Document.php index 51b6dbc463..168b9cae36 100644 --- a/src/PhpWord/Writer/RTF/Part/Document.php +++ b/src/PhpWord/Writer/RTF/Part/Document.php @@ -65,7 +65,11 @@ private function writeInfo() $content .= '\info'; foreach ($properties as $property) { $method = 'get' . (isset($mapping[$property]) ? $mapping[$property] : $property); - $value = $docProps->$method(); + if (!in_array($property, $dateFields) && Settings::isOutputEscapingEnabled()) { + $value = $this->escaper->escape($docProps->$method()); + } else { + $value = $docProps->$method(); + } $value = in_array($property, $dateFields) ? $this->getDateValue($value) : $value; $content .= "{\\{$property} {$value}}"; } @@ -105,7 +109,6 @@ private function writeFormatting() */ private function writeSections() { - $content = ''; $sections = $this->getParentWriter()->getPhpWord()->getSections(); diff --git a/src/PhpWord/Writer/RTF/Part/Header.php b/src/PhpWord/Writer/RTF/Part/Header.php index cc5d3dd4e3..fad62278f1 100644 --- a/src/PhpWord/Writer/RTF/Part/Header.php +++ b/src/PhpWord/Writer/RTF/Part/Header.php @@ -173,7 +173,7 @@ private function writeGenerator() { $content = ''; - $content .= '{\*\generator PhpWord;}'; // Set the generator + $content .= '{\*\generator PHPWord;}'; // Set the generator $content .= PHP_EOL; return $content; From e2ea1eec7c393ef157af254f3d11edfeb9515135 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Fri, 8 Jul 2016 23:21:38 +0400 Subject: [PATCH 90/99] Fixed tests. --- src/PhpWord/Writer/RTF/Element/AbstractElement.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PhpWord/Writer/RTF/Element/AbstractElement.php b/src/PhpWord/Writer/RTF/Element/AbstractElement.php index b185cd921a..ee08f9c729 100644 --- a/src/PhpWord/Writer/RTF/Element/AbstractElement.php +++ b/src/PhpWord/Writer/RTF/Element/AbstractElement.php @@ -50,7 +50,7 @@ abstract class AbstractElement extends HTMLAbstractElement */ private $paragraphStyle; - public function __construct(AbstractWriter $parentWriter, Element $element, $withoutP) + public function __construct(AbstractWriter $parentWriter, Element $element, $withoutP = false) { parent::__construct($parentWriter, $element, $withoutP); @@ -126,7 +126,7 @@ protected function writeText($text) if (Settings::isOutputEscapingEnabled()) { return $this->escaper->escape($text); } else { - return CommonText::toUnicode($text); + return CommonText::toUnicode($text); // todo: replace with `return $text;` later. } } From 7deb0103183b2d81d24da10a3e3b07889af8f09b Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Fri, 8 Jul 2016 23:43:12 +0400 Subject: [PATCH 91/99] Fixed formatting. --- src/PhpWord/Escaper/Rtf.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/PhpWord/Escaper/Rtf.php b/src/PhpWord/Escaper/Rtf.php index 9385e63e74..6f83604d38 100644 --- a/src/PhpWord/Escaper/Rtf.php +++ b/src/PhpWord/Escaper/Rtf.php @@ -24,7 +24,8 @@ */ class Rtf extends AbstractEscaper { - protected function escapeAsciiCharacter($code) { + protected function escapeAsciiCharacter($code) + { if (20 > $code || $code >= 80) { return '{\u' . $code . '}'; } else { @@ -32,7 +33,8 @@ protected function escapeAsciiCharacter($code) { } } - protected function escapeMultibyteCharacter($code) { + protected function escapeMultibyteCharacter($code) + { return '\uc0{\u' . $code . '}'; } From fb863cdf21df3fc82ef266696354cfad692fbb0e Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 30 Jul 2016 16:02:23 +0400 Subject: [PATCH 92/99] https://github.com/PHPOffice/PHPWord/issues/335. --- CHANGELOG.md | 1 + README.md | 2 +- composer.json | 2 +- docs/intro.rst | 3 +- docs/templates-processing.rst | 2 +- src/PhpWord/TemplateProcessor.php | 101 ++++++++++++------ tests/PhpWord/TemplateProcessorTest.php | 46 +++++--- .../documents/without_table_macros.docx | Bin 5083 -> 6304 bytes .../_files/templates/with_table_macros.docx | Bin 5375 -> 7379 bytes 9 files changed, 104 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f9745d780..145b6a31fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ Place announcement text here. - Introduced writer for the "Table Alignment" element (see `\PhpOffice\PhpWord\Writer\Word2007\Element\TableAlignment`). - @RomanSyroeshko - Supported indexed arrays in arguments of `TemplateProcessor::setValue()`. - @RomanSyroeshko #618 - Introduced automatic output escaping for OOXML, ODF, HTML, and RTF. To turn the feature on use `phpword.ini` or `\PhpOffice\PhpWord\Settings`. - @RomanSyroeshko #483 +- Supported processing of headers and footers in `TemplateProcessor::applyXslStyleSheet()`. - @RomanSyroeshko #335 ### Changed - Improved error message for the case when `autoload.php` is not found. - @RomanSyroeshko #371 diff --git a/README.md b/README.md index 3c2bd5c1d6..949238a79b 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ With PHPWord, you can create OOXML, ODF, or RTF documents dynamically using your - Insert charts (pie, doughnut, bar, line, area, scatter, radar) - Insert form fields (textinput, checkbox, and dropdown) - Create document from templates -- Use XSL 1.0 style sheets to transform main document part of OOXML template +- Use XSL 1.0 style sheets to transform headers, main document part, and footers of an OOXML template - ... and many more features on progress ## Requirements diff --git a/composer.json b/composer.json index e939991457..c49eb9cd28 100644 --- a/composer.json +++ b/composer.json @@ -53,7 +53,7 @@ "ext-zip": "Allows writing OOXML and ODF", "ext-gd2": "Allows adding images", "ext-xmlwriter": "Allows writing OOXML and ODF", - "ext-xsl": "Allows applying XSL style sheet to main document part of OOXML template", + "ext-xsl": "Allows applying XSL style sheet to headers, to main document part, and to footers of an OOXML template", "dompdf/dompdf": "Allows writing PDF" }, "autoload": { diff --git a/docs/intro.rst b/docs/intro.rst index 0ef27c9fe6..d1c791cf67 100644 --- a/docs/intro.rst +++ b/docs/intro.rst @@ -50,8 +50,7 @@ Features - Insert charts (pie, doughnut, bar, line, area, scatter, radar) - Insert form fields (textinput, checkbox, and dropdown) - Create document from templates -- Use XSL 1.0 style sheets to transform main document part of OOXML - template +- Use XSL 1.0 style sheets to transform headers, main document part, and footers of an OOXML template - ... and many more features on progress File formats diff --git a/docs/templates-processing.rst b/docs/templates-processing.rst index 1c0b8b03e4..af03b24586 100644 --- a/docs/templates-processing.rst +++ b/docs/templates-processing.rst @@ -15,7 +15,7 @@ Example: $templateProcessor->setValue('Name', 'John Doe'); $templateProcessor->setValue(array('City', 'Street'), array('Detroit', '12th Street')); -It is not possible to directly add new OOXML elements to the template file being processed, but it is possible to transform main document part of the template using XSLT (see ``TemplateProcessor::applyXslStyleSheet``). +It is not possible to directly add new OOXML elements to the template file being processed, but it is possible to transform headers, main document part, and footers of the template using XSLT (see ``TemplateProcessor::applyXslStyleSheet``). See ``Sample_07_TemplateCloneRow.php`` for example on how to create multirow from a single row in a template by using ``TemplateProcessor::cloneRow``. diff --git a/src/PhpWord/TemplateProcessor.php b/src/PhpWord/TemplateProcessor.php index 5f1319012c..d2a306e9eb 100644 --- a/src/PhpWord/TemplateProcessor.php +++ b/src/PhpWord/TemplateProcessor.php @@ -100,7 +100,49 @@ public function __construct($documentTemplate) ); $index++; } - $this->tempDocumentMainPart = $this->fixBrokenMacros($this->zipClass->getFromName('word/document.xml')); + $this->tempDocumentMainPart = $this->fixBrokenMacros($this->zipClass->getFromName($this->getMainPartName())); + } + + /** + * @param string $xml + * @param \XSLTProcessor $xsltProcessor + * + * @return string + * + * @throws \PhpOffice\PhpWord\Exception\Exception + */ + protected function transformSingleXml($xml, $xsltProcessor) + { + $domDocument = new \DOMDocument(); + if (false === $domDocument->loadXML($xml)) { + throw new Exception('Could not load the given XML document.'); + } + + $transformedXml = $xsltProcessor->transformToXml($domDocument); + if (false === $transformedXml) { + throw new Exception('Could not transform the given XML document.'); + } + + return $transformedXml; + } + + /** + * @param mixed $xml + * @param \XSLTProcessor $xsltProcessor + * + * @return mixed + */ + protected function transformXml($xml, $xsltProcessor) + { + if (is_array($xml)) { + foreach ($xml as &$item) { + $item = $this->transformSingleXml($item, $xsltProcessor); + } + } else { + $xml = $this->transformSingleXml($xml, $xsltProcessor); + } + + return $xml; } /** @@ -109,35 +151,26 @@ public function __construct($documentTemplate) * Note: since the method doesn't make any guess on logic of the provided XSL style sheet, * make sure that output is correctly escaped. Otherwise you may get broken document. * - * @param \DOMDocument $xslDOMDocument + * @param \DOMDocument $xslDomDocument * @param array $xslOptions - * @param string $xslOptionsURI + * @param string $xslOptionsUri * * @return void * * @throws \PhpOffice\PhpWord\Exception\Exception */ - public function applyXslStyleSheet($xslDOMDocument, $xslOptions = array(), $xslOptionsURI = '') + public function applyXslStyleSheet($xslDomDocument, $xslOptions = array(), $xslOptionsUri = '') { $xsltProcessor = new \XSLTProcessor(); - $xsltProcessor->importStylesheet($xslDOMDocument); - - if (false === $xsltProcessor->setParameter($xslOptionsURI, $xslOptions)) { + $xsltProcessor->importStylesheet($xslDomDocument); + if (false === $xsltProcessor->setParameter($xslOptionsUri, $xslOptions)) { throw new Exception('Could not set values for the given XSL style sheet parameters.'); } - $xmlDOMDocument = new \DOMDocument(); - if (false === $xmlDOMDocument->loadXML($this->tempDocumentMainPart)) { - throw new Exception('Could not load XML from the given template.'); - } - - $xmlTransformed = $xsltProcessor->transformToXml($xmlDOMDocument); - if (false === $xmlTransformed) { - throw new Exception('Could not transform the given XML document.'); - } - - $this->tempDocumentMainPart = $xmlTransformed; + $this->tempDocumentHeaders = $this->transformXml($this->tempDocumentHeaders, $xsltProcessor); + $this->tempDocumentMainPart = $this->transformXml($this->tempDocumentMainPart, $xsltProcessor); + $this->tempDocumentFooters = $this->transformXml($this->tempDocumentFooters, $xsltProcessor); } /** @@ -365,14 +398,14 @@ public function deleteBlock($blockname) */ public function save() { - foreach ($this->tempDocumentHeaders as $index => $headerXML) { - $this->zipClass->addFromString($this->getHeaderName($index), $this->tempDocumentHeaders[$index]); + foreach ($this->tempDocumentHeaders as $index => $xml) { + $this->zipClass->addFromString($this->getHeaderName($index), $xml); } - $this->zipClass->addFromString('word/document.xml', $this->tempDocumentMainPart); + $this->zipClass->addFromString($this->getMainPartName(), $this->tempDocumentMainPart); - foreach ($this->tempDocumentFooters as $index => $headerXML) { - $this->zipClass->addFromString($this->getFooterName($index), $this->tempDocumentFooters[$index]); + foreach ($this->tempDocumentFooters as $index => $xml) { + $this->zipClass->addFromString($this->getFooterName($index), $xml); } // Close zip file @@ -414,8 +447,6 @@ public function saveAs($fileName) * Finds parts of broken macros and sticks them together. * Macros, while being edited, could be implicitly broken by some of the word processors. * - * @since 0.13.0 - * * @param string $documentPart The document part in XML representation. * * @return string @@ -471,27 +502,35 @@ protected function getVariablesForPart($documentPartXML) } /** - * Get the name of the footer file for $index. + * Get the name of the header file for $index. * * @param integer $index * * @return string */ - protected function getFooterName($index) + protected function getHeaderName($index) { - return sprintf('word/footer%d.xml', $index); + return sprintf('word/header%d.xml', $index); } /** - * Get the name of the header file for $index. + * @return string + */ + protected function getMainPartName() + { + return 'word/document.xml'; + } + + /** + * Get the name of the footer file for $index. * * @param integer $index * * @return string */ - protected function getHeaderName($index) + protected function getFooterName($index) { - return sprintf('word/header%d.xml', $index); + return sprintf('word/footer%d.xml', $index); } /** diff --git a/tests/PhpWord/TemplateProcessorTest.php b/tests/PhpWord/TemplateProcessorTest.php index c5a4b1a32f..3c2b8e46c3 100644 --- a/tests/PhpWord/TemplateProcessorTest.php +++ b/tests/PhpWord/TemplateProcessorTest.php @@ -35,10 +35,10 @@ final public function testTemplateCanBeSavedInTemporaryLocation() $templateFqfn = __DIR__ . '/_files/templates/with_table_macros.docx'; $templateProcessor = new TemplateProcessor($templateFqfn); - $xslDOMDocument = new \DOMDocument(); - $xslDOMDocument->load(__DIR__ . "/_files/xsl/remove_tables_by_needle.xsl"); - foreach (array('${employee.', '${scoreboard.') as $needle) { - $templateProcessor->applyXslStyleSheet($xslDOMDocument, array('needle' => $needle)); + $xslDomDocument = new \DOMDocument(); + $xslDomDocument->load(__DIR__ . "/_files/xsl/remove_tables_by_needle.xsl"); + foreach (array('${employee.', '${scoreboard.', '${reference.') as $needle) { + $templateProcessor->applyXslStyleSheet($xslDomDocument, array('needle' => $needle)); } $documentFqfn = $templateProcessor->save(); @@ -48,19 +48,25 @@ final public function testTemplateCanBeSavedInTemporaryLocation() $templateZip = new \ZipArchive(); $templateZip->open($templateFqfn); - $templateXml = $templateZip->getFromName('word/document.xml'); + $templateHeaderXml = $templateZip->getFromName('word/header1.xml'); + $templateMainPartXml = $templateZip->getFromName('word/document.xml'); + $templateFooterXml = $templateZip->getFromName('word/footer1.xml'); if (false === $templateZip->close()) { throw new \Exception("Could not close zip file \"{$templateZip}\"."); } $documentZip = new \ZipArchive(); $documentZip->open($documentFqfn); - $documentXml = $documentZip->getFromName('word/document.xml'); + $documentHeaderXml = $documentZip->getFromName('word/header1.xml'); + $documentMainPartXml = $documentZip->getFromName('word/document.xml'); + $documentFooterXml = $documentZip->getFromName('word/footer1.xml'); if (false === $documentZip->close()) { throw new \Exception("Could not close zip file \"{$documentZip}\"."); } - $this->assertNotEquals($documentXml, $templateXml); + $this->assertNotEquals($templateHeaderXml, $documentHeaderXml); + $this->assertNotEquals($templateMainPartXml, $documentMainPartXml); + $this->assertNotEquals($templateFooterXml, $documentFooterXml); return $documentFqfn; } @@ -82,19 +88,25 @@ final public function testXslStyleSheetCanBeApplied($actualDocumentFqfn) $actualDocumentZip = new \ZipArchive(); $actualDocumentZip->open($actualDocumentFqfn); - $actualDocumentXml = $actualDocumentZip->getFromName('word/document.xml'); + $actualHeaderXml = $actualDocumentZip->getFromName('word/header1.xml'); + $actualMainPartXml = $actualDocumentZip->getFromName('word/document.xml'); + $actualFooterXml = $actualDocumentZip->getFromName('word/footer1.xml'); if (false === $actualDocumentZip->close()) { throw new \Exception("Could not close zip file \"{$actualDocumentFqfn}\"."); } $expectedDocumentZip = new \ZipArchive(); $expectedDocumentZip->open($expectedDocumentFqfn); - $expectedDocumentXml = $expectedDocumentZip->getFromName('word/document.xml'); + $expectedHeaderXml = $expectedDocumentZip->getFromName('word/header1.xml'); + $expectedMainPartXml = $expectedDocumentZip->getFromName('word/document.xml'); + $expectedFooterXml = $expectedDocumentZip->getFromName('word/footer1.xml'); if (false === $expectedDocumentZip->close()) { throw new \Exception("Could not close zip file \"{$expectedDocumentFqfn}\"."); } - $this->assertXmlStringEqualsXmlString($expectedDocumentXml, $actualDocumentXml); + $this->assertXmlStringEqualsXmlString($expectedHeaderXml, $actualHeaderXml); + $this->assertXmlStringEqualsXmlString($expectedMainPartXml, $actualMainPartXml); + $this->assertXmlStringEqualsXmlString($expectedFooterXml, $actualFooterXml); } /** @@ -109,14 +121,14 @@ final public function testXslStyleSheetCanNotBeAppliedOnFailureOfSettingParamete { $templateProcessor = new TemplateProcessor(__DIR__ . '/_files/templates/blank.docx'); - $xslDOMDocument = new \DOMDocument(); - $xslDOMDocument->load(__DIR__ . '/_files/xsl/passthrough.xsl'); + $xslDomDocument = new \DOMDocument(); + $xslDomDocument->load(__DIR__ . '/_files/xsl/passthrough.xsl'); /* * We have to use error control below, because \XSLTProcessor::setParameter omits warning on failure. * This warning fails the test. */ - @$templateProcessor->applyXslStyleSheet($xslDOMDocument, array(1 => 'somevalue')); + @$templateProcessor->applyXslStyleSheet($xslDomDocument, array(1 => 'somevalue')); } /** @@ -124,21 +136,21 @@ final public function testXslStyleSheetCanNotBeAppliedOnFailureOfSettingParamete * * @covers ::applyXslStyleSheet * @expectedException \PhpOffice\PhpWord\Exception\Exception - * @expectedExceptionMessage Could not load XML from the given template. + * @expectedExceptionMessage Could not load the given XML document. * @test */ final public function testXslStyleSheetCanNotBeAppliedOnFailureOfLoadingXmlFromTemplate() { $templateProcessor = new TemplateProcessor(__DIR__ . '/_files/templates/corrupted_main_document_part.docx'); - $xslDOMDocument = new \DOMDocument(); - $xslDOMDocument->load(__DIR__ . '/_files/xsl/passthrough.xsl'); + $xslDomDocument = new \DOMDocument(); + $xslDomDocument->load(__DIR__ . '/_files/xsl/passthrough.xsl'); /* * We have to use error control below, because \DOMDocument::loadXML omits warning on failure. * This warning fails the test. */ - @$templateProcessor->applyXslStyleSheet($xslDOMDocument); + @$templateProcessor->applyXslStyleSheet($xslDomDocument); } /** diff --git a/tests/PhpWord/_files/documents/without_table_macros.docx b/tests/PhpWord/_files/documents/without_table_macros.docx index e4e9767fc1aa165ae5b86947c9af49950cb5b787..316a1df762202dd257b8c11ad7ea1166dd8a93a5 100644 GIT binary patch literal 6304 zcmaJ_1yq##w;j5BC;>_71_cq2PKhC;yJP5W%k$ z|9W}v|7O;jZ_TXPzi)l}oU_k4TU{9i6$k)eVgj)BuNA(IA~Ajj003gh000i+YT{<) z=+49a^Ann?qKqPm8@YEyD!sel$PwKKJ7JJ=W;n(O&)VJ{g<%NTL2ni%vEQr5=Jz)H z9_~|*gJIYCsyT6SlAW*YBwcyO-t*e~%!%>PnojV%*AY*iRLU}Bf3+B1Xhy7<6y5z~ zyF!r9wLF{NT1}%@)SRKVEX8%9;WRUdKR=IeYTCZf-~)2~g~FxK13$7Frf_C!<5I)7 zwZhz_s=k(ErbWILuIKiG5L_Q4+pA{e^ouIS- zU~{kInDI*7aAD_Xs-ryhe=!hZ;XUAh1OUt-7$8D0VCih3?&j>`&ST;1X2tCTb_~!k zQVZh+2At|7w@Tx@OCmIlc_G%+#TwVssK2XAsx;wcadApU;rMN3PV6-2<;9ebYq^pQ zfzqKqQ{O43n?#k!Mxnx}h{1dJFSgRMs)PCxp^5op3@tHP@w!mB;uLZEaz2d%lSh|j zXhTmQrp0iBI%r2PqUuZOQ_}lnuaK1oT5XYp=`3S8cm>NMSEffHMT{bP>yCBlkF>qe zA9kusp>^19KNA;sz$;fW2^i%gABfE^3V%HwLOq2sEN?a;XiVazG1r!~^fZZQp`4q1 z=M_c1p!j`aKD0@RUEQ#99wFYh%U9A3GIkP|2G3EQcn2@-fRSV2&An$c7t>Wq4v>az z%1^==!@%b~i&ZQ^Oq|>mtX^Kr6|+qvTdMq}vzi%N*$}ZGk+O=c2|+peDph;!USY*mOyG>vtJcJ&xiW21d6>YxPvxYO z2b6}*V5hIIr_kR#hZn;04QU7#v+<-733&OQqw1lROn8}#tIshmc&2t1t(%arCe;Yu z!&JSS4yfj@HS_nJr@jhOiCBLgxLYKa4WAh$V;0~iz>^KCntGW4&B<>U9Rcz12VOd=xSMkJj@p$#eD-| zbkxES&Azf@s37Euimrvb4prxta&85;2mxM+=G0l|XCLFLT!O#<=GkC7tuS;r#=-GgA> zWGrGg$21qR8wN#aOdwp`dVZ_d4oEXA-(ADq8x-5B(}1e}6Z#_^Nhip67@n=nzeazy z$!GzJQn51RVN=j?=a@2@?rU`Qhdb>eeNJN;R7T?FAu;VXJ)m*c)P{EO6b1TC9wE1j z;nDnnvl=BZnNEWCk*@Ew8IdgIbB>Aa7pZ2PeYk%P;S=0Q@=LjC;x^Hwccy_cJ}D|8 zywH9WEK@LeNcJR+t%G?@Z4Gvf^zRg$z_|c(B3Mbl1po;CVaDCV*U`%TCnGJ|YHD-5 zz_vY2nbzlZZzObx2)DFCP#0vDtBSIPp-~n#4bnQQ6Zjt-PjedsLUswLLhbVCujHPo zre&mhaj~njsa#S&Zd;;lb98FM%Jft!E)0ECUZ){Lwp_W->ip>IS-EjJowD7K*bpiU z{x_nChQ_;Kuh&Ya6dCaO!zJiNNnm$9D&wH zZmwdG4q8x-m3#_+dOB;UFmE1A_D#|tc#33KU}ZJh&MNYI#FMB^)}|@6nSpOltKHZ< zN5#QJSes~#FJv@m+qG<>UQ=qKa6BOhF)5Y@rseu2KC|qaFczI zqbfraUa{{tP2?i@{45>9mk{sfMv=uFy^L8PXpRldci>cWF?`u`;FdYC zhXl<2_M}*N5b`dCqdHQ0HLa;wjn8ws@g!th4j8;Pi5o;EztpiLw4)GpbHCojL@%*K zsa4EBfu}(7GVvnJ`@q-#{+W+=xLEvmweOkY(%Bc3c?63+Z7XqS1o1Gg;F+X0N%Cfj zW?KJuLdnWzNEbuSOL27lnN864URvYlE>%ZbLXDA+rYCF0p&8#@+TyFbuWn4|GDCJ$ z*K~)c8kMVrimd_}+a@&bZYWjY6zsi8-&O=)-IAPn#sd{9gtluVii`N4!m@UD^3XCf zcl@jE)~o-c?iqWN1sLIlrKH3w;ePpRC=Yf^t1aI$zE$j7T3x57??WnZtM#_Fv9_tb zaCurs@yUn%%L02Evf@Qrfjj+D;z%Qbh6}1l$Z>eYcFLO5v)aw?1Dcj8(=msY$)52l zmB6h#H2VWW3RtiGT?i+HaWbIQ?nrO?drp@f(vn4Vh zadmkh&6Juo<&MX2v$(JwjR{*;_o_DgVF(g>;DsD?*tL`K4;J4!`A9i8GQm5Fk
  • 9~1s$IYiaVs;*N{Ok3+6~agZ~uhk-x^hFuKRT!L7@nO&YuI!U+V2{<>6uHWb>Cw z$*TRsWXj$oH^yC1YOHd12-O-&LqBu1<(~c`So+)#7t{roI~;xDeimEs-kfY?^2HS_ z3%g>YePZ&($i%_*XRSgB6jWx%VZ3hY_aCe)(6r-}UyVy>@IbS)HNns$0l8!vmg2&M z97fv$-x{0^daGSfv5Z9(0ZeQb^W_sA_O>jG`bjMJq++W?_nvEPltdRSztF=dH}(vU z@M+Pe=h~5R-{-i774p}5OOpsub>v6*Lc9{LqLiUlEO)bxXl!StN&%>2ItNuXwY2_{ zCp;}JyMcgzQ?V%v@O+G*!59tE%n(!bBqy2JYoY0jk0n21A1BNlX4jX6C5bh12r9z zXC^iiCKri>2iSb0eb2kz+2UC$lWu}M)v?Zr3uN_*%ldYoNt!>EiWt?0Mj!Sk2rSv2 zODGKl;5~Q%Cnd)`7wGqCi5I8qja4u1Nb^z5#dr{^K$gf@bG#SQS_wrz@!8YW_?Q7f zA4=IKpdEH;!ocCaNs3!6a@fOK*&YG22<+;jFgP;{jZ!6jZ+j512#88k)f0MwVmE{Q z^0DmRqgZE&tho3BA#roO%rfIS67hEjvJ`K6Z2&TFn!14K8}uE;=@&O^m;a<5024su zcdbwYWzEk;@V$Wg_k{LW>e*VESz5XA{Up0SeMza47ud5G5Sx6#1&x-fCh?F)8#Bv2 z)yt@Czg%T9nBt(7F@dr0seDjj=~HjEQ-D2e+k3wo!`PA&kp-{8=hXor-4ew*ITY8H7 z@$rOmJR=rlebMW#na-#Bs_>kmcd6XKMYN6{6LIMumD9M4L7+jQy7ML54O22NSxv|1 zPNWf05nyKP&IHv6;5FNWRzAqx%i*b$p}<~;McVF~!KMciWvLs&!Ro8{1RXY}s}{Jf zY?ou2vbpPG-$-OKlS}+S2eLH$# z)bLE)eakO$l5UA5R1~1w+8^CrY!D8)`2)Fbzz>j)RPG$zNvns{IGMEd}b{C^FpTl@iej z5)r|`Z@zIMm7l%0Olj5Mnt1Z$ss{;=zeo`APIWpHuaJ#s4|1fx8IY++Bf~6f{Ue;I1G%nW z>V-9F<6!R>lO9mL(=o7uqbDp~AkUIgh0Il}FM&_R{z0FAX#2yw7YqThUxHVsxKg}H zDM{1tdbg1V^%KO@i;iA?LB34(Od5#h|k5FB<6iO73U%DIpAct5aAtn+c`q{gd;#^xG|$8p6lkD6}=U0 z%dtl+fAK@n$+MX1{7Hs6tyX9SC6Y5hKv2+=Vx@_$nW8_U84fgS()~`~|6wo9f10%{ zL7%QoHg!P@HA5S_<>A0?+bQcRgascaT^KWO43=YP7-#NXY7L^ai?Y}`aulV^yP`q>NTAF|JP_$gcdacaIby!_Ea>t$qf2|cH>GOMvL&PbJ`b82BVa#|c>ZT>nRMzM8(exadP*zF) zg3}zpAP|&4PD$tK{*96(v^#qu%*0M2QOL?v)TNtKgaLF!df3AU?+R?|jwxB=1%Kw6 zsJGkt`p_uce5ct}hjNvhS={x`7anpKF>_EwDS;5~U@s4w&*Upu^Z zU@w$MQC16j5Vv7}beJ(oCh-G1spQ7#83WFtk!Tsw{ts#Kqu6>{q9KkAh))18MXqJk zc6acHv@AZSdqDE$CE#I5`4X{o0{S!T5bTgS88{nR&b^uBRXgl>?D&OHS7g#vYr1s# z>p?U#h>d61a%_9j^AA|XVcwSH{)VD8DDliG&~ZI!v<>o5Q#Bzu*CPg|&r>H}Lfte;v%I8W=QKrjWbGYLq@ZAlKEAR(**@x7l$p=^A4YztmewB3I6v+wItk35 z8z8!3kV19*nr`xgkPItos>onE2Tv6uMEEm*7OwdFBQHNvgF}T;sWXGvC zh*QVN>S|8aS3mg2${l7HR$_e;Rq>Tu9xE<8?lm*+bqi?IE*m>+ggi`Kkq&2(2>23= zDj`qPg&o{h@zAUm^Xn^uCF9E|=eHIp@j*-Eov$SPBpzgZm~n z*o{-Gptxqz$?Vf9`YUw}!foPEX##p}whE=q`+G=((jz6=7w5+od#0L4TW;o{*~fK@ z??$*8TUj&0YZi{;ha@3gEGn3E?#=Pxm9C$0VUICNg4W|>%7~5zbWtWCHCRo=Wj>Oz zSsr{%6)=jK^aGag8I-aOEgZTZwzBD|kJ(fEljA=PS5@UxcIu&`VDux`j5cI(s>WSv z;xnyrWk|uYAs^GM{Eb;flVqJBY7VFCL50r-^aAvUT+< zXXXiAihGcKk|S|bilAM8T*hYZAAMdNecrG(y9+1?B;9&VWup}o_W0GQOVW*;CwPI8d#45~gf((*~^kg~t_w5+}q zB)c9zQ0zR}a&4UjF##L0bx#g_7f;1h`~nUKZM^`v1D``}2Gf_`a97SXGgwwzO7CJX z<`0LxX^*brRVu`(ER67A_SP<8ipQaSR0Y4EGLmNLs4qhBV46KjPJMnwoKk;U^#MBP zJsrCr4`o|;~U6{Qh|);uf1Fk(y>Gq3TGgD1Lg@4Kga zv(DP22Hnvk=qBO2j1ZmGm7`ic@>BX^wMpr0fJ4ACd+k}5^!3i;vG|;{Y0S&dXHMqg z*M%kHv3D=vESjIQXPQLvJ`egVTv%9M`#RIaYDl*;Mtkm_u?M2J2F;tbIc|bb91g=q z(Qc+orbIW{+i@tNT^d-f*hHx<%D(flv4AL}Afi3q%6_7lRWkzL7o$3>JNrlUIeB(t zTSqpgSsrMa_LiFT01+D00@!Fj}$BfZEWXgJ6dV?u)&+okaB~hYW+I0}v^MFcS z83`E(`0t)BVi5l0^@qcI8+h9a{f$CKq|W~`MsLG!`*pwJIS2>uKk#4f-EH)36Y4h_ z4Ux0|pCxtsq}!&=?~`Z|1J2*;(SIzQ+u+-a>2I(P<}dKS*3{eh+uPW0d?(gFH~(Wd zyA8j+!Tg59u>a3}=H~%`pTYkxBl+(G#1S6W?E(EZ`t}s~8;ynk3;pLzcpH9OWq!lI eBG$3LZvKbns4JtP|NI9I;{6Ws5aXmjzx@xpIQpRg literal 5083 zcmai21y~e&_g=bTNs*9{ZUh18QcAiz7wPVhZbdo-q#Hy5X@R8{1eOL#>2MJg>HK!@ zckd_H|98LtnP;DwXJ^jLoOjN7-*bLyN+_r#08C6wK)l^ES->p=!jG+-E!EtdUEI0N zU0k?)9365Jz$)E5K-v9($5yV6yG*teY|NxYtKq0o0LZ8JGu7%AhQ}J?9gtvI|2@~k zBEh=B#-IGwa+qU6^GP76Ji3lBXt$lQ=4!2gPG8nMl{_aREt@vU(YxC;^e1psawrMh zmqrD=iX3Ml;EBm#b|4<(dWx)x>;JW0faqTKWp*b$CwV375T;Iu!D$fP8J|V4|i_kzS8FDBfVPnKRi!F~$yR<*|beraE*ZL-c$B)Z(u(V$pC?vecoUCVNax~rtNt3$XO&QMr%Xz;bTx1#s~q|`5>;zdy-@4)JA zyUHE@ksazYj_(~8g$WH$1p~vN{(sBIqrS5LPD{ey*62r+wM;#uc3St9n)uYZ+)cJAF{;l z@85KAFtyJzX`R7@6f@uAYc%$dsgAv3-$Op`(+2DXODD5t)xk(59v;-;{kFvjBI+Azk4H#Z&F#}sdFr3kSK zwM=-4`4Si=BPKS5@N4L+^wqx}t5q%);{wQ%b^elOmRt!5uayhgm<4lHs?=D3M#0X5)y!i-{NFa?pE?)kO3{_I|w8+K5(OS9J_!N}8<>Ov&E6B@6WK1RLJ5CeO5n_r=g6>gKpvm2e?6NJPw#ak&S%HKpqjx1b>DDj|xJ^r`sq zvZ$F|Wuj`N4cGpkRYUZgOZtI`@{om1K72D(zI%??ot( z%Qx$Kr#X_+Le^au#le17fb0&11<8%Xmm&=947s$h`M?p*oDr5TB`HBzBmMh&q{jvP zF0WvncuDHli}0v)yuvvu3hP*)l9jVV66L5j~oZOuV@x%)F~hO=apetgY= z%eZ8rV=Lh6e)^i(IfeBr$;&3$&)UJPozs;rRnT}+lPn4~ABDB4IONTA+NTekMdiEJ zrwBNx`3+kYFznMlq0fAEPWL2LHgy76=lYn$m{kBYgR6B{^m57^Tr5$rxoz9D1Xw_l zps=WVq3jXp>{|f`yZi^p~8XZBYW~VVVR%xT}NU&U$u~I?(IX zk|~?n7CIQotVMR*UMY8D>gqzV+2(VYi;0c9giD}fJZoeqT?ylac^9$(=+v4*r>ULN zzj_3acScRGI&q%LYJ=k0T6Q(c+BwdWHbX0O|ASQ1qu7eeIS+$HTGx5$ zjdaky+=gx(#zpbO!@B0L^|l77siltgM^i_}q~Tykg`%i~9#P)q#-tcf4&W1WgSjl1zGMsT}V?s2U!hJP!OVv$1JV`=)30lEjSeM_bwo*7GXhXpUlSyFDTJw z?7=#c9K>)~RJI&2kuyn7=zt8%NGHfheVi4kGbQ8_Ud=5Yd8GhyTe*559{$Y>}Tr}){XUy!1r0PFA7f;7mD7YgjO7_ zXkpYOJ}MWfOw&Iuqasf#eA@J+FTHr|boVGqCN@l75{K8gGqqg*EySZ>7|RGdkOyCX z_Z_M864DW>v6NYx3&p#Lp$FyXVlI7N6a0sV_sWzfr}&*|$%PEsB<*-EKrQOo*^JKTHr(aSsP#sp^v25Zcz#@Mon#vbBWh~Dr}BrKx`RACY@MFDBjogPyb^vF53cMHt`r`|N=DF}%K zW{!4KqP2K6#*MuVqgssqb^EBTlEgv!`C9qFK+r zH7yX4m{*-nvuRbrWVw@A|5XU%7z4d6Qf^YSi7M5-T2$unoog#iLs0rL4kAXcsrc$* zczTS&fB&371b-!vyN9m>=#L0LY7aY2NCMk`l1wjYmZ}FyYcNNMphQMeUip8*u)}@+PuV!L?^<+rcYrF?bnRHVAIy3VKI&=~!GW%H=KL8eu zsqn~s^gx49KfHONuFYKJyOiF1=YhCl#8)i%;Je;0V7t$u)KH; z^WKKyc{-#tB~b=k3r;TNs!kHe*1?E7*n32*<`Pb%J<&t|ptWY=p+5w>|H5Yver+ejfhN*1bC`f2?I5Uioi*o$vBnn%dH=3X3j z%xiB+Gs_eqinc{~Os!=wAo}pp&d-&&A?AWE@XG0NX^wQYlacaQDNbsG&(&E3-|C6| zYdc)V6{i<`@C&{0%fqqyi&dn}SbC5f(eOo>0*U61sI&w{PqCo57!2%Up7Y&Bi;C%f zZH6crXeV_b&RwOXP{N3O0D5KOstB`r)H^x>McEzt3C~SVe4~-Yp_Sw`#rN`>OEk?~ zC(YzK*3YLdKw@-OCgT*FAYVqv>*tmJ=auc#x-Nksum=&;N~>bl6aAodJ+3qH`?IX$)yUyKs;m2rZSPh~4fk5z>7~x8X7-cL^OVG}{wR7LDuxulr#m1I zloQ@b-IDxvy>$CCE{Sc4b7bM1;)*suYnWMfL$9LoNcuT`JeVM_5F^}Z`+9++=)MC1 zutpAvMID;(k?@?_N}^mtxM^m6;l4F*^e5kF@tr}`A`|-Q%F|&B+C_pXg3|H>gP@74 z)8cD(Z&D%y7L3B^oz zip%P=oqw#A(JWrbNxp&wc*(FP`#ILW%O9|3rC8o&Zr11x_2D6s}Ct6dwHf&0ANrluG1 z#-kXHFM~N0Lh{uc#!CoYSQ;l7tKt;eAu1Y1Sk+!3y_CeL^|DUAzG|Gu4;ZHNW0L32 zO*A+HyK}UdXK8bbcS0{z(MeF4=CzS8-+l^C6^!b5=V)vnL0JhEqo7D!4soK6luv1w zBKlsI+>a#AC2>(2;E0!c@Ofn(TzNFyb6F!HS&*@@b>~e^X@mk4V};Bc0mm6PPiHSY zSYkLN|4b9a@GA^u;2HxTDonL}T|n-}2r~Sb!mA1wnuwF@*nW0JDsrH-f-o(wbQI5h zOH-n_o`!&u`kOcIHuq7>2mpQ>8Q$z8fwO<(A;GQ7xm=S!mfA$wpe1QY-Xbie?YolQw;0 zfqPs?Q`tdu2aV|2ygaooGqQN+?pek^5JqGJA^- z?9u(uV|r<4`Xh|+%-y|FCDTdAYn(({}xat;ioPx28LXkZws~hQ^?~yOC}f7`j1}knRShq=)WQx*1x!L_|tL5UC5^@B2SK z?|h-vn-0ytP-Bx*XnirjbZ{kdY!G5 z84)4cRbnIR1R8G!*?KMr0;!EBfz8@Nu~Tws2COB^LAfRX*_hWo3cJNToK8g(^1Guu^a!$|K_UpGG)LqD2^7DBUS2F}LS{fD@RMZG?5Gi??j~nNC z6+4~V@+4t-KDWN|$q~RB{ie<%JtkW2b*L+#Q{Rxp{7zrW78p5ifBGg8X2+HM{_gc{m%0r!ZuF29}gZ|3vq*eQn}XO?Q;XT`FS8 zoz}ZPLPB=fMRG=dFwO^q;Td^Br4xY^)2JiTCX+md1nz1J9Wg6fF~FrFjt6@sB-uPd zyZ}z*DUp4hS4BX6P{rDnc)f&;$fbS?k^^Yy(uOc(JgBwr$Lz&SWsF@?{VwT80n`z~ zl-}h^rT~UV9L3D;?rX*KO=CMsTm|#$$r>3+fg_=atqudWa77HX>k-spffzrbLwp zSH)Fh;_J3ZaTTB#{5i#cKTj}Ybrwd<$jya|Eg4Wb{U!>Unf*av*h=akiu9qCkgx3V zBV1xbe{PkuRR-nig)9xRfR?Lbx^c0UP$pl5v)6>kgbW=7IvN(LuBJ;#`Tc{hXeb1F zSqOKY^`M3)%bp~CUrkrp#Q375kMF6g>Kc4vVw~(mT~5TBP}xNCs5|SVE5qb+Jvr&z z8B81eY{+|Pc$G|yqnI1pyj|+}7w~NP`^islfv5i?@D#VedpJ6q1OJyfZnMP=Y~kQ~ zhyPzJG7^59Ex~7g;gB=4+N@-?$R#Y~hF5+scnkxI7-^fhBOQg|gY}pvf`?oJMm>m` z1aH1mUPx}~=OHtwVqw*BS(Mtr&#oUi1-aDAc2p%0D)~<8jdjMHB9PJftS^?L_-xag zsfH?A7ywyhv|ZSypU?C+IQgzR?8DC`Fb&DWa{vj9dyEe$9o03VoxnVQ@2L}n4}#c~ zKUbNbM==;rseXgMChK@ku#){~T<}|-Qu2=$-t#0*o~;<~xSJ*pBXwFw%29fSymxpP znonOyZGv^&dd)f;Q z>mWS8m5R#hi;n;?;6m<%9DAE=TbZ2ATgpD#Ik(+@cbRS58^69LgkTKOmJ|#s)7`_& zw8uhJ{U65FyJ4|%L>S9enNpKti3DrGzObsFXI2?L#A;+NxZEFX`p8r*C@KA)$Skxc zqh&VPMnoscENd}j<7;K8%H*qb&SpqRfY&Z)b9#)4sH)A7_4>dI9GPTv1r+w}vG_Bf zB*dp4+Zgc@iFPg1_WSekTxGPHL_t-o;~^D2)KX=ODI5S^qKSxiG#V_cG^SpQXrZky zozgK0?IEl&o^kzey0>-u2PB%Cs-!f4G^IRbu~HulLl8WbTresgtftObznX@PzLQx8 zu+v3okei&-hhdv>W)_iGtHe}y?&N3gO;@LXwtxIA@9pbaAgY1PE>|NWT#$nM46VT{ z0UzIlIoKqob5oMsf4?$Op z@4Yt%eJuvlci-HCS(4FC3%f+eQylYKan^-WZD$2xZLF)@J&fXwDS1U_V>Lm z8xKS*B&P6O6?(eHkf+%gDQM)&d@5u?3?eK^gibkeat80jv#h`JDuA*=huH=?o6AVT zc??d`bUQ~DSC-tdXuSy$pDq)O4*gIXq$Bz6){df-vN*IKEk_!dj9h7?vQ|wn_>ni6 zms4bYbQB8^G5BF|{*6hwT*el#OEi0Hes92hS5`4|2*z!M3VMU4m0#7M3FE42ZJAxH zz?WCf5+A@gdTDB$W3Dz7l&rK#6)!wAx1lpd3ZSH?;%<%b>McJ?X;;OKr#Mh_-8B+`!k|G`W?~?toteg_)?p|M)iL z4ha5~c6T-WSK8gDroAkEmy9QPFIL7XjIF6N;Mx%;^C$TnCb`?p*K4y}44-lJhY*NF z#%?^xx<0E}RN(li7)EL4bBsqGq@{NVtu>uJ9nu!|Rc_9G=Bx{0unR4DH2&VSo;)(< zQ^kV=99P|NBy{`rsuxrP+++h4(Kp_YdBK*7zGP_V3`lVU(Vx(9hx?t2lyebR>I5P_ z%24PG^Uqm-(&O=ot0B9TaSuXMlpJ8Ctd2!d;WJ%iLclrKkuA+M2eV*n?lEV2ONa!} z_hIK5%uiRJR`>!t9Dc@X6-F-5S`kOlk)W-}FMJOpAMUaKibxo}Icyh%Ycu!R+&gbz zf%35|CT7^UVBE0-g&2SJxP1PLXNqm~6$i1g#1p+S38!yrWK-pjp`q401pbfFH}Emn zqH&&&5!FZ>=Bn%MIJGrDwVeLcbNM6r+=K$86hcLUfEK^LJkV#1DQ-EoJ_|bc=uJpz zPxaDBPuK2#8ZX?Z=Ti+xk)W;0mRI4)2a(Yz?7Uo3ROA9A7D^8UKTG-)_i0@M2OFpT zbVKbSo7QLSBXZ5$omR2DI9~57zGfeX;?-i7Xdne^n2wQ+j38gq&qAYi|7UT_C;2tU zh8-T)P!E6+a6)fergG><`6==mf_cknT;>;IJZeHpEG7G&ZCWw z#(9}DTj6u9`C!DyBqI5}0eXBSFx&6*;*3bgrL&<e`8PF?{E!Vs_D%f1OnaS{S!zBN~55F6vm<ZstajATk4PUDnk<2d_A2PDiV6EEb!R+=Ys%bWsU{_2-;V$q z<1-&3-h!ZAHSVu4s+NXW!-lu6`Es+V?UGbcpD}N28%24$tQJxv| z&q0h35DJ3!O*X-GLH4_FsKgn(t7JZfzm8Ost_OsD8O&vCnJ*fbQVfhtNf*5`lSU^v zGnMvk5QLFQsqc|B&yOf>IDC0XUdDvYIwH)`Q67_(;^okRxt7@L2MVg0z*DMGS8EN# zi#DlM8*fnJuPZln)|=F`-L`2{Kr;XnF6sH1GwuJ}=V)_tLXa0(YLZTSkoaR_2V>vJ zl&PPFtC0@n23m`3Q{2CL%4Izc*LvGAdK#jOP(Cn4f=E(3mGL3&A8m;EqSYv)!1VnD z@cHHRgRG!kVGs66LeTl;`d3keje7@(pq(@hiS-#D^w=jUT?VY|A*DfR<CgMC}f`j1pV#`hw|7*KC}28ItL9c#{Le1Gu=xAW8jj#YKcY0ACeCXZv=!J zp1ay@o;S(PdU(t&a?V1po8qRATzJj#NDW9|rM_(mz?vEK>$@~Sg5<$z4Ua8t0%PB! zGGCa(m5z<|L{0Fm>F(&P9KVh05uoJi+!N=*TdmQ$NhVr+Mw_y;dh|2SU_HdPrKxP% z*^tld$f{$Q%hXHK!095mu^eC93cg%vdX9+Su2Fa4xl0b_uth}sxh-W(11Fc^MH43d z1_|j3uEI`j_p~r;Se%nNWD?8N-1mm0EU7dm&gpJMrsfpX^}BWO#^$~qTU&c!BDX&@ zmC>i%Iy!RL)n%HQQ#dU-8*p-6qkea)sXzF9lo)qt&=s7%%$&iG-mE5{ul+>!+g@fg zb77!lguaxt`8vAp`asN+LtJ-02KwIaE><3HzHEU5Z;^o4+*}1VvI6@?TP`ni7+VFt zwde7FzeLEElq+WSXW*!+TnA0B_B!@g;o+RP+QpsLGb=#J9V&Ak?nN=tv1lKo2rFMk z)OOJub?fQw`&LSWzFB3CKz$@ynbjpHxWT<^r@>Z3_-Uwca1P~v zs_VFa*L4?HFMA7@yKcHoQ(1WdMA&hlF43M+TPC87kGG={h_ocJR+*O}01Y*>su$N* zn#5_bKg(+H3*5&ge`)iU_Dae}DIq!Dot;&MMe&kCxMPL7!``6-J=IMvKlkO+qFOZx z;zxTV-rcO&ZpiO3Zb=EBa@>G%-x=}?VU1jirdJ03a zu~%{GGvr6|c#RQ+0AnveFmnF`Q$_tm)g}3GQLR<2vv~uVMbj6=Uq$s_OcU&LuW!7z zu?RT|RtVi@Zkk4(9sH_Q<;>y+69VI-ZzDIPOQ=zQ(69MvPB-6G9+U zu@mNfTJ*x9PF`>v3csmVX&)AoM#sXbN+JiESIX~k0Pf-mt;-HE`wf6%CDp}@nsi^_ z8x^+Z>kDPV%8kXMS-Cs1G7$&QwqHnON+R2*ho0mcXoIc^&o-zJSAJlWA3&ZL)S5}Q zZuzFeGF!)WeN)}R1&B&$=;Yt7V?*#-ctn@zAX8zqdDbP}?TmmY3*WjI1s0~vfl_whf4Ixiw zrm82P$w!cm$f};J8{>u4z&)i+ossDV`AYtL3xE2KNj0i1xnj(mgR;b3S@6}b26__n z0{rNdut)jjre+v^y zUy<*&$oe~Nzu3LapA3k*0(Ojw<0Z=^AJ#6fZ(KkI2G=S8@M8fJ*RW%o5d7KUDX|Lq z*47JBgHYYT&hS zIMLhLdAR2T5L5&-Ne@rr@<7G6E@SwZ^VV=$!X*JO(^<7y$Cxd6%am#rcgVNRz{n6c{>B;WK9D``tGrPy)~5~n-O@; zx9#j5!{gHkON$&OJ$q+86oP`+kr#e%zsoTeiFdZO4^M7XY;zOE<3#6c+n!^f-3V0 z`U=_pm5tA|wEgfo&NUvER+d&Z7Z9yll8>IOpO#n?5M(bBa$IOvqQ@F=)gVYu0>1|Z z@5XI9_|$A44XT^R&4eA7$GSx-mJ{xfQGOfbmq9P}h2Tx{XKHSB6{8!{yQq0+L2Gsm zAA=Z}(!P%h~ zZ9Wil4ds)az9(H6n*_m7vpH2~k6VL{vuiyAr>sxAPGBt)3z8Mz>)NOYEaq$vAMIlu zQ$r0E!c3U;DL|>V5M=T*^engbGbnMqjo%)ioe^>Uow1qn4WX6yw^M>UXcy@Z70GX* z)%>Fr^q)Pci-oJJjf2&%>LscCH?naDQyi#Ns`26SJ%Qw#i1h=ERptkJ%V6p6{F5kw?L`w{FOislx}Vr0z-`H~3{ zH6S!iQymOF;g*V}WXjKt%A~i>@v6q$qP5sp&6hB%#2po!M|-27&DxP>RyT$25|eKc z?b3UVffx-z_kMXC>dczV7Bus$DMd3R;%I?=L?(N)uOJ2wNn3i1GtfQiDpVe7!9%tM=yY5%HlONvTBYaed+Tu6#_@um zvZ(UISRVPp^)c1OWYPIY*^wsttJ}rSPHsm{E#nIevUt7rI`3|@#x|EH+E#T_K|crN zNb2Sn_V4?Mnrev!!}Or9j|ZZ-SFF!P z^1YNHj;62veh}DR4n;ZjJkU{lpPYm;9Jh;0JpyS$#pJk&iCE6FJ3wFG9Ro9Q@9QAa zIWqFY$YYK=`23dPLKBp9`O^_?W)a>9OCCH8cN9sBh|J*^GR00UG+ZDMYCM!ADeJR> zlPGKICPdky?aWWSxY@k?6`I?UaBjl4*c<-JdUymvxPOj;?jMKT9RvN_?i~uL$p72% zzB+#w)&Cga_ErDq?BsX%`x^6Io%zRFZ&m02xc?>S|L%QXcfHf0|1n;qKdaKe|I>Xb z>EGipx<%`E)%JJq`wi>AL6|}NFXGeh?)S^^U03^$mEVr#*USIuaesHd&*lFf`2)hg zobT1`-@WhC)g9meW4OfsnfE>R|K0z7PXBx6wh#Uu`aO#K-Ti(@-X;D&7EJPAX+T9D T8RhOF%-gH+HbRie?(Y5v_n4sB delta 4642 zcmZWtbySq!79EBdN@7Uq4hcai=@O7ex*MrM2@wfr=#(0|8)<|AM2R7XZc!=eF6j~; z`de>3{k?CkZ+-WV^X0(s-#0hEj5Zws zLEgf+pZMo$)sGbszu;&XXDyF>(t=WdYJyYY>EA_7f`O2C>3XfnbMk;?GB+GPbz%0D z+pi;2hy5EvcHu_Ar3Mx$I@`1^@T#)U8kQ&=+FA`Ubqb~~8C+Mri6-lm^VCZ5eJ*kXhbt*x_@VdZ zZereRtGKw{4z~p)!?Adj$KeY}+Ert|JpT}))R7Kq%#WV+*;F#0r@-3uN@=|vrh>wg z%1{)kP21g)8m?qgM7LWlNirkFu2zA%HiBzyQYbhsry^O7e$}Rk&3Ypau_*#N0bwd_+x$WJ!Ay zxuBrDB3;%_oMY*Jkn^mXb+4JC89cTXH7F+=D<{+ZO|14|ZS9n=C>IsJvpCs-W!w}0 zf}g!3jj?;7$(QV$BEU?fce|`-k6Uevaoy_;&Kjky&ez60_qs*(BVGm*cr7>;1SLv} zgl$j{l^!qXfU2Nzk4nVKk_=DY(NM}Jb4t`Km&_2*1`K(ihT|Td35JWv2 zp~Eg2NA3$9wkh1oiGFI?RbM#Gh?b-x&Vp~n!wW1&l0rW92UFngf;lZOkqs(ci)pkL zeIsnn>#nE74huc{V=0T_N`n*1bkiA}4llV3J|>9T#|VWZaU&Y2iL|qlns` z>aunbIF95H^Dns<2A=RcS<`=G3l_&*BR-+kG3tei3qIO7T!-VxFlXqcNEMjCwn&;qo-h=*4pxHtHcKo2j>E?%HkHq*eye=8HJSPH<-p>uJRC= z49`Lb7T`(B@0GOY=o@)Y8!7ed-h95am0+|n8>3paea(tWdsF6fQPwi4|H99I>p?KB z%A$nbc#rL}f$eo$eVKK6D+5b;N1DtQqo>1|100FQh6T$j!EYcX=3`Ut5+eyq&1f^H zy4&_a!?ca{Ip@~hImV+TIioCD{nxG&`iJkJtuez#dl;_nHx6BEAFJ*!)t+7HooQz% zATJW)0((N4_-I%Xyj3@BJ z1kr7TIr*Rye81O0hT=;n1{2fa~U*U>$;kd3179U|lTkEM6?vzLleTeXUcEk)aEF4vg93SfX)&1U+x z4VK~ly8v!`3VaQl2|6W03j2Pl?=|D+Y?UsSC0p#UUL@Ac$G9`Ji^uHj-~65@hFf++ z{pPYS38G}pkpk$>5TB1MXWm$^^(b&>s4|1P({7-RBiYOpCwX-Z+p}a;r_()_@4wpP zHL4-yTTbm^q}%Orr|GHs)Y_c3!Ny<2dy>-0>gBI4dXV7l4Ye@%`nWCFi8=wpW`Gxe zannY;{tgZOvIuCWhupfQlEbw~WzjmO_$|&$;-zGdyfE%Bu7=8wb*XW?2&|e~{B18~ zn072p&j~Bx;=RAHqO(Jt~M(|h1s*2Vj zB_AT_3S{F0^Fo;)ef@Oy09!jz#PA7TLAqV)1~I#qgx7*(7g`aa!S0-)ft7uylSDf~ z>XX3qVRK0n6@7^k=rr|_OY2Fc`2h>M8anqk)dyiHFJUM~ykdc-D2c7OhOPW#Pon9U zT1ssz%*4twPn?%KK|hXK6`1j~W&=Z@!iz{m~8`gYX&Yoogv0*8WFi4atvG@FV@ZmupnBi)f z&@p{sBZ&SxSW&42QTme6J9Iit55n80(Px=wk)}6~#avk{pBbh8KGv2Y=8i8)-Nzy- z1HcZ1Uxl2hR$d#GYGF-b#b!os+csnBiFijrLZzSwyccjdO-LZInhq_zH3`D%r)hY! zxOvX@@m=Sk(&T)7Yh&RhPNRtRh%PxkFkE_(QE8i5AzXNEH3vfzn9v1tL+alDhL1BP z8faI`*|DlIM)LVIZ=E{#tfFoz7?}+mnl8k>D#0E7gn5l1U!fP>Fa8*O7hsbe`xw_> zN_x={j_of6uwBTR;oL9AFN)|xZ*H2aS0aCp(@ za>6?0Po+ZBJawt_SGC!UZO(X0z!v4^LdC*LyE`WHT92|63zGyBY1;C~)SHT9T=eVg zCLwBNC8-U@b=$>TC^tmV;FNDE6lV2^@m2;MiA`9&f|+b_&pq^6em! zchUFRZ78$Mq|30lfsxSRAtnq2FmlT<2&M=4ks*Ei`TCucb1L+X{jA$9pXPyId`@Zw z{be}lh~)=W1Z-yb25<72jVluXVo2W3-OK2&{+EpyUuo^>hN$+|Bk8@#V+GjX&X;0Q z9gf>q{Uk1GaJ5tlaKs4g>m>JMFZRiAa`?bIpr9*x%r2k_J zV)1#Tl}yvac{C6a9vYJu((?Yh0{cJ^4c2U(4S5?G4&4hRf%rUZHuc;FiB2Fu9;&bp z>nJTA@TDI^&zkVFrA`_fV|op>4D3>yFV*;d=j!e8D9ee~+2_ zgq3jLEFLQVT;WEYJB^Hqk0M!bSuFC=;@$$2ttz&PcIPERDMQsTgOcLdVRJ6LG}@GR zt}`U_p5*}9Sn=|PXnb-{x(7si&LrKd1WjpAf$1BI!uqi>Lm0|_v$`59dS{_!5Pxnp zqPhhiZ`9w5%Q4ZjVs-@KeIUewtJ_|ba=0FZm(Bc+pK)ANQ z;ZVR%5qnf*I^K3j2}@7ZcDseO>gQ4(qoKTIB4uW9QU*gjtRE@lcj=4q)r~8=XNJ&mX!(dsXN>I&}*KC=)%H{i8-CeHT)uJKZGv2p9 z0pST12|<>HeIK1m6L||-%F=5}CyY4w1(Y{)DLcJ;H*86Y*Y;k1|E0@X)Y;K7fD`}- zxE-YbWkVRy7@?3j8I2AGQq*^fjhBpux767}Je5EXTfGYM5E{!T^;O|}BZc(QY7~Y^g=iYC< z%#W=XR~7c7G`77wgGfAB%XeiY_jH@FevIpDsQ&poL|5vUg4SbxPiSt%JO6(H;gtMP z8cHJBC!!4evY~v;*5=^I&U)V>#7&mFJu}8TVnnq;&DE~o@ESaF#cmxg=ru8!ur1zi z2vjgCR5Pv#y%1`)>UY$dFb1W>PFnPSB$^Ri;}E07u$%PHg?C@bU`$;ki7{qB#=Bw~ zzTb#ogW))Y(UsrZ#aXKhuwnK6K!OfUh?4SNk9+27+dJqZW0RyR^2Lc0xU%GwFF86! z%c&PlwT)3xe*qS#hx&U8p;0QJZ_Jpy}rKMln7IL;}O_= z=o}Q1Q|Gn0aCDb#>s&GjLI@oV9(_fA^J7PY+CubhkWi>w?2DBOIdx>dH8Mo<9@)Eu z8j*b&`rWq9q{$mA{F8k8vQ{t!CjCw1=AGXH?iN_yyA{t2<5vcv0ZDJu@xON%a55@E zhF^CWf4Y8}+v)ay4;T%ug+a&t??3;v*TnyezFjc_;SMzPzfu2mkl??9FwxpwIj`3p&w7@kW>25+XpCcpvU0K{+YLB(%s{{gX_P!#|G From 54013a616420381bdd2d0aa858e2464e77ea5d2c Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 30 Jul 2016 22:32:32 +0400 Subject: [PATCH 93/99] https://github.com/PHPOffice/PHPWord/issues/399. --- CHANGELOG.md | 1 + src/PhpWord/TemplateProcessor.php | 2 +- src/PhpWord/Writer/PDF/TCPDF.php | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 145b6a31fe..8cb0afb4ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ Place announcement text here. Use the correspondent `getAlignment` and `setAlignment` methods instead. - @RomanSyroeshko - `left`, `right`, and `justify` alignment options for paragraphs (now are mapped to `Jc::START`, `Jc::END`, and `Jc::BOTH`). - @RomanSyroeshko - `left`, `right`, and `justify` alignment options for tables (now are mapped to `Jc::START`, `Jc::END`, and `Jc::CENTER`). - @RomanSyroeshko +- `TCPDF` due to its limited HTML support. Use `DomPDF` or `MPDF` renderer instead. - @RomanSyroeshko #399 ### Removed - `\PhpOffice\PhpWord\Style\Alignment`. Style properties, which previously stored instances of this class, now deal with strings. diff --git a/src/PhpWord/TemplateProcessor.php b/src/PhpWord/TemplateProcessor.php index d2a306e9eb..52cf70dff1 100644 --- a/src/PhpWord/TemplateProcessor.php +++ b/src/PhpWord/TemplateProcessor.php @@ -434,7 +434,7 @@ public function saveAs($fileName) } /* - * Note: we do not use ``rename`` function here, because it looses file ownership data on Windows platform. + * Note: we do not use `rename` function here, because it looses file ownership data on Windows platform. * As a result, user cannot open the file directly getting "Access denied" message. * * @see https://github.com/PHPOffice/PHPWord/issues/532 diff --git a/src/PhpWord/Writer/PDF/TCPDF.php b/src/PhpWord/Writer/PDF/TCPDF.php index 8a73ddb0ac..69e9a77f71 100644 --- a/src/PhpWord/Writer/PDF/TCPDF.php +++ b/src/PhpWord/Writer/PDF/TCPDF.php @@ -22,6 +22,8 @@ /** * TCPDF writer * + * @deprecated 0.13.0 Use `DomPDF` or `MPDF` instead. + * * @link http://www.tcpdf.org/ * @since 0.11.0 */ From 7817524b31fc88881ef1de8d8e709506bae7e3b8 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 30 Jul 2016 22:33:24 +0400 Subject: [PATCH 94/99] https://github.com/PHPOffice/PHPWord/issues/399. --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8cb0afb4ed..7f35e52ec3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,7 +26,7 @@ Place announcement text here. Use the correspondent `getAlignment` and `setAlignment` methods instead. - @RomanSyroeshko - `left`, `right`, and `justify` alignment options for paragraphs (now are mapped to `Jc::START`, `Jc::END`, and `Jc::BOTH`). - @RomanSyroeshko - `left`, `right`, and `justify` alignment options for tables (now are mapped to `Jc::START`, `Jc::END`, and `Jc::CENTER`). - @RomanSyroeshko -- `TCPDF` due to its limited HTML support. Use `DomPDF` or `MPDF` renderer instead. - @RomanSyroeshko #399 +- `TCPDF` due to its limited HTML support. Use `DomPDF` or `MPDF` writer instead. - @RomanSyroeshko #399 ### Removed - `\PhpOffice\PhpWord\Style\Alignment`. Style properties, which previously stored instances of this class, now deal with strings. From 1827eab20c8325fe16814d5dfcb586aa0ec77ba4 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 30 Jul 2016 22:41:31 +0400 Subject: [PATCH 95/99] Removed deprecated code. --- CHANGELOG.md | 1 + src/PhpWord/Element/AbstractContainer.php | 17 ----------------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f35e52ec3..cd7cc4c811 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,7 @@ so installation via ZIP-archive download is not an option anymore. To install PH - `\PhpOffice\PhpWord\Shared\String` replaced by `\PhpOffice\Common\Text`. - @Progi1984 @RomanSyroeshko #658 - `\PhpOffice\PhpWord\Shared\XMLReader` replaced by `\PhpOffice\Common\XMLReader`. - @Progi1984 #658 - `\PhpOffice\PhpWord\Shared\XMLWriter` replaced by `\PhpOffice\Common\XMLWriter`. - @Progi1984 @RomanSyroeshko #658 +- `AbstractContainer::addMemoryImage()`. Use `AbstractContainer::addImage()` instead. ### Fixed - `Undefined property` error while reading MS-DOC documents. - @jaberu #610 diff --git a/src/PhpWord/Element/AbstractContainer.php b/src/PhpWord/Element/AbstractContainer.php index d211ae07b7..da2c4391de 100644 --- a/src/PhpWord/Element/AbstractContainer.php +++ b/src/PhpWord/Element/AbstractContainer.php @@ -248,23 +248,6 @@ private function checkValidity($method) return true; } - /** - * Add memory image element - * - * @deprecated 0.9.0 - * - * @param string $src - * @param mixed $style - * - * @return \PhpOffice\PhpWord\Element\Image - * - * @codeCoverageIgnore - */ - public function addMemoryImage($src, $style = null) - { - return $this->addImage($src, $style); - } - /** * Create textrun element * From 2bcfacfbf9ee8553ea06750ec311a4a45ead4beb Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sun, 31 Jul 2016 12:35:06 +0400 Subject: [PATCH 96/99] Updated copyright. --- LICENSE | 2 +- bootstrap.php | 2 +- src/PhpWord/Collection/AbstractCollection.php | 2 +- src/PhpWord/Collection/Bookmarks.php | 2 +- src/PhpWord/Collection/Charts.php | 2 +- src/PhpWord/Collection/Endnotes.php | 2 +- src/PhpWord/Collection/Footnotes.php | 2 +- src/PhpWord/Collection/Titles.php | 2 +- src/PhpWord/Element/AbstractContainer.php | 2 +- src/PhpWord/Element/AbstractElement.php | 3 +-- src/PhpWord/Element/Bookmark.php | 3 +-- src/PhpWord/Element/Cell.php | 2 +- src/PhpWord/Element/Chart.php | 2 +- src/PhpWord/Element/CheckBox.php | 2 +- src/PhpWord/Element/Endnote.php | 2 +- src/PhpWord/Element/Field.php | 2 +- src/PhpWord/Element/Footer.php | 2 +- src/PhpWord/Element/Footnote.php | 2 +- src/PhpWord/Element/FormField.php | 2 +- src/PhpWord/Element/Header.php | 2 +- src/PhpWord/Element/Image.php | 2 +- src/PhpWord/Element/Line.php | 2 +- src/PhpWord/Element/Link.php | 2 +- src/PhpWord/Element/ListItem.php | 2 +- src/PhpWord/Element/ListItemRun.php | 2 +- src/PhpWord/Element/Object.php | 2 +- src/PhpWord/Element/PageBreak.php | 2 +- src/PhpWord/Element/PreserveText.php | 2 +- src/PhpWord/Element/Row.php | 2 +- src/PhpWord/Element/SDT.php | 2 +- src/PhpWord/Element/Section.php | 2 +- src/PhpWord/Element/Shape.php | 2 +- src/PhpWord/Element/TOC.php | 2 +- src/PhpWord/Element/Table.php | 2 +- src/PhpWord/Element/Text.php | 2 +- src/PhpWord/Element/TextBox.php | 2 +- src/PhpWord/Element/TextBreak.php | 2 +- src/PhpWord/Element/TextRun.php | 2 +- src/PhpWord/Element/Title.php | 2 +- src/PhpWord/Exception/CopyFileException.php | 2 +- src/PhpWord/Exception/CreateTemporaryFileException.php | 2 +- src/PhpWord/Exception/Exception.php | 2 +- src/PhpWord/Exception/InvalidImageException.php | 2 +- src/PhpWord/Exception/InvalidObjectException.php | 2 +- src/PhpWord/Exception/InvalidStyleException.php | 2 +- src/PhpWord/Exception/UnsupportedImageTypeException.php | 2 +- src/PhpWord/IOFactory.php | 2 +- src/PhpWord/Media.php | 2 +- src/PhpWord/Metadata/Compatibility.php | 2 +- src/PhpWord/Metadata/DocInfo.php | 2 +- src/PhpWord/Metadata/Protection.php | 2 +- src/PhpWord/PhpWord.php | 2 +- src/PhpWord/Reader/AbstractReader.php | 2 +- src/PhpWord/Reader/HTML.php | 2 +- src/PhpWord/Reader/MsDoc.php | 3 +-- src/PhpWord/Reader/ODText.php | 2 +- src/PhpWord/Reader/ODText/AbstractPart.php | 2 +- src/PhpWord/Reader/ODText/Content.php | 2 +- src/PhpWord/Reader/ODText/Meta.php | 2 +- src/PhpWord/Reader/RTF.php | 2 +- src/PhpWord/Reader/RTF/Document.php | 2 +- src/PhpWord/Reader/ReaderInterface.php | 2 +- src/PhpWord/Reader/Word2007.php | 2 +- src/PhpWord/Reader/Word2007/AbstractPart.php | 2 +- src/PhpWord/Reader/Word2007/DocPropsApp.php | 2 +- src/PhpWord/Reader/Word2007/DocPropsCore.php | 2 +- src/PhpWord/Reader/Word2007/DocPropsCustom.php | 2 +- src/PhpWord/Reader/Word2007/Document.php | 2 +- src/PhpWord/Reader/Word2007/Endnotes.php | 2 +- src/PhpWord/Reader/Word2007/Footnotes.php | 2 +- src/PhpWord/Reader/Word2007/Numbering.php | 2 +- src/PhpWord/Reader/Word2007/Styles.php | 2 +- src/PhpWord/Settings.php | 2 +- src/PhpWord/Shared/Converter.php | 2 +- src/PhpWord/Shared/Html.php | 2 +- src/PhpWord/Shared/OLERead.php | 2 +- src/PhpWord/Shared/ZipArchive.php | 2 +- src/PhpWord/SimpleType/Jc.php | 2 +- src/PhpWord/SimpleType/JcTable.php | 2 +- src/PhpWord/Style.php | 2 +- src/PhpWord/Style/AbstractStyle.php | 2 +- src/PhpWord/Style/Border.php | 2 +- src/PhpWord/Style/Cell.php | 2 +- src/PhpWord/Style/Chart.php | 2 +- src/PhpWord/Style/Extrusion.php | 2 +- src/PhpWord/Style/Fill.php | 2 +- src/PhpWord/Style/Font.php | 2 +- src/PhpWord/Style/Frame.php | 2 +- src/PhpWord/Style/Image.php | 2 +- src/PhpWord/Style/Indentation.php | 2 +- src/PhpWord/Style/Line.php | 2 +- src/PhpWord/Style/LineNumbering.php | 2 +- src/PhpWord/Style/ListItem.php | 2 +- src/PhpWord/Style/Numbering.php | 2 +- src/PhpWord/Style/NumberingLevel.php | 2 +- src/PhpWord/Style/Outline.php | 2 +- src/PhpWord/Style/Paper.php | 2 +- src/PhpWord/Style/Paragraph.php | 2 +- src/PhpWord/Style/Row.php | 2 +- src/PhpWord/Style/Section.php | 2 +- src/PhpWord/Style/Shading.php | 2 +- src/PhpWord/Style/Shadow.php | 2 +- src/PhpWord/Style/Shape.php | 2 +- src/PhpWord/Style/Spacing.php | 2 +- src/PhpWord/Style/TOC.php | 2 +- src/PhpWord/Style/Tab.php | 2 +- src/PhpWord/Style/Table.php | 2 +- src/PhpWord/Style/TextBox.php | 2 +- src/PhpWord/Template.php | 2 +- src/PhpWord/TemplateProcessor.php | 2 +- src/PhpWord/Writer/AbstractWriter.php | 2 +- src/PhpWord/Writer/HTML.php | 2 +- src/PhpWord/Writer/HTML/Element/AbstractElement.php | 2 +- src/PhpWord/Writer/HTML/Element/Container.php | 2 +- src/PhpWord/Writer/HTML/Element/Endnote.php | 2 +- src/PhpWord/Writer/HTML/Element/Footnote.php | 2 +- src/PhpWord/Writer/HTML/Element/Image.php | 2 +- src/PhpWord/Writer/HTML/Element/Link.php | 2 +- src/PhpWord/Writer/HTML/Element/ListItem.php | 2 +- src/PhpWord/Writer/HTML/Element/PageBreak.php | 2 +- src/PhpWord/Writer/HTML/Element/Table.php | 2 +- src/PhpWord/Writer/HTML/Element/Text.php | 2 +- src/PhpWord/Writer/HTML/Element/TextBreak.php | 2 +- src/PhpWord/Writer/HTML/Element/TextRun.php | 2 +- src/PhpWord/Writer/HTML/Element/Title.php | 2 +- src/PhpWord/Writer/HTML/Part/AbstractPart.php | 2 +- src/PhpWord/Writer/HTML/Part/Body.php | 2 +- src/PhpWord/Writer/HTML/Part/Head.php | 2 +- src/PhpWord/Writer/HTML/Style/AbstractStyle.php | 2 +- src/PhpWord/Writer/HTML/Style/Font.php | 2 +- src/PhpWord/Writer/HTML/Style/Generic.php | 2 +- src/PhpWord/Writer/HTML/Style/Image.php | 2 +- src/PhpWord/Writer/HTML/Style/Paragraph.php | 2 +- src/PhpWord/Writer/ODText.php | 2 +- src/PhpWord/Writer/ODText/Element/AbstractElement.php | 2 +- src/PhpWord/Writer/ODText/Element/Container.php | 2 +- src/PhpWord/Writer/ODText/Element/Image.php | 2 +- src/PhpWord/Writer/ODText/Element/Link.php | 2 +- src/PhpWord/Writer/ODText/Element/Table.php | 2 +- src/PhpWord/Writer/ODText/Element/Text.php | 2 +- src/PhpWord/Writer/ODText/Element/TextBreak.php | 2 +- src/PhpWord/Writer/ODText/Element/TextRun.php | 2 +- src/PhpWord/Writer/ODText/Element/Title.php | 2 +- src/PhpWord/Writer/ODText/Part/AbstractPart.php | 2 +- src/PhpWord/Writer/ODText/Part/Content.php | 2 +- src/PhpWord/Writer/ODText/Part/Manifest.php | 2 +- src/PhpWord/Writer/ODText/Part/Meta.php | 2 +- src/PhpWord/Writer/ODText/Part/Mimetype.php | 2 +- src/PhpWord/Writer/ODText/Part/Styles.php | 2 +- src/PhpWord/Writer/ODText/Style/AbstractStyle.php | 2 +- src/PhpWord/Writer/ODText/Style/Font.php | 2 +- src/PhpWord/Writer/ODText/Style/Image.php | 2 +- src/PhpWord/Writer/ODText/Style/Paragraph.php | 2 +- src/PhpWord/Writer/ODText/Style/Section.php | 2 +- src/PhpWord/Writer/ODText/Style/Table.php | 2 +- src/PhpWord/Writer/PDF.php | 2 +- src/PhpWord/Writer/PDF/AbstractRenderer.php | 2 +- src/PhpWord/Writer/PDF/DomPDF.php | 2 +- src/PhpWord/Writer/PDF/MPDF.php | 2 +- src/PhpWord/Writer/PDF/TCPDF.php | 2 +- src/PhpWord/Writer/RTF.php | 2 +- src/PhpWord/Writer/RTF/Element/AbstractElement.php | 2 +- src/PhpWord/Writer/RTF/Element/Container.php | 2 +- src/PhpWord/Writer/RTF/Element/Image.php | 2 +- src/PhpWord/Writer/RTF/Element/Link.php | 2 +- src/PhpWord/Writer/RTF/Element/ListItem.php | 2 +- src/PhpWord/Writer/RTF/Element/PageBreak.php | 2 +- src/PhpWord/Writer/RTF/Element/Table.php | 2 +- src/PhpWord/Writer/RTF/Element/Text.php | 2 +- src/PhpWord/Writer/RTF/Element/TextBreak.php | 2 +- src/PhpWord/Writer/RTF/Element/TextRun.php | 2 +- src/PhpWord/Writer/RTF/Element/Title.php | 2 +- src/PhpWord/Writer/RTF/Part/AbstractPart.php | 2 +- src/PhpWord/Writer/RTF/Part/Document.php | 2 +- src/PhpWord/Writer/RTF/Part/Header.php | 2 +- src/PhpWord/Writer/RTF/Style/AbstractStyle.php | 2 +- src/PhpWord/Writer/RTF/Style/Border.php | 2 +- src/PhpWord/Writer/RTF/Style/Font.php | 2 +- src/PhpWord/Writer/RTF/Style/Paragraph.php | 2 +- src/PhpWord/Writer/RTF/Style/Section.php | 2 +- src/PhpWord/Writer/Word2007.php | 2 +- src/PhpWord/Writer/Word2007/Element/AbstractElement.php | 2 +- src/PhpWord/Writer/Word2007/Element/Bookmark.php | 2 +- src/PhpWord/Writer/Word2007/Element/Chart.php | 2 +- src/PhpWord/Writer/Word2007/Element/CheckBox.php | 2 +- src/PhpWord/Writer/Word2007/Element/Container.php | 2 +- src/PhpWord/Writer/Word2007/Element/Endnote.php | 2 +- src/PhpWord/Writer/Word2007/Element/Field.php | 2 +- src/PhpWord/Writer/Word2007/Element/Footnote.php | 2 +- src/PhpWord/Writer/Word2007/Element/FormField.php | 2 +- src/PhpWord/Writer/Word2007/Element/Image.php | 2 +- src/PhpWord/Writer/Word2007/Element/Line.php | 2 +- src/PhpWord/Writer/Word2007/Element/Link.php | 2 +- src/PhpWord/Writer/Word2007/Element/ListItem.php | 2 +- src/PhpWord/Writer/Word2007/Element/ListItemRun.php | 2 +- src/PhpWord/Writer/Word2007/Element/Object.php | 2 +- src/PhpWord/Writer/Word2007/Element/PageBreak.php | 2 +- src/PhpWord/Writer/Word2007/Element/ParagraphAlignment.php | 2 +- src/PhpWord/Writer/Word2007/Element/PreserveText.php | 2 +- src/PhpWord/Writer/Word2007/Element/SDT.php | 2 +- src/PhpWord/Writer/Word2007/Element/Shape.php | 2 +- src/PhpWord/Writer/Word2007/Element/TOC.php | 2 +- src/PhpWord/Writer/Word2007/Element/Table.php | 2 +- src/PhpWord/Writer/Word2007/Element/TableAlignment.php | 2 +- src/PhpWord/Writer/Word2007/Element/Text.php | 2 +- src/PhpWord/Writer/Word2007/Element/TextBox.php | 2 +- src/PhpWord/Writer/Word2007/Element/TextBreak.php | 2 +- src/PhpWord/Writer/Word2007/Element/TextRun.php | 2 +- src/PhpWord/Writer/Word2007/Element/Title.php | 2 +- src/PhpWord/Writer/Word2007/Part/AbstractPart.php | 2 +- src/PhpWord/Writer/Word2007/Part/Chart.php | 2 +- src/PhpWord/Writer/Word2007/Part/ContentTypes.php | 2 +- src/PhpWord/Writer/Word2007/Part/DocPropsApp.php | 2 +- src/PhpWord/Writer/Word2007/Part/DocPropsCore.php | 2 +- src/PhpWord/Writer/Word2007/Part/DocPropsCustom.php | 2 +- src/PhpWord/Writer/Word2007/Part/Document.php | 2 +- src/PhpWord/Writer/Word2007/Part/Endnotes.php | 2 +- src/PhpWord/Writer/Word2007/Part/FontTable.php | 2 +- src/PhpWord/Writer/Word2007/Part/Footer.php | 2 +- src/PhpWord/Writer/Word2007/Part/Footnotes.php | 2 +- src/PhpWord/Writer/Word2007/Part/Header.php | 2 +- src/PhpWord/Writer/Word2007/Part/Numbering.php | 2 +- src/PhpWord/Writer/Word2007/Part/Rels.php | 2 +- src/PhpWord/Writer/Word2007/Part/RelsDocument.php | 2 +- src/PhpWord/Writer/Word2007/Part/RelsPart.php | 2 +- src/PhpWord/Writer/Word2007/Part/Settings.php | 2 +- src/PhpWord/Writer/Word2007/Part/Styles.php | 2 +- src/PhpWord/Writer/Word2007/Part/Theme.php | 2 +- src/PhpWord/Writer/Word2007/Part/WebSettings.php | 2 +- src/PhpWord/Writer/Word2007/Style/AbstractStyle.php | 2 +- src/PhpWord/Writer/Word2007/Style/Cell.php | 2 +- src/PhpWord/Writer/Word2007/Style/Extrusion.php | 2 +- src/PhpWord/Writer/Word2007/Style/Fill.php | 2 +- src/PhpWord/Writer/Word2007/Style/Font.php | 2 +- src/PhpWord/Writer/Word2007/Style/Frame.php | 2 +- src/PhpWord/Writer/Word2007/Style/Image.php | 2 +- src/PhpWord/Writer/Word2007/Style/Indentation.php | 2 +- src/PhpWord/Writer/Word2007/Style/Line.php | 2 +- src/PhpWord/Writer/Word2007/Style/LineNumbering.php | 2 +- src/PhpWord/Writer/Word2007/Style/MarginBorder.php | 2 +- src/PhpWord/Writer/Word2007/Style/Outline.php | 2 +- src/PhpWord/Writer/Word2007/Style/Paragraph.php | 2 +- src/PhpWord/Writer/Word2007/Style/Row.php | 2 +- src/PhpWord/Writer/Word2007/Style/Section.php | 2 +- src/PhpWord/Writer/Word2007/Style/Shading.php | 2 +- src/PhpWord/Writer/Word2007/Style/Shadow.php | 2 +- src/PhpWord/Writer/Word2007/Style/Shape.php | 2 +- src/PhpWord/Writer/Word2007/Style/Spacing.php | 2 +- src/PhpWord/Writer/Word2007/Style/Tab.php | 2 +- src/PhpWord/Writer/Word2007/Style/Table.php | 2 +- src/PhpWord/Writer/Word2007/Style/TextBox.php | 2 +- src/PhpWord/Writer/WriterInterface.php | 2 +- tests/PhpWord/Collection/CollectionTest.php | 2 +- tests/PhpWord/Element/AbstractElementTest.php | 2 +- tests/PhpWord/Element/CellTest.php | 2 +- tests/PhpWord/Element/CheckBoxTest.php | 2 +- tests/PhpWord/Element/FieldTest.php | 2 +- tests/PhpWord/Element/FooterTest.php | 2 +- tests/PhpWord/Element/FootnoteTest.php | 2 +- tests/PhpWord/Element/HeaderTest.php | 2 +- tests/PhpWord/Element/ImageTest.php | 2 +- tests/PhpWord/Element/LineTest.php | 2 +- tests/PhpWord/Element/LinkTest.php | 2 +- tests/PhpWord/Element/ListItemRunTest.php | 2 +- tests/PhpWord/Element/ListItemTest.php | 2 +- tests/PhpWord/Element/ObjectTest.php | 2 +- tests/PhpWord/Element/PageBreakTest.php | 2 +- tests/PhpWord/Element/PreserveTextTest.php | 2 +- tests/PhpWord/Element/RowTest.php | 2 +- tests/PhpWord/Element/SDTTest.php | 2 +- tests/PhpWord/Element/SectionTest.php | 2 +- tests/PhpWord/Element/TOCTest.php | 2 +- tests/PhpWord/Element/TableTest.php | 2 +- tests/PhpWord/Element/TextBoxTest.php | 2 +- tests/PhpWord/Element/TextBreakTest.php | 2 +- tests/PhpWord/Element/TextRunTest.php | 2 +- tests/PhpWord/Element/TextTest.php | 2 +- tests/PhpWord/Element/TitleTest.php | 2 +- tests/PhpWord/Exception/CopyFileExceptionTest.php | 2 +- tests/PhpWord/Exception/CreateTemporaryFileExceptionTest.php | 2 +- tests/PhpWord/Exception/ExceptionTest.php | 2 +- tests/PhpWord/Exception/InvalidImageExceptionTest.php | 2 +- tests/PhpWord/Exception/InvalidStyleExceptionTest.php | 2 +- tests/PhpWord/Exception/UnsupportedImageTypeExceptionTest.php | 2 +- tests/PhpWord/IOFactoryTest.php | 2 +- tests/PhpWord/MediaTest.php | 2 +- tests/PhpWord/Metadata/DocInfoTest.php | 2 +- tests/PhpWord/PhpWordTest.php | 3 +-- tests/PhpWord/Reader/HTMLTest.php | 2 +- tests/PhpWord/Reader/ODTextTest.php | 2 +- tests/PhpWord/Reader/RTFTest.php | 2 +- tests/PhpWord/Reader/Word2007Test.php | 2 +- tests/PhpWord/SettingsTest.php | 2 +- tests/PhpWord/Shared/ConverterTest.php | 2 +- tests/PhpWord/Shared/HtmlTest.php | 2 +- tests/PhpWord/Shared/ZipArchiveTest.php | 2 +- tests/PhpWord/Style/AbstractStyleTest.php | 2 +- tests/PhpWord/Style/CellTest.php | 2 +- tests/PhpWord/Style/FontTest.php | 2 +- tests/PhpWord/Style/ImageTest.php | 2 +- tests/PhpWord/Style/IndentationTest.php | 2 +- tests/PhpWord/Style/LineNumberingTest.php | 2 +- tests/PhpWord/Style/LineTest.php | 2 +- tests/PhpWord/Style/ListItemTest.php | 2 +- tests/PhpWord/Style/NumberingLevelTest.php | 2 +- tests/PhpWord/Style/NumberingTest.php | 2 +- tests/PhpWord/Style/ParagraphTest.php | 2 +- tests/PhpWord/Style/RowTest.php | 2 +- tests/PhpWord/Style/SectionTest.php | 2 +- tests/PhpWord/Style/ShadingTest.php | 2 +- tests/PhpWord/Style/SpacingTest.php | 2 +- tests/PhpWord/Style/TOCTest.php | 2 +- tests/PhpWord/Style/TabTest.php | 2 +- tests/PhpWord/Style/TableTest.php | 2 +- tests/PhpWord/Style/TextBoxTest.php | 2 +- tests/PhpWord/StyleTest.php | 2 +- tests/PhpWord/TemplateProcessorTest.php | 2 +- tests/PhpWord/Writer/HTML/ElementTest.php | 2 +- tests/PhpWord/Writer/HTML/PartTest.php | 2 +- tests/PhpWord/Writer/HTML/StyleTest.php | 2 +- tests/PhpWord/Writer/HTMLTest.php | 2 +- tests/PhpWord/Writer/ODText/ElementTest.php | 2 +- tests/PhpWord/Writer/ODText/Part/AbstractPartTest.php | 2 +- tests/PhpWord/Writer/ODText/Part/ContentTest.php | 2 +- tests/PhpWord/Writer/ODText/StyleTest.php | 2 +- tests/PhpWord/Writer/ODTextTest.php | 2 +- tests/PhpWord/Writer/PDF/DomPDFTest.php | 2 +- tests/PhpWord/Writer/PDF/MPDFTest.php | 2 +- tests/PhpWord/Writer/PDF/TCPDFTest.php | 2 +- tests/PhpWord/Writer/PDFTest.php | 2 +- tests/PhpWord/Writer/RTF/ElementTest.php | 2 +- tests/PhpWord/Writer/RTF/StyleTest.php | 2 +- tests/PhpWord/Writer/RTFTest.php | 2 +- tests/PhpWord/Writer/Word2007/ElementTest.php | 2 +- tests/PhpWord/Writer/Word2007/Part/AbstractPartTest.php | 2 +- tests/PhpWord/Writer/Word2007/Part/DocumentTest.php | 2 +- tests/PhpWord/Writer/Word2007/Part/FooterTest.php | 2 +- tests/PhpWord/Writer/Word2007/Part/FootnotesTest.php | 2 +- tests/PhpWord/Writer/Word2007/Part/HeaderTest.php | 2 +- tests/PhpWord/Writer/Word2007/Part/NumberingTest.php | 2 +- tests/PhpWord/Writer/Word2007/Part/SettingsTest.php | 2 +- tests/PhpWord/Writer/Word2007/Part/StylesTest.php | 2 +- tests/PhpWord/Writer/Word2007/PartTest.php | 2 +- tests/PhpWord/Writer/Word2007/Style/FontTest.php | 2 +- tests/PhpWord/Writer/Word2007/StyleTest.php | 2 +- tests/PhpWord/Writer/Word2007Test.php | 2 +- tests/PhpWord/_includes/TestHelperDOCX.php | 2 +- tests/PhpWord/_includes/XmlDocument.php | 2 +- tests/bootstrap.php | 2 +- 349 files changed, 349 insertions(+), 353 deletions(-) diff --git a/LICENSE b/LICENSE index ac3b2c9247..8a1acaeaba 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ PHPWord, a pure PHP library for reading and writing word processing documents. -Copyright (c) 2010-2015 PHPWord. +Copyright (c) 2010-2016 PHPWord. PHPWord is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 3 as published by diff --git a/bootstrap.php b/bootstrap.php index 81d7d319bc..11939feefd 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. test bootstrap * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Collection/AbstractCollection.php b/src/PhpWord/Collection/AbstractCollection.php index dc97566ae4..beff290eb0 100644 --- a/src/PhpWord/Collection/AbstractCollection.php +++ b/src/PhpWord/Collection/AbstractCollection.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Collection/Bookmarks.php b/src/PhpWord/Collection/Bookmarks.php index 9943b477ff..b263cda725 100644 --- a/src/PhpWord/Collection/Bookmarks.php +++ b/src/PhpWord/Collection/Bookmarks.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Collection/Charts.php b/src/PhpWord/Collection/Charts.php index 379fb3a148..01f3f72e85 100644 --- a/src/PhpWord/Collection/Charts.php +++ b/src/PhpWord/Collection/Charts.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Collection/Endnotes.php b/src/PhpWord/Collection/Endnotes.php index c1ca59b81a..083142ed3f 100644 --- a/src/PhpWord/Collection/Endnotes.php +++ b/src/PhpWord/Collection/Endnotes.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Collection/Footnotes.php b/src/PhpWord/Collection/Footnotes.php index b8c331ede9..0c094a53c1 100644 --- a/src/PhpWord/Collection/Footnotes.php +++ b/src/PhpWord/Collection/Footnotes.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Collection/Titles.php b/src/PhpWord/Collection/Titles.php index f0349cb69f..80e2d9d76b 100644 --- a/src/PhpWord/Collection/Titles.php +++ b/src/PhpWord/Collection/Titles.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/AbstractContainer.php b/src/PhpWord/Element/AbstractContainer.php index da2c4391de..a3872e0b94 100644 --- a/src/PhpWord/Element/AbstractContainer.php +++ b/src/PhpWord/Element/AbstractContainer.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/AbstractElement.php b/src/PhpWord/Element/AbstractElement.php index fd81ba00ae..b0ed8ae27a 100644 --- a/src/PhpWord/Element/AbstractElement.php +++ b/src/PhpWord/Element/AbstractElement.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ @@ -19,7 +19,6 @@ use PhpOffice\PhpWord\Media; use PhpOffice\PhpWord\PhpWord; -use PhpOffice\PhpWord\Style; /** * Element abstract class diff --git a/src/PhpWord/Element/Bookmark.php b/src/PhpWord/Element/Bookmark.php index 0a971228d8..c865893fad 100644 --- a/src/PhpWord/Element/Bookmark.php +++ b/src/PhpWord/Element/Bookmark.php @@ -11,14 +11,13 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Element; use PhpOffice\Common\Text as CommonText; -use PhpOffice\PhpWord\Style; /** * Bookmark element diff --git a/src/PhpWord/Element/Cell.php b/src/PhpWord/Element/Cell.php index 3e2fdfdc86..28e517fd83 100644 --- a/src/PhpWord/Element/Cell.php +++ b/src/PhpWord/Element/Cell.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/Chart.php b/src/PhpWord/Element/Chart.php index 2d95e11082..f98c1d7426 100644 --- a/src/PhpWord/Element/Chart.php +++ b/src/PhpWord/Element/Chart.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/CheckBox.php b/src/PhpWord/Element/CheckBox.php index 7c4575dac1..3fc578ef37 100644 --- a/src/PhpWord/Element/CheckBox.php +++ b/src/PhpWord/Element/CheckBox.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/Endnote.php b/src/PhpWord/Element/Endnote.php index a82841c00f..2d8e473179 100644 --- a/src/PhpWord/Element/Endnote.php +++ b/src/PhpWord/Element/Endnote.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/Field.php b/src/PhpWord/Element/Field.php index 5cc20df2b0..48dc1d2eba 100644 --- a/src/PhpWord/Element/Field.php +++ b/src/PhpWord/Element/Field.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/Footer.php b/src/PhpWord/Element/Footer.php index b7f727af46..01c6d25c9e 100644 --- a/src/PhpWord/Element/Footer.php +++ b/src/PhpWord/Element/Footer.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/Footnote.php b/src/PhpWord/Element/Footnote.php index ea467c5f6a..73350bb785 100644 --- a/src/PhpWord/Element/Footnote.php +++ b/src/PhpWord/Element/Footnote.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/FormField.php b/src/PhpWord/Element/FormField.php index 97aa2e1ae9..c7cb44d240 100644 --- a/src/PhpWord/Element/FormField.php +++ b/src/PhpWord/Element/FormField.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/Header.php b/src/PhpWord/Element/Header.php index 619380fbb4..d4afdb867f 100644 --- a/src/PhpWord/Element/Header.php +++ b/src/PhpWord/Element/Header.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/Image.php b/src/PhpWord/Element/Image.php index f5cc7ccccf..2cce610d94 100644 --- a/src/PhpWord/Element/Image.php +++ b/src/PhpWord/Element/Image.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/Line.php b/src/PhpWord/Element/Line.php index 1e806c5ec5..3e94a3a6bf 100644 --- a/src/PhpWord/Element/Line.php +++ b/src/PhpWord/Element/Line.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/Link.php b/src/PhpWord/Element/Link.php index 139e0985c7..4a72e167f0 100644 --- a/src/PhpWord/Element/Link.php +++ b/src/PhpWord/Element/Link.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/ListItem.php b/src/PhpWord/Element/ListItem.php index a6d0451a7c..25ace0905b 100644 --- a/src/PhpWord/Element/ListItem.php +++ b/src/PhpWord/Element/ListItem.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/ListItemRun.php b/src/PhpWord/Element/ListItemRun.php index f921134865..53440db617 100644 --- a/src/PhpWord/Element/ListItemRun.php +++ b/src/PhpWord/Element/ListItemRun.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord -* @copyright 2010-2015 PHPWord contributors +* @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/Object.php b/src/PhpWord/Element/Object.php index 950e8eb16b..7285030c0c 100644 --- a/src/PhpWord/Element/Object.php +++ b/src/PhpWord/Element/Object.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/PageBreak.php b/src/PhpWord/Element/PageBreak.php index e8234f4841..d9d4bc641b 100644 --- a/src/PhpWord/Element/PageBreak.php +++ b/src/PhpWord/Element/PageBreak.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/PreserveText.php b/src/PhpWord/Element/PreserveText.php index e38a8c1662..65e17e35b5 100644 --- a/src/PhpWord/Element/PreserveText.php +++ b/src/PhpWord/Element/PreserveText.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/Row.php b/src/PhpWord/Element/Row.php index bcc422b781..05fde7e43d 100644 --- a/src/PhpWord/Element/Row.php +++ b/src/PhpWord/Element/Row.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/SDT.php b/src/PhpWord/Element/SDT.php index ebaf7edf72..58a477d92b 100644 --- a/src/PhpWord/Element/SDT.php +++ b/src/PhpWord/Element/SDT.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/Section.php b/src/PhpWord/Element/Section.php index 6bf58c6f73..1e926d2f57 100644 --- a/src/PhpWord/Element/Section.php +++ b/src/PhpWord/Element/Section.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/Shape.php b/src/PhpWord/Element/Shape.php index d1334a148e..4717afb8f8 100644 --- a/src/PhpWord/Element/Shape.php +++ b/src/PhpWord/Element/Shape.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/TOC.php b/src/PhpWord/Element/TOC.php index 6f2785cafd..54ae384433 100644 --- a/src/PhpWord/Element/TOC.php +++ b/src/PhpWord/Element/TOC.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/Table.php b/src/PhpWord/Element/Table.php index 125955a737..357af37ae5 100644 --- a/src/PhpWord/Element/Table.php +++ b/src/PhpWord/Element/Table.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/Text.php b/src/PhpWord/Element/Text.php index ca4013622c..0de9cdeaf2 100644 --- a/src/PhpWord/Element/Text.php +++ b/src/PhpWord/Element/Text.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/TextBox.php b/src/PhpWord/Element/TextBox.php index d8ef0be7cb..4a1e51310b 100644 --- a/src/PhpWord/Element/TextBox.php +++ b/src/PhpWord/Element/TextBox.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/TextBreak.php b/src/PhpWord/Element/TextBreak.php index 96cb72a41e..893fa87531 100644 --- a/src/PhpWord/Element/TextBreak.php +++ b/src/PhpWord/Element/TextBreak.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/TextRun.php b/src/PhpWord/Element/TextRun.php index d4e90608dc..c2ce4f9981 100644 --- a/src/PhpWord/Element/TextRun.php +++ b/src/PhpWord/Element/TextRun.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Element/Title.php b/src/PhpWord/Element/Title.php index faf50faa81..eabb1feb82 100644 --- a/src/PhpWord/Element/Title.php +++ b/src/PhpWord/Element/Title.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Exception/CopyFileException.php b/src/PhpWord/Exception/CopyFileException.php index 0bdc10daa7..c172657f4d 100644 --- a/src/PhpWord/Exception/CopyFileException.php +++ b/src/PhpWord/Exception/CopyFileException.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Exception/CreateTemporaryFileException.php b/src/PhpWord/Exception/CreateTemporaryFileException.php index 3c5eb84938..67d969baad 100644 --- a/src/PhpWord/Exception/CreateTemporaryFileException.php +++ b/src/PhpWord/Exception/CreateTemporaryFileException.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Exception/Exception.php b/src/PhpWord/Exception/Exception.php index f4313397f5..a9c49f7fd6 100644 --- a/src/PhpWord/Exception/Exception.php +++ b/src/PhpWord/Exception/Exception.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Exception/InvalidImageException.php b/src/PhpWord/Exception/InvalidImageException.php index 8c502cd30d..21c885eebc 100644 --- a/src/PhpWord/Exception/InvalidImageException.php +++ b/src/PhpWord/Exception/InvalidImageException.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Exception/InvalidObjectException.php b/src/PhpWord/Exception/InvalidObjectException.php index 3e6cfa4a02..ad564d4799 100644 --- a/src/PhpWord/Exception/InvalidObjectException.php +++ b/src/PhpWord/Exception/InvalidObjectException.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Exception/InvalidStyleException.php b/src/PhpWord/Exception/InvalidStyleException.php index 0ca5dbc739..44980842ea 100644 --- a/src/PhpWord/Exception/InvalidStyleException.php +++ b/src/PhpWord/Exception/InvalidStyleException.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Exception/UnsupportedImageTypeException.php b/src/PhpWord/Exception/UnsupportedImageTypeException.php index 2b1ed078f8..1b09bc8f69 100644 --- a/src/PhpWord/Exception/UnsupportedImageTypeException.php +++ b/src/PhpWord/Exception/UnsupportedImageTypeException.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/IOFactory.php b/src/PhpWord/IOFactory.php index 6c6b31821e..c868841a12 100644 --- a/src/PhpWord/IOFactory.php +++ b/src/PhpWord/IOFactory.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Media.php b/src/PhpWord/Media.php index a94dbba546..df3378545e 100644 --- a/src/PhpWord/Media.php +++ b/src/PhpWord/Media.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Metadata/Compatibility.php b/src/PhpWord/Metadata/Compatibility.php index 84b715d913..eb93274dd3 100644 --- a/src/PhpWord/Metadata/Compatibility.php +++ b/src/PhpWord/Metadata/Compatibility.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Metadata/DocInfo.php b/src/PhpWord/Metadata/DocInfo.php index 54377aed6a..63a7d51539 100644 --- a/src/PhpWord/Metadata/DocInfo.php +++ b/src/PhpWord/Metadata/DocInfo.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Metadata/Protection.php b/src/PhpWord/Metadata/Protection.php index 086f8eecba..0e2ee7c140 100644 --- a/src/PhpWord/Metadata/Protection.php +++ b/src/PhpWord/Metadata/Protection.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/PhpWord.php b/src/PhpWord/PhpWord.php index 04a7926704..0fa76b2fc6 100644 --- a/src/PhpWord/PhpWord.php +++ b/src/PhpWord/PhpWord.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Reader/AbstractReader.php b/src/PhpWord/Reader/AbstractReader.php index f225a6975e..93288c3b05 100644 --- a/src/PhpWord/Reader/AbstractReader.php +++ b/src/PhpWord/Reader/AbstractReader.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Reader/HTML.php b/src/PhpWord/Reader/HTML.php index bcbcd85959..824573e905 100644 --- a/src/PhpWord/Reader/HTML.php +++ b/src/PhpWord/Reader/HTML.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Reader/MsDoc.php b/src/PhpWord/Reader/MsDoc.php index 00659aeaf8..2f8c7e1a55 100644 --- a/src/PhpWord/Reader/MsDoc.php +++ b/src/PhpWord/Reader/MsDoc.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ @@ -20,7 +20,6 @@ use PhpOffice\Common\Drawing; use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\Shared\OLERead; -use PhpOffice\PhpWord\Style; /** * Reader for Word97 diff --git a/src/PhpWord/Reader/ODText.php b/src/PhpWord/Reader/ODText.php index 02d415bcfc..e8c868861c 100644 --- a/src/PhpWord/Reader/ODText.php +++ b/src/PhpWord/Reader/ODText.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Reader/ODText/AbstractPart.php b/src/PhpWord/Reader/ODText/AbstractPart.php index 59376a8a10..5ec2f22d7a 100644 --- a/src/PhpWord/Reader/ODText/AbstractPart.php +++ b/src/PhpWord/Reader/ODText/AbstractPart.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Reader/ODText/Content.php b/src/PhpWord/Reader/ODText/Content.php index 5295b16a3d..7362b02ca2 100644 --- a/src/PhpWord/Reader/ODText/Content.php +++ b/src/PhpWord/Reader/ODText/Content.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Reader/ODText/Meta.php b/src/PhpWord/Reader/ODText/Meta.php index c9d7f71dc8..9533c38bd8 100644 --- a/src/PhpWord/Reader/ODText/Meta.php +++ b/src/PhpWord/Reader/ODText/Meta.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Reader/RTF.php b/src/PhpWord/Reader/RTF.php index 921f67c706..b6d2e21eeb 100644 --- a/src/PhpWord/Reader/RTF.php +++ b/src/PhpWord/Reader/RTF.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Reader/RTF/Document.php b/src/PhpWord/Reader/RTF/Document.php index f04e957bf9..4e0f2c3559 100644 --- a/src/PhpWord/Reader/RTF/Document.php +++ b/src/PhpWord/Reader/RTF/Document.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Reader/ReaderInterface.php b/src/PhpWord/Reader/ReaderInterface.php index 6ce2408996..4f5231a767 100644 --- a/src/PhpWord/Reader/ReaderInterface.php +++ b/src/PhpWord/Reader/ReaderInterface.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Reader/Word2007.php b/src/PhpWord/Reader/Word2007.php index 8387b1c20d..da20eb8763 100644 --- a/src/PhpWord/Reader/Word2007.php +++ b/src/PhpWord/Reader/Word2007.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Reader/Word2007/AbstractPart.php b/src/PhpWord/Reader/Word2007/AbstractPart.php index a814ae1d3c..f429ff7519 100644 --- a/src/PhpWord/Reader/Word2007/AbstractPart.php +++ b/src/PhpWord/Reader/Word2007/AbstractPart.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Reader/Word2007/DocPropsApp.php b/src/PhpWord/Reader/Word2007/DocPropsApp.php index f6f42852c6..6b1410a56a 100644 --- a/src/PhpWord/Reader/Word2007/DocPropsApp.php +++ b/src/PhpWord/Reader/Word2007/DocPropsApp.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Reader/Word2007/DocPropsCore.php b/src/PhpWord/Reader/Word2007/DocPropsCore.php index e3e0dbfe77..417a93bd3f 100644 --- a/src/PhpWord/Reader/Word2007/DocPropsCore.php +++ b/src/PhpWord/Reader/Word2007/DocPropsCore.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Reader/Word2007/DocPropsCustom.php b/src/PhpWord/Reader/Word2007/DocPropsCustom.php index 47ad2b40ba..979a244197 100644 --- a/src/PhpWord/Reader/Word2007/DocPropsCustom.php +++ b/src/PhpWord/Reader/Word2007/DocPropsCustom.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Reader/Word2007/Document.php b/src/PhpWord/Reader/Word2007/Document.php index eed5f7b8f6..b89a99ad14 100644 --- a/src/PhpWord/Reader/Word2007/Document.php +++ b/src/PhpWord/Reader/Word2007/Document.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Reader/Word2007/Endnotes.php b/src/PhpWord/Reader/Word2007/Endnotes.php index d889e9de79..7bcafc6a10 100644 --- a/src/PhpWord/Reader/Word2007/Endnotes.php +++ b/src/PhpWord/Reader/Word2007/Endnotes.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Reader/Word2007/Footnotes.php b/src/PhpWord/Reader/Word2007/Footnotes.php index fc5c0420e5..3d85af716c 100644 --- a/src/PhpWord/Reader/Word2007/Footnotes.php +++ b/src/PhpWord/Reader/Word2007/Footnotes.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Reader/Word2007/Numbering.php b/src/PhpWord/Reader/Word2007/Numbering.php index beaa5f62e2..a00a630740 100644 --- a/src/PhpWord/Reader/Word2007/Numbering.php +++ b/src/PhpWord/Reader/Word2007/Numbering.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Reader/Word2007/Styles.php b/src/PhpWord/Reader/Word2007/Styles.php index 3a8d027f22..645c9830c2 100644 --- a/src/PhpWord/Reader/Word2007/Styles.php +++ b/src/PhpWord/Reader/Word2007/Styles.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Settings.php b/src/PhpWord/Settings.php index deb90faa7f..e049c46ed1 100644 --- a/src/PhpWord/Settings.php +++ b/src/PhpWord/Settings.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Shared/Converter.php b/src/PhpWord/Shared/Converter.php index d25f2375b3..e5cb5b25f0 100644 --- a/src/PhpWord/Shared/Converter.php +++ b/src/PhpWord/Shared/Converter.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Shared/Html.php b/src/PhpWord/Shared/Html.php index 64bcab1eb1..d03d0adf0d 100644 --- a/src/PhpWord/Shared/Html.php +++ b/src/PhpWord/Shared/Html.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Shared/OLERead.php b/src/PhpWord/Shared/OLERead.php index fbf42e807a..cf9b15d3e6 100644 --- a/src/PhpWord/Shared/OLERead.php +++ b/src/PhpWord/Shared/OLERead.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Shared/ZipArchive.php b/src/PhpWord/Shared/ZipArchive.php index bb2902da30..4dc4af4e14 100644 --- a/src/PhpWord/Shared/ZipArchive.php +++ b/src/PhpWord/Shared/ZipArchive.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/SimpleType/Jc.php b/src/PhpWord/SimpleType/Jc.php index ede2f2fc23..e90674a449 100644 --- a/src/PhpWord/SimpleType/Jc.php +++ b/src/PhpWord/SimpleType/Jc.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/SimpleType/JcTable.php b/src/PhpWord/SimpleType/JcTable.php index 38e72cc3de..d9648477d3 100644 --- a/src/PhpWord/SimpleType/JcTable.php +++ b/src/PhpWord/SimpleType/JcTable.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style.php b/src/PhpWord/Style.php index f9936246e5..57d9d69208 100644 --- a/src/PhpWord/Style.php +++ b/src/PhpWord/Style.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/AbstractStyle.php b/src/PhpWord/Style/AbstractStyle.php index cff813bc2d..05c79ea2da 100644 --- a/src/PhpWord/Style/AbstractStyle.php +++ b/src/PhpWord/Style/AbstractStyle.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/Border.php b/src/PhpWord/Style/Border.php index 6977f84ee3..d3bc2e571c 100644 --- a/src/PhpWord/Style/Border.php +++ b/src/PhpWord/Style/Border.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/Cell.php b/src/PhpWord/Style/Cell.php index 529db7358c..7bab8b56c2 100644 --- a/src/PhpWord/Style/Cell.php +++ b/src/PhpWord/Style/Cell.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/Chart.php b/src/PhpWord/Style/Chart.php index 83d96b8c6c..8e1f4b61b5 100644 --- a/src/PhpWord/Style/Chart.php +++ b/src/PhpWord/Style/Chart.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/Extrusion.php b/src/PhpWord/Style/Extrusion.php index 9c544913b9..d8c5e65ffc 100644 --- a/src/PhpWord/Style/Extrusion.php +++ b/src/PhpWord/Style/Extrusion.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/Fill.php b/src/PhpWord/Style/Fill.php index 252f9d7695..cf6ffb4115 100644 --- a/src/PhpWord/Style/Fill.php +++ b/src/PhpWord/Style/Fill.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/Font.php b/src/PhpWord/Style/Font.php index a33b649bd2..b625e3b8a9 100644 --- a/src/PhpWord/Style/Font.php +++ b/src/PhpWord/Style/Font.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/Frame.php b/src/PhpWord/Style/Frame.php index d6ba9d0cc4..97faacfb91 100644 --- a/src/PhpWord/Style/Frame.php +++ b/src/PhpWord/Style/Frame.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/Image.php b/src/PhpWord/Style/Image.php index 8397463091..f2c88b5f0f 100644 --- a/src/PhpWord/Style/Image.php +++ b/src/PhpWord/Style/Image.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Style; diff --git a/src/PhpWord/Style/Indentation.php b/src/PhpWord/Style/Indentation.php index 81569041ea..0408929b8f 100644 --- a/src/PhpWord/Style/Indentation.php +++ b/src/PhpWord/Style/Indentation.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/Line.php b/src/PhpWord/Style/Line.php index c4ee920f1a..f8cc4026f0 100644 --- a/src/PhpWord/Style/Line.php +++ b/src/PhpWord/Style/Line.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Style; diff --git a/src/PhpWord/Style/LineNumbering.php b/src/PhpWord/Style/LineNumbering.php index 5d55eb0637..e125f47717 100644 --- a/src/PhpWord/Style/LineNumbering.php +++ b/src/PhpWord/Style/LineNumbering.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/ListItem.php b/src/PhpWord/Style/ListItem.php index 3de01f5dca..18ea0bf264 100644 --- a/src/PhpWord/Style/ListItem.php +++ b/src/PhpWord/Style/ListItem.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/Numbering.php b/src/PhpWord/Style/Numbering.php index 6325d78c69..0d4fd85d3e 100644 --- a/src/PhpWord/Style/Numbering.php +++ b/src/PhpWord/Style/Numbering.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/NumberingLevel.php b/src/PhpWord/Style/NumberingLevel.php index 2ed8e4ec6a..51ae61486c 100644 --- a/src/PhpWord/Style/NumberingLevel.php +++ b/src/PhpWord/Style/NumberingLevel.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/Outline.php b/src/PhpWord/Style/Outline.php index 23601e9c0c..8628c4c5fb 100644 --- a/src/PhpWord/Style/Outline.php +++ b/src/PhpWord/Style/Outline.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/Paper.php b/src/PhpWord/Style/Paper.php index 09066951b9..ed1c59ebeb 100644 --- a/src/PhpWord/Style/Paper.php +++ b/src/PhpWord/Style/Paper.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/Paragraph.php b/src/PhpWord/Style/Paragraph.php index 50f9607c9e..c6e60efb27 100644 --- a/src/PhpWord/Style/Paragraph.php +++ b/src/PhpWord/Style/Paragraph.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/Row.php b/src/PhpWord/Style/Row.php index 93169b8f0a..5be03b6972 100644 --- a/src/PhpWord/Style/Row.php +++ b/src/PhpWord/Style/Row.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/Section.php b/src/PhpWord/Style/Section.php index 9a5fe6fc94..62eb8f1158 100644 --- a/src/PhpWord/Style/Section.php +++ b/src/PhpWord/Style/Section.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/Shading.php b/src/PhpWord/Style/Shading.php index bfae643f8e..ab4fce8214 100644 --- a/src/PhpWord/Style/Shading.php +++ b/src/PhpWord/Style/Shading.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/Shadow.php b/src/PhpWord/Style/Shadow.php index fa871f1cfb..f8f693a97f 100644 --- a/src/PhpWord/Style/Shadow.php +++ b/src/PhpWord/Style/Shadow.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/Shape.php b/src/PhpWord/Style/Shape.php index b7ae1f1e3b..01b6158873 100644 --- a/src/PhpWord/Style/Shape.php +++ b/src/PhpWord/Style/Shape.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/Spacing.php b/src/PhpWord/Style/Spacing.php index 63c2258194..8d7cfeb221 100644 --- a/src/PhpWord/Style/Spacing.php +++ b/src/PhpWord/Style/Spacing.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/TOC.php b/src/PhpWord/Style/TOC.php index 8632399eda..eb4b2253ff 100644 --- a/src/PhpWord/Style/TOC.php +++ b/src/PhpWord/Style/TOC.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/Tab.php b/src/PhpWord/Style/Tab.php index 500d852ac0..33e518c8b5 100644 --- a/src/PhpWord/Style/Tab.php +++ b/src/PhpWord/Style/Tab.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/Table.php b/src/PhpWord/Style/Table.php index bbbd670882..91809528a7 100644 --- a/src/PhpWord/Style/Table.php +++ b/src/PhpWord/Style/Table.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Style/TextBox.php b/src/PhpWord/Style/TextBox.php index 26cfef61e7..600fb8eabf 100644 --- a/src/PhpWord/Style/TextBox.php +++ b/src/PhpWord/Style/TextBox.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Template.php b/src/PhpWord/Template.php index f99819e0b1..87ccd8ed0b 100644 --- a/src/PhpWord/Template.php +++ b/src/PhpWord/Template.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/TemplateProcessor.php b/src/PhpWord/TemplateProcessor.php index 52cf70dff1..e7a8d039c4 100644 --- a/src/PhpWord/TemplateProcessor.php +++ b/src/PhpWord/TemplateProcessor.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/AbstractWriter.php b/src/PhpWord/Writer/AbstractWriter.php index 55b2023294..78ec5acd85 100644 --- a/src/PhpWord/Writer/AbstractWriter.php +++ b/src/PhpWord/Writer/AbstractWriter.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML.php b/src/PhpWord/Writer/HTML.php index bc6958e628..5668f18436 100644 --- a/src/PhpWord/Writer/HTML.php +++ b/src/PhpWord/Writer/HTML.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML/Element/AbstractElement.php b/src/PhpWord/Writer/HTML/Element/AbstractElement.php index 9eae024ca8..294d6de7f2 100644 --- a/src/PhpWord/Writer/HTML/Element/AbstractElement.php +++ b/src/PhpWord/Writer/HTML/Element/AbstractElement.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML/Element/Container.php b/src/PhpWord/Writer/HTML/Element/Container.php index 1efa2eecbd..88384a12d4 100644 --- a/src/PhpWord/Writer/HTML/Element/Container.php +++ b/src/PhpWord/Writer/HTML/Element/Container.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML/Element/Endnote.php b/src/PhpWord/Writer/HTML/Element/Endnote.php index ba07676e3c..b049e43766 100644 --- a/src/PhpWord/Writer/HTML/Element/Endnote.php +++ b/src/PhpWord/Writer/HTML/Element/Endnote.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML/Element/Footnote.php b/src/PhpWord/Writer/HTML/Element/Footnote.php index 7c5562bf13..b5aa0a0afc 100644 --- a/src/PhpWord/Writer/HTML/Element/Footnote.php +++ b/src/PhpWord/Writer/HTML/Element/Footnote.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML/Element/Image.php b/src/PhpWord/Writer/HTML/Element/Image.php index 6cdcc75cd7..9c69d41f1f 100644 --- a/src/PhpWord/Writer/HTML/Element/Image.php +++ b/src/PhpWord/Writer/HTML/Element/Image.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML/Element/Link.php b/src/PhpWord/Writer/HTML/Element/Link.php index b8953cddb3..bff57cfc20 100644 --- a/src/PhpWord/Writer/HTML/Element/Link.php +++ b/src/PhpWord/Writer/HTML/Element/Link.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML/Element/ListItem.php b/src/PhpWord/Writer/HTML/Element/ListItem.php index 707b761999..d8b1e4ed89 100644 --- a/src/PhpWord/Writer/HTML/Element/ListItem.php +++ b/src/PhpWord/Writer/HTML/Element/ListItem.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML/Element/PageBreak.php b/src/PhpWord/Writer/HTML/Element/PageBreak.php index b43904a1cc..8b332dcfaf 100644 --- a/src/PhpWord/Writer/HTML/Element/PageBreak.php +++ b/src/PhpWord/Writer/HTML/Element/PageBreak.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML/Element/Table.php b/src/PhpWord/Writer/HTML/Element/Table.php index 6d541f81be..9025f01aac 100644 --- a/src/PhpWord/Writer/HTML/Element/Table.php +++ b/src/PhpWord/Writer/HTML/Element/Table.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML/Element/Text.php b/src/PhpWord/Writer/HTML/Element/Text.php index 66455c1f6c..874515958c 100644 --- a/src/PhpWord/Writer/HTML/Element/Text.php +++ b/src/PhpWord/Writer/HTML/Element/Text.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML/Element/TextBreak.php b/src/PhpWord/Writer/HTML/Element/TextBreak.php index e091dea1b0..9b23d739b8 100644 --- a/src/PhpWord/Writer/HTML/Element/TextBreak.php +++ b/src/PhpWord/Writer/HTML/Element/TextBreak.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML/Element/TextRun.php b/src/PhpWord/Writer/HTML/Element/TextRun.php index 6cbae3f11a..492f7597e3 100644 --- a/src/PhpWord/Writer/HTML/Element/TextRun.php +++ b/src/PhpWord/Writer/HTML/Element/TextRun.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML/Element/Title.php b/src/PhpWord/Writer/HTML/Element/Title.php index 3f78b56fac..23c2993804 100644 --- a/src/PhpWord/Writer/HTML/Element/Title.php +++ b/src/PhpWord/Writer/HTML/Element/Title.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML/Part/AbstractPart.php b/src/PhpWord/Writer/HTML/Part/AbstractPart.php index 8dcd2e4b50..638f846b98 100644 --- a/src/PhpWord/Writer/HTML/Part/AbstractPart.php +++ b/src/PhpWord/Writer/HTML/Part/AbstractPart.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML/Part/Body.php b/src/PhpWord/Writer/HTML/Part/Body.php index cae17f6ef8..0d852a57fd 100644 --- a/src/PhpWord/Writer/HTML/Part/Body.php +++ b/src/PhpWord/Writer/HTML/Part/Body.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML/Part/Head.php b/src/PhpWord/Writer/HTML/Part/Head.php index c9f947cfd4..fa4c383346 100644 --- a/src/PhpWord/Writer/HTML/Part/Head.php +++ b/src/PhpWord/Writer/HTML/Part/Head.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML/Style/AbstractStyle.php b/src/PhpWord/Writer/HTML/Style/AbstractStyle.php index 91fdd4e8d3..10a0a9addf 100644 --- a/src/PhpWord/Writer/HTML/Style/AbstractStyle.php +++ b/src/PhpWord/Writer/HTML/Style/AbstractStyle.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML/Style/Font.php b/src/PhpWord/Writer/HTML/Style/Font.php index b5f2267250..c202af9397 100644 --- a/src/PhpWord/Writer/HTML/Style/Font.php +++ b/src/PhpWord/Writer/HTML/Style/Font.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML/Style/Generic.php b/src/PhpWord/Writer/HTML/Style/Generic.php index 14e6b4280e..e3d2b3522a 100644 --- a/src/PhpWord/Writer/HTML/Style/Generic.php +++ b/src/PhpWord/Writer/HTML/Style/Generic.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML/Style/Image.php b/src/PhpWord/Writer/HTML/Style/Image.php index cca838605e..36a9fecaad 100644 --- a/src/PhpWord/Writer/HTML/Style/Image.php +++ b/src/PhpWord/Writer/HTML/Style/Image.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/HTML/Style/Paragraph.php b/src/PhpWord/Writer/HTML/Style/Paragraph.php index 78a6f4bbcf..593c6dca93 100644 --- a/src/PhpWord/Writer/HTML/Style/Paragraph.php +++ b/src/PhpWord/Writer/HTML/Style/Paragraph.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText.php b/src/PhpWord/Writer/ODText.php index 9d5f1f59fe..40bc6c2fbe 100644 --- a/src/PhpWord/Writer/ODText.php +++ b/src/PhpWord/Writer/ODText.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText/Element/AbstractElement.php b/src/PhpWord/Writer/ODText/Element/AbstractElement.php index 2620721752..0ca43e4fc1 100644 --- a/src/PhpWord/Writer/ODText/Element/AbstractElement.php +++ b/src/PhpWord/Writer/ODText/Element/AbstractElement.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText/Element/Container.php b/src/PhpWord/Writer/ODText/Element/Container.php index 9babdffcc5..212cd184b8 100644 --- a/src/PhpWord/Writer/ODText/Element/Container.php +++ b/src/PhpWord/Writer/ODText/Element/Container.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText/Element/Image.php b/src/PhpWord/Writer/ODText/Element/Image.php index aaecd0496a..c6b16cfce5 100644 --- a/src/PhpWord/Writer/ODText/Element/Image.php +++ b/src/PhpWord/Writer/ODText/Element/Image.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText/Element/Link.php b/src/PhpWord/Writer/ODText/Element/Link.php index fb4b33ecfd..cb0226a3b0 100644 --- a/src/PhpWord/Writer/ODText/Element/Link.php +++ b/src/PhpWord/Writer/ODText/Element/Link.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText/Element/Table.php b/src/PhpWord/Writer/ODText/Element/Table.php index 18b4836840..f6a2f8456d 100644 --- a/src/PhpWord/Writer/ODText/Element/Table.php +++ b/src/PhpWord/Writer/ODText/Element/Table.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText/Element/Text.php b/src/PhpWord/Writer/ODText/Element/Text.php index 57ca807469..cff684812b 100644 --- a/src/PhpWord/Writer/ODText/Element/Text.php +++ b/src/PhpWord/Writer/ODText/Element/Text.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText/Element/TextBreak.php b/src/PhpWord/Writer/ODText/Element/TextBreak.php index 86d3f21a56..b0f5009e19 100644 --- a/src/PhpWord/Writer/ODText/Element/TextBreak.php +++ b/src/PhpWord/Writer/ODText/Element/TextBreak.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText/Element/TextRun.php b/src/PhpWord/Writer/ODText/Element/TextRun.php index 808a882ac5..037170163a 100644 --- a/src/PhpWord/Writer/ODText/Element/TextRun.php +++ b/src/PhpWord/Writer/ODText/Element/TextRun.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText/Element/Title.php b/src/PhpWord/Writer/ODText/Element/Title.php index ed1fa736da..b20ba9447a 100644 --- a/src/PhpWord/Writer/ODText/Element/Title.php +++ b/src/PhpWord/Writer/ODText/Element/Title.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText/Part/AbstractPart.php b/src/PhpWord/Writer/ODText/Part/AbstractPart.php index 7cd3e95d43..dc377e0f99 100644 --- a/src/PhpWord/Writer/ODText/Part/AbstractPart.php +++ b/src/PhpWord/Writer/ODText/Part/AbstractPart.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText/Part/Content.php b/src/PhpWord/Writer/ODText/Part/Content.php index c5de1f1584..61f8e7e27b 100644 --- a/src/PhpWord/Writer/ODText/Part/Content.php +++ b/src/PhpWord/Writer/ODText/Part/Content.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText/Part/Manifest.php b/src/PhpWord/Writer/ODText/Part/Manifest.php index 06fdc531af..237c1a11d5 100644 --- a/src/PhpWord/Writer/ODText/Part/Manifest.php +++ b/src/PhpWord/Writer/ODText/Part/Manifest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText/Part/Meta.php b/src/PhpWord/Writer/ODText/Part/Meta.php index 536902b585..f16db161ea 100644 --- a/src/PhpWord/Writer/ODText/Part/Meta.php +++ b/src/PhpWord/Writer/ODText/Part/Meta.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText/Part/Mimetype.php b/src/PhpWord/Writer/ODText/Part/Mimetype.php index f62df81993..7cf78b4b08 100644 --- a/src/PhpWord/Writer/ODText/Part/Mimetype.php +++ b/src/PhpWord/Writer/ODText/Part/Mimetype.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText/Part/Styles.php b/src/PhpWord/Writer/ODText/Part/Styles.php index 8bb9533ea5..b50be0e804 100644 --- a/src/PhpWord/Writer/ODText/Part/Styles.php +++ b/src/PhpWord/Writer/ODText/Part/Styles.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText/Style/AbstractStyle.php b/src/PhpWord/Writer/ODText/Style/AbstractStyle.php index fcaa1f46ae..7bc49cb36c 100644 --- a/src/PhpWord/Writer/ODText/Style/AbstractStyle.php +++ b/src/PhpWord/Writer/ODText/Style/AbstractStyle.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText/Style/Font.php b/src/PhpWord/Writer/ODText/Style/Font.php index 3763838c27..5d8e5753d6 100644 --- a/src/PhpWord/Writer/ODText/Style/Font.php +++ b/src/PhpWord/Writer/ODText/Style/Font.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText/Style/Image.php b/src/PhpWord/Writer/ODText/Style/Image.php index 2ca9ab5a73..447f449ce3 100644 --- a/src/PhpWord/Writer/ODText/Style/Image.php +++ b/src/PhpWord/Writer/ODText/Style/Image.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText/Style/Paragraph.php b/src/PhpWord/Writer/ODText/Style/Paragraph.php index 42570e5f85..1d82181071 100644 --- a/src/PhpWord/Writer/ODText/Style/Paragraph.php +++ b/src/PhpWord/Writer/ODText/Style/Paragraph.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText/Style/Section.php b/src/PhpWord/Writer/ODText/Style/Section.php index 4af397e4cf..79d57adb8b 100644 --- a/src/PhpWord/Writer/ODText/Style/Section.php +++ b/src/PhpWord/Writer/ODText/Style/Section.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/ODText/Style/Table.php b/src/PhpWord/Writer/ODText/Style/Table.php index 0ae33b5a62..ff3cc423fe 100644 --- a/src/PhpWord/Writer/ODText/Style/Table.php +++ b/src/PhpWord/Writer/ODText/Style/Table.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/PDF.php b/src/PhpWord/Writer/PDF.php index 37a6d0ee6e..5e5d9d71cf 100644 --- a/src/PhpWord/Writer/PDF.php +++ b/src/PhpWord/Writer/PDF.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PhpWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/PDF/AbstractRenderer.php b/src/PhpWord/Writer/PDF/AbstractRenderer.php index ea65f2129f..2778aa5243 100644 --- a/src/PhpWord/Writer/PDF/AbstractRenderer.php +++ b/src/PhpWord/Writer/PDF/AbstractRenderer.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PhpWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/PDF/DomPDF.php b/src/PhpWord/Writer/PDF/DomPDF.php index 304a2eba47..e31f3aae95 100644 --- a/src/PhpWord/Writer/PDF/DomPDF.php +++ b/src/PhpWord/Writer/PDF/DomPDF.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PhpWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/PDF/MPDF.php b/src/PhpWord/Writer/PDF/MPDF.php index caacf96814..028ffac725 100644 --- a/src/PhpWord/Writer/PDF/MPDF.php +++ b/src/PhpWord/Writer/PDF/MPDF.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PhpWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/PDF/TCPDF.php b/src/PhpWord/Writer/PDF/TCPDF.php index 69e9a77f71..e1e1900604 100644 --- a/src/PhpWord/Writer/PDF/TCPDF.php +++ b/src/PhpWord/Writer/PDF/TCPDF.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PhpWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/RTF.php b/src/PhpWord/Writer/RTF.php index e35693e56d..887b1c67b3 100644 --- a/src/PhpWord/Writer/RTF.php +++ b/src/PhpWord/Writer/RTF.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/RTF/Element/AbstractElement.php b/src/PhpWord/Writer/RTF/Element/AbstractElement.php index ee08f9c729..289733dca5 100644 --- a/src/PhpWord/Writer/RTF/Element/AbstractElement.php +++ b/src/PhpWord/Writer/RTF/Element/AbstractElement.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/RTF/Element/Container.php b/src/PhpWord/Writer/RTF/Element/Container.php index 00f2fb6faa..7a1b0b07f7 100644 --- a/src/PhpWord/Writer/RTF/Element/Container.php +++ b/src/PhpWord/Writer/RTF/Element/Container.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/RTF/Element/Image.php b/src/PhpWord/Writer/RTF/Element/Image.php index 0e83359663..e950d30b39 100644 --- a/src/PhpWord/Writer/RTF/Element/Image.php +++ b/src/PhpWord/Writer/RTF/Element/Image.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/RTF/Element/Link.php b/src/PhpWord/Writer/RTF/Element/Link.php index a73a98d2d6..f106d57dd7 100644 --- a/src/PhpWord/Writer/RTF/Element/Link.php +++ b/src/PhpWord/Writer/RTF/Element/Link.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/RTF/Element/ListItem.php b/src/PhpWord/Writer/RTF/Element/ListItem.php index e5e994f551..b2ba612d4f 100644 --- a/src/PhpWord/Writer/RTF/Element/ListItem.php +++ b/src/PhpWord/Writer/RTF/Element/ListItem.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/RTF/Element/PageBreak.php b/src/PhpWord/Writer/RTF/Element/PageBreak.php index 7f4a43d74c..ac2bb8ecb6 100644 --- a/src/PhpWord/Writer/RTF/Element/PageBreak.php +++ b/src/PhpWord/Writer/RTF/Element/PageBreak.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/RTF/Element/Table.php b/src/PhpWord/Writer/RTF/Element/Table.php index 665d5df9a6..c65d724871 100644 --- a/src/PhpWord/Writer/RTF/Element/Table.php +++ b/src/PhpWord/Writer/RTF/Element/Table.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/RTF/Element/Text.php b/src/PhpWord/Writer/RTF/Element/Text.php index d5a5347a8c..b5a28adf74 100644 --- a/src/PhpWord/Writer/RTF/Element/Text.php +++ b/src/PhpWord/Writer/RTF/Element/Text.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/RTF/Element/TextBreak.php b/src/PhpWord/Writer/RTF/Element/TextBreak.php index 94b9cfa723..0f76aea2fa 100644 --- a/src/PhpWord/Writer/RTF/Element/TextBreak.php +++ b/src/PhpWord/Writer/RTF/Element/TextBreak.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/RTF/Element/TextRun.php b/src/PhpWord/Writer/RTF/Element/TextRun.php index b9686f5c2e..f63f338ddc 100644 --- a/src/PhpWord/Writer/RTF/Element/TextRun.php +++ b/src/PhpWord/Writer/RTF/Element/TextRun.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/RTF/Element/Title.php b/src/PhpWord/Writer/RTF/Element/Title.php index 72460e56fc..894f52cc2e 100644 --- a/src/PhpWord/Writer/RTF/Element/Title.php +++ b/src/PhpWord/Writer/RTF/Element/Title.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/RTF/Part/AbstractPart.php b/src/PhpWord/Writer/RTF/Part/AbstractPart.php index b1cd1fb3be..152493db7b 100644 --- a/src/PhpWord/Writer/RTF/Part/AbstractPart.php +++ b/src/PhpWord/Writer/RTF/Part/AbstractPart.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/RTF/Part/Document.php b/src/PhpWord/Writer/RTF/Part/Document.php index 168b9cae36..24ee7b0add 100644 --- a/src/PhpWord/Writer/RTF/Part/Document.php +++ b/src/PhpWord/Writer/RTF/Part/Document.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/RTF/Part/Header.php b/src/PhpWord/Writer/RTF/Part/Header.php index fad62278f1..56a5034995 100644 --- a/src/PhpWord/Writer/RTF/Part/Header.php +++ b/src/PhpWord/Writer/RTF/Part/Header.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/RTF/Style/AbstractStyle.php b/src/PhpWord/Writer/RTF/Style/AbstractStyle.php index b981aa9f7a..417be9cff9 100644 --- a/src/PhpWord/Writer/RTF/Style/AbstractStyle.php +++ b/src/PhpWord/Writer/RTF/Style/AbstractStyle.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/RTF/Style/Border.php b/src/PhpWord/Writer/RTF/Style/Border.php index d3dfc42cd8..9f7ee2c0ae 100644 --- a/src/PhpWord/Writer/RTF/Style/Border.php +++ b/src/PhpWord/Writer/RTF/Style/Border.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/RTF/Style/Font.php b/src/PhpWord/Writer/RTF/Style/Font.php index 46a80e968b..6567ec33bd 100644 --- a/src/PhpWord/Writer/RTF/Style/Font.php +++ b/src/PhpWord/Writer/RTF/Style/Font.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/RTF/Style/Paragraph.php b/src/PhpWord/Writer/RTF/Style/Paragraph.php index bc8d2b4ec6..046adc8c67 100644 --- a/src/PhpWord/Writer/RTF/Style/Paragraph.php +++ b/src/PhpWord/Writer/RTF/Style/Paragraph.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/RTF/Style/Section.php b/src/PhpWord/Writer/RTF/Style/Section.php index cf74980a7d..dcdc0aaf3b 100644 --- a/src/PhpWord/Writer/RTF/Style/Section.php +++ b/src/PhpWord/Writer/RTF/Style/Section.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007.php b/src/PhpWord/Writer/Word2007.php index 2e2e082036..8e10f5f604 100644 --- a/src/PhpWord/Writer/Word2007.php +++ b/src/PhpWord/Writer/Word2007.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/AbstractElement.php b/src/PhpWord/Writer/Word2007/Element/AbstractElement.php index ead71b3406..f5a454d297 100644 --- a/src/PhpWord/Writer/Word2007/Element/AbstractElement.php +++ b/src/PhpWord/Writer/Word2007/Element/AbstractElement.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/Bookmark.php b/src/PhpWord/Writer/Word2007/Element/Bookmark.php index 4ba171e51b..424fb0ab79 100644 --- a/src/PhpWord/Writer/Word2007/Element/Bookmark.php +++ b/src/PhpWord/Writer/Word2007/Element/Bookmark.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/Chart.php b/src/PhpWord/Writer/Word2007/Element/Chart.php index 0df9f48d07..12602532a9 100644 --- a/src/PhpWord/Writer/Word2007/Element/Chart.php +++ b/src/PhpWord/Writer/Word2007/Element/Chart.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/CheckBox.php b/src/PhpWord/Writer/Word2007/Element/CheckBox.php index dc498ddfb1..7424985cfc 100644 --- a/src/PhpWord/Writer/Word2007/Element/CheckBox.php +++ b/src/PhpWord/Writer/Word2007/Element/CheckBox.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/Container.php b/src/PhpWord/Writer/Word2007/Element/Container.php index 4a207ed5a8..0efd0ebc43 100644 --- a/src/PhpWord/Writer/Word2007/Element/Container.php +++ b/src/PhpWord/Writer/Word2007/Element/Container.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/Endnote.php b/src/PhpWord/Writer/Word2007/Element/Endnote.php index aef646601f..9363489e45 100644 --- a/src/PhpWord/Writer/Word2007/Element/Endnote.php +++ b/src/PhpWord/Writer/Word2007/Element/Endnote.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/Field.php b/src/PhpWord/Writer/Word2007/Element/Field.php index 5dadfadfed..ae4c66ba8e 100644 --- a/src/PhpWord/Writer/Word2007/Element/Field.php +++ b/src/PhpWord/Writer/Word2007/Element/Field.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/Footnote.php b/src/PhpWord/Writer/Word2007/Element/Footnote.php index 58d9e16fdc..53fcd6a045 100644 --- a/src/PhpWord/Writer/Word2007/Element/Footnote.php +++ b/src/PhpWord/Writer/Word2007/Element/Footnote.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/FormField.php b/src/PhpWord/Writer/Word2007/Element/FormField.php index 9b22e60741..27df756f06 100644 --- a/src/PhpWord/Writer/Word2007/Element/FormField.php +++ b/src/PhpWord/Writer/Word2007/Element/FormField.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/Image.php b/src/PhpWord/Writer/Word2007/Element/Image.php index 8884fecaf4..914c78ea49 100644 --- a/src/PhpWord/Writer/Word2007/Element/Image.php +++ b/src/PhpWord/Writer/Word2007/Element/Image.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/Line.php b/src/PhpWord/Writer/Word2007/Element/Line.php index d08ee4872f..ade91fb84f 100644 --- a/src/PhpWord/Writer/Word2007/Element/Line.php +++ b/src/PhpWord/Writer/Word2007/Element/Line.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/Link.php b/src/PhpWord/Writer/Word2007/Element/Link.php index 46ef28e78c..5f7ad278c9 100644 --- a/src/PhpWord/Writer/Word2007/Element/Link.php +++ b/src/PhpWord/Writer/Word2007/Element/Link.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/ListItem.php b/src/PhpWord/Writer/Word2007/Element/ListItem.php index 17f763bd5d..53644ffa67 100644 --- a/src/PhpWord/Writer/Word2007/Element/ListItem.php +++ b/src/PhpWord/Writer/Word2007/Element/ListItem.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/ListItemRun.php b/src/PhpWord/Writer/Word2007/Element/ListItemRun.php index 32e18416e5..1ac17a98a9 100644 --- a/src/PhpWord/Writer/Word2007/Element/ListItemRun.php +++ b/src/PhpWord/Writer/Word2007/Element/ListItemRun.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/Object.php b/src/PhpWord/Writer/Word2007/Element/Object.php index 1f1608b835..4fdf6feda8 100644 --- a/src/PhpWord/Writer/Word2007/Element/Object.php +++ b/src/PhpWord/Writer/Word2007/Element/Object.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/PageBreak.php b/src/PhpWord/Writer/Word2007/Element/PageBreak.php index f6a8885e19..363a8c2c3a 100644 --- a/src/PhpWord/Writer/Word2007/Element/PageBreak.php +++ b/src/PhpWord/Writer/Word2007/Element/PageBreak.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/ParagraphAlignment.php b/src/PhpWord/Writer/Word2007/Element/ParagraphAlignment.php index 5f8d813c54..2c775d1445 100644 --- a/src/PhpWord/Writer/Word2007/Element/ParagraphAlignment.php +++ b/src/PhpWord/Writer/Word2007/Element/ParagraphAlignment.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/PreserveText.php b/src/PhpWord/Writer/Word2007/Element/PreserveText.php index 4c5c90bfb1..82c6f87b0f 100644 --- a/src/PhpWord/Writer/Word2007/Element/PreserveText.php +++ b/src/PhpWord/Writer/Word2007/Element/PreserveText.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/SDT.php b/src/PhpWord/Writer/Word2007/Element/SDT.php index 706eefdebb..313bf7e07b 100644 --- a/src/PhpWord/Writer/Word2007/Element/SDT.php +++ b/src/PhpWord/Writer/Word2007/Element/SDT.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/Shape.php b/src/PhpWord/Writer/Word2007/Element/Shape.php index dfedaaa904..f282c4a536 100644 --- a/src/PhpWord/Writer/Word2007/Element/Shape.php +++ b/src/PhpWord/Writer/Word2007/Element/Shape.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/TOC.php b/src/PhpWord/Writer/Word2007/Element/TOC.php index cf839127b0..996edb64e5 100644 --- a/src/PhpWord/Writer/Word2007/Element/TOC.php +++ b/src/PhpWord/Writer/Word2007/Element/TOC.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/Table.php b/src/PhpWord/Writer/Word2007/Element/Table.php index 86bfe302c0..093666ee22 100644 --- a/src/PhpWord/Writer/Word2007/Element/Table.php +++ b/src/PhpWord/Writer/Word2007/Element/Table.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/TableAlignment.php b/src/PhpWord/Writer/Word2007/Element/TableAlignment.php index fbee67a765..45459a388c 100644 --- a/src/PhpWord/Writer/Word2007/Element/TableAlignment.php +++ b/src/PhpWord/Writer/Word2007/Element/TableAlignment.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/Text.php b/src/PhpWord/Writer/Word2007/Element/Text.php index 0c1ff8b22d..2df4892bfe 100644 --- a/src/PhpWord/Writer/Word2007/Element/Text.php +++ b/src/PhpWord/Writer/Word2007/Element/Text.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/TextBox.php b/src/PhpWord/Writer/Word2007/Element/TextBox.php index 15b8cd31e8..3c4f48c27f 100644 --- a/src/PhpWord/Writer/Word2007/Element/TextBox.php +++ b/src/PhpWord/Writer/Word2007/Element/TextBox.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/TextBreak.php b/src/PhpWord/Writer/Word2007/Element/TextBreak.php index b984719765..a9e6f613ac 100644 --- a/src/PhpWord/Writer/Word2007/Element/TextBreak.php +++ b/src/PhpWord/Writer/Word2007/Element/TextBreak.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/TextRun.php b/src/PhpWord/Writer/Word2007/Element/TextRun.php index fced761476..1e95ab5ccf 100644 --- a/src/PhpWord/Writer/Word2007/Element/TextRun.php +++ b/src/PhpWord/Writer/Word2007/Element/TextRun.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Element/Title.php b/src/PhpWord/Writer/Word2007/Element/Title.php index b662572e9d..925d4c433f 100644 --- a/src/PhpWord/Writer/Word2007/Element/Title.php +++ b/src/PhpWord/Writer/Word2007/Element/Title.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Part/AbstractPart.php b/src/PhpWord/Writer/Word2007/Part/AbstractPart.php index 5b8947a491..26734aa097 100644 --- a/src/PhpWord/Writer/Word2007/Part/AbstractPart.php +++ b/src/PhpWord/Writer/Word2007/Part/AbstractPart.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Part/Chart.php b/src/PhpWord/Writer/Word2007/Part/Chart.php index f7d1c2ce14..3dd3968b49 100644 --- a/src/PhpWord/Writer/Word2007/Part/Chart.php +++ b/src/PhpWord/Writer/Word2007/Part/Chart.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Part/ContentTypes.php b/src/PhpWord/Writer/Word2007/Part/ContentTypes.php index 871ecc1041..1c81f34366 100644 --- a/src/PhpWord/Writer/Word2007/Part/ContentTypes.php +++ b/src/PhpWord/Writer/Word2007/Part/ContentTypes.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Part/DocPropsApp.php b/src/PhpWord/Writer/Word2007/Part/DocPropsApp.php index 8bb34a22de..adfe752f80 100644 --- a/src/PhpWord/Writer/Word2007/Part/DocPropsApp.php +++ b/src/PhpWord/Writer/Word2007/Part/DocPropsApp.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Part/DocPropsCore.php b/src/PhpWord/Writer/Word2007/Part/DocPropsCore.php index 96faae2e39..afb6f286e7 100644 --- a/src/PhpWord/Writer/Word2007/Part/DocPropsCore.php +++ b/src/PhpWord/Writer/Word2007/Part/DocPropsCore.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Part/DocPropsCustom.php b/src/PhpWord/Writer/Word2007/Part/DocPropsCustom.php index 6c404ce930..63ed8edeea 100644 --- a/src/PhpWord/Writer/Word2007/Part/DocPropsCustom.php +++ b/src/PhpWord/Writer/Word2007/Part/DocPropsCustom.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Part/Document.php b/src/PhpWord/Writer/Word2007/Part/Document.php index aad7c2e51a..411946f51c 100644 --- a/src/PhpWord/Writer/Word2007/Part/Document.php +++ b/src/PhpWord/Writer/Word2007/Part/Document.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Part/Endnotes.php b/src/PhpWord/Writer/Word2007/Part/Endnotes.php index 976ec638d5..bc15cf1e13 100644 --- a/src/PhpWord/Writer/Word2007/Part/Endnotes.php +++ b/src/PhpWord/Writer/Word2007/Part/Endnotes.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Part/FontTable.php b/src/PhpWord/Writer/Word2007/Part/FontTable.php index 5bdc275a09..08f0ad0e05 100644 --- a/src/PhpWord/Writer/Word2007/Part/FontTable.php +++ b/src/PhpWord/Writer/Word2007/Part/FontTable.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Part/Footer.php b/src/PhpWord/Writer/Word2007/Part/Footer.php index 5c5335b9df..3e4e4fee2c 100644 --- a/src/PhpWord/Writer/Word2007/Part/Footer.php +++ b/src/PhpWord/Writer/Word2007/Part/Footer.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Part/Footnotes.php b/src/PhpWord/Writer/Word2007/Part/Footnotes.php index 0de413002b..fd69214980 100644 --- a/src/PhpWord/Writer/Word2007/Part/Footnotes.php +++ b/src/PhpWord/Writer/Word2007/Part/Footnotes.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Part/Header.php b/src/PhpWord/Writer/Word2007/Part/Header.php index b1deeafefc..438e503eca 100644 --- a/src/PhpWord/Writer/Word2007/Part/Header.php +++ b/src/PhpWord/Writer/Word2007/Part/Header.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Part/Numbering.php b/src/PhpWord/Writer/Word2007/Part/Numbering.php index dc43a76c75..c5c9b4c724 100644 --- a/src/PhpWord/Writer/Word2007/Part/Numbering.php +++ b/src/PhpWord/Writer/Word2007/Part/Numbering.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Part/Rels.php b/src/PhpWord/Writer/Word2007/Part/Rels.php index 064446484e..4a3b5b673d 100644 --- a/src/PhpWord/Writer/Word2007/Part/Rels.php +++ b/src/PhpWord/Writer/Word2007/Part/Rels.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Part/RelsDocument.php b/src/PhpWord/Writer/Word2007/Part/RelsDocument.php index 12fff40cd1..c60dba286f 100644 --- a/src/PhpWord/Writer/Word2007/Part/RelsDocument.php +++ b/src/PhpWord/Writer/Word2007/Part/RelsDocument.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Part/RelsPart.php b/src/PhpWord/Writer/Word2007/Part/RelsPart.php index bca58224fc..e8939c7fa1 100644 --- a/src/PhpWord/Writer/Word2007/Part/RelsPart.php +++ b/src/PhpWord/Writer/Word2007/Part/RelsPart.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Part/Settings.php b/src/PhpWord/Writer/Word2007/Part/Settings.php index 436328530c..5c6f646cae 100644 --- a/src/PhpWord/Writer/Word2007/Part/Settings.php +++ b/src/PhpWord/Writer/Word2007/Part/Settings.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Part/Styles.php b/src/PhpWord/Writer/Word2007/Part/Styles.php index f220e2318a..7bcb8d92a4 100644 --- a/src/PhpWord/Writer/Word2007/Part/Styles.php +++ b/src/PhpWord/Writer/Word2007/Part/Styles.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Part/Theme.php b/src/PhpWord/Writer/Word2007/Part/Theme.php index ff33c42941..e9b16bfcc2 100644 --- a/src/PhpWord/Writer/Word2007/Part/Theme.php +++ b/src/PhpWord/Writer/Word2007/Part/Theme.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Part/WebSettings.php b/src/PhpWord/Writer/Word2007/Part/WebSettings.php index d8cd033214..ce42063da7 100644 --- a/src/PhpWord/Writer/Word2007/Part/WebSettings.php +++ b/src/PhpWord/Writer/Word2007/Part/WebSettings.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/AbstractStyle.php b/src/PhpWord/Writer/Word2007/Style/AbstractStyle.php index 07bae121fa..d0ee5a0def 100644 --- a/src/PhpWord/Writer/Word2007/Style/AbstractStyle.php +++ b/src/PhpWord/Writer/Word2007/Style/AbstractStyle.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/Cell.php b/src/PhpWord/Writer/Word2007/Style/Cell.php index 78c2de2c51..c9156de133 100644 --- a/src/PhpWord/Writer/Word2007/Style/Cell.php +++ b/src/PhpWord/Writer/Word2007/Style/Cell.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/Extrusion.php b/src/PhpWord/Writer/Word2007/Style/Extrusion.php index 30cf8a91de..3ecd76e4fe 100644 --- a/src/PhpWord/Writer/Word2007/Style/Extrusion.php +++ b/src/PhpWord/Writer/Word2007/Style/Extrusion.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/Fill.php b/src/PhpWord/Writer/Word2007/Style/Fill.php index 396be61f77..7ce6810635 100644 --- a/src/PhpWord/Writer/Word2007/Style/Fill.php +++ b/src/PhpWord/Writer/Word2007/Style/Fill.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/Font.php b/src/PhpWord/Writer/Word2007/Style/Font.php index f146638142..97cf3088b9 100644 --- a/src/PhpWord/Writer/Word2007/Style/Font.php +++ b/src/PhpWord/Writer/Word2007/Style/Font.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/Frame.php b/src/PhpWord/Writer/Word2007/Style/Frame.php index f7c7344e6b..9c6ddaefad 100644 --- a/src/PhpWord/Writer/Word2007/Style/Frame.php +++ b/src/PhpWord/Writer/Word2007/Style/Frame.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/Image.php b/src/PhpWord/Writer/Word2007/Style/Image.php index 2b89f77978..3bbe751eba 100644 --- a/src/PhpWord/Writer/Word2007/Style/Image.php +++ b/src/PhpWord/Writer/Word2007/Style/Image.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/Indentation.php b/src/PhpWord/Writer/Word2007/Style/Indentation.php index 08d424980b..a7edaee188 100644 --- a/src/PhpWord/Writer/Word2007/Style/Indentation.php +++ b/src/PhpWord/Writer/Word2007/Style/Indentation.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/Line.php b/src/PhpWord/Writer/Word2007/Style/Line.php index 688c20d126..3407c2523c 100644 --- a/src/PhpWord/Writer/Word2007/Style/Line.php +++ b/src/PhpWord/Writer/Word2007/Style/Line.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/LineNumbering.php b/src/PhpWord/Writer/Word2007/Style/LineNumbering.php index bf8e78ba91..592fb7bb97 100644 --- a/src/PhpWord/Writer/Word2007/Style/LineNumbering.php +++ b/src/PhpWord/Writer/Word2007/Style/LineNumbering.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/MarginBorder.php b/src/PhpWord/Writer/Word2007/Style/MarginBorder.php index a309be0770..68ba70d2df 100644 --- a/src/PhpWord/Writer/Word2007/Style/MarginBorder.php +++ b/src/PhpWord/Writer/Word2007/Style/MarginBorder.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/Outline.php b/src/PhpWord/Writer/Word2007/Style/Outline.php index f5fdcedbfe..620720b399 100644 --- a/src/PhpWord/Writer/Word2007/Style/Outline.php +++ b/src/PhpWord/Writer/Word2007/Style/Outline.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/Paragraph.php b/src/PhpWord/Writer/Word2007/Style/Paragraph.php index 25fc298d5c..2cb08bee17 100644 --- a/src/PhpWord/Writer/Word2007/Style/Paragraph.php +++ b/src/PhpWord/Writer/Word2007/Style/Paragraph.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/Row.php b/src/PhpWord/Writer/Word2007/Style/Row.php index c2b8e27899..e8b7e1a5b1 100644 --- a/src/PhpWord/Writer/Word2007/Style/Row.php +++ b/src/PhpWord/Writer/Word2007/Style/Row.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/Section.php b/src/PhpWord/Writer/Word2007/Style/Section.php index 91ae98015b..60b5d86967 100644 --- a/src/PhpWord/Writer/Word2007/Style/Section.php +++ b/src/PhpWord/Writer/Word2007/Style/Section.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/Shading.php b/src/PhpWord/Writer/Word2007/Style/Shading.php index 418ef72e00..c3594b24fd 100644 --- a/src/PhpWord/Writer/Word2007/Style/Shading.php +++ b/src/PhpWord/Writer/Word2007/Style/Shading.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/Shadow.php b/src/PhpWord/Writer/Word2007/Style/Shadow.php index 7ee0c29399..239c161d5e 100644 --- a/src/PhpWord/Writer/Word2007/Style/Shadow.php +++ b/src/PhpWord/Writer/Word2007/Style/Shadow.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/Shape.php b/src/PhpWord/Writer/Word2007/Style/Shape.php index cea940a674..4ed1469d5d 100644 --- a/src/PhpWord/Writer/Word2007/Style/Shape.php +++ b/src/PhpWord/Writer/Word2007/Style/Shape.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/Spacing.php b/src/PhpWord/Writer/Word2007/Style/Spacing.php index f110991dc6..bd2d06aa02 100644 --- a/src/PhpWord/Writer/Word2007/Style/Spacing.php +++ b/src/PhpWord/Writer/Word2007/Style/Spacing.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/Tab.php b/src/PhpWord/Writer/Word2007/Style/Tab.php index fa2874d2a0..9867023f6e 100644 --- a/src/PhpWord/Writer/Word2007/Style/Tab.php +++ b/src/PhpWord/Writer/Word2007/Style/Tab.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/Table.php b/src/PhpWord/Writer/Word2007/Style/Table.php index bd68f6dec7..570e85bb7b 100644 --- a/src/PhpWord/Writer/Word2007/Style/Table.php +++ b/src/PhpWord/Writer/Word2007/Style/Table.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/Word2007/Style/TextBox.php b/src/PhpWord/Writer/Word2007/Style/TextBox.php index 5ef5b68f13..f8f94da37f 100644 --- a/src/PhpWord/Writer/Word2007/Style/TextBox.php +++ b/src/PhpWord/Writer/Word2007/Style/TextBox.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/src/PhpWord/Writer/WriterInterface.php b/src/PhpWord/Writer/WriterInterface.php index 8858097b7b..1ccdf3213d 100644 --- a/src/PhpWord/Writer/WriterInterface.php +++ b/src/PhpWord/Writer/WriterInterface.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Collection/CollectionTest.php b/tests/PhpWord/Collection/CollectionTest.php index 66307c60c8..4b2fa0ca71 100644 --- a/tests/PhpWord/Collection/CollectionTest.php +++ b/tests/PhpWord/Collection/CollectionTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/AbstractElementTest.php b/tests/PhpWord/Element/AbstractElementTest.php index ed051d3c17..83f209e437 100644 --- a/tests/PhpWord/Element/AbstractElementTest.php +++ b/tests/PhpWord/Element/AbstractElementTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/CellTest.php b/tests/PhpWord/Element/CellTest.php index 4c122f9e94..f1d6a28040 100644 --- a/tests/PhpWord/Element/CellTest.php +++ b/tests/PhpWord/Element/CellTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/CheckBoxTest.php b/tests/PhpWord/Element/CheckBoxTest.php index fd0969020f..183d22db5c 100644 --- a/tests/PhpWord/Element/CheckBoxTest.php +++ b/tests/PhpWord/Element/CheckBoxTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/FieldTest.php b/tests/PhpWord/Element/FieldTest.php index 5d6f75896a..b9afad1f89 100644 --- a/tests/PhpWord/Element/FieldTest.php +++ b/tests/PhpWord/Element/FieldTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/FooterTest.php b/tests/PhpWord/Element/FooterTest.php index c6d10469db..33a211d3a9 100644 --- a/tests/PhpWord/Element/FooterTest.php +++ b/tests/PhpWord/Element/FooterTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/FootnoteTest.php b/tests/PhpWord/Element/FootnoteTest.php index 17625c80be..a3f3b4d8d3 100644 --- a/tests/PhpWord/Element/FootnoteTest.php +++ b/tests/PhpWord/Element/FootnoteTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/HeaderTest.php b/tests/PhpWord/Element/HeaderTest.php index 4de82556d3..f75910aa98 100644 --- a/tests/PhpWord/Element/HeaderTest.php +++ b/tests/PhpWord/Element/HeaderTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/ImageTest.php b/tests/PhpWord/Element/ImageTest.php index 1c1d71b35d..c463b0c4d4 100644 --- a/tests/PhpWord/Element/ImageTest.php +++ b/tests/PhpWord/Element/ImageTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/LineTest.php b/tests/PhpWord/Element/LineTest.php index 01cfd27baf..a7b15b0863 100644 --- a/tests/PhpWord/Element/LineTest.php +++ b/tests/PhpWord/Element/LineTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/LinkTest.php b/tests/PhpWord/Element/LinkTest.php index 7f9c0178a9..40f07a1f1e 100644 --- a/tests/PhpWord/Element/LinkTest.php +++ b/tests/PhpWord/Element/LinkTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/ListItemRunTest.php b/tests/PhpWord/Element/ListItemRunTest.php index 84f3ec890b..91609357f9 100644 --- a/tests/PhpWord/Element/ListItemRunTest.php +++ b/tests/PhpWord/Element/ListItemRunTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/ListItemTest.php b/tests/PhpWord/Element/ListItemTest.php index 4f055620f3..2dc4f65ccb 100644 --- a/tests/PhpWord/Element/ListItemTest.php +++ b/tests/PhpWord/Element/ListItemTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/ObjectTest.php b/tests/PhpWord/Element/ObjectTest.php index 7729d7a372..44516b617e 100644 --- a/tests/PhpWord/Element/ObjectTest.php +++ b/tests/PhpWord/Element/ObjectTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/PageBreakTest.php b/tests/PhpWord/Element/PageBreakTest.php index a160352d06..3d8b1db616 100644 --- a/tests/PhpWord/Element/PageBreakTest.php +++ b/tests/PhpWord/Element/PageBreakTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/PreserveTextTest.php b/tests/PhpWord/Element/PreserveTextTest.php index 71299264f3..33e2272a2b 100644 --- a/tests/PhpWord/Element/PreserveTextTest.php +++ b/tests/PhpWord/Element/PreserveTextTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/RowTest.php b/tests/PhpWord/Element/RowTest.php index cec112ce23..58a166f493 100644 --- a/tests/PhpWord/Element/RowTest.php +++ b/tests/PhpWord/Element/RowTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/SDTTest.php b/tests/PhpWord/Element/SDTTest.php index e1bd871955..52705bc124 100644 --- a/tests/PhpWord/Element/SDTTest.php +++ b/tests/PhpWord/Element/SDTTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/SectionTest.php b/tests/PhpWord/Element/SectionTest.php index 9cfba74b2c..78010bc9ed 100644 --- a/tests/PhpWord/Element/SectionTest.php +++ b/tests/PhpWord/Element/SectionTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/TOCTest.php b/tests/PhpWord/Element/TOCTest.php index 6cb8524232..6b5867bc12 100644 --- a/tests/PhpWord/Element/TOCTest.php +++ b/tests/PhpWord/Element/TOCTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/TableTest.php b/tests/PhpWord/Element/TableTest.php index cbaa91075e..785ec40aa3 100644 --- a/tests/PhpWord/Element/TableTest.php +++ b/tests/PhpWord/Element/TableTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/TextBoxTest.php b/tests/PhpWord/Element/TextBoxTest.php index 8eecd11495..cb3fdb99df 100644 --- a/tests/PhpWord/Element/TextBoxTest.php +++ b/tests/PhpWord/Element/TextBoxTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/TextBreakTest.php b/tests/PhpWord/Element/TextBreakTest.php index 5d59a8ec9d..40ed696550 100644 --- a/tests/PhpWord/Element/TextBreakTest.php +++ b/tests/PhpWord/Element/TextBreakTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/TextRunTest.php b/tests/PhpWord/Element/TextRunTest.php index e47d42af64..efd8d6f3f7 100644 --- a/tests/PhpWord/Element/TextRunTest.php +++ b/tests/PhpWord/Element/TextRunTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/TextTest.php b/tests/PhpWord/Element/TextTest.php index f5e3cc8192..d2fe0472b5 100644 --- a/tests/PhpWord/Element/TextTest.php +++ b/tests/PhpWord/Element/TextTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Element/TitleTest.php b/tests/PhpWord/Element/TitleTest.php index 3b6f190f21..2b886e5e9a 100644 --- a/tests/PhpWord/Element/TitleTest.php +++ b/tests/PhpWord/Element/TitleTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Exception/CopyFileExceptionTest.php b/tests/PhpWord/Exception/CopyFileExceptionTest.php index e384515835..0bc2e32241 100644 --- a/tests/PhpWord/Exception/CopyFileExceptionTest.php +++ b/tests/PhpWord/Exception/CopyFileExceptionTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Exception/CreateTemporaryFileExceptionTest.php b/tests/PhpWord/Exception/CreateTemporaryFileExceptionTest.php index 1053de3e05..d68bf573fe 100644 --- a/tests/PhpWord/Exception/CreateTemporaryFileExceptionTest.php +++ b/tests/PhpWord/Exception/CreateTemporaryFileExceptionTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Exception/ExceptionTest.php b/tests/PhpWord/Exception/ExceptionTest.php index 967bce3c90..4c14abb9ed 100644 --- a/tests/PhpWord/Exception/ExceptionTest.php +++ b/tests/PhpWord/Exception/ExceptionTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Exception/InvalidImageExceptionTest.php b/tests/PhpWord/Exception/InvalidImageExceptionTest.php index 21ef77bc4e..d83aa878d4 100644 --- a/tests/PhpWord/Exception/InvalidImageExceptionTest.php +++ b/tests/PhpWord/Exception/InvalidImageExceptionTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Exception/InvalidStyleExceptionTest.php b/tests/PhpWord/Exception/InvalidStyleExceptionTest.php index 974697cef4..5038ed2f0d 100644 --- a/tests/PhpWord/Exception/InvalidStyleExceptionTest.php +++ b/tests/PhpWord/Exception/InvalidStyleExceptionTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Exception/UnsupportedImageTypeExceptionTest.php b/tests/PhpWord/Exception/UnsupportedImageTypeExceptionTest.php index 0277539130..251ed957bf 100644 --- a/tests/PhpWord/Exception/UnsupportedImageTypeExceptionTest.php +++ b/tests/PhpWord/Exception/UnsupportedImageTypeExceptionTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/IOFactoryTest.php b/tests/PhpWord/IOFactoryTest.php index 67cc91e15b..9c2d1e676f 100644 --- a/tests/PhpWord/IOFactoryTest.php +++ b/tests/PhpWord/IOFactoryTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/MediaTest.php b/tests/PhpWord/MediaTest.php index 9b062d80ad..25480313b7 100644 --- a/tests/PhpWord/MediaTest.php +++ b/tests/PhpWord/MediaTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Metadata/DocInfoTest.php b/tests/PhpWord/Metadata/DocInfoTest.php index 1a866a5e82..235727106e 100644 --- a/tests/PhpWord/Metadata/DocInfoTest.php +++ b/tests/PhpWord/Metadata/DocInfoTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/PhpWordTest.php b/tests/PhpWord/PhpWordTest.php index bbfd93899f..459c67a0aa 100644 --- a/tests/PhpWord/PhpWordTest.php +++ b/tests/PhpWord/PhpWordTest.php @@ -11,14 +11,13 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord; use PhpOffice\PhpWord\Metadata\DocInfo; -use PhpOffice\PhpWord\Style; /** * Test class for PhpOffice\PhpWord\PhpWord diff --git a/tests/PhpWord/Reader/HTMLTest.php b/tests/PhpWord/Reader/HTMLTest.php index 4fbd2969b7..6e3039cf18 100644 --- a/tests/PhpWord/Reader/HTMLTest.php +++ b/tests/PhpWord/Reader/HTMLTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Reader/ODTextTest.php b/tests/PhpWord/Reader/ODTextTest.php index 14b2d05329..1bdce2e635 100644 --- a/tests/PhpWord/Reader/ODTextTest.php +++ b/tests/PhpWord/Reader/ODTextTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Reader/RTFTest.php b/tests/PhpWord/Reader/RTFTest.php index 14706db307..79cf13a716 100644 --- a/tests/PhpWord/Reader/RTFTest.php +++ b/tests/PhpWord/Reader/RTFTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Reader/Word2007Test.php b/tests/PhpWord/Reader/Word2007Test.php index 5c6c94a5fd..9be78a5b72 100644 --- a/tests/PhpWord/Reader/Word2007Test.php +++ b/tests/PhpWord/Reader/Word2007Test.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/SettingsTest.php b/tests/PhpWord/SettingsTest.php index 483535b9ae..f5ac3ed6a0 100644 --- a/tests/PhpWord/SettingsTest.php +++ b/tests/PhpWord/SettingsTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Shared/ConverterTest.php b/tests/PhpWord/Shared/ConverterTest.php index 643b21529f..e307f09b1e 100644 --- a/tests/PhpWord/Shared/ConverterTest.php +++ b/tests/PhpWord/Shared/ConverterTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Shared/HtmlTest.php b/tests/PhpWord/Shared/HtmlTest.php index ee2a19f0b9..c651fd4a53 100644 --- a/tests/PhpWord/Shared/HtmlTest.php +++ b/tests/PhpWord/Shared/HtmlTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Shared/ZipArchiveTest.php b/tests/PhpWord/Shared/ZipArchiveTest.php index edd3de9f00..1adcfbfc5d 100644 --- a/tests/PhpWord/Shared/ZipArchiveTest.php +++ b/tests/PhpWord/Shared/ZipArchiveTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Style/AbstractStyleTest.php b/tests/PhpWord/Style/AbstractStyleTest.php index de5bda3e9b..f7c6f6c516 100644 --- a/tests/PhpWord/Style/AbstractStyleTest.php +++ b/tests/PhpWord/Style/AbstractStyleTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Style/CellTest.php b/tests/PhpWord/Style/CellTest.php index b246a72a27..51f4e8952c 100644 --- a/tests/PhpWord/Style/CellTest.php +++ b/tests/PhpWord/Style/CellTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Style/FontTest.php b/tests/PhpWord/Style/FontTest.php index 1108bd3a50..61648d4ebf 100644 --- a/tests/PhpWord/Style/FontTest.php +++ b/tests/PhpWord/Style/FontTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Style/ImageTest.php b/tests/PhpWord/Style/ImageTest.php index 520e0fb4b3..c5bb5c7dc1 100644 --- a/tests/PhpWord/Style/ImageTest.php +++ b/tests/PhpWord/Style/ImageTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Style/IndentationTest.php b/tests/PhpWord/Style/IndentationTest.php index d82968ecdd..477e131408 100644 --- a/tests/PhpWord/Style/IndentationTest.php +++ b/tests/PhpWord/Style/IndentationTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Style/LineNumberingTest.php b/tests/PhpWord/Style/LineNumberingTest.php index dd87e4ba32..e8ef1367ea 100644 --- a/tests/PhpWord/Style/LineNumberingTest.php +++ b/tests/PhpWord/Style/LineNumberingTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Style/LineTest.php b/tests/PhpWord/Style/LineTest.php index 50f9fa37b9..98e20b3de6 100644 --- a/tests/PhpWord/Style/LineTest.php +++ b/tests/PhpWord/Style/LineTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Style/ListItemTest.php b/tests/PhpWord/Style/ListItemTest.php index d81ab8472d..2e8692e999 100644 --- a/tests/PhpWord/Style/ListItemTest.php +++ b/tests/PhpWord/Style/ListItemTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Style/NumberingLevelTest.php b/tests/PhpWord/Style/NumberingLevelTest.php index 47dfc30e63..c6cee11c53 100644 --- a/tests/PhpWord/Style/NumberingLevelTest.php +++ b/tests/PhpWord/Style/NumberingLevelTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Style/NumberingTest.php b/tests/PhpWord/Style/NumberingTest.php index 999d000719..ee9c032cb1 100644 --- a/tests/PhpWord/Style/NumberingTest.php +++ b/tests/PhpWord/Style/NumberingTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Style/ParagraphTest.php b/tests/PhpWord/Style/ParagraphTest.php index b8c387a792..c0096b0b1c 100644 --- a/tests/PhpWord/Style/ParagraphTest.php +++ b/tests/PhpWord/Style/ParagraphTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Style/RowTest.php b/tests/PhpWord/Style/RowTest.php index 11cb0a621b..a89f73d238 100644 --- a/tests/PhpWord/Style/RowTest.php +++ b/tests/PhpWord/Style/RowTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Style/SectionTest.php b/tests/PhpWord/Style/SectionTest.php index 3b69f55ac2..ed25ac367f 100644 --- a/tests/PhpWord/Style/SectionTest.php +++ b/tests/PhpWord/Style/SectionTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Style/ShadingTest.php b/tests/PhpWord/Style/ShadingTest.php index ea796e10e5..d6378f8d39 100644 --- a/tests/PhpWord/Style/ShadingTest.php +++ b/tests/PhpWord/Style/ShadingTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Style/SpacingTest.php b/tests/PhpWord/Style/SpacingTest.php index e552bba47b..79c9e4589d 100644 --- a/tests/PhpWord/Style/SpacingTest.php +++ b/tests/PhpWord/Style/SpacingTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Style/TOCTest.php b/tests/PhpWord/Style/TOCTest.php index c6c1420353..03620c178a 100644 --- a/tests/PhpWord/Style/TOCTest.php +++ b/tests/PhpWord/Style/TOCTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Style/TabTest.php b/tests/PhpWord/Style/TabTest.php index c469fb78df..7724aa418c 100644 --- a/tests/PhpWord/Style/TabTest.php +++ b/tests/PhpWord/Style/TabTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Style/TableTest.php b/tests/PhpWord/Style/TableTest.php index 580cbc1b5e..5e878692c7 100644 --- a/tests/PhpWord/Style/TableTest.php +++ b/tests/PhpWord/Style/TableTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Style/TextBoxTest.php b/tests/PhpWord/Style/TextBoxTest.php index 5afb5c9bfd..ea7bc71f09 100644 --- a/tests/PhpWord/Style/TextBoxTest.php +++ b/tests/PhpWord/Style/TextBoxTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/StyleTest.php b/tests/PhpWord/StyleTest.php index fe7661f190..57ec98f45f 100644 --- a/tests/PhpWord/StyleTest.php +++ b/tests/PhpWord/StyleTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/TemplateProcessorTest.php b/tests/PhpWord/TemplateProcessorTest.php index 3c2b8e46c3..11b43cf454 100644 --- a/tests/PhpWord/TemplateProcessorTest.php +++ b/tests/PhpWord/TemplateProcessorTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/Writer/HTML/ElementTest.php b/tests/PhpWord/Writer/HTML/ElementTest.php index 2f0ac97f6a..2a1e03dc28 100644 --- a/tests/PhpWord/Writer/HTML/ElementTest.php +++ b/tests/PhpWord/Writer/HTML/ElementTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\HTML; diff --git a/tests/PhpWord/Writer/HTML/PartTest.php b/tests/PhpWord/Writer/HTML/PartTest.php index 4d9eacf194..137a092e42 100644 --- a/tests/PhpWord/Writer/HTML/PartTest.php +++ b/tests/PhpWord/Writer/HTML/PartTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\HTML; diff --git a/tests/PhpWord/Writer/HTML/StyleTest.php b/tests/PhpWord/Writer/HTML/StyleTest.php index c23f96f069..629efd7aa2 100644 --- a/tests/PhpWord/Writer/HTML/StyleTest.php +++ b/tests/PhpWord/Writer/HTML/StyleTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\HTML; diff --git a/tests/PhpWord/Writer/HTMLTest.php b/tests/PhpWord/Writer/HTMLTest.php index 1caae685e5..b2b10165fd 100644 --- a/tests/PhpWord/Writer/HTMLTest.php +++ b/tests/PhpWord/Writer/HTMLTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer; diff --git a/tests/PhpWord/Writer/ODText/ElementTest.php b/tests/PhpWord/Writer/ODText/ElementTest.php index 24acf5fb27..fb14aae571 100644 --- a/tests/PhpWord/Writer/ODText/ElementTest.php +++ b/tests/PhpWord/Writer/ODText/ElementTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\ODText; diff --git a/tests/PhpWord/Writer/ODText/Part/AbstractPartTest.php b/tests/PhpWord/Writer/ODText/Part/AbstractPartTest.php index 6564980dd1..90874b47e9 100644 --- a/tests/PhpWord/Writer/ODText/Part/AbstractPartTest.php +++ b/tests/PhpWord/Writer/ODText/Part/AbstractPartTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\ODText\Part; diff --git a/tests/PhpWord/Writer/ODText/Part/ContentTest.php b/tests/PhpWord/Writer/ODText/Part/ContentTest.php index 33684dfa26..5814fa603f 100644 --- a/tests/PhpWord/Writer/ODText/Part/ContentTest.php +++ b/tests/PhpWord/Writer/ODText/Part/ContentTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\ODText\Part; diff --git a/tests/PhpWord/Writer/ODText/StyleTest.php b/tests/PhpWord/Writer/ODText/StyleTest.php index aa921a47a4..6b9793856a 100644 --- a/tests/PhpWord/Writer/ODText/StyleTest.php +++ b/tests/PhpWord/Writer/ODText/StyleTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\ODText; diff --git a/tests/PhpWord/Writer/ODTextTest.php b/tests/PhpWord/Writer/ODTextTest.php index 11cecc62fd..d79a9d42a2 100644 --- a/tests/PhpWord/Writer/ODTextTest.php +++ b/tests/PhpWord/Writer/ODTextTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer; diff --git a/tests/PhpWord/Writer/PDF/DomPDFTest.php b/tests/PhpWord/Writer/PDF/DomPDFTest.php index 7484125674..67026a8439 100644 --- a/tests/PhpWord/Writer/PDF/DomPDFTest.php +++ b/tests/PhpWord/Writer/PDF/DomPDFTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\PDF; diff --git a/tests/PhpWord/Writer/PDF/MPDFTest.php b/tests/PhpWord/Writer/PDF/MPDFTest.php index 5d5e8bf623..b6c85a408e 100644 --- a/tests/PhpWord/Writer/PDF/MPDFTest.php +++ b/tests/PhpWord/Writer/PDF/MPDFTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\PDF; diff --git a/tests/PhpWord/Writer/PDF/TCPDFTest.php b/tests/PhpWord/Writer/PDF/TCPDFTest.php index 62c55fb64d..aaec55eb12 100644 --- a/tests/PhpWord/Writer/PDF/TCPDFTest.php +++ b/tests/PhpWord/Writer/PDF/TCPDFTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\PDF; diff --git a/tests/PhpWord/Writer/PDFTest.php b/tests/PhpWord/Writer/PDFTest.php index 6c7d9bf3f2..75db6c037b 100644 --- a/tests/PhpWord/Writer/PDFTest.php +++ b/tests/PhpWord/Writer/PDFTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer; diff --git a/tests/PhpWord/Writer/RTF/ElementTest.php b/tests/PhpWord/Writer/RTF/ElementTest.php index 372994725e..47d01d009e 100644 --- a/tests/PhpWord/Writer/RTF/ElementTest.php +++ b/tests/PhpWord/Writer/RTF/ElementTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\RTF; diff --git a/tests/PhpWord/Writer/RTF/StyleTest.php b/tests/PhpWord/Writer/RTF/StyleTest.php index a212be5d50..095d30d535 100644 --- a/tests/PhpWord/Writer/RTF/StyleTest.php +++ b/tests/PhpWord/Writer/RTF/StyleTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\RTF; diff --git a/tests/PhpWord/Writer/RTFTest.php b/tests/PhpWord/Writer/RTFTest.php index 3c05f2603d..0b4f6b0f78 100644 --- a/tests/PhpWord/Writer/RTFTest.php +++ b/tests/PhpWord/Writer/RTFTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer; diff --git a/tests/PhpWord/Writer/Word2007/ElementTest.php b/tests/PhpWord/Writer/Word2007/ElementTest.php index 8e73ccdfd1..027ba86a2e 100644 --- a/tests/PhpWord/Writer/Word2007/ElementTest.php +++ b/tests/PhpWord/Writer/Word2007/ElementTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\Word2007; diff --git a/tests/PhpWord/Writer/Word2007/Part/AbstractPartTest.php b/tests/PhpWord/Writer/Word2007/Part/AbstractPartTest.php index f8948d6537..8f72cdfe96 100644 --- a/tests/PhpWord/Writer/Word2007/Part/AbstractPartTest.php +++ b/tests/PhpWord/Writer/Word2007/Part/AbstractPartTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\Word2007\Part; diff --git a/tests/PhpWord/Writer/Word2007/Part/DocumentTest.php b/tests/PhpWord/Writer/Word2007/Part/DocumentTest.php index bf5e7edb19..a9e6d8617c 100644 --- a/tests/PhpWord/Writer/Word2007/Part/DocumentTest.php +++ b/tests/PhpWord/Writer/Word2007/Part/DocumentTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\Word2007\Part; diff --git a/tests/PhpWord/Writer/Word2007/Part/FooterTest.php b/tests/PhpWord/Writer/Word2007/Part/FooterTest.php index dc32ebc929..9a7d809a86 100644 --- a/tests/PhpWord/Writer/Word2007/Part/FooterTest.php +++ b/tests/PhpWord/Writer/Word2007/Part/FooterTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\Word2007\Part; diff --git a/tests/PhpWord/Writer/Word2007/Part/FootnotesTest.php b/tests/PhpWord/Writer/Word2007/Part/FootnotesTest.php index 9f4f8f9fbe..2d48fe363a 100644 --- a/tests/PhpWord/Writer/Word2007/Part/FootnotesTest.php +++ b/tests/PhpWord/Writer/Word2007/Part/FootnotesTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\Word2007\Part; diff --git a/tests/PhpWord/Writer/Word2007/Part/HeaderTest.php b/tests/PhpWord/Writer/Word2007/Part/HeaderTest.php index 4db0de7bcd..6c285af6b9 100644 --- a/tests/PhpWord/Writer/Word2007/Part/HeaderTest.php +++ b/tests/PhpWord/Writer/Word2007/Part/HeaderTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\Word2007\Part; diff --git a/tests/PhpWord/Writer/Word2007/Part/NumberingTest.php b/tests/PhpWord/Writer/Word2007/Part/NumberingTest.php index 332f812541..9d11e5cb94 100644 --- a/tests/PhpWord/Writer/Word2007/Part/NumberingTest.php +++ b/tests/PhpWord/Writer/Word2007/Part/NumberingTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\Word2007\Part; diff --git a/tests/PhpWord/Writer/Word2007/Part/SettingsTest.php b/tests/PhpWord/Writer/Word2007/Part/SettingsTest.php index c83ffd22c3..06d12abe51 100644 --- a/tests/PhpWord/Writer/Word2007/Part/SettingsTest.php +++ b/tests/PhpWord/Writer/Word2007/Part/SettingsTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\Word2007\Part; diff --git a/tests/PhpWord/Writer/Word2007/Part/StylesTest.php b/tests/PhpWord/Writer/Word2007/Part/StylesTest.php index bdbf71377d..f40387a182 100644 --- a/tests/PhpWord/Writer/Word2007/Part/StylesTest.php +++ b/tests/PhpWord/Writer/Word2007/Part/StylesTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\Word2007\Part; diff --git a/tests/PhpWord/Writer/Word2007/PartTest.php b/tests/PhpWord/Writer/Word2007/PartTest.php index e59951b1c7..7af8ce3afd 100644 --- a/tests/PhpWord/Writer/Word2007/PartTest.php +++ b/tests/PhpWord/Writer/Word2007/PartTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\Word2007; diff --git a/tests/PhpWord/Writer/Word2007/Style/FontTest.php b/tests/PhpWord/Writer/Word2007/Style/FontTest.php index 5a482cbe01..50a7ecf765 100644 --- a/tests/PhpWord/Writer/Word2007/Style/FontTest.php +++ b/tests/PhpWord/Writer/Word2007/Style/FontTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\Word2007\Style; diff --git a/tests/PhpWord/Writer/Word2007/StyleTest.php b/tests/PhpWord/Writer/Word2007/StyleTest.php index 5719558c3f..dfabec0358 100644 --- a/tests/PhpWord/Writer/Word2007/StyleTest.php +++ b/tests/PhpWord/Writer/Word2007/StyleTest.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer\Word2007; diff --git a/tests/PhpWord/Writer/Word2007Test.php b/tests/PhpWord/Writer/Word2007Test.php index 00072181b0..76ba2114f4 100644 --- a/tests/PhpWord/Writer/Word2007Test.php +++ b/tests/PhpWord/Writer/Word2007Test.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ namespace PhpOffice\PhpWord\Writer; diff --git a/tests/PhpWord/_includes/TestHelperDOCX.php b/tests/PhpWord/_includes/TestHelperDOCX.php index b8501c0590..0307997427 100644 --- a/tests/PhpWord/_includes/TestHelperDOCX.php +++ b/tests/PhpWord/_includes/TestHelperDOCX.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/PhpWord/_includes/XmlDocument.php b/tests/PhpWord/_includes/XmlDocument.php index f6c076e555..72b18c29aa 100644 --- a/tests/PhpWord/_includes/XmlDocument.php +++ b/tests/PhpWord/_includes/XmlDocument.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 765a0cdb13..60ca5ae771 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -11,7 +11,7 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. test bootstrap * * @link https://github.com/PHPOffice/PHPWord - * @copyright 2010-2015 PHPWord contributors + * @copyright 2010-2016 PHPWord contributors * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 */ From 4486e2befb204311577536c329c12ffe231eecdb Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sun, 31 Jul 2016 12:50:01 +0400 Subject: [PATCH 97/99] Updated change log. --- CHANGELOG.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cd7cc4c811..9c36c515e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,9 +3,12 @@ Change Log All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). -0.13.0 (unreleased) +v0.13.0 (31 July 2016) ------------------- -Place announcement text here. +This release brings several improvements in `TemplateProcessor`, +automatic output escaping feature for OOXML, ODF, HTML, and RTF (turned off, by default). It also +introduces constants for horizontal alignment options, and resolves some issues with PHP 7. +Manual installation feature has been dropped since the release. Please, use [Composer](https://getcomposer.org/) to install PHPWord. ### Added - Introduced the `\PhpOffice\PhpWord\SimpleType\Jc` simple type. - @RomanSyroeshko @@ -49,7 +52,7 @@ That case wasn't taken into account in implementation of `TemplateProcessor::fix -0.12.1 (30 August 2015) +v0.12.1 (30 August 2015) ----------------------- Maintenance release. This release is focused primarily on `TemplateProcessor`. From 31cc01a3d146b2a5c56e532c3b2bb748285f9590 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sun, 31 Jul 2016 12:51:09 +0400 Subject: [PATCH 98/99] Updated change log. --- CHANGELOG.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c36c515e8..3310427688 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -66,7 +66,7 @@ Maintenance release. This release is focused primarily on `TemplateProcessor`. -0.12.0 (3 January 2015) +v0.12.0 (3 January 2015) ----------------------- This release added form fields (textinput, checkbox, and dropdown), drawing shapes (arc, curve, line, polyline, rect, oval), and basic 2D chart (pie, doughnut, bar, line, area, scatter, radar) elements along with some new styles. Basic MsDoc reader is introduced. @@ -125,7 +125,7 @@ This release added form fields (textinput, checkbox, and dropdown), drawing shap -0.11.1 (2 June 2014) +v0.11.1 (2 June 2014) -------------------- This is an immediate bugfix release for HTML reader. @@ -133,7 +133,7 @@ This is an immediate bugfix release for HTML reader. -0.11.0 (1 June 2014) +v0.11.0 (1 June 2014) -------------------- This release marked the change of PHPWord license from LGPL 2.1 to LGPL 3. Four new elements were added: TextBox, ListItemRun, Field, and Line. Relative and absolute positioning for images and textboxes were added. Writer classes were refactored into parts, elements, and styles. ODT and RTF features were enhanced. Ability to add elements to PHPWord object via HTML were implemented. RTF and HTML reader were initiated. @@ -197,7 +197,7 @@ This release marked the change of PHPWord license from LGPL 2.1 to LGPL 3. Four -0.10.1 (21 May 2014) +v0.10.1 (21 May 2014) -------------------- This is a bugfix release for `php-zip` requirement in Composer. @@ -205,7 +205,7 @@ This is a bugfix release for `php-zip` requirement in Composer. -0.10.0 (4 May 2014) +v0.10.0 (4 May 2014) ------------------- This release marked heavy refactorings on internal code structure with the creation of some abstract classes to reduce code duplication. `Element` subnamespace is introduced in this release to replace `Section`. Word2007 reader capability is greatly enhanced. Endnote is introduced. List numbering is now customizable. Basic HTML and PDF writing support is enabled. Basic ODText reader is introduced. @@ -289,7 +289,7 @@ This release marked heavy refactorings on internal code structure with the creat -0.9.1 (27 Mar 2014) +v0.9.1 (27 Mar 2014) ------------------- This is a bugfix release for PSR-4 compatibility. @@ -297,7 +297,7 @@ This is a bugfix release for PSR-4 compatibility. -0.9.0 (26 Mar 2014) +v0.9.0 (26 Mar 2014) ------------------- This release marked the transformation to namespaces (PHP 5.3+). @@ -319,7 +319,7 @@ This release marked the transformation to namespaces (PHP 5.3+). -0.8.1 (17 Mar 2014) +v0.8.1 (17 Mar 2014) ------------------- This is a bugfix release for image detection functionality. @@ -327,7 +327,7 @@ This is a bugfix release for image detection functionality. -0.8.0 (15 Mar 2014) +v0.8.0 (15 Mar 2014) ------------------- This release merged a lot of improvements from the community. Unit tests introduced in this release and has reached 90% code coverage. @@ -375,7 +375,7 @@ This release merged a lot of improvements from the community. Unit tests introdu -0.7.0 (28 Jan 2014) +v0.7.0 (28 Jan 2014) ------------------- This is the first release after a long development hiatus in [CodePlex](https://phpword.codeplex.com/). This release initialized ODT and RTF Writer, along with some other new features for the existing Word2007 Writer, e.g. tab, multiple header, rowspan and colspan. [Composer](https://packagist.org/packages/phpoffice/phpword) and [Travis](https://travis-ci.org/PHPOffice/PHPWord) were added. From 0a3f873972defb304de4fa2f5f53156558c11a7a Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sun, 31 Jul 2016 12:53:39 +0400 Subject: [PATCH 99/99] Updated change log. --- CHANGELOG.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3310427688..66f38ddaca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,9 +5,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). v0.13.0 (31 July 2016) ------------------- -This release brings several improvements in `TemplateProcessor`, -automatic output escaping feature for OOXML, ODF, HTML, and RTF (turned off, by default). It also -introduces constants for horizontal alignment options, and resolves some issues with PHP 7. +This release brings several improvements in `TemplateProcessor`, automatic output escaping feature for OOXML, ODF, HTML, and RTF (turned off, by default). +It also introduces constants for horizontal alignment options, and resolves some issues with PHP 7. Manual installation feature has been dropped since the release. Please, use [Composer](https://getcomposer.org/) to install PHPWord. ### Added