From 505cc76406120b27e38ab399a997db7c11b41e13 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 10 Oct 2015 19:22:19 +0400 Subject: [PATCH] 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 3e6385ba..ee200328 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 6c8638c5..a0e9c7ff 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 b35af8dc..d8d5915a 100644 --- a/samples/Sample_01_SimpleText.php +++ b/samples/Sample_01_SimpleText.php @@ -5,7 +5,7 @@ include_once 'Sample_Header.php'; 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 f0dc80f1..1a802f32 100644 --- a/samples/Sample_08_ParagraphPagination.php +++ b/samples/Sample_08_ParagraphPagination.php @@ -6,7 +6,7 @@ echo date('H:i:s'), ' Create new PhpWord object', EOL; $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 3e6cb670..e78fe297 100644 --- a/samples/Sample_09_Tables.php +++ b/samples/Sample_09_Tables.php @@ -26,7 +26,7 @@ for ($r = 1; $r <= 8; $r++) { $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 @@ $styleTable = 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\ST_Jc::CENTER); +$cellHCentered = array('alignment' => \PhpOffice\PhpWord\SimpleType\Jc::CENTER); $cellVCentered = array('valign' => 'center'); $phpWord->addTableStyle('Colspan Rowspan', $styleTable); @@ -89,10 +89,10 @@ $table->addCell(null, $cellRowContinue); $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 cb29bf9e..4ea3e287 100644 --- a/samples/Sample_12_HeaderFooter.php +++ b/samples/Sample_12_HeaderFooter.php @@ -17,7 +17,7 @@ $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')); -$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 @@ $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\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 a5e2eece..0088acbd 100644 --- a/samples/Sample_13_Images.php +++ b/samples/Sample_13_Images.php @@ -12,7 +12,7 @@ $section->addImage('resources/_mars.jpg'); $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 162f1c74..a1414dc1 100644 --- a/samples/Sample_21_TableRowRules.php +++ b/samples/Sample_21_TableRowRules.php @@ -22,7 +22,7 @@ $section->addText( $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 = $section->addTable( ); $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 3925a256..36bd1718 100644 --- a/samples/Sample_25_TextBox.php +++ b/samples/Sample_25_TextBox.php @@ -10,7 +10,7 @@ $section = $phpWord->addSection(); // 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 2cab80fd..479342e3 100644 --- a/samples/Sample_27_Field.php +++ b/samples/Sample_27_Field.php @@ -19,7 +19,7 @@ $section->addField('PAGE', array('format' => 'ArabicDash')); $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 ee023fd4..3121e4d0 100644 --- a/samples/Sample_36_RTL.php +++ b/samples/Sample_36_RTL.php @@ -9,7 +9,7 @@ $section = $phpWord->addSection(); $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 d33b5396..d2f850bf 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 @@ class Document '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 5558133c..3d7366e4 100644 --- a/src/PhpWord/SimpleType/ST_Jc.php +++ b/src/PhpWord/SimpleType/Jc.php @@ -22,7 +22,7 @@ namespace PhpOffice\PhpWord\SimpleType; * * @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 c9736ca1..e9928a01 100644 --- a/src/PhpWord/SimpleType/ST_JcTable.php +++ b/src/PhpWord/SimpleType/JcTable.php @@ -22,7 +22,7 @@ namespace PhpOffice\PhpWord\SimpleType; * * @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 e1c7d52c..055a4e89 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 @@ class Frame extends AbstractStyle */ 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 ba2a6ac2..78a9c95f 100644 --- a/src/PhpWord/Style/Paragraph.php +++ b/src/PhpWord/Style/Paragraph.php @@ -19,7 +19,7 @@ namespace PhpOffice\PhpWord\Style; 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 @@ class Paragraph extends Border */ 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 c92df68a..ea4e4932 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 @@ class Table extends Border */ 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 aed59c94..84e5b8ee 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 @@ class Paragraph extends AbstractStyle } $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 1c2650e2..16352c1e 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 c13be632..ad088569 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 0e9b9682..fdc2ef77 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 @@ class CheckBoxTest extends \PHPUnit_Framework_TestCase $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 7e8ef94c..d0360756 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 @@ class ImageTest extends \PHPUnit_Framework_TestCase array( 'width' => 210, 'height' => 210, - 'alignment' => ST_Jc::CENTER, + 'alignment' => Jc::CENTER, 'wrappingStyle' => \PhpOffice\PhpWord\Style\Image::WRAPPING_STYLE_BEHIND, ) ); @@ -98,7 +98,7 @@ class ImageTest extends \PHPUnit_Framework_TestCase { $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 36a0e572..73cee03e 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 @@ class PreserveTextTest extends \PHPUnit_Framework_TestCase $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 34f742a2..00a2033e 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 @@ class TextTest extends \PHPUnit_Framework_TestCase $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 24255c39..ea36f395 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 @@ class FontTest extends \PHPUnit_Framework_TestCase */ 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 @@ class FontTest extends \PHPUnit_Framework_TestCase */ 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 741bd4b3..74518e12 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 @@ class ImageTest extends \PHPUnit_Framework_TestCase $properties = array( 'width' => 200, 'height' => 200, - 'alignment' => ST_Jc::START, + 'alignment' => Jc::START, 'marginTop' => 240, 'marginLeft' => 240, 'wrappingStyle' => 'inline', @@ -61,7 +61,7 @@ class ImageTest extends \PHPUnit_Framework_TestCase $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 e7522057..854b97af 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 @@ class NumberingLevelTest extends \PHPUnit_Framework_TestCase '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 f81211a6..987c2e01 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 @@ class TableTest extends \PHPUnit_Framework_TestCase '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 3334f1e5..c2bb17fb 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 @@ class TextBoxTest extends \PHPUnit_Framework_TestCase $properties = array( 'width' => 200, 'height' => 200, - 'alignment' => ST_Jc::START, + 'alignment' => Jc::START, 'marginTop' => 240, 'marginLeft' => 240, 'wrappingStyle' => 'inline', @@ -72,7 +72,7 @@ class TextBoxTest extends \PHPUnit_Framework_TestCase $properties = array( 'width' => 200, 'height' => 200, - 'alignment' => ST_Jc::START, + 'alignment' => Jc::START, 'marginTop' => 240, 'marginLeft' => 240, 'wrappingStyle' => 'inline', @@ -135,7 +135,7 @@ class TextBoxTest extends \PHPUnit_Framework_TestCase { $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 b2d02242..908441a8 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 @@ class StyleTest extends \PHPUnit_Framework_TestCase */ 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 eca06326..6ad9093d 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 @@ class HTMLTest extends \PHPUnit_Framework_TestCase '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 @@ class HTMLTest extends \PHPUnit_Framework_TestCase $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 b34737c9..1f028c87 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 @@ class ContentTest extends \PHPUnit_Framework_TestCase $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 b474ae04..cdc36516 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 @@ class ODTextTest extends \PHPUnit_Framework_TestCase $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 ffa70871..7e978cb5 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 @@ class RTFTest extends \PHPUnit_Framework_TestCase '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 8ad43b7e..71dba3ed 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 @@ class DocumentTest extends \PHPUnit_Framework_TestCase '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 @@ class DocumentTest extends \PHPUnit_Framework_TestCase $phpWord->addParagraphStyle( 'pStyle', array( - 'alignment' => ST_Jc::CENTER, + 'alignment' => Jc::CENTER, 'tabs' => $tabs, 'shading' => array('fill' => 'FFFF99'), 'borderSize' => 4, @@ -177,11 +177,11 @@ class DocumentTest extends \PHPUnit_Framework_TestCase ); // 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 @@ class DocumentTest extends \PHPUnit_Framework_TestCase 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 @@ class DocumentTest extends \PHPUnit_Framework_TestCase $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 @@ class DocumentTest extends \PHPUnit_Framework_TestCase $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 @@ class DocumentTest extends \PHPUnit_Framework_TestCase $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 @@ class DocumentTest extends \PHPUnit_Framework_TestCase 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 @@ class DocumentTest extends \PHPUnit_Framework_TestCase $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 67c2909f..15133107 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 @@ class FootnotesTest extends \PHPUnit_Framework_TestCase 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 0d4b5e05..3add6854 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 @@ class NumberingTest extends \PHPUnit_Framework_TestCase '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 225aab66..ad846467 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 @@ class StylesTest extends \PHPUnit_Framework_TestCase { $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 b6a5d085..83a4a9a1 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 @@ class Word2007Test extends \PHPUnit_Framework_TestCase $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();