Added TextBox functionality

This commit is contained in:
Bas-Jan 't Jong 2014-05-07 21:27:51 +02:00
parent ce85cc5497
commit 364131aa5d
267 changed files with 7550 additions and 734 deletions

1
.gitignore vendored
View File

@ -4,7 +4,6 @@
.Trashes
Thumbs.db
Desktop.ini
composer.lock
composer.phar
phpunit.xml
/.buildpath

14
.scrutinizer.yml Normal file
View File

@ -0,0 +1,14 @@
filter:
excluded_paths: [ 'vendor/*', 'tests/*', 'samples/*', 'src/PhpWord/Shared/PCLZip/*' ]
before_commands:
- "composer self-update"
- "composer install --prefer-source --dev"
tools:
php_code_coverage:
enabled: true
test_command: phpunit -c phpunit.xml.dist
php_sim: true
php_pdepend: true
php_analyzer: true

View File

@ -58,7 +58,7 @@ script:
## PHPUnit
- phpunit -c ./ --coverage-text --coverage-html ./build/coverage
## PHPDocumentor
- vendor/bin/phpdoc.php -d ./src -t ./build/docs -i ./src/PhpWord/Shared/PCLZip/*
- vendor/bin/phpdoc.php -d ./src -t ./build/docs --ignore "*/src/PhpWord/Shared/PCLZip/*" --template="responsive-twig"
after_script:
## PHPDocumentor

View File

@ -13,7 +13,7 @@ This release changed PHPWord license from LGPL 2.1 to LGPL 3.
### Bugfixes
- ...
- Header: All images added to the second header were assigned to the first header - @basjan GH-222
### Deprecated
@ -26,6 +26,8 @@ This release changed PHPWord license from LGPL 2.1 to LGPL 3.
- Refactor: Replace static classes `Footnotes`, `Endnotes`, and `TOC` with `Collections` - @ivanlanin GH-206
- QA: Reactivate `phpcpd` and `phpmd` on Travis - @ivanlanin
- Refactor: PHPMD recommendation: Change all `get...` method that returns `boolean` into `is...` or `has...` - @ivanlanin
- Docs: Create gh-pages branch for API documentation - @Progi1984 GH-154
- QA: Add `.scrutinizer.yml` and include `composer.lock` for preparation to Scrutinizer - @ivanlanin GH-186
## 0.10.0 - 4 May 2014

View File

@ -7,40 +7,44 @@
[![License](https://poser.pugx.org/phpoffice/phpword/license.png)](https://packagist.org/packages/phpoffice/phpword)
PHPWord is a library written in pure PHP that provides a set of classes to write to and read from different document file formats. The current version of PHPWord supports Microsoft [Office Open XML](http://en.wikipedia.org/wiki/Office_Open_XML) (OOXML or OpenXML), OASIS [Open Document Format for Office Applications](http://en.wikipedia.org/wiki/OpenDocument) (OpenDocument or ODF), and [Rich Text Format](http://en.wikipedia.org/wiki/Rich_Text_Format) (RTF).
PHPWord is a library written in pure PHP that provides a set of classes to write to and read from different document file formats. The current version of PHPWord supports Microsoft [Office Open XML](http://en.wikipedia.org/wiki/Office_Open_XML) (OOXML or OpenXML), OASIS [Open Document Format for Office Applications](http://en.wikipedia.org/wiki/OpenDocument) (OpenDocument or ODF), [Rich Text Format](http://en.wikipedia.org/wiki/Rich_Text_Format) (RTF), HTML, and PDF.
PHPWord is an open source project licensed under the terms of [LGPL version 3](https://github.com/PHPOffice/PHPWord/blob/develop/LICENSE.md). PHPWord is aimed to be a high quality software product by incorporating [continuous integration](https://travis-ci.org/PHPOffice/PHPWord) and [unit testing](http://phpoffice.github.io/PHPWord/coverage/develop/). You can learn more about PHPWord by reading the [Developers' Documentation](http://phpword.readthedocs.org/) and the [API Documentation](http://phpoffice.github.io/PHPWord/docs/develop/).
## Features
With PHPWord, you can create DOCX, ODT, or RTF documents dynamically using your PHP 5.3+ scripts. Below are some of the things that you can do with PHPWord library:
* Set document properties, e.g. title, subject, and creator.
* Create document sections with different settings, e.g. portrait/landscape, page size, and page numbering
* Create header and footer for each sections
* Set default font type, font size, and paragraph style
* Use UTF-8 and East Asia fonts/characters
* Define custom font styles (e.g. bold, italic, color) and paragraph styles (e.g. centered, multicolumns, spacing) either as named style or inline in text
* Insert paragraphs, either as a simple text or complex one (a text run) that contains other elements
* Insert titles (headers) and table of contents
* Insert text breaks and page breaks
* Insert and format images, either local, remote, or as page watermarks
* Insert binary OLE Objects such as Excel or Visio
* Insert and format table with customized properties for each rows (e.g. repeat as header row) and cells (e.g. background color, rowspan, colspan)
* Insert list items as bulleted, numbered, or multilevel
* Insert hyperlinks
* Insert footnotes and endnotes
* Create document from templates
* Use XSL 1.0 style sheets to transform main document part of OOXML template
* ... and many more features on progress
__Want to contribute?__ [Fork us](https://github.com/PHPOffice/PHPWord/fork) or [submit](https://github.com/PHPOffice/PHPWord/issues) your bug reports or feature requests to us.
- Set document properties, e.g. title, subject, and creator.
- Create document sections with different settings, e.g. portrait/landscape, page size, and page numbering
- Create header and footer for each sections
- Set default font type, font size, and paragraph style
- Use UTF-8 and East Asia fonts/characters
- Define custom font styles (e.g. bold, italic, color) and paragraph styles (e.g. centered, multicolumns, spacing) either as named style or inline in text
- Insert paragraphs, either as a simple text or complex one (a text run) that contains other elements
- Insert titles (headers) and table of contents
- Insert text breaks and page breaks
- Insert and format images, either local, remote, or as page watermarks
- Insert binary OLE Objects such as Excel or Visio
- Insert and format table with customized properties for each rows (e.g. repeat as header row) and cells (e.g. background color, rowspan, colspan)
- Insert list items as bulleted, numbered, or multilevel
- Insert hyperlinks
- Insert footnotes and endnotes
- Create document from templates
- Use XSL 1.0 style sheets to transform main document part of OOXML template
- ... and many more features on progress
## Requirements
* PHP 5.3+
* PHP [Zip](http://php.net/manual/en/book.zip.php) extension
* PHP [XML Parser](http://www.php.net/manual/en/xml.installation.php) extension
### Optional PHP extensions
* PHP [GD](http://php.net/manual/en/book.image.php) extension
* PHP [XMLWriter](http://php.net/manual/en/book.xmlwriter.php) extension
* PHP [XSL](http://php.net/manual/en/book.xsl.php) extension
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)
- [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)
## Installation
@ -63,7 +67,7 @@ require_once 'path/to/PhpWord/src/PhpWord/Autoloader.php';
\PhpOffice\PhpWord\Autoloader::register();
```
## Basic usage
## Usages
The following is a basic example of the PHPWord library. More examples are provided in the [samples folder](samples/).
@ -107,6 +111,11 @@ $objWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord, 'RTF');
$objWriter->save('helloWorld.rtf');
```
## Documentation
## Contributing
__Want to know more?__ Read the full documentation of PHPWord on [Read The Docs](http://phpword.readthedocs.org/).
We welcome everyone to contribute to PHPWord. Below are some of the things that you can do to contribute:
- Read [our contributing guide](https://github.com/PHPOffice/PHPWord/blob/master/CONTRIBUTING.md)
- [Fork us](https://github.com/PHPOffice/PHPWord/fork) and [request a pull](https://github.com/PHPOffice/PHPWord/pulls) to the [develop](https://github.com/PHPOffice/PHPWord/tree/develop) branch
- Submit [bug reports or feature requests](https://github.com/PHPOffice/PHPWord/issues) to GitHub
- Follow [@PHPWord](https://twitter.com/PHPWord) and [@PHPOffice](https://twitter.com/PHPOffice) on Twitter

View File

@ -8,7 +8,7 @@
],
"homepage": "http://phpoffice.github.io",
"type": "library",
"license": "LGPL",
"license": "LGPL-3.0",
"authors": [
{
"name": "Mark Baker"

3107
composer.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -12,18 +12,14 @@ Applications <http://en.wikipedia.org/wiki/OpenDocument>`__
(OpenDocument or ODF), and `Rich Text
Format <http://en.wikipedia.org/wiki/Rich_Text_Format>`__ (RTF).
No Windows operating system is needed for usage because the resulting
DOCX, ODT, or RTF files can be opened by all major `word processing
softwares <http://en.wikipedia.org/wiki/List_of_word_processors>`__.
PHPWord is an open source project licensed under LGPL version 3. PHPWord is `unit
tested <https://travis-ci.org/PHPOffice/PHPWord>`__ to make sure that
the released versions are stable.
**Want to contribute?** `Fork
us <https://github.com/PHPOffice/PHPWord/fork>`__ or
`submit <https://github.com/PHPOffice/PHPWord/issues>`__ your bug
reports or feature requests to us.
PHPWord is an open source project licensed under the terms of `LGPL
version 3 <https://github.com/PHPOffice/PHPWord/blob/develop/LICENSE.md>`__.
PHPWord is aimed to be a high quality software product by incorporating
`continuous integration <https://travis-ci.org/PHPOffice/PHPWord>`__ and
`unit testing <http://phpoffice.github.io/PHPWord/coverage/develop/>`__.
You can learn more about PHPWord by reading this Developers'
Documentation and the `API
Documentation <http://phpoffice.github.io/PHPWord/docs/develop/>`__.
Features
--------
@ -180,3 +176,20 @@ Readers
+---------------------------+----------------------+--------+-------+-------+
| | Protection | | | |
+---------------------------+----------------------+--------+-------+-------+
Contributing
------------
We welcome everyone to contribute to PHPWord. Below are some of the
things that you can do to contribute:
- Read `our contributing
guide <https://github.com/PHPOffice/PHPWord/blob/master/CONTRIBUTING.md>`__
- `Fork us <https://github.com/PHPOffice/PHPWord/fork>`__ and `request
a pull <https://github.com/PHPOffice/PHPWord/pulls>`__ to the
`develop <https://github.com/PHPOffice/PHPWord/tree/develop>`__
branch
- Submit `bug reports or feature
requests <https://github.com/PHPOffice/PHPWord/issues>`__ to GitHub
- Follow `@PHPWord <https://twitter.com/PHPWord>`__ and
`@PHPOffice <https://twitter.com/PHPOffice>`__ on Twitter

View File

@ -3,11 +3,21 @@
References
==========
ISO/IEC 29500, Third edition, 2012-09-01
---------------------
- `Part 1: Fundamentals and Markup Language Reference
<http://standards.iso.org/ittf/PubliclyAvailableStandards/c061750_ISO_IEC_29500-1_2012.zip>`__
- `Part 2: Open Packaging Conventions
<http://standards.iso.org/ittf/PubliclyAvailableStandards/c061796_ISO_IEC_29500-2_2012.zip>`__
- `Part 3: Markup Compatibility and Extensibility
<http://standards.iso.org/ittf/PubliclyAvailableStandards/c061797_ISO_IEC_29500-3_2012.zip>`__
- `Part 4: Transitional Migration Features
<http://standards.iso.org/ittf/PubliclyAvailableStandards/c061798_ISO_IEC_29500-4_2012.zip>`__
Formal specifications
---------------------
- `Office Open XML (OOXML) (ECMA-376)
Schema <http://www.schemacentral.com/sc/ooxml/ss.html>`__
- `Oasis OpenDocument Standard Version
1.2 <http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os.html>`__
- `Rich Text Format (RTF) Specification, version

View File

@ -47,11 +47,7 @@ Don't forget to change `code::` directive to `code-block::` in the resulting rst
PHPWord is a library written in pure PHP that provides a set of classes to write to and read from different document file formats. The current version of PHPWord supports Microsoft [Office Open XML](http://en.wikipedia.org/wiki/Office_Open_XML) (OOXML or OpenXML), OASIS [Open Document Format for Office Applications](http://en.wikipedia.org/wiki/OpenDocument) (OpenDocument or ODF), and [Rich Text Format](http://en.wikipedia.org/wiki/Rich_Text_Format) (RTF).
No Windows operating system is needed for usage because the resulting DOCX, ODT, or RTF files can be opened by all major [word processing softwares](http://en.wikipedia.org/wiki/List_of_word_processors).
PHPWord is an open source project licensed under LGPL version 3. PHPWord is [unit tested](https://travis-ci.org/PHPOffice/PHPWord) to make sure that the released versions are stable.
**Want to contribute?** [Fork us](https://github.com/PHPOffice/PHPWord/fork) or [submit](https://github.com/PHPOffice/PHPWord/issues) your bug reports or feature requests to us.
PHPWord is an open source project licensed under the terms of [LGPL version 3](https://github.com/PHPOffice/PHPWord/blob/develop/LICENSE.md). PHPWord is aimed to be a high quality software product by incorporating [continuous integration](https://travis-ci.org/PHPOffice/PHPWord) and [unit testing](http://phpoffice.github.io/PHPWord/coverage/develop/). You can learn more about PHPWord by reading this Developers' Documentation and the [API Documentation](http://phpoffice.github.io/PHPWord/docs/develop/).
## Features
@ -142,6 +138,15 @@ Below are the supported features for each file formats.
| **Bonus** | Encryption | | | |
| | Protection | | | |
## Contributing
We welcome everyone to contribute to PHPWord. Below are some of the things that you can do to contribute:
- Read [our contributing guide](https://github.com/PHPOffice/PHPWord/blob/master/CONTRIBUTING.md)
- [Fork us](https://github.com/PHPOffice/PHPWord/fork) and [request a pull](https://github.com/PHPOffice/PHPWord/pulls) to the [develop](https://github.com/PHPOffice/PHPWord/tree/develop) branch
- Submit [bug reports or feature requests](https://github.com/PHPOffice/PHPWord/issues) to GitHub
- Follow [@PHPWord](https://twitter.com/PHPWord) and [@PHPOffice](https://twitter.com/PHPOffice) on Twitter
# Installing/configuring
## Requirements
@ -938,13 +943,18 @@ PHPWord requires PHP 5.3+ since 0.8, while PHPWord 0.6.3 from CodePlex can run w
# References
## ISO/IEC 29500, Third edition, 2012-09-01
- [Part 1: Fundamentals and Markup Language Reference](http://standards.iso.org/ittf/PubliclyAvailableStandards/c061750_ISO_IEC_29500-1_2012.zip)
- [Part 2: Open Packaging Conventions](http://standards.iso.org/ittf/PubliclyAvailableStandards/c061796_ISO_IEC_29500-2_2012.zip)
- [Part 3: Markup Compatibility and Extensibility](http://standards.iso.org/ittf/PubliclyAvailableStandards/c061797_ISO_IEC_29500-3_2012.zip)
- [Part 4: Transitional Migration Features](http://standards.iso.org/ittf/PubliclyAvailableStandards/c061798_ISO_IEC_29500-4_2012.zip)
## Formal specifications
- [Office Open XML (OOXML) (ECMA-376) Schema](http://www.schemacentral.com/sc/ooxml/ss.html)
- [Oasis OpenDocument Standard Version 1.2](http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os.html)
- [Rich Text Format (RTF) Specification, version 1.9.1](http://www.microsoft.com/en-us/download/details.aspx?id=10725)
- [Oasis OpenDocument Standard Version 1.2](http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os.html)
- [Rich Text Format (RTF) Specification, version 1.9.1](http://www.microsoft.com/en-us/download/details.aspx?id=10725)
## Other resources
- [DocumentFormat.OpenXml.Wordprocessing Namespace on MSDN](http://msdn.microsoft.com/en-us/library/documentformat.openxml.wordprocessing%28v=office.14%29.aspx)
- [DocumentFormat.OpenXml.Wordprocessing Namespace on MSDN](http://msdn.microsoft.com/en-us/library/documentformat.openxml.wordprocessing%28v=office.14%29.aspx)

View File

@ -25,6 +25,7 @@ $table->addCell(4500)->addImage(
// Add header for all other pages
$subsequent = $section->addHeader();
$subsequent->addText("Subsequent pages in Section 1 will Have this!");
$subsequent->addImage('resources/_mars.jpg', array('width' => 80, 'height' => 80));
// Add footer
$footer = $section->addFooter();

View File

@ -31,6 +31,37 @@ foreach ($wrappingStyles as $wrappingStyle) {
$section->addText($text);
}
//Absolute positioning
$section->addTextBreak(3);
$section->addText('Absolute positioning: see top right corner of page');
$section->addImage(
'resources/_mars.jpg',
array(
'width' => \PhpOffice\PhpWord\Shared\Drawing::centimetersToPixels(3),
'height' => \PhpOffice\PhpWord\Shared\Drawing::centimetersToPixels(3),
'positioning' => \PhpOffice\PhpWord\Style\Image::POSITION_ABSOLUTE,
'marginLeft' => \PhpOffice\PhpWord\Shared\Drawing::centimetersToPixels(15.5),
'marginTop' => \PhpOffice\PhpWord\Shared\Drawing::centimetersToPixels(1.55)
)
);
//Relative positioning
$section->addTextBreak(3);
$section->addText('Relative positioning: Horizontal position center relative to column,');
$section->addText('Vertical position top relative to line');
$section->addImage(
'resources/_mars.jpg',
array(
'width' => \PhpOffice\PhpWord\Shared\Drawing::centimetersToPixels(3),
'height' => \PhpOffice\PhpWord\Shared\Drawing::centimetersToPixels(3),
'positioning' => \PhpOffice\PhpWord\Style\Image::POSITION_RELATIVE,
'posHorizontal' => \PhpOffice\PhpWord\Style\Image::POSITION_HORIZONTAL_CENTER,
'posHorizontalRel' => \PhpOffice\PhpWord\Style\Image::POSITION_RELATIVE_TO_COLUMN,
'posVertical' => \PhpOffice\PhpWord\Style\Image::POSITION_VERTICAL_TOP,
'posVerticalRel' => \PhpOffice\PhpWord\Style\Image::POSITION_RELATIVE_TO_LINE
)
);
// Save file
echo write($phpWord, basename(__FILE__, '.php'), $writers);
if (!CLI) {

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,21 +1,22 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/
namespace PhpOffice\PhpWord\Element;
use PhpOffice\PhpWord\Element\CheckBox;
use PhpOffice\PhpWord\Element\Image;
use PhpOffice\PhpWord\Element\Link;
use PhpOffice\PhpWord\Element\ListItem;
use PhpOffice\PhpWord\Element\Object;
use PhpOffice\PhpWord\Element\TextBreak;
use PhpOffice\PhpWord\Element\TextRun;
use PhpOffice\PhpWord\Media;
use PhpOffice\PhpWord\PhpWord;
@ -303,7 +304,7 @@ abstract class AbstractContainer extends AbstractElement
private function checkValidity($method)
{
// Valid containers for each element
$allContainers = array('section', 'header', 'footer', 'cell', 'textrun', 'footnote', 'endnote');
$allContainers = array('section', 'header', 'footer', 'cell', 'textrun', 'footnote', 'endnote', 'textbox');
$validContainers = array(
'Text' => $allContainers,
'Link' => $allContainers,
@ -355,7 +356,7 @@ abstract class AbstractContainer extends AbstractElement
$docPart = $isCellTextrun ? $this->getDocPart() : $this->container;
$docPartId = $isCellTextrun ? $this->getDocPartId() : $this->sectionId;
$inHeaderFooter = ($docPart == 'header' || $docPart == 'footer');
$docPartId = $inHeaderFooter ? $this->getDocPartId() : $docPartId;
return $inHeaderFooter ? $docPart . $docPartId : $docPart;
}

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/
@ -19,13 +27,11 @@ use PhpOffice\PhpWord\Style;
*/
abstract class AbstractElement
{
/**
* PhpWord object
*/
protected $phpWord;
/**
* Container type section|header|footer|cell|textrun|footnote|endnote
* Container type section|header|footer|cell|textrun|footnote|endnote|textbox
*
* @var string
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,16 +1,22 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/
namespace PhpOffice\PhpWord\Element;
use PhpOffice\PhpWord\Element\Table;
/**
* Footer element
*/
@ -109,6 +115,21 @@ class Footer extends AbstractContainer
return $this->type = self::EVEN;
}
/**
* Add textbox element
*
* @param mixed $style
* @return \PhpOffice\PhpWord\Element\TextBox
* @todo Merge with the same function on Section
*/
public function addTextBox($style = null)
{
$textbox = new TextBox($this->getDocPart(), $this->getDocPartId(), $style);
$this->addElement($textbox);
return $textbox;
}
/**
* Add table element
*

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,16 +1,24 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/
namespace PhpOffice\PhpWord\Element;
use PhpOffice\PhpWord\Style\Image as ImageStyle;
use PhpOffice\PhpWord\Exception\InvalidObjectException;
use PhpOffice\PhpWord\Style\Image as ImageStyle;
/**
* Object element

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,18 +1,22 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/
namespace PhpOffice\PhpWord\Element;
use PhpOffice\PhpWord\Element\PageBreak;
use PhpOffice\PhpWord\Element\TOC;
use PhpOffice\PhpWord\Element\Table;
use PhpOffice\PhpWord\Element\Title;
use PhpOffice\PhpWord\Exception\Exception;
use PhpOffice\PhpWord\PhpWord;
use PhpOffice\PhpWord\Style\Section as SectionSettings;
@ -113,6 +117,21 @@ class Section extends AbstractContainer
$this->addElement(new PageBreak());
}
/**
* Add textbox element
*
* @param mixed $style
* @return \PhpOffice\PhpWord\Element\TextBox
* @todo Merge with the same function on Footer
*/
public function addTextBox($style = null)
{
$textbox = new TextBox($this->getDocPart(), $this->getDocPartId(), $style);
$this->addElement($textbox);
return $textbox;
}
/**
* Add table element
*

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -0,0 +1,57 @@
<?php
/**
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* 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 version 3
*/
namespace PhpOffice\PhpWord\Element;
use PhpOffice\PhpWord\Style\TextBox as TextBoxStyle;
/**
* Table element
*/
class TextBox extends AbstractContainer
{
/**
* TextBox style
*
* @var \PhpOffice\PhpWord\Style\TextBox
*/
private $style;
/**
* Create a new textbox
*
* @param string $docPart
* @param integer $docPartId
* @param mixed $style
*/
public function __construct($docPart, $docPartId, $style = null)
{
$this->container = 'textbox';
$this->setDocPart($docPart, $docPartId);
$this->style = $this->setStyle(new TextBoxStyle(), $style);
}
/**
* Get textbox style
*
* @return \PhpOffice\PhpWord\Style\TextBox
*/
public function getStyle()
{
return $this->style;
}
}

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,16 +1,24 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/
namespace PhpOffice\PhpWord\Element;
use PhpOffice\PhpWord\Style;
use PhpOffice\PhpWord\Shared\String;
use PhpOffice\PhpWord\Style;
/**
* Title element

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/
@ -12,11 +20,9 @@ namespace PhpOffice\PhpWord;
use PhpOffice\PhpWord\Collection\Endnotes;
use PhpOffice\PhpWord\Collection\Footnotes;
use PhpOffice\PhpWord\Collection\Titles;
use PhpOffice\PhpWord\DocumentProperties;
use PhpOffice\PhpWord\Element\Section;
use PhpOffice\PhpWord\Exception\Exception;
use PhpOffice\PhpWord\Style;
use PhpOffice\PhpWord\Template;
/**
* PHPWord main class

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/
@ -12,12 +20,19 @@ namespace PhpOffice\PhpWord\Reader\Word2007;
/**
* Endnotes reader
*/
class Endnotes extends Notes
class Endnotes extends Footnotes
{
/**
* Note type = endnotes
* Collection name
*
* @var string
*/
protected $type = 'endnotes';
protected $collection = 'endnotes';
/**
* Element name
*
* @var string
*/
protected $element = 'endnote';
}

View File

@ -1,23 +1,74 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/
namespace PhpOffice\PhpWord\Reader\Word2007;
use PhpOffice\PhpWord\PhpWord;
use PhpOffice\PhpWord\Shared\XMLReader;
/**
* Footnotes reader
*/
class Footnotes extends Notes
class Footnotes extends AbstractPart
{
/**
* Note type = footnotes
* Collection name footnotes|endnotes
*
* @var string
*/
protected $type = 'footnotes';
protected $collection = 'footnotes';
/**
* Element name footnote|endnote
*
* @var string
*/
protected $element = 'footnote';
/**
* Read (footnotes|endnotes).xml
*
* @param \PhpOffice\PhpWord\PhpWord $phpWord
*/
public function read(PhpWord &$phpWord)
{
$getMethod = "get{$this->collection}";
$collection = $phpWord->$getMethod()->getItems();
$xmlReader = new XMLReader();
$xmlReader->getDomFromZip($this->docFile, $this->xmlFile);
$nodes = $xmlReader->getElements('*');
if ($nodes->length > 0) {
foreach ($nodes as $node) {
$id = $xmlReader->getAttribute('w:id', $node);
$type = $xmlReader->getAttribute('w:type', $node);
// Avoid w:type "separator" and "continuationSeparator"
// Only look for <footnote> or <endnote> without w:type attribute
if (is_null($type) && array_key_exists($id, $collection)) {
$element = $collection[$id];
$pNodes = $xmlReader->getElements('w:p/*', $node);
foreach ($pNodes as $pNode) {
$this->readRun($xmlReader, $pNode, $element, $this->collection);
}
$addMethod = "add{$this->element}";
$phpWord->$addMethod($element);
}
}
}
}
}

View File

@ -1,60 +0,0 @@
<?php
/**
* PHPWord
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/
namespace PhpOffice\PhpWord\Reader\Word2007;
use PhpOffice\PhpWord\PhpWord;
use PhpOffice\PhpWord\Shared\XMLReader;
/**
* Notes reader
*/
class Notes extends AbstractPart
{
/**
* Note type footnotes|endnotes
*
* @var string
*/
protected $type = 'footnotes';
/**
* Read (footnotes|endnotes).xml
*
* @param \PhpOffice\PhpWord\PhpWord $phpWord
*/
public function read(PhpWord &$phpWord)
{
$this->type = ($this->type == 'endnotes') ? 'endnotes' : 'footnotes';
$getMethod = 'get' . $this->type;
$collection = $phpWord->$getMethod()->getItems();
$xmlReader = new XMLReader();
$xmlReader->getDomFromZip($this->docFile, $this->xmlFile);
$nodes = $xmlReader->getElements('*');
if ($nodes->length > 0) {
foreach ($nodes as $node) {
$id = $xmlReader->getAttribute('w:id', $node);
$type = $xmlReader->getAttribute('w:type', $node);
// Avoid w:type "separator" and "continuationSeparator"
// Only look for <footnote> or <endnote> without w:type attribute
if (is_null($type) && array_key_exists($id, $collection)) {
$element = $collection[$id];
$pNodes = $xmlReader->getElements('w:p/*', $node);
foreach ($pNodes as $pNode) {
$this->readRun($xmlReader, $pNode, $element, $this->type);
}
$addMethod = 'add' . ($this->type == 'endnotes' ? 'endnote' : 'footnote');
$phpWord->$addMethod($element);
}
}
}
}
}

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,10 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/
namespace PhpOffice\PhpWord\Style;
@ -31,7 +38,7 @@ class Image extends AbstractStyle
* @const string
*/
const POSITION_HORIZONTAL_LEFT = 'left';
const POSITION_HORIZONTAL_CENTER = 'centered';
const POSITION_HORIZONTAL_CENTER = 'center';
const POSITION_HORIZONTAL_RIGHT = 'right';
/**

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/
@ -17,20 +25,34 @@ namespace PhpOffice\PhpWord\Style;
*/
class Shading extends AbstractStyle
{
/**
* Pattern constants (partly)
*
* @const string
* @link http://www.schemacentral.com/sc/ooxml/t-w_ST_Shd.html
*/
const PATTERN_CLEAR = 'clear'; // No pattern
const PATTERN_SOLID = 'solid'; // 100% fill pattern
const PATTERN_HSTRIPE = 'horzStripe'; // Horizontal stripe pattern
const PATTERN_VSTRIPE = 'vertStripe'; // Vertical stripe pattern
const PATTERN_DSTRIPE = 'diagStripe'; // Diagonal stripe pattern
const PATTERN_HCROSS = 'horzCross'; // Horizontal cross pattern
const PATTERN_DCROSS = 'diagCross'; // Diagonal cross pattern
/**
* Shading pattern
*
* @var string
* @link http://www.schemacentral.com/sc/ooxml/t-w_ST_Shd.html
*/
private $pattern = 'clear';
private $pattern = self::PATTERN_CLEAR;
/**
* Shading pattern color
*
* @var string
*/
private $color = 'auto';
private $color;
/**
* Shading background color
@ -67,7 +89,10 @@ class Shading extends AbstractStyle
*/
public function setPattern($value = null)
{
$this->pattern = $value;
$enum = array(self::PATTERN_CLEAR, self::PATTERN_SOLID, self::PATTERN_HSTRIPE,
self::PATTERN_VSTRIPE, self::PATTERN_DSTRIPE, self::PATTERN_HCROSS, self::PATTERN_DCROSS);
$this->pattern = $this->setEnumVal($value, $enum, $this->pattern);
return $this;
}

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/
@ -14,6 +22,12 @@ namespace PhpOffice\PhpWord\Style;
*/
class TOC extends Tab
{
/**
* Tab leader types for backward compatibility
*
* @const string
* @deprecated 0.11.0
*/
const TABLEADER_DOT = self::TAB_LEADER_DOT;
const TABLEADER_UNDERSCORE = self::TAB_LEADER_UNDERSCORE;
const TABLEADER_LINE = self::TAB_LEADER_HYPHEN;
@ -24,8 +38,7 @@ class TOC extends Tab
*
* @var int
*/
private $indent;
private $indent = 200;
/**
* Create a new TOC Style
@ -33,7 +46,6 @@ class TOC extends Tab
public function __construct()
{
parent::__construct(self::TAB_STOP_RIGHT, 9062, self::TABLEADER_DOT);
$this->indent = 200;
}
/**

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/
@ -135,6 +143,8 @@ class Table extends Border
{
if (!is_null($this->shading)) {
return $this->shading->getFill();
} else {
return null;
}
}

View File

@ -0,0 +1,641 @@
<?php
/**
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* 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 version 3
*/
namespace PhpOffice\PhpWord\Style;
/**
* TextBox style
*/
class TextBox extends AbstractStyle
{
/**
* Wrapping styles
*
* @const string
*/
const WRAPPING_STYLE_INLINE = 'inline';
const WRAPPING_STYLE_SQUARE = 'square';
const WRAPPING_STYLE_TIGHT = 'tight';
const WRAPPING_STYLE_BEHIND = 'behind';
const WRAPPING_STYLE_INFRONT = 'infront';
/**
* Horizontal alignment
*
* @const string
*/
const POSITION_HORIZONTAL_LEFT = 'left';
const POSITION_HORIZONTAL_CENTER = 'center';
const POSITION_HORIZONTAL_RIGHT = 'right';
/**
* Vertical alignment
*
* @const string
*/
const POSITION_VERTICAL_TOP = 'top';
const POSITION_VERTICAL_CENTER = 'center';
const POSITION_VERTICAL_BOTTOM = 'bottom';
const POSITION_VERTICAL_INSIDE = 'inside';
const POSITION_VERTICAL_OUTSIDE = 'outside';
/**
* Position relative to
*
* @const string
*/
const POSITION_RELATIVE_TO_MARGIN = 'margin';
const POSITION_RELATIVE_TO_PAGE = 'page';
const POSITION_RELATIVE_TO_COLUMN = 'column';
const POSITION_RELATIVE_TO_CHAR = 'char';
const POSITION_RELATIVE_TO_LMARGIN = 'left-margin-area';
const POSITION_RELATIVE_TO_RMARGIN = 'right-margin-area';
const POSITION_RELATIVE_TO_IMARGIN = 'inner-margin-area';
const POSITION_RELATIVE_TO_OMARGIN = 'outer-margin-area';
const POSITION_RELATIVE_TO_LINE = 'line';
const POSITION_RELATIVE_TO_TMARGIN = 'top-margin-area';
const POSITION_RELATIVE_TO_BMARGIN = 'bottom-margin-area';
/**
* Position type, relative/absolute
*
* @const string
*/
const POSITION_RELATIVE = 'relative';
const POSITION_ABSOLUTE = 'absolute';
/**
* TextBox width
*
* @var int
*/
private $width;
/**
* TextBox height
*
* @var int
*/
private $height;
/**
* Alignment
*
* @var string
*/
private $align;
/**
* Margin Top
*
* @var int
*/
private $marginTop;
/**
* Margin Left
*
* @var int
*/
private $marginLeft;
/**
* Wrapping style
*
* @var string
*/
private $wrappingStyle;
/**
* Positioning type (relative or absolute)
*
* @var string
*/
private $positioning;
/**
* Horizontal alignment
*
* @var string
*/
private $posHorizontal;
/**
* Horizontal Relation
*
* @var string
*/
private $posHorizontalRel;
/**
* Vertical alignment
*
* @var string
*/
private $posVertical;
/**
* Vertical Relation
*
* @var string
*/
private $posVerticalRel;
/**
* margin top
*
* @var int
*/
private $innerMarginTop = null;
/**
* margin left
*
* @var int
*/
private $innerMarginLeft = null;
/**
* margin right
*
* @var int
*/
private $innerMarginRight = null;
/**
* Cell margin bottom
*
* @var int
*/
private $innerMarginBottom = null;
/**
* border size
*
* @var int
*/
private $borderSize = null;
/**
* border color
*
* @var string
*/
private $borderColor;
/**
* Create new textbox style
*/
public function __construct()
{
$this->setWrappingStyle(self::WRAPPING_STYLE_INLINE);
$this->setPosHorizontal(self::POSITION_HORIZONTAL_LEFT);
$this->setPosHorizontalRel(self::POSITION_RELATIVE_TO_CHAR);
$this->setPosVertical(self::POSITION_VERTICAL_TOP);
$this->setPosVerticalRel(self::POSITION_RELATIVE_TO_LINE);
}
/**
* Get width
*/
public function getWidth()
{
return $this->width;
}
/**
* Set width
*
* @param int $value
*/
public function setWidth($value = null)
{
$this->width = $value;
}
/**
* Get height
*/
public function getHeight()
{
return $this->height;
}
/**
* Set height
*
* @param int $value
*/
public function setHeight($value = null)
{
$this->height = $value;
}
/**
* Get alignment
*/
public function getAlign()
{
return $this->align;
}
/**
* Set alignment
*
* @param string $value
*/
public function setAlign($value = null)
{
$this->align = $value;
}
/**
* Get Margin Top
*
* @return int
*/
public function getMarginTop()
{
return $this->marginTop;
}
/**
* Set Margin Top
*
* @param int $value
* @return self
*/
public function setMarginTop($value = null)
{
$this->marginTop = $value;
return $this;
}
/**
* Get Margin Left
*
* @return int
*/
public function getMarginLeft()
{
return $this->marginLeft;
}
/**
* Set Margin Left
*
* @param int $value
* @return self
*/
public function setMarginLeft($value = null)
{
$this->marginLeft = $value;
return $this;
}
/**
* Get wrapping style
*
* @return string
*/
public function getWrappingStyle()
{
return $this->wrappingStyle;
}
/**
* Set wrapping style
*
* @param string $wrappingStyle
* @throws \InvalidArgumentException
* @return self
*/
public function setWrappingStyle($wrappingStyle)
{
$enum = array(self::WRAPPING_STYLE_INLINE, self::WRAPPING_STYLE_INFRONT, self::WRAPPING_STYLE_BEHIND,
self::WRAPPING_STYLE_SQUARE, self::WRAPPING_STYLE_TIGHT);
if (in_array($wrappingStyle, $enum)) {
$this->wrappingStyle = $wrappingStyle;
} else {
throw new \InvalidArgumentException('Invalid wrapping style.');
}
return $this;
}
/**
* Get positioning type
*
* @return string
*/
public function getPositioning()
{
return $this->positioning;
}
/**
* Set positioning type
*
* @param string $positioning
* @throws \InvalidArgumentException
* @return self
*/
public function setPositioning($positioning)
{
$enum = array(self::POSITION_RELATIVE, self::POSITION_ABSOLUTE);
if (in_array($positioning, $enum)) {
$this->positioning = $positioning;
} else {
throw new \InvalidArgumentException('Invalid positioning.');
}
return $this;
}
/**
* Get horizontal alignment
*
* @return string
*/
public function getPosHorizontal()
{
return $this->posHorizontal;
}
/**
* Set horizontal alignment
*
* @param string $alignment
* @throws \InvalidArgumentException
* @return self
*/
public function setPosHorizontal($alignment)
{
$enum = array(self::POSITION_HORIZONTAL_LEFT, self::POSITION_HORIZONTAL_CENTER,
self::POSITION_HORIZONTAL_RIGHT);
if (in_array($alignment, $enum)) {
$this->posHorizontal = $alignment;
} else {
throw new \InvalidArgumentException('Invalid horizontal alignment.');
}
return $this;
}
/**
* Get vertical alignment
*
* @return string
*/
public function getPosVertical()
{
return $this->posVertical;
}
/**
* Set vertical alignment
*
* @param string $alignment
* @throws \InvalidArgumentException
* @return self
*/
public function setPosVertical($alignment)
{
$enum = array(self::POSITION_VERTICAL_TOP, self::POSITION_VERTICAL_CENTER,
self::POSITION_VERTICAL_BOTTOM, self::POSITION_VERTICAL_INSIDE, self::POSITION_VERTICAL_OUTSIDE);
if (in_array($alignment, $enum)) {
$this->posVertical = $alignment;
} else {
throw new \InvalidArgumentException('Invalid vertical alignment.');
}
return $this;
}
/**
* Get horizontal relation
*
* @return string
*/
public function getPosHorizontalRel()
{
return $this->posHorizontalRel;
}
/**
* Set horizontal relation
*
* @param string $relto
* @throws \InvalidArgumentException
* @return self
*/
public function setPosHorizontalRel($relto)
{
$enum = array(self::POSITION_RELATIVE_TO_MARGIN, self::POSITION_RELATIVE_TO_PAGE,
self::POSITION_RELATIVE_TO_COLUMN, self::POSITION_RELATIVE_TO_CHAR,
self::POSITION_RELATIVE_TO_LMARGIN, self::POSITION_RELATIVE_TO_RMARGIN,
self::POSITION_RELATIVE_TO_IMARGIN, self::POSITION_RELATIVE_TO_OMARGIN);
if (in_array($relto, $enum)) {
$this->posHorizontalRel = $relto;
} else {
throw new \InvalidArgumentException('Invalid relative horizontal alignment.');
}
return $this;
}
/**
* Get vertical relation
*
* @return string
*/
public function getPosVerticalRel()
{
return $this->posVerticalRel;
}
/**
* Set vertical relation
*
* @param string $relto
* @throws \InvalidArgumentException
* @return self
*/
public function setPosVerticalRel($relto)
{
$enum = array(self::POSITION_RELATIVE_TO_MARGIN, self::POSITION_RELATIVE_TO_PAGE,
self::POSITION_RELATIVE_TO_LINE,
self::POSITION_RELATIVE_TO_TMARGIN, self::POSITION_RELATIVE_TO_BMARGIN,
self::POSITION_RELATIVE_TO_IMARGIN, self::POSITION_RELATIVE_TO_OMARGIN);
if (in_array($relto, $enum)) {
$this->posVerticalRel = $relto;
} else {
throw new \InvalidArgumentException('Invalid relative vertical alignment.');
}
return $this;
}
/**
* Set margin top
*
* @param int $value
*/
public function setInnerMarginTop($value = null)
{
$this->innerMarginTop = $value;
}
/**
* Get margin top
*
* @return int
*/
public function getInnerMarginTop()
{
return $this->innerMarginTop;
}
/**
* Set margin left
*
* @param int $value
*/
public function setInnerMarginLeft($value = null)
{
$this->innerMarginLeft = $value;
}
/**
* Get margin left
*
* @return int
*/
public function getInnerMarginLeft()
{
return $this->innerMarginLeft;
}
/**
* Set margin right
*
* @param int $value
*/
public function setInnerMarginRight($value = null)
{
$this->innerMarginRight = $value;
}
/**
* Get margin right
*
* @return int
*/
public function getInnerMarginRight()
{
return $this->innerMarginRight;
}
/**
* Set margin bottom
*
* @param int $value
*/
public function setInnerMarginBottom($value = null)
{
$this->innerMarginBottom = $value;
}
/**
* Get margin bottom
*
* @return int
*/
public function getInnerMarginBottom()
{
return $this->innerMarginBottom;
}
/**
* Set TLRB cell margin
*
* @param int $value Margin in twips
*/
public function setInnerMargin($value = null)
{
$this->setInnerMarginTop($value);
$this->setInnerMarginLeft($value);
$this->setInnerMarginRight($value);
$this->setInnerMarginBottom($value);
}
/**
* Get cell margin
*
* @return int[]
*/
public function getInnerMargin()
{
return array($this->innerMarginLeft, $this->innerMarginTop, $this->innerMarginRight, $this->innerMarginBottom);
}
/**
* Set border size
*
* @param int $value Size in points
*/
public function setBorderSize($value = null)
{
$this->borderSize = $value;
}
/**
* Get border size
*
* @return int
*/
public function getBorderSize()
{
return $this->borderSize;
}
/**
* Set border color
*
* @param string $value
*/
public function setBorderColor($value = null)
{
$this->borderColor = $value;
}
/**
* Get border color
*
* @return string
*/
public function getBorderColor()
{
return $this->borderColor;
}
}

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

View File

@ -1,9 +1,17 @@
<?php
/**
* PHPWord
* This file is part of PHPWord - A pure PHP library for reading and writing
* word processing documents.
*
* PHPWord is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full copyright and license information, please read the LICENSE
* file that was distributed with this source code. For the full list of
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors.
*
* @link https://github.com/PHPOffice/PHPWord
* @copyright 2014 PHPWord
* @copyright 2010-2014 PHPWord contributors
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
*/

Some files were not shown because too many files have changed in this diff Show More