diff --git a/.travis.yml b/.travis.yml index 4d52286ae5..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: @@ -31,8 +33,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 650ca5dfc6..6bc157f2aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,14 +16,30 @@ 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. -Use the correspondent `getAlignment` and `setAlignment` methods instead. +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. +- `\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. + 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 + +### Fixed +- `Undefined property` error while reading MS-DOC documents. - @jaberu #610 + 0.12.1 (30 August 2015) 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/README.md b/README.md index 5f0f00cd41..b3bfa53a45 100644 --- a/README.md +++ b/README.md @@ -53,42 +53,36 @@ 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 ) -- [dompdf](https://github.com/dompdf/dompdf) (optional, used to write PDF) +- [dompdf library](https://github.com/dompdf/dompdf) (optional, used to write PDF) ## 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 { "require": { - "phpoffice/phpword": "dev-master" + "phpoffice/phpword": "v0.13.*" } } ``` -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 foo(); - } +$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 --prefer-source\' or \'update --prefer-source\' Composer commands to move forward.', + $vendorDirPath . '/autoload.php' + ) + ); } diff --git a/composer.json b/composer.json index b55d8340ca..83d437402a 100644 --- a/composer.json +++ b/composer.json @@ -33,25 +33,30 @@ ], "require": { "php": ">=5.3.3", - "ext-xml": "*" + "ext-xml": "*", + "zendframework/zend-validator": "2.5.*", + "zendframework/zend-stdlib": "~2.5", + "phpoffice/common": "0.2.*" }, "require-dev": { "phpunit/phpunit": "3.7.*", "phpdocumentor/phpdocumentor":"2.*", "squizlabs/php_codesniffer": "1.*", "phpmd/phpmd": "2.*", - "sebastian/phpcpd": "2.*", "phploc/phploc": "2.*", "dompdf/dompdf":"0.6.*", - "tecnick.com/tcpdf": "6.*", - "mpdf/mpdf": "5.*" + "tecnickcom/tcpdf": "6.*", + "mpdf/mpdf": "5.*", + "zendframework/zend-validator": "2.5.*", + "zendframework/zend-stdlib": "~2.5", + "phpoffice/common": "0.2.*" }, "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/general.rst b/docs/general.rst index 4e350cd078..13bb1a7b69 100644 --- a/docs/general.rst +++ b/docs/general.rst @@ -13,8 +13,7 @@ folder `__. .. code-block:: php `__ 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 `__ library Installation ------------ -There are two ways to install PHPWord, i.e. via -`Composer `__ or manually by downloading the -library. +PHPWord is installed via `Composer `__. +You just need to `add dependency `__ on PHPWord into your package. -Using Composer -~~~~~~~~~~~~~~ - -To install via Composer, add the following lines to your -``composer.json``: +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 { @@ -51,27 +50,6 @@ Notice: all contributions must be done against the developer branch. } -Manual install -~~~~~~~~~~~~~~ - -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 ``src/PhpWord/Autoloader.php`` in your PHP script and -invoke ``Autoloader::register``. - -.. code-block:: php - - require_once '/path/to/src/PhpWord/Autoloader.php'; - \PhpOffice\PhpWord\Autoloader::register(); - - Using samples ------------- 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 @@ '); define('SCRIPT_FILENAME', basename($_SERVER['SCRIPT_FILENAME'], '.php')); define('IS_INDEX', SCRIPT_FILENAME == 'index'); -Autoloader::register(); Settings::loadConfig(); // Set writers diff --git a/src/PhpWord/Autoloader.php b/src/PhpWord/Autoloader.php deleted file mode 100644 index 68da845de3..0000000000 --- a/src/PhpWord/Autoloader.php +++ /dev/null @@ -1,58 +0,0 @@ -name = String::toUTF8($name); + $this->name = CommonText::toUTF8($name); return $this; } 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..7c4575dac1 100644 --- a/src/PhpWord/Element/CheckBox.php +++ b/src/PhpWord/Element/CheckBox.php @@ -11,13 +11,13 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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/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..ea467c5f6a 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 */ @@ -20,7 +20,7 @@ use PhpOffice\PhpWord\Style\Paragraph; /** - * Footnote element + * @codeCoverageIgnore */ class Footnote extends AbstractContainer { @@ -70,8 +70,6 @@ public function getParagraphStyle() * @deprecated 0.10.0 * * @return int - * - * @codeCoverageIgnore */ public function getReferenceId() { @@ -84,8 +82,6 @@ public function getReferenceId() * @deprecated 0.10.0 * * @param int $rId - * - * @codeCoverageIgnore */ public function setReferenceId($rId) { 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..139e0985c7 100644 --- a/src/PhpWord/Element/Link.php +++ b/src/PhpWord/Element/Link.php @@ -11,13 +11,13 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 4cb8d33952..a6d0451a7c 100644 --- a/src/PhpWord/Element/ListItem.php +++ b/src/PhpWord/Element/ListItem.php @@ -11,13 +11,13 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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/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..e38a8c1662 100644 --- a/src/PhpWord/Element/PreserveText.php +++ b/src/PhpWord/Element/PreserveText.php @@ -11,13 +11,13 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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/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..6bf58c6f73 100644 --- a/src/PhpWord/Element/Section.php +++ b/src/PhpWord/Element/Section.php @@ -11,18 +11,14 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\Element; -use PhpOffice\PhpWord\Exception\Exception; use PhpOffice\PhpWord\Style\Section as SectionStyle; -/** - * Section - */ class Section extends AbstractContainer { /** @@ -82,6 +78,8 @@ public function setStyle($style = null) * Get section style * * @return \PhpOffice\PhpWord\Style\Section + * + * @codeCoverageIgnore */ public function getStyle() { @@ -91,9 +89,11 @@ 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,9 +103,11 @@ 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) { @@ -116,6 +118,8 @@ public function addFooter($type = Header::AUTO) * Get header elements * * @return Header[] + * + * @codeCoverageIgnore */ public function getHeaders() { @@ -126,6 +130,8 @@ public function getHeaders() * Get footer elements * * @return Footer[] + * + * @codeCoverageIgnore */ public function getFooters() { @@ -160,7 +166,7 @@ public function hasDifferentFirstPage() * * @return Header|Footer * - * @throws \PhpOffice\PhpWord\Exception\Exception + * @throws \Exception */ private function addHeaderFooter($type = Header::AUTO, $header = true) { @@ -178,7 +184,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/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..ca4013622c 100644 --- a/src/PhpWord/Element/Text.php +++ b/src/PhpWord/Element/Text.php @@ -11,13 +11,13 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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/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..faf50faa81 100644 --- a/src/PhpWord/Element/Title.php +++ b/src/PhpWord/Element/Title.php @@ -11,13 +11,13 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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/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/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 @@ _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) diff --git a/src/PhpWord/Reader/ODText.php b/src/PhpWord/Reader/ODText.php index d992f7fd3c..02d415bcfc 100644 --- a/src/PhpWord/Reader/ODText.php +++ b/src/PhpWord/Reader/ODText.php @@ -11,14 +11,14 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\Reader; +use PhpOffice\Common\XMLReader; use PhpOffice\PhpWord\PhpWord; -use PhpOffice\PhpWord\Shared\XMLReader; /** * Reader for ODText 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..5295b16a3d 100644 --- a/src/PhpWord/Reader/ODText/Content.php +++ b/src/PhpWord/Reader/ODText/Content.php @@ -11,14 +11,14 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 d08ce3a679..c9d7f71dc8 100644 --- a/src/PhpWord/Reader/ODText/Meta.php +++ b/src/PhpWord/Reader/ODText/Meta.php @@ -11,14 +11,14 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\Reader\ODText; +use PhpOffice\Common\XMLReader; use PhpOffice\PhpWord\PhpWord; -use PhpOffice\PhpWord\Shared\XMLReader; /** * Meta reader 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..8387b1c20d 100644 --- a/src/PhpWord/Reader/Word2007.php +++ b/src/PhpWord/Reader/Word2007.php @@ -11,14 +11,14 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 bf523f2676..a814ae1d3c 100644 --- a/src/PhpWord/Reader/Word2007/AbstractPart.php +++ b/src/PhpWord/Reader/Word2007/AbstractPart.php @@ -11,14 +11,14 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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/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..e3e0dbfe77 100644 --- a/src/PhpWord/Reader/Word2007/DocPropsCore.php +++ b/src/PhpWord/Reader/Word2007/DocPropsCore.php @@ -11,14 +11,14 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 eb725b2ec3..47ad2b40ba 100644 --- a/src/PhpWord/Reader/Word2007/DocPropsCustom.php +++ b/src/PhpWord/Reader/Word2007/DocPropsCustom.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\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 e1beed0666..eed5f7b8f6 100644 --- a/src/PhpWord/Reader/Word2007/Document.php +++ b/src/PhpWord/Reader/Word2007/Document.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\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/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..fc5c0420e5 100644 --- a/src/PhpWord/Reader/Word2007/Footnotes.php +++ b/src/PhpWord/Reader/Word2007/Footnotes.php @@ -11,14 +11,14 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 f1144b1a37..beaa5f62e2 100644 --- a/src/PhpWord/Reader/Word2007/Numbering.php +++ b/src/PhpWord/Reader/Word2007/Numbering.php @@ -11,14 +11,14 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 299fe1df77..3a8d027f22 100644 --- a/src/PhpWord/Reader/Word2007/Styles.php +++ b/src/PhpWord/Reader/Word2007/Styles.php @@ -11,14 +11,14 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\Reader\Word2007; +use PhpOffice\Common\XMLReader; use PhpOffice\PhpWord\PhpWord; -use PhpOffice\PhpWord\Shared\XMLReader; /** * Styles reader 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/Drawing.php b/src/PhpWord/Shared/Drawing.php deleted file mode 100644 index e3a33e5b69..0000000000 --- a/src/PhpWord/Shared/Drawing.php +++ /dev/null @@ -1,217 +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 6af1ca9b36..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 26dbcc3464..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/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 3d7366e403..5cbf47522f 100644 --- a/src/PhpWord/SimpleType/Jc.php +++ b/src/PhpWord/SimpleType/Jc.php @@ -11,16 +11,20 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\SimpleType; +use Zend\Validator\InArray; + /** * Horizontal Alignment Type. * * @since 0.13.0 + * + * @codeCoverageIgnore */ final class Jc { @@ -35,23 +39,46 @@ 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() + final public static function getValidator() { - 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, + // 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..d93e56f193 100644 --- a/src/PhpWord/SimpleType/JcTable.php +++ b/src/PhpWord/SimpleType/JcTable.php @@ -11,16 +11,20 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\SimpleType; +use Zend\Validator\InArray; + /** * Table Alignment Type. * * @since 0.13.0 + * + * @codeCoverageIgnore */ final class JcTable { @@ -28,13 +32,32 @@ 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() + final public static function getValidator() { - return array(self::START, self::CENTER, self::END); + // 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.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..cff813bc2d 100644 --- a/src/PhpWord/Style/AbstractStyle.php +++ b/src/PhpWord/Style/AbstractStyle.php @@ -11,13 +11,13 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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; -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/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 055a4e8944..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 */ @@ -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/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 91f40df247..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 */ @@ -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/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 78a9c95f97..10e94a2ab8 100644 --- a/src/PhpWord/Style/Paragraph.php +++ b/src/PhpWord/Style/Paragraph.php @@ -11,14 +11,14 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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; +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) { @@ -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/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 ea4e493284..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 */ @@ -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/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..49fbf70567 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 */ @@ -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 { @@ -144,6 +144,14 @@ 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 . '}'; + } + + if (!StringUtils::isValidUtf8($replace)) { + $replace = utf8_encode($replace); + } + foreach ($this->tempDocumentHeaders as $index => $headerXML) { $this->tempDocumentHeaders[$index] = $this->setValueForPart($this->tempDocumentHeaders[$index], $macro, $replace, $limit); } @@ -399,14 +407,6 @@ 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); - } - // 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); 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..7cd3e95d43 100644 --- a/src/PhpWord/Writer/ODText/Part/AbstractPart.php +++ b/src/PhpWord/Writer/ODText/Part/AbstractPart.php @@ -11,14 +11,14 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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; +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 4bde66ee97..c5de1f1584 100644 --- a/src/PhpWord/Writer/ODText/Part/Content.php +++ b/src/PhpWord/Writer/ODText/Part/Content.php @@ -11,18 +11,18 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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; +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/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..1c71745c17 100644 --- a/src/PhpWord/Writer/ODText/Part/Meta.php +++ b/src/PhpWord/Writer/ODText/Part/Meta.php @@ -11,13 +11,13 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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; -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/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..8bb9533ea5 100644 --- a/src/PhpWord/Writer/ODText/Part/Styles.php +++ b/src/PhpWord/Writer/ODText/Part/Styles.php @@ -11,14 +11,14 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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; +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/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..3ac9c6e79f 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\Common\Text as CommonText; 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; @@ -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/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..ead71b3406 100644 --- a/src/PhpWord/Writer/Word2007/Element/AbstractElement.php +++ b/src/PhpWord/Writer/Word2007/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\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/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..4a207ed5a8 100644 --- a/src/PhpWord/Writer/Word2007/Element/Container.php +++ b/src/PhpWord/Writer/Word2007/Element/Container.php @@ -11,16 +11,16 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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/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..669b8183a9 100644 --- a/src/PhpWord/Writer/Word2007/Element/FormField.php +++ b/src/PhpWord/Writer/Word2007/Element/FormField.php @@ -11,14 +11,14 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 7398842397..8884fecaf4 100644 --- a/src/PhpWord/Writer/Word2007/Element/Image.php +++ b/src/PhpWord/Writer/Word2007/Element/Image.php @@ -11,14 +11,14 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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/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..2d639242a3 100644 --- a/src/PhpWord/Writer/Word2007/Element/SDT.php +++ b/src/PhpWord/Writer/Word2007/Element/SDT.php @@ -11,14 +11,14 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 bd9320a258..dfedaaa904 100644 --- a/src/PhpWord/Writer/Word2007/Element/Shape.php +++ b/src/PhpWord/Writer/Word2007/Element/Shape.php @@ -11,14 +11,14 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 db2a65d07b..fcc90886df 100644 --- a/src/PhpWord/Writer/Word2007/Element/TOC.php +++ b/src/PhpWord/Writer/Word2007/Element/TOC.php @@ -11,14 +11,14 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 f090d05c89..86bfe302c0 100644 --- a/src/PhpWord/Writer/Word2007/Element/Table.php +++ b/src/PhpWord/Writer/Word2007/Element/Table.php @@ -11,16 +11,16 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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/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..5b8947a491 100644 --- a/src/PhpWord/Writer/Word2007/Part/AbstractPart.php +++ b/src/PhpWord/Writer/Word2007/Part/AbstractPart.php @@ -11,14 +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\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 8423762c30..78f2ca24e3 100644 --- a/src/PhpWord/Writer/Word2007/Part/Chart.php +++ b/src/PhpWord/Writer/Word2007/Part/Chart.php @@ -11,14 +11,14 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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; +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 6ae4e8758e..871ecc1041 100644 --- a/src/PhpWord/Writer/Word2007/Part/ContentTypes.php +++ b/src/PhpWord/Writer/Word2007/Part/ContentTypes.php @@ -11,13 +11,13 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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; -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/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..aad7c2e51a 100644 --- a/src/PhpWord/Writer/Word2007/Part/Document.php +++ b/src/PhpWord/Writer/Word2007/Part/Document.php @@ -11,14 +11,14 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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; +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/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..e0faf6ac81 100644 --- a/src/PhpWord/Writer/Word2007/Part/Footnotes.php +++ b/src/PhpWord/Writer/Word2007/Part/Footnotes.php @@ -11,14 +11,14 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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; +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/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..dc43a76c75 100644 --- a/src/PhpWord/Writer/Word2007/Part/Numbering.php +++ b/src/PhpWord/Writer/Word2007/Part/Numbering.php @@ -11,13 +11,13 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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; -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 8327f5c9c5..064446484e 100644 --- a/src/PhpWord/Writer/Word2007/Part/Rels.php +++ b/src/PhpWord/Writer/Word2007/Part/Rels.php @@ -11,14 +11,14 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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; +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/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..436328530c 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 */ @@ -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 0194222948..f220e2318a 100644 --- a/src/PhpWord/Writer/Word2007/Part/Styles.php +++ b/src/PhpWord/Writer/Word2007/Part/Styles.php @@ -11,14 +11,14 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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; +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/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..07bae121fa 100644 --- a/src/PhpWord/Writer/Word2007/Style/AbstractStyle.php +++ b/src/PhpWord/Writer/Word2007/Style/AbstractStyle.php @@ -11,14 +11,14 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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; +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/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..f7c7344e6b 100644 --- a/src/PhpWord/Writer/Word2007/Style/Frame.php +++ b/src/PhpWord/Writer/Word2007/Style/Frame.php @@ -11,13 +11,13 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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; -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/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..a309be0770 100644 --- a/src/PhpWord/Writer/Word2007/Style/MarginBorder.php +++ b/src/PhpWord/Writer/Word2007/Style/MarginBorder.php @@ -11,13 +11,13 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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; -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/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..25fc298d5c 100644 --- a/src/PhpWord/Writer/Word2007/Style/Paragraph.php +++ b/src/PhpWord/Writer/Word2007/Style/Paragraph.php @@ -11,13 +11,13 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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; -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/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..bd68f6dec7 100644 --- a/src/PhpWord/Writer/Word2007/Style/Table.php +++ b/src/PhpWord/Writer/Word2007/Style/Table.php @@ -11,13 +11,13 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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; -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/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/Tests/Collection/CollectionTest.php b/tests/PhpWord/Collection/CollectionTest.php similarity index 62% rename from tests/PhpWord/Tests/Collection/CollectionTest.php rename to tests/PhpWord/Collection/CollectionTest.php index 833b3e8072..66307c60c8 100644 --- a/tests/PhpWord/Tests/Collection/CollectionTest.php +++ b/tests/PhpWord/Collection/CollectionTest.php @@ -1,19 +1,26 @@ 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() { @@ -78,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()); @@ -126,8 +86,7 @@ public function testAddElements() } /** - * Test add object exception - * + * @coversNothing * @expectedException \PhpOffice\PhpWord\Exception\InvalidObjectException */ public function testAddObjectException() @@ -139,6 +98,8 @@ public function testAddObjectException() /** * Add title with predefined style + * + * @coversNothing */ public function testAddTitleWithStyle() { @@ -152,22 +113,25 @@ public function testAddTitleWithStyle() } /** - * Create header footer + * @covers ::addHeader + * @covers ::addFooter + * @covers ::hasDifferentFirstPage */ - 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()); } /** - * Add header has different first page + * @covers ::addHeader + * @covers ::hasDifferentFirstPage */ public function testHasDifferentFirstPage() { @@ -178,10 +142,9 @@ public function testHasDifferentFirstPage() } /** - * Add header exception - * - * @expectedException Exception - * @expectedExceptionMesssage Invalid header/footer type. + * @covers ::addHeader + * @expectedException \Exception + * @expectedExceptionMessage Invalid header/footer type. */ public function testAddHeaderException() { diff --git a/tests/PhpWord/Tests/Element/TOCTest.php b/tests/PhpWord/Element/TOCTest.php similarity index 94% rename from tests/PhpWord/Tests/Element/TOCTest.php rename to tests/PhpWord/Element/TOCTest.php index e4d984ebb9..b96fb9cb5b 100644 --- a/tests/PhpWord/Tests/Element/TOCTest.php +++ b/tests/PhpWord/Element/TOCTest.php @@ -11,14 +11,12 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 95% rename from tests/PhpWord/Tests/Element/TableTest.php rename to tests/PhpWord/Element/TableTest.php index be5df55c96..cbaa91075e 100644 --- a/tests/PhpWord/Tests/Element/TableTest.php +++ b/tests/PhpWord/Element/TableTest.php @@ -11,13 +11,11 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 94% rename from tests/PhpWord/Tests/Element/TextBoxTest.php rename to tests/PhpWord/Element/TextBoxTest.php index 0dda48994e..8eecd11495 100644 --- a/tests/PhpWord/Tests/Element/TextBoxTest.php +++ b/tests/PhpWord/Element/TextBoxTest.php @@ -11,13 +11,11 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 94% rename from tests/PhpWord/Tests/Element/TextBreakTest.php rename to tests/PhpWord/Element/TextBreakTest.php index 1d9479ee3e..5d59a8ec9d 100644 --- a/tests/PhpWord/Tests/Element/TextBreakTest.php +++ b/tests/PhpWord/Element/TextBreakTest.php @@ -11,13 +11,12 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 97% rename from tests/PhpWord/Tests/Element/TextRunTest.php rename to tests/PhpWord/Element/TextRunTest.php index 5e2dd856e8..bdfa4bf53c 100644 --- a/tests/PhpWord/Tests/Element/TextRunTest.php +++ b/tests/PhpWord/Element/TextRunTest.php @@ -11,13 +11,12 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 95% rename from tests/PhpWord/Tests/Element/TextTest.php rename to tests/PhpWord/Element/TextTest.php index 00a2033e28..1659e5dbf0 100644 --- a/tests/PhpWord/Tests/Element/TextTest.php +++ b/tests/PhpWord/Element/TextTest.php @@ -11,13 +11,12 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 91% rename from tests/PhpWord/Tests/Element/TitleTest.php rename to tests/PhpWord/Element/TitleTest.php index ee72f7fc43..687a32f645 100644 --- a/tests/PhpWord/Tests/Element/TitleTest.php +++ b/tests/PhpWord/Element/TitleTest.php @@ -11,13 +11,11 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 89% rename from tests/PhpWord/Tests/Exception/CopyFileExceptionTest.php rename to tests/PhpWord/Exception/CopyFileExceptionTest.php index 3d92595f25..e384515835 100644 --- a/tests/PhpWord/Tests/Exception/CopyFileExceptionTest.php +++ b/tests/PhpWord/Exception/CopyFileExceptionTest.php @@ -11,13 +11,11 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 88% rename from tests/PhpWord/Tests/Exception/CreateTemporaryFileExceptionTest.php rename to tests/PhpWord/Exception/CreateTemporaryFileExceptionTest.php index 7cf0cb773d..1053de3e05 100644 --- a/tests/PhpWord/Tests/Exception/CreateTemporaryFileExceptionTest.php +++ b/tests/PhpWord/Exception/CreateTemporaryFileExceptionTest.php @@ -11,13 +11,11 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 89% rename from tests/PhpWord/Tests/Exception/ExceptionTest.php rename to tests/PhpWord/Exception/ExceptionTest.php index 38d0f7f2c7..967bce3c90 100644 --- a/tests/PhpWord/Tests/Exception/ExceptionTest.php +++ b/tests/PhpWord/Exception/ExceptionTest.php @@ -11,13 +11,11 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 88% rename from tests/PhpWord/Tests/Exception/InvalidImageExceptionTest.php rename to tests/PhpWord/Exception/InvalidImageExceptionTest.php index 7c6303e306..21ef77bc4e 100644 --- a/tests/PhpWord/Tests/Exception/InvalidImageExceptionTest.php +++ b/tests/PhpWord/Exception/InvalidImageExceptionTest.php @@ -11,13 +11,11 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 88% rename from tests/PhpWord/Tests/Exception/InvalidStyleExceptionTest.php rename to tests/PhpWord/Exception/InvalidStyleExceptionTest.php index 3cff7376ff..974697cef4 100644 --- a/tests/PhpWord/Tests/Exception/InvalidStyleExceptionTest.php +++ b/tests/PhpWord/Exception/InvalidStyleExceptionTest.php @@ -11,13 +11,11 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 88% rename from tests/PhpWord/Tests/Exception/UnsupportedImageTypeExceptionTest.php rename to tests/PhpWord/Exception/UnsupportedImageTypeExceptionTest.php index 0a1020eb4e..0277539130 100644 --- a/tests/PhpWord/Tests/Exception/UnsupportedImageTypeExceptionTest.php +++ b/tests/PhpWord/Exception/UnsupportedImageTypeExceptionTest.php @@ -11,13 +11,11 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 93% rename from tests/PhpWord/Tests/IOFactoryTest.php rename to tests/PhpWord/IOFactoryTest.php index 1f293b0e98..67cc91e15b 100644 --- a/tests/PhpWord/Tests/IOFactoryTest.php +++ b/tests/PhpWord/IOFactoryTest.php @@ -11,14 +11,11 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 97% rename from tests/PhpWord/Tests/MediaTest.php rename to tests/PhpWord/MediaTest.php index 8eef6469b2..9b062d80ad 100644 --- a/tests/PhpWord/Tests/MediaTest.php +++ b/tests/PhpWord/MediaTest.php @@ -11,14 +11,13 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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..1a866a5e82 100644 --- a/tests/PhpWord/Tests/Metadata/DocInfoTest.php +++ b/tests/PhpWord/Metadata/DocInfoTest.php @@ -11,13 +11,11 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 97% rename from tests/PhpWord/Tests/PhpWordTest.php rename to tests/PhpWord/PhpWordTest.php index 7fdbd689a6..bbfd93899f 100644 --- a/tests/PhpWord/Tests/PhpWordTest.php +++ b/tests/PhpWord/PhpWordTest.php @@ -11,15 +11,13 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 94% rename from tests/PhpWord/Tests/Reader/HTMLTest.php rename to tests/PhpWord/Reader/HTMLTest.php index cb3dc55c29..4fbd2969b7 100644 --- a/tests/PhpWord/Tests/Reader/HTMLTest.php +++ b/tests/PhpWord/Reader/HTMLTest.php @@ -11,11 +11,11 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 92% rename from tests/PhpWord/Tests/Reader/ODTextTest.php rename to tests/PhpWord/Reader/ODTextTest.php index fc4d2e337e..14b2d05329 100644 --- a/tests/PhpWord/Tests/Reader/ODTextTest.php +++ b/tests/PhpWord/Reader/ODTextTest.php @@ -11,11 +11,11 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 94% rename from tests/PhpWord/Tests/Reader/RTFTest.php rename to tests/PhpWord/Reader/RTFTest.php index c495db6884..14706db307 100644 --- a/tests/PhpWord/Tests/Reader/RTFTest.php +++ b/tests/PhpWord/Reader/RTFTest.php @@ -11,11 +11,11 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 92% rename from tests/PhpWord/Tests/Reader/Word2007Test.php rename to tests/PhpWord/Reader/Word2007Test.php index f2257012a5..5c6c94a5fd 100644 --- a/tests/PhpWord/Tests/Reader/Word2007Test.php +++ b/tests/PhpWord/Reader/Word2007Test.php @@ -11,14 +11,13 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\Tests\Reader; +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/Tests/SettingsTest.php b/tests/PhpWord/SettingsTest.php similarity index 96% rename from tests/PhpWord/Tests/SettingsTest.php rename to tests/PhpWord/SettingsTest.php index fb9b602354..f5bdb1d9dd 100644 --- a/tests/PhpWord/Tests/SettingsTest.php +++ b/tests/PhpWord/SettingsTest.php @@ -11,13 +11,11 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 96% rename from tests/PhpWord/Tests/Shared/ConverterTest.php rename to tests/PhpWord/Shared/ConverterTest.php index 002e2e33bf..643b21529f 100644 --- a/tests/PhpWord/Tests/Shared/ConverterTest.php +++ b/tests/PhpWord/Shared/ConverterTest.php @@ -11,13 +11,11 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 95% rename from tests/PhpWord/Tests/Shared/HtmlTest.php rename to tests/PhpWord/Shared/HtmlTest.php index de746e8200..ee2a19f0b9 100644 --- a/tests/PhpWord/Tests/Shared/HtmlTest.php +++ b/tests/PhpWord/Shared/HtmlTest.php @@ -11,14 +11,13 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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/ZipArchiveTest.php b/tests/PhpWord/Shared/ZipArchiveTest.php similarity index 96% rename from tests/PhpWord/Tests/Shared/ZipArchiveTest.php rename to tests/PhpWord/Shared/ZipArchiveTest.php index fa407c2ac1..edd3de9f00 100644 --- a/tests/PhpWord/Tests/Shared/ZipArchiveTest.php +++ b/tests/PhpWord/Shared/ZipArchiveTest.php @@ -11,14 +11,13 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 97% rename from tests/PhpWord/Tests/Style/AbstractStyleTest.php rename to tests/PhpWord/Style/AbstractStyleTest.php index 946e1f1539..de5bda3e9b 100644 --- a/tests/PhpWord/Tests/Style/AbstractStyleTest.php +++ b/tests/PhpWord/Style/AbstractStyleTest.php @@ -11,11 +11,11 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 95% rename from tests/PhpWord/Tests/Style/CellTest.php rename to tests/PhpWord/Style/CellTest.php index 4f058f0cd1..b246a72a27 100644 --- a/tests/PhpWord/Tests/Style/CellTest.php +++ b/tests/PhpWord/Style/CellTest.php @@ -11,13 +11,11 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 97% rename from tests/PhpWord/Tests/Style/FontTest.php rename to tests/PhpWord/Style/FontTest.php index ea36f395f0..8c3ed4f752 100644 --- a/tests/PhpWord/Tests/Style/FontTest.php +++ b/tests/PhpWord/Style/FontTest.php @@ -11,16 +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\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 95% rename from tests/PhpWord/Tests/Style/ImageTest.php rename to tests/PhpWord/Style/ImageTest.php index 74518e12ba..520e0fb4b3 100644 --- a/tests/PhpWord/Tests/Style/ImageTest.php +++ b/tests/PhpWord/Style/ImageTest.php @@ -11,14 +11,13 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 92% rename from tests/PhpWord/Tests/Style/IndentationTest.php rename to tests/PhpWord/Style/IndentationTest.php index 9c997c3876..d82968ecdd 100644 --- a/tests/PhpWord/Tests/Style/IndentationTest.php +++ b/tests/PhpWord/Style/IndentationTest.php @@ -11,13 +11,11 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 92% rename from tests/PhpWord/Tests/Style/LineNumberingTest.php rename to tests/PhpWord/Style/LineNumberingTest.php index 5b8e3f9e94..dd87e4ba32 100644 --- a/tests/PhpWord/Tests/Style/LineNumberingTest.php +++ b/tests/PhpWord/Style/LineNumberingTest.php @@ -11,13 +11,11 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 97% rename from tests/PhpWord/Tests/Style/LineTest.php rename to tests/PhpWord/Style/LineTest.php index a574120dc0..50f9fa37b9 100644 --- a/tests/PhpWord/Tests/Style/LineTest.php +++ b/tests/PhpWord/Style/LineTest.php @@ -11,13 +11,11 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 93% rename from tests/PhpWord/Tests/Style/ListItemTest.php rename to tests/PhpWord/Style/ListItemTest.php index a97c8dd604..d81ab8472d 100644 --- a/tests/PhpWord/Tests/Style/ListItemTest.php +++ b/tests/PhpWord/Style/ListItemTest.php @@ -11,13 +11,11 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 92% rename from tests/PhpWord/Tests/Style/NumberingLevelTest.php rename to tests/PhpWord/Style/NumberingLevelTest.php index 854b97af1c..47dfc30e63 100644 --- a/tests/PhpWord/Tests/Style/NumberingLevelTest.php +++ b/tests/PhpWord/Style/NumberingLevelTest.php @@ -11,14 +11,13 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 92% rename from tests/PhpWord/Tests/Style/NumberingTest.php rename to tests/PhpWord/Style/NumberingTest.php index ca7f0cb013..999d000719 100644 --- a/tests/PhpWord/Tests/Style/NumberingTest.php +++ b/tests/PhpWord/Style/NumberingTest.php @@ -11,13 +11,11 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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..56180c076b 100644 --- a/tests/PhpWord/Tests/Style/ParagraphTest.php +++ b/tests/PhpWord/Style/ParagraphTest.php @@ -11,16 +11,14 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 94% rename from tests/PhpWord/Tests/Style/RowTest.php rename to tests/PhpWord/Style/RowTest.php index 757dbadbb6..11cb0a621b 100644 --- a/tests/PhpWord/Tests/Style/RowTest.php +++ b/tests/PhpWord/Style/RowTest.php @@ -11,13 +11,11 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 98% rename from tests/PhpWord/Tests/Style/SectionTest.php rename to tests/PhpWord/Style/SectionTest.php index 10e406051b..3b69f55ac2 100644 --- a/tests/PhpWord/Tests/Style/SectionTest.php +++ b/tests/PhpWord/Style/SectionTest.php @@ -11,13 +11,11 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 92% rename from tests/PhpWord/Tests/Style/ShadingTest.php rename to tests/PhpWord/Style/ShadingTest.php index 5a965e1d10..ea796e10e5 100644 --- a/tests/PhpWord/Tests/Style/ShadingTest.php +++ b/tests/PhpWord/Style/ShadingTest.php @@ -11,13 +11,11 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 92% rename from tests/PhpWord/Tests/Style/SpacingTest.php rename to tests/PhpWord/Style/SpacingTest.php index 30b1ccce1e..e552bba47b 100644 --- a/tests/PhpWord/Tests/Style/SpacingTest.php +++ b/tests/PhpWord/Style/SpacingTest.php @@ -11,13 +11,11 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 92% rename from tests/PhpWord/Tests/Style/TOCTest.php rename to tests/PhpWord/Style/TOCTest.php index e6e32e6b9d..c6c1420353 100644 --- a/tests/PhpWord/Tests/Style/TOCTest.php +++ b/tests/PhpWord/Style/TOCTest.php @@ -11,13 +11,11 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 92% rename from tests/PhpWord/Tests/Style/TabTest.php rename to tests/PhpWord/Style/TabTest.php index 784b4e4709..c469fb78df 100644 --- a/tests/PhpWord/Tests/Style/TabTest.php +++ b/tests/PhpWord/Style/TabTest.php @@ -11,13 +11,11 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 97% rename from tests/PhpWord/Tests/Style/TableTest.php rename to tests/PhpWord/Style/TableTest.php index 987c2e0116..580cbc1b5e 100644 --- a/tests/PhpWord/Tests/Style/TableTest.php +++ b/tests/PhpWord/Style/TableTest.php @@ -11,14 +11,13 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 98% rename from tests/PhpWord/Tests/Style/TextBoxTest.php rename to tests/PhpWord/Style/TextBoxTest.php index c2bb17fbaa..5afb5c9bfd 100644 --- a/tests/PhpWord/Tests/Style/TextBoxTest.php +++ b/tests/PhpWord/Style/TextBoxTest.php @@ -11,14 +11,13 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 96% rename from tests/PhpWord/Tests/StyleTest.php rename to tests/PhpWord/StyleTest.php index 908441a8bf..fe7661f190 100644 --- a/tests/PhpWord/Tests/StyleTest.php +++ b/tests/PhpWord/StyleTest.php @@ -11,14 +11,13 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\Tests; +namespace PhpOffice\PhpWord; use PhpOffice\PhpWord\SimpleType\Jc; -use PhpOffice\PhpWord\Style; /** * Test class for PhpOffice\PhpWord\Style diff --git a/tests/PhpWord/Tests/TemplateProcessorTest.php b/tests/PhpWord/TemplateProcessorTest.php similarity index 98% rename from tests/PhpWord/Tests/TemplateProcessorTest.php rename to tests/PhpWord/TemplateProcessorTest.php index 3683bb7949..9a475017ef 100644 --- a/tests/PhpWord/Tests/TemplateProcessorTest.php +++ b/tests/PhpWord/TemplateProcessorTest.php @@ -11,13 +11,11 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\Tests; - -use PhpOffice\PhpWord\TemplateProcessor; +namespace PhpOffice\PhpWord; /** * @covers \PhpOffice\PhpWord\TemplateProcessor @@ -144,7 +142,7 @@ final public function testXslStyleSheetCanNotBeAppliedOnFailureOfLoadingXmlFromT } /** - * @civers ::setValue + * @covers ::setValue * @covers ::cloneRow * @covers ::saveAs * @test diff --git a/tests/PhpWord/Tests/AutoloaderTest.php b/tests/PhpWord/Tests/AutoloaderTest.php deleted file mode 100644 index 7847aa05ff..0000000000 --- a/tests/PhpWord/Tests/AutoloaderTest.php +++ /dev/null @@ -1,60 +0,0 @@ -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/PhpWord/Tests/Shared/StringTest.php b/tests/PhpWord/Tests/Shared/StringTest.php deleted file mode 100644 index a3524eded8..0000000000 --- a/tests/PhpWord/Tests/Shared/StringTest.php +++ /dev/null @@ -1,75 +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/Tests/Shared/XMLReaderTest.php b/tests/PhpWord/Tests/Shared/XMLReaderTest.php deleted file mode 100644 index e82f475af6..0000000000 --- a/tests/PhpWord/Tests/Shared/XMLReaderTest.php +++ /dev/null @@ -1,75 +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/Tests/Writer/HTML/ElementTest.php b/tests/PhpWord/Writer/HTML/ElementTest.php similarity index 95% rename from tests/PhpWord/Tests/Writer/HTML/ElementTest.php rename to tests/PhpWord/Writer/HTML/ElementTest.php index 0c8dfa3e2a..2f0ac97f6a 100644 --- a/tests/PhpWord/Tests/Writer/HTML/ElementTest.php +++ b/tests/PhpWord/Writer/HTML/ElementTest.php @@ -11,14 +11,14 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 91% rename from tests/PhpWord/Tests/Writer/HTML/PartTest.php rename to tests/PhpWord/Writer/HTML/PartTest.php index 93e9a98ef8..4d9eacf194 100644 --- a/tests/PhpWord/Tests/Writer/HTML/PartTest.php +++ b/tests/PhpWord/Writer/HTML/PartTest.php @@ -11,10 +11,10 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 89% rename from tests/PhpWord/Tests/Writer/HTML/StyleTest.php rename to tests/PhpWord/Writer/HTML/StyleTest.php index 8af1e47930..c23f96f069 100644 --- a/tests/PhpWord/Tests/Writer/HTML/StyleTest.php +++ b/tests/PhpWord/Writer/HTML/StyleTest.php @@ -11,12 +11,10 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 97% rename from tests/PhpWord/Tests/Writer/HTMLTest.php rename to tests/PhpWord/Writer/HTMLTest.php index 6ad9093d25..1caae685e5 100644 --- a/tests/PhpWord/Tests/Writer/HTMLTest.php +++ b/tests/PhpWord/Writer/HTMLTest.php @@ -11,14 +11,13 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\Tests\Writer; +namespace PhpOffice\PhpWord\Writer; 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/Tests/Writer/ODText/ElementTest.php b/tests/PhpWord/Writer/ODText/ElementTest.php similarity index 90% rename from tests/PhpWord/Tests/Writer/ODText/ElementTest.php rename to tests/PhpWord/Writer/ODText/ElementTest.php index fa9532d147..24acf5fb27 100644 --- a/tests/PhpWord/Tests/Writer/ODText/ElementTest.php +++ b/tests/PhpWord/Writer/ODText/ElementTest.php @@ -11,12 +11,12 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\Tests\Writer\ODText; +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/Tests/Writer/ODText/Part/AbstractPartTest.php b/tests/PhpWord/Writer/ODText/Part/AbstractPartTest.php similarity index 92% rename from tests/PhpWord/Tests/Writer/ODText/Part/AbstractPartTest.php rename to tests/PhpWord/Writer/ODText/Part/AbstractPartTest.php index add4a3fbe2..6564980dd1 100644 --- a/tests/PhpWord/Tests/Writer/ODText/Part/AbstractPartTest.php +++ b/tests/PhpWord/Writer/ODText/Part/AbstractPartTest.php @@ -11,13 +11,12 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\Tests\Writer\ODText\Part; +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/Tests/Writer/ODText/Part/ContentTest.php b/tests/PhpWord/Writer/ODText/Part/ContentTest.php similarity index 96% rename from tests/PhpWord/Tests/Writer/ODText/Part/ContentTest.php rename to tests/PhpWord/Writer/ODText/Part/ContentTest.php index 1f028c8743..87f1527536 100644 --- a/tests/PhpWord/Tests/Writer/ODText/Part/ContentTest.php +++ b/tests/PhpWord/Writer/ODText/Part/ContentTest.php @@ -11,14 +11,14 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 90% rename from tests/PhpWord/Tests/Writer/ODText/StyleTest.php rename to tests/PhpWord/Writer/ODText/StyleTest.php index cd5ea0eb15..aa921a47a4 100644 --- a/tests/PhpWord/Tests/Writer/ODText/StyleTest.php +++ b/tests/PhpWord/Writer/ODText/StyleTest.php @@ -11,12 +11,12 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\Tests\Writer\ODText; +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/Tests/Writer/ODTextTest.php b/tests/PhpWord/Writer/ODTextTest.php similarity index 97% rename from tests/PhpWord/Tests/Writer/ODTextTest.php rename to tests/PhpWord/Writer/ODTextTest.php index cdc3651681..9b64029dd8 100644 --- a/tests/PhpWord/Tests/Writer/ODTextTest.php +++ b/tests/PhpWord/Writer/ODTextTest.php @@ -11,14 +11,13 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\Tests\Writer; +namespace PhpOffice\PhpWord\Writer; 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/Tests/Writer/PDF/DomPDFTest.php b/tests/PhpWord/Writer/PDF/DomPDFTest.php similarity index 96% rename from tests/PhpWord/Tests/Writer/PDF/DomPDFTest.php rename to tests/PhpWord/Writer/PDF/DomPDFTest.php index 71d157231c..5ba36c0279 100644 --- a/tests/PhpWord/Tests/Writer/PDF/DomPDFTest.php +++ b/tests/PhpWord/Writer/PDF/DomPDFTest.php @@ -11,10 +11,10 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 94% rename from tests/PhpWord/Tests/Writer/PDF/MPDFTest.php rename to tests/PhpWord/Writer/PDF/MPDFTest.php index fbf6d1d40b..3be94f0c4c 100644 --- a/tests/PhpWord/Tests/Writer/PDF/MPDFTest.php +++ b/tests/PhpWord/Writer/PDF/MPDFTest.php @@ -11,10 +11,10 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 92% rename from tests/PhpWord/Tests/Writer/PDF/TCPDFTest.php rename to tests/PhpWord/Writer/PDF/TCPDFTest.php index c6d2a99f37..3f2bf766e6 100644 --- a/tests/PhpWord/Tests/Writer/PDF/TCPDFTest.php +++ b/tests/PhpWord/Writer/PDF/TCPDFTest.php @@ -11,10 +11,10 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\Tests\Writer\PDF; +namespace PhpOffice\PhpWord\Writer\PDF; use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\Settings; @@ -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/Tests/Writer/PDFTest.php b/tests/PhpWord/Writer/PDFTest.php similarity index 93% rename from tests/PhpWord/Tests/Writer/PDFTest.php rename to tests/PhpWord/Writer/PDFTest.php index 8e1149cda7..6c7d9bf3f2 100644 --- a/tests/PhpWord/Tests/Writer/PDFTest.php +++ b/tests/PhpWord/Writer/PDFTest.php @@ -11,14 +11,13 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\Tests\Writer; +namespace PhpOffice\PhpWord\Writer; 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/Tests/Writer/RTF/ElementTest.php b/tests/PhpWord/Writer/RTF/ElementTest.php similarity index 93% rename from tests/PhpWord/Tests/Writer/RTF/ElementTest.php rename to tests/PhpWord/Writer/RTF/ElementTest.php index e090b34921..372994725e 100644 --- a/tests/PhpWord/Tests/Writer/RTF/ElementTest.php +++ b/tests/PhpWord/Writer/RTF/ElementTest.php @@ -11,10 +11,10 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 89% rename from tests/PhpWord/Tests/Writer/RTF/StyleTest.php rename to tests/PhpWord/Writer/RTF/StyleTest.php index 542e34fe7c..a212be5d50 100644 --- a/tests/PhpWord/Tests/Writer/RTF/StyleTest.php +++ b/tests/PhpWord/Writer/RTF/StyleTest.php @@ -11,12 +11,10 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 96% rename from tests/PhpWord/Tests/Writer/RTFTest.php rename to tests/PhpWord/Writer/RTFTest.php index 7e978cb582..3c05f2603d 100644 --- a/tests/PhpWord/Tests/Writer/RTFTest.php +++ b/tests/PhpWord/Writer/RTFTest.php @@ -11,14 +11,13 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\Tests\Writer; +namespace PhpOffice\PhpWord\Writer; 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/Tests/Writer/Word2007/ElementTest.php b/tests/PhpWord/Writer/Word2007/ElementTest.php similarity index 97% rename from tests/PhpWord/Tests/Writer/Word2007/ElementTest.php rename to tests/PhpWord/Writer/Word2007/ElementTest.php index da95ee026b..789d00f2f5 100644 --- a/tests/PhpWord/Tests/Writer/Word2007/ElementTest.php +++ b/tests/PhpWord/Writer/Word2007/ElementTest.php @@ -11,14 +11,14 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\Tests\Writer\Word2007; +namespace PhpOffice\PhpWord\Writer\Word2007; +use PhpOffice\Common\XMLWriter; 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 89% rename from tests/PhpWord/Tests/Writer/Word2007/Part/AbstractPartTest.php rename to tests/PhpWord/Writer/Word2007/Part/AbstractPartTest.php index 37a5ece691..f8948d6537 100644 --- a/tests/PhpWord/Tests/Writer/Word2007/Part/AbstractPartTest.php +++ b/tests/PhpWord/Writer/Word2007/Part/AbstractPartTest.php @@ -11,14 +11,12 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\Tests\Writer\Word2007\Part; +namespace PhpOffice\PhpWord\Writer\Word2007\Part; -use PhpOffice\PhpWord\Writer\Word2007\Part\AbstractWriterPart; use PhpOffice\PhpWord\Writer\Word2007; -use PhpWord\Tests\TestHelperDOCX; /** * Test class for PhpOffice\PhpWord\Writer\Word2007\Part\AbstractWriterPart 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..bf2a7aef3c 100644 --- a/tests/PhpWord/Tests/Writer/Word2007/Part/DocumentTest.php +++ b/tests/PhpWord/Writer/Word2007/Part/DocumentTest.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\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 92% rename from tests/PhpWord/Tests/Writer/Word2007/Part/FooterTest.php rename to tests/PhpWord/Writer/Word2007/Part/FooterTest.php index 068b2e25be..82ec12dc85 100644 --- a/tests/PhpWord/Tests/Writer/Word2007/Part/FooterTest.php +++ b/tests/PhpWord/Writer/Word2007/Part/FooterTest.php @@ -11,13 +11,12 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 85% rename from tests/PhpWord/Tests/Writer/Word2007/Part/FootnotesTest.php rename to tests/PhpWord/Writer/Word2007/Part/FootnotesTest.php index 151331072a..c89311cfb0 100644 --- a/tests/PhpWord/Tests/Writer/Word2007/Part/FootnotesTest.php +++ b/tests/PhpWord/Writer/Word2007/Part/FootnotesTest.php @@ -11,33 +11,26 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 - * + * @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(); diff --git a/tests/PhpWord/Tests/Writer/Word2007/Part/HeaderTest.php b/tests/PhpWord/Writer/Word2007/Part/HeaderTest.php similarity index 92% rename from tests/PhpWord/Tests/Writer/Word2007/Part/HeaderTest.php rename to tests/PhpWord/Writer/Word2007/Part/HeaderTest.php index e8f77845dc..0f2a4de46b 100644 --- a/tests/PhpWord/Tests/Writer/Word2007/Part/HeaderTest.php +++ b/tests/PhpWord/Writer/Word2007/Part/HeaderTest.php @@ -11,13 +11,12 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 93% rename from tests/PhpWord/Tests/Writer/Word2007/Part/NumberingTest.php rename to tests/PhpWord/Writer/Word2007/Part/NumberingTest.php index 3add6854d0..332f812541 100644 --- a/tests/PhpWord/Tests/Writer/Word2007/Part/NumberingTest.php +++ b/tests/PhpWord/Writer/Word2007/Part/NumberingTest.php @@ -11,14 +11,14 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 92% rename from tests/PhpWord/Tests/Writer/Word2007/Part/SettingsTest.php rename to tests/PhpWord/Writer/Word2007/Part/SettingsTest.php index 7d4d1849c6..c83ffd22c3 100644 --- a/tests/PhpWord/Tests/Writer/Word2007/Part/SettingsTest.php +++ b/tests/PhpWord/Writer/Word2007/Part/SettingsTest.php @@ -11,13 +11,13 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 94% rename from tests/PhpWord/Tests/Writer/Word2007/Part/StylesTest.php rename to tests/PhpWord/Writer/Word2007/Part/StylesTest.php index ad8464671b..bdbf71377d 100644 --- a/tests/PhpWord/Tests/Writer/Word2007/Part/StylesTest.php +++ b/tests/PhpWord/Writer/Word2007/Part/StylesTest.php @@ -11,14 +11,14 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 93% rename from tests/PhpWord/Tests/Writer/Word2007/PartTest.php rename to tests/PhpWord/Writer/Word2007/PartTest.php index c3d2933190..e59951b1c7 100644 --- a/tests/PhpWord/Tests/Writer/Word2007/PartTest.php +++ b/tests/PhpWord/Writer/Word2007/PartTest.php @@ -11,10 +11,10 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 91% rename from tests/PhpWord/Tests/Writer/Word2007/Style/FontTest.php rename to tests/PhpWord/Writer/Word2007/Style/FontTest.php index f3f6badb49..1731f90d52 100644 --- a/tests/PhpWord/Tests/Writer/Word2007/Style/FontTest.php +++ b/tests/PhpWord/Writer/Word2007/Style/FontTest.php @@ -11,12 +11,12 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\Tests\Writer\Word2007\Part; +namespace PhpOffice\PhpWord\Writer\Word2007\Style; -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 93% rename from tests/PhpWord/Tests/Writer/Word2007/StyleTest.php rename to tests/PhpWord/Writer/Word2007/StyleTest.php index 1650e115e3..5719558c3f 100644 --- a/tests/PhpWord/Tests/Writer/Word2007/StyleTest.php +++ b/tests/PhpWord/Writer/Word2007/StyleTest.php @@ -11,12 +11,12 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\Tests\Writer\Word2007; +namespace PhpOffice\PhpWord\Writer\Word2007; -use PhpOffice\PhpWord\Shared\XMLWriter; +use PhpOffice\Common\XMLWriter; /** * Test class for PhpOffice\PhpWord\Writer\Word2007\Style subnamespace diff --git a/tests/PhpWord/Tests/Writer/Word2007Test.php b/tests/PhpWord/Writer/Word2007Test.php similarity index 97% rename from tests/PhpWord/Tests/Writer/Word2007Test.php rename to tests/PhpWord/Writer/Word2007Test.php index 83a4a9a1d8..c87ef356ce 100644 --- a/tests/PhpWord/Tests/Writer/Word2007Test.php +++ b/tests/PhpWord/Writer/Word2007Test.php @@ -11,15 +11,14 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\Tests\Writer; +namespace PhpOffice\PhpWord\Writer; use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\SimpleType\Jc; -use PhpOffice\PhpWord\Tests\TestHelperDOCX; -use PhpOffice\PhpWord\Writer\Word2007; +use PhpOffice\PhpWord\TestHelperDOCX; /** * Test class for 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 92% rename from tests/PhpWord/Tests/_includes/TestHelperDOCX.php rename to tests/PhpWord/_includes/TestHelperDOCX.php index b27f9a994b..b8501c0590 100644 --- a/tests/PhpWord/Tests/_includes/TestHelperDOCX.php +++ b/tests/PhpWord/_includes/TestHelperDOCX.php @@ -11,16 +11,13 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\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 97% rename from tests/PhpWord/Tests/_includes/XmlDocument.php rename to tests/PhpWord/_includes/XmlDocument.php index 0a70c5f22f..f6c076e555 100644 --- a/tests/PhpWord/Tests/_includes/XmlDocument.php +++ b/tests/PhpWord/_includes/XmlDocument.php @@ -11,11 +11,11 @@ * contributors, visit https://github.com/PHPOffice/PHPWord/contributors. * * @link https://github.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\Tests; +namespace PhpOffice\PhpWord; /** * DOM wrapper class diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 6a1398a4db..765a0cdb13 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -11,10 +11,12 @@ * 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 */ +require_once __DIR__ . '/../bootstrap.php'; + date_default_timezone_set('UTC'); // defining base dir for tests @@ -22,24 +24,12 @@ 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'; + $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)) { @@ -47,6 +37,3 @@ } } }); - -require_once __DIR__ . '/../src/PhpWord/Autoloader.php'; -\PhpOffice\PhpWord\Autoloader::register();