Merge pull request #62 from gabrielbull/master
Added section page numbering, fixed bug with cell styling, added unit tests and added documentation
This commit is contained in:
commit
62f8ad8d0b
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
72
README.md
72
README.md
|
|
@ -1,19 +1,20 @@
|
|||
# PHPWord - OpenXML - Read, Write and Create Word documents in PHP
|
||||
# PHPWord
|
||||
|
||||
[](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.
|
||||
|
||||
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.
|
||||
|
||||
|
|
@ -71,10 +121,10 @@ $section->addImage('mars.jpg');
|
|||
Images settings include:
|
||||
* ``width`` width in pixels
|
||||
* ``height`` height in pixels
|
||||
* ``align`` image alignment, __left__, __right__ or __center__
|
||||
* ``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__
|
||||
* ``wrappingStyle`` can be _inline_, _square_, _tight_, _behind_, _infront_
|
||||
|
||||
To add an image with settings, consider the following example.
|
||||
|
||||
|
|
@ -86,7 +136,7 @@ $section->addImage(
|
|||
'height' => 100,
|
||||
'marginTop' => -1,
|
||||
'marginLeft' => -1,
|
||||
wrappingStyle => 'behind'
|
||||
'wrappingStyle' => 'behind'
|
||||
)
|
||||
);
|
||||
```
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -22,6 +22,9 @@
|
|||
"php": ">=5.3.0",
|
||||
"ext-xml": "*"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "3.7.28"
|
||||
},
|
||||
"recommend": {
|
||||
"ext-zip": "*",
|
||||
"ext-gd2": "*"
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ class ImageTest extends PHPUnit_Framework_TestCase
|
|||
public function testImageWrappingStyleBehind()
|
||||
{
|
||||
$PHPWord = new PHPWord();
|
||||
$section = $PHPWord->createSection(12240, 15840, 0, 0, 0, 0);
|
||||
$section = $PHPWord->createSection();
|
||||
|
||||
$section->addImage(
|
||||
__DIR__ . '/_files/images/earth.jpg',
|
||||
|
|
|
|||
|
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
namespace PHPWord\Tests\Section;
|
||||
|
||||
use PHPUnit_Framework_TestCase;
|
||||
use PHPWord;
|
||||
use PHPWord\Tests\TestHelper;
|
||||
|
||||
class PageNumberingTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function tearDown()
|
||||
{
|
||||
TestHelper::clear();
|
||||
}
|
||||
|
||||
public function testSectionPageNumbering()
|
||||
{
|
||||
$PHPWord = new PHPWord();
|
||||
$section = $PHPWord->createSection();
|
||||
$section->getSettings()->setPageNumberingStart(2);
|
||||
|
||||
$doc = TestHelper::getDocument($PHPWord);
|
||||
$element = $doc->getElement('/w:document/w:body/w:sectPr/w:pgNumType');
|
||||
|
||||
$this->assertEquals(2, $element->getAttribute('w:start'));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
namespace PHPWord\Tests\Table;
|
||||
|
||||
use PHPUnit_Framework_TestCase;
|
||||
use PHPWord;
|
||||
use PHPWord\Tests\TestHelper;
|
||||
|
||||
class CellGridSpanTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function tearDown()
|
||||
{
|
||||
TestHelper::clear();
|
||||
}
|
||||
|
||||
public function testCellGridSpan()
|
||||
{
|
||||
$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 = TestHelper::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'));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
namespace PHPWord\Tests\Text;
|
||||
|
||||
use PHPUnit_Framework_TestCase;
|
||||
use PHPWord;
|
||||
use PHPWord\Tests\TestHelper;
|
||||
|
||||
class AlignTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function tearDown()
|
||||
{
|
||||
TestHelper::clear();
|
||||
}
|
||||
|
||||
public function testAlign()
|
||||
{
|
||||
$PHPWord = new PHPWord();
|
||||
$section = $PHPWord->createSection();
|
||||
|
||||
$section->addText('This is my text', null, array('align' => 'right'));
|
||||
|
||||
$doc = TestHelper::getDocument($PHPWord);
|
||||
$element = $doc->getElement('/w:document/w:body/w:p/w:pPr/w:jc');
|
||||
|
||||
$this->assertEquals('right', $element->getAttribute('w:val'));
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue