This commit is contained in:
Progi1984 2014-02-24 19:38:09 +01:00
commit 4ffa261a6c
67 changed files with 339 additions and 168 deletions

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -20,8 +20,8 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,8 +20,8 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/
@ -150,6 +150,14 @@ class PHPWord_Section_Settings
*/
private $_borderBottomColor;
/**
* Page Numbering Start
*
* @var int
*/
private $pageNumberingStart;
/**
* Create new Section Settings
*/
@ -542,4 +550,22 @@ class PHPWord_Section_Settings
{
return $this->_borderBottomColor;
}
/**
* @param null|int $pageNumberingStart
* @return $this
*/
public function setPageNumberingStart($pageNumberingStart = null)
{
$this->pageNumberingStart = $pageNumberingStart;
return $this;
}
/**
* @return null|int
*/
public function getPageNumberingStart()
{
return $this->pageNumberingStart;
}
}

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/
@ -80,11 +80,10 @@ class PHPWord_Section_Table_Cell
$this->_insideOf = $insideOf;
$this->_pCount = $pCount;
$this->_width = $width;
$this->_style = new PHPWord_Style_Cell;
if (!is_null($style)) {
if (is_array($style)) {
$this->_style = new PHPWord_Style_Cell();
foreach ($style as $key => $value) {
if (substr($key, 0, 1) != '_') {
$key = '_' . $key;

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,8 +20,8 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,8 +20,8 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,8 +20,8 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,8 +20,8 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,8 +20,8 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,8 +20,8 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,8 +20,8 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,8 +20,8 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/
@ -123,19 +123,19 @@ class PHPWord_Writer_Word2007_Document extends PHPWord_Writer_Word2007_Base
private function _writeEndSection(PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Section $section)
{
$_settings = $section->getSettings();
$settings = $section->getSettings();
$_headers = $section->getHeaders();
$_footer = $section->getFooter();
$pgSzW = $_settings->getPageSizeW();
$pgSzH = $_settings->getPageSizeH();
$orientation = $_settings->getOrientation();
$pgSzW = $settings->getPageSizeW();
$pgSzH = $settings->getPageSizeH();
$orientation = $settings->getOrientation();
$marginTop = $_settings->getMarginTop();
$marginLeft = $_settings->getMarginLeft();
$marginRight = $_settings->getMarginRight();
$marginBottom = $_settings->getMarginBottom();
$marginTop = $settings->getMarginTop();
$marginLeft = $settings->getMarginLeft();
$marginRight = $settings->getMarginRight();
$marginBottom = $settings->getMarginBottom();
$borders = $_settings->getBorderSize();
$borders = $settings->getBorderSize();
$objWriter->startElement('w:sectPr');
@ -182,7 +182,7 @@ class PHPWord_Writer_Word2007_Document extends PHPWord_Writer_Word2007_Base
if (!is_null($borders[0]) || !is_null($borders[1]) || !is_null($borders[2]) || !is_null($borders[3])) {
$borderColor = $_settings->getBorderColor();
$borderColor = $settings->getBorderColor();
$objWriter->startElement('w:pgBorders');
$objWriter->writeAttribute('w:offsetFrom', 'page');
@ -225,6 +225,12 @@ class PHPWord_Writer_Word2007_Document extends PHPWord_Writer_Word2007_Base
$objWriter->endElement();
}
// Page numbering
if (null !== $settings->getPageNumberingStart()) {
$objWriter->startElement('w:pgNumType');
$objWriter->writeAttribute('w:start', $section->getSettings()->getPageNumberingStart());
$objWriter->endElement();
}
$objWriter->startElement('w:cols');
$objWriter->writeAttribute('w:space', '720');
@ -245,7 +251,7 @@ class PHPWord_Writer_Word2007_Document extends PHPWord_Writer_Word2007_Base
$objWriter->endElement();
}
private function _writeListItem(PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Section_ListItem $listItem)
public function _writeListItem(PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Section_ListItem $listItem)
{
$textObject = $listItem->getTextObject();
$text = $textObject->getText();

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -2,7 +2,7 @@
/**
* PHPWord
*
* Copyright (c) 2013 PHPWord
* Copyright (c) 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -20,7 +20,7 @@
*
* @category PHPWord
* @package PHPWord
* @copyright Copyright (c) 2013 PHPWord
* @copyright Copyright (c) 2014 PHPWord
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version 0.7.0
*/

View File

@ -1,19 +1,20 @@
# PHPWord - OpenXML - Read, Write and Create Word documents in PHP
# PHPWord
[![Build Status](https://travis-ci.org/PHPOffice/PHPWord.png?branch=master)](https://travis-ci.org/PHPOffice/PHPWord)
__OpenXML - Read, Write and Create Word documents in PHP.__
PHPWord is a library written in PHP that create word documents.
PHPWord is a library written in PHP that create word documents.
No Windows operating system is needed for usage because the result are docx files (Office Open XML) that can be
opened by all major office software.
## Want to contribute?
Fork us!
__Want to contribute?__ Fork us!
## Requirements
* PHP version 5.3.0 or higher
## License
PHPWord is licensed under [LGPL (GNU LESSER GENERAL PUBLIC LICENSE)](https://github.com/PHPOffice/PHPWord/blob/master/license.md)
## Installation
It is recommended that you install the PHPWord library [through composer](http://getcomposer.org/). To do so, add
@ -27,7 +28,19 @@ the following lines to your ``composer.json``.
}
```
## Usage
## Documentation
### Table of contents
1. [Basic usage](#basic-usage)
2. [Sections](#sections)
* [Change Section Page Numbering](#sections-page-numbering)
3. [Tables](#tables)
* [Cell Style](#tables-cell-style)
4. [Images](#images)
<a name="basic-usage"></a>
#### Basic usage
The following is a basic example of the PHPWord library.
@ -59,7 +72,44 @@ $objWriter = PHPWord_IOFactory::createWriter($PHPWord, 'Word2007');
$objWriter->save('helloWorld.docx');
```
## Images
<a name="sections"></a>
#### Sections
<a name="sections-page-numbering"></a>
##### Change Section Page Numbering
You can change a section page numbering.
```php
$section = $PHPWord->createSection();
$section->getSettings()->setPageNumberingStart(1);
```
<a name="tables"></a>
#### Tables
The following illustrates how to create a table.
```php
$table = $section->addTable();
$table->addRow();
$table->addCell();
```
<a name="tables-cell-style"></a>
##### Cell Style
###### Cell Span
You can span a cell on multiple columms.
```php
$cell = $table->addCell(200);
$cell->getStyle()->setGridSpan(5);
```
<a name="images"></a>
#### Images
You can add images easily using the following example.
@ -69,16 +119,16 @@ $section->addImage('mars.jpg');
```
Images settings include:
* ``width`` width in pixels
* ``height`` height in pixels
* ``align`` image alignment, __left__, __right__ or __center__
* ``marginTop`` top margin in inches, can be negative
* ``marginLeft`` left margin in inches, can be negative
* ``wrappingStyle`` can be inline, __square__, __tight__, __behind__, __infront__
* ``width`` width in pixels
* ``height`` height in pixels
* ``align`` image alignment, _left_, _right_ or _center_
* ``marginTop`` top margin in inches, can be negative
* ``marginLeft`` left margin in inches, can be negative
* ``wrappingStyle`` can be _inline_, _square_, _tight_, _behind_, _infront_
To add an image with settings, consider the following example.
To add an image with settings, consider the following example.
```php
```php
$section->addImage(
'mars.jpg',
array(
@ -86,7 +136,7 @@ $section->addImage(
'height' => 100,
'marginTop' => -1,
'marginLeft' => -1,
wrappingStyle => 'behind'
'wrappingStyle' => 'behind'
)
);
```

View File

@ -0,0 +1,82 @@
<?php
namespace PHPWord\Tests;
use PHPUnit_Framework_TestCase;
use PHPWord;
use PHPWord_Writer_Word2007;
use PHPWord_Writer_Word2007_Base;
/**
* Class PHPWord_Writer_Word2007_BaseTest
* @package PHPWord\Tests
* @runTestsInSeparateProcesses
*/
class PHPWord_Writer_Word2007_BaseTest extends \PHPUnit_Framework_TestCase {
/**
* Executed before each method of the class
*/
public function tearDown()
{
TestHelperDOCX::clear();
}
public function testWriteImage_Position()
{
$PHPWord = new PHPWord();
$section = $PHPWord->createSection();
$section->addImage(
PHPWORD_TESTS_DIR_ROOT . '/_files/images/earth.jpg',
array(
'marginTop' => -1,
'marginLeft' => -1,
'wrappingStyle' => 'behind'
)
);
$doc = TestHelperDOCX::getDocument($PHPWord);
$element = $doc->getElement('/w:document/w:body/w:p/w:r/w:pict/v:shape');
$style = $element->getAttribute('style');
$this->assertRegExp('/z\-index:\-[0-9]*/', $style);
$this->assertRegExp('/position:absolute;/', $style);
}
public function testWriteParagraphStyle_Align()
{
$PHPWord = new PHPWord();
$section = $PHPWord->createSection();
$section->addText('This is my text', null, array('align' => 'right'));
$doc = TestHelperDOCX::getDocument($PHPWord);
$element = $doc->getElement('/w:document/w:body/w:p/w:pPr/w:jc');
$this->assertEquals('right', $element->getAttribute('w:val'));
}
public function testWriteCellStyle_CellGridSpan()
{
$PHPWord = new PHPWord();
$section = $PHPWord->createSection();
$table = $section->addTable();
$table->addRow();
$cell = $table->addCell(200);
$cell->getStyle()->setGridSpan(5);
$table->addRow();
$table->addCell(40);
$table->addCell(40);
$table->addCell(40);
$table->addCell(40);
$table->addCell(40);
$doc = TestHelperDOCX::getDocument($PHPWord);
$element = $doc->getElement('/w:document/w:body/w:tbl/w:tr/w:tc/w:tcPr/w:gridSpan');
$this->assertEquals(5, $element->getAttribute('w:val'));
}
}

View File

@ -1,7 +1,7 @@
**************************************************************************************
* PHPWord
*
* Copyright (c) 2011 - 2013 PHPWord
* Copyright (c) 2011 - 2014 PHPWord
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -17,11 +17,16 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* @copyright Copyright (c) 2011 - 2013 PHPWord (https://github.com/PHPOffice/PHPWord/)
* @copyright Copyright (c) 2011 - 2014 PHPWord (https://github.com/PHPOffice/PHPWord/)
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
* @version ##VERSION##, ##DATE##
**************************************************************************************
Changes in branch for release 0.7.1 :
- Feature: (gabrielbull) - Word2007 : Support sections page numbering
- Bugfix: (gabrielbull) - Fixed bug with cell styling
- Bugfix: (gabrielbull) - Fixed bug list items inside of cells
Fixed in branch for release 0.7.0 :
- Bugfix: (RomanSyroeshko) GH-32 - "Warning: Invalid error type specified in ...\PHPWord.php on line 226" is thrown when the specified template file is not found
- Bugfix: (RomanSyroeshko) GH-34 - PHPWord_Shared_String.IsUTF8 returns FALSE for Cyrillic UTF-8 input

View File

@ -22,6 +22,9 @@
"php": ">=5.3.0",
"ext-xml": "*"
},
"require-dev": {
"phpunit/phpunit": "3.7.28"
},
"recommend": {
"ext-zip": "*",
"ext-gd2": "*"