DocBlock corrections
This commit is contained in:
parent
12a79779bf
commit
fca9e532cf
|
|
@ -188,8 +188,8 @@ class PHPWord
|
||||||
/**
|
/**
|
||||||
* Adds a paragraph style definition to styles.xml
|
* Adds a paragraph style definition to styles.xml
|
||||||
*
|
*
|
||||||
* @param $styleName string
|
* @param string $styleName
|
||||||
* @param $styles array
|
* @param array $styles
|
||||||
*/
|
*/
|
||||||
public function addParagraphStyle($styleName, $styles)
|
public function addParagraphStyle($styleName, $styles)
|
||||||
{
|
{
|
||||||
|
|
@ -199,8 +199,9 @@ class PHPWord
|
||||||
/**
|
/**
|
||||||
* Adds a font style definition to styles.xml
|
* Adds a font style definition to styles.xml
|
||||||
*
|
*
|
||||||
* @param $styleName string
|
* @param string $styleName
|
||||||
* @param $styles array
|
* @param array $styleFont
|
||||||
|
* @param array $styleParagraph
|
||||||
*/
|
*/
|
||||||
public function addFontStyle($styleName, $styleFont, $styleParagraph = null)
|
public function addFontStyle($styleName, $styleFont, $styleParagraph = null)
|
||||||
{
|
{
|
||||||
|
|
@ -210,8 +211,9 @@ class PHPWord
|
||||||
/**
|
/**
|
||||||
* Adds a table style definition to styles.xml
|
* Adds a table style definition to styles.xml
|
||||||
*
|
*
|
||||||
* @param $styleName string
|
* @param string $styleName
|
||||||
* @param $styles array
|
* @param array $styleTable
|
||||||
|
* @param array $styleFirstRow
|
||||||
*/
|
*/
|
||||||
public function addTableStyle($styleName, $styleTable, $styleFirstRow = null)
|
public function addTableStyle($styleName, $styleTable, $styleFirstRow = null)
|
||||||
{
|
{
|
||||||
|
|
@ -221,8 +223,9 @@ class PHPWord
|
||||||
/**
|
/**
|
||||||
* Adds a heading style definition to styles.xml
|
* Adds a heading style definition to styles.xml
|
||||||
*
|
*
|
||||||
* @param $titleCount int
|
* @param int $titleCount
|
||||||
* @param $styles array
|
* @param array $styleFont
|
||||||
|
* @param array $styleParagraph
|
||||||
*/
|
*/
|
||||||
public function addTitleStyle($titleCount, $styleFont, $styleParagraph = null)
|
public function addTitleStyle($titleCount, $styleFont, $styleParagraph = null)
|
||||||
{
|
{
|
||||||
|
|
@ -232,8 +235,8 @@ class PHPWord
|
||||||
/**
|
/**
|
||||||
* Adds a hyperlink style to styles.xml
|
* Adds a hyperlink style to styles.xml
|
||||||
*
|
*
|
||||||
* @param $styleName string
|
* @param string $styleName
|
||||||
* @param $styles array
|
* @param array $styles
|
||||||
*/
|
*/
|
||||||
public function addLinkStyle($styleName, $styles)
|
public function addLinkStyle($styleName, $styles)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ class PHPWord_Autoloader
|
||||||
/**
|
/**
|
||||||
* Autoloader
|
* Autoloader
|
||||||
*
|
*
|
||||||
* @param string
|
* @param string $class
|
||||||
*/
|
*/
|
||||||
public static function autoload($class)
|
public static function autoload($class)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,29 @@
|
||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
|
* 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
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*
|
||||||
|
* @category PHPWord
|
||||||
|
* @package PHPWord
|
||||||
|
* @copyright Copyright (c) 2014 PHPWord
|
||||||
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
|
* @version 0.8.0
|
||||||
|
*/
|
||||||
namespace PhpOffice\PhpWord\Exceptions;
|
namespace PhpOffice\PhpWord\Exceptions;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,29 @@
|
||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
|
* 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
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*
|
||||||
|
* @category PHPWord
|
||||||
|
* @package PHPWord
|
||||||
|
* @copyright Copyright (c) 2014 PHPWord
|
||||||
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
|
* @version 0.8.0
|
||||||
|
*/
|
||||||
namespace PhpOffice\PhpWord\Exceptions;
|
namespace PhpOffice\PhpWord\Exceptions;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,29 @@
|
||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
|
* 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
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*
|
||||||
|
* @category PHPWord
|
||||||
|
* @package PHPWord
|
||||||
|
* @copyright Copyright (c) 2014 PHPWord
|
||||||
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
|
* @version 0.8.0
|
||||||
|
*/
|
||||||
namespace PhpOffice\PhpWord\Exceptions;
|
namespace PhpOffice\PhpWord\Exceptions;
|
||||||
|
|
||||||
use InvalidArgumentException;
|
use InvalidArgumentException;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,29 @@
|
||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
|
* 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
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*
|
||||||
|
* @category PHPWord
|
||||||
|
* @package PHPWord
|
||||||
|
* @copyright Copyright (c) 2014 PHPWord
|
||||||
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
|
* @version 0.8.0
|
||||||
|
*/
|
||||||
namespace PhpOffice\PhpWord\Exceptions;
|
namespace PhpOffice\PhpWord\Exceptions;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -86,8 +86,7 @@ class PHPWord_Footnote
|
||||||
/**
|
/**
|
||||||
* Add new Footnote Link Element
|
* Add new Footnote Link Element
|
||||||
*
|
*
|
||||||
* @param string $src
|
* @param string $linkSrc
|
||||||
* @param string $type
|
|
||||||
*
|
*
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,8 @@ abstract class PHPWord_Reader_Abstract implements PHPWord_Reader_IReader
|
||||||
protected $readDataOnly = true;
|
protected $readDataOnly = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* File pointer
|
||||||
|
*
|
||||||
* @var bool|resource
|
* @var bool|resource
|
||||||
*/
|
*/
|
||||||
protected $fileHandle = true;
|
protected $fileHandle = true;
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,8 @@ class PHPWord_Section_Footer
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new Footer
|
* Create a new Footer
|
||||||
|
*
|
||||||
|
* @param int $sectionCount
|
||||||
*/
|
*/
|
||||||
public function __construct($sectionCount)
|
public function __construct($sectionCount)
|
||||||
{
|
{
|
||||||
|
|
@ -95,6 +97,7 @@ class PHPWord_Section_Footer
|
||||||
/**
|
/**
|
||||||
* Create a new TextRun
|
* Create a new TextRun
|
||||||
*
|
*
|
||||||
|
* @param null|string|array|PHPWord_Style_Paragraph $styleParagraph
|
||||||
* @return PHPWord_Section_TextRun
|
* @return PHPWord_Section_TextRun
|
||||||
*/
|
*/
|
||||||
public function createTextRun($styleParagraph = null)
|
public function createTextRun($styleParagraph = null)
|
||||||
|
|
|
||||||
|
|
@ -56,8 +56,10 @@ class PHPWord_Section_Footer_PreserveText
|
||||||
/**
|
/**
|
||||||
* Create a new Preserve Text Element
|
* Create a new Preserve Text Element
|
||||||
*
|
*
|
||||||
* @var string $text
|
* @param string $text
|
||||||
* @var mixed $style
|
* @param mixed $styleFont
|
||||||
|
* @param mixed $styleParagraph
|
||||||
|
* @return PHPWord_Section_Footer_PreserveText
|
||||||
*/
|
*/
|
||||||
public function __construct($text = null, $styleFont = null, $styleParagraph = null)
|
public function __construct($text = null, $styleFont = null, $styleParagraph = null)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,8 @@ class PHPWord_Section_Footnote
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new Footnote Element
|
* Create a new Footnote Element
|
||||||
|
*
|
||||||
|
* @param mixed $styleParagraph
|
||||||
*/
|
*/
|
||||||
public function __construct($styleParagraph = null)
|
public function __construct($styleParagraph = null)
|
||||||
{
|
{
|
||||||
|
|
@ -78,8 +80,8 @@ class PHPWord_Section_Footnote
|
||||||
/**
|
/**
|
||||||
* Add a Text Element
|
* Add a Text Element
|
||||||
*
|
*
|
||||||
* @var string $text
|
* @param null|string $text
|
||||||
* @var mixed $styleFont
|
* @param mixed $styleFont
|
||||||
* @return PHPWord_Section_Text
|
* @return PHPWord_Section_Text
|
||||||
*/
|
*/
|
||||||
public function addText($text = null, $styleFont = null)
|
public function addText($text = null, $styleFont = null)
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,8 @@ class PHPWord_Section_Header
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new Header
|
* Create a new Header
|
||||||
|
*
|
||||||
|
* @param int $sectionCount
|
||||||
*/
|
*/
|
||||||
public function __construct($sectionCount)
|
public function __construct($sectionCount)
|
||||||
{
|
{
|
||||||
|
|
@ -124,6 +126,7 @@ class PHPWord_Section_Header
|
||||||
/**
|
/**
|
||||||
* Create a new TextRun
|
* Create a new TextRun
|
||||||
*
|
*
|
||||||
|
* @param mixed $styleParagraph
|
||||||
* @return PHPWord_Section_TextRun
|
* @return PHPWord_Section_TextRun
|
||||||
*/
|
*/
|
||||||
public function createTextRun($styleParagraph = null)
|
public function createTextRun($styleParagraph = null)
|
||||||
|
|
|
||||||
|
|
@ -70,10 +70,10 @@ class PHPWord_Section_Link
|
||||||
/**
|
/**
|
||||||
* Create a new Link Element
|
* Create a new Link Element
|
||||||
*
|
*
|
||||||
* @var string $linkSrc
|
* @param string $linkSrc
|
||||||
* @var string $linkName
|
* @param string $linkName
|
||||||
* @var mixed $styleFont
|
* @param mixed $styleFont
|
||||||
* @var mixed $styleParagraph
|
* @param mixed $styleParagraph
|
||||||
*/
|
*/
|
||||||
public function __construct($linkSrc, $linkName = null, $styleFont = null, $styleParagraph = null)
|
public function __construct($linkSrc, $linkName = null, $styleFont = null, $styleParagraph = null)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -58,8 +58,9 @@ class PHPWord_Section_ListItem
|
||||||
*
|
*
|
||||||
* @param string $text
|
* @param string $text
|
||||||
* @param int $depth
|
* @param int $depth
|
||||||
* @param mixed $styleText
|
* @param mixed $styleFont
|
||||||
* @param mixed $styleList
|
* @param mixed $styleList
|
||||||
|
* @param mixed $styleParagraph
|
||||||
*/
|
*/
|
||||||
public function __construct($text, $depth = 0, $styleFont = null, $styleList = null, $styleParagraph = null)
|
public function __construct($text, $depth = 0, $styleFont = null, $styleList = null, $styleParagraph = null)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -158,11 +158,15 @@ class PHPWord_Section_Settings
|
||||||
private $pageNumberingStart;
|
private $pageNumberingStart;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Header height
|
||||||
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
private $headerHeight;
|
private $headerHeight;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Footer height
|
||||||
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
private $footerHeight;
|
private $footerHeight;
|
||||||
|
|
@ -594,6 +598,8 @@ class PHPWord_Section_Settings
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Set page numbering start
|
||||||
|
*
|
||||||
* @param null|int $pageNumberingStart
|
* @param null|int $pageNumberingStart
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
|
|
@ -604,6 +610,8 @@ class PHPWord_Section_Settings
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Get page numbering start
|
||||||
|
*
|
||||||
* @return null|int
|
* @return null|int
|
||||||
*/
|
*/
|
||||||
public function getPageNumberingStart()
|
public function getPageNumberingStart()
|
||||||
|
|
|
||||||
|
|
@ -99,6 +99,7 @@ class PHPWord_Section_Table
|
||||||
* Add a row
|
* Add a row
|
||||||
*
|
*
|
||||||
* @param int $height
|
* @param int $height
|
||||||
|
* @param mixed $style
|
||||||
*/
|
*/
|
||||||
public function addRow($height = null, $style = null)
|
public function addRow($height = null, $style = null)
|
||||||
{
|
{
|
||||||
|
|
@ -144,7 +145,7 @@ class PHPWord_Section_Table
|
||||||
/**
|
/**
|
||||||
* Set table width
|
* Set table width
|
||||||
*
|
*
|
||||||
* @var int $width
|
* @param int $width
|
||||||
*/
|
*/
|
||||||
public function setWidth($width)
|
public function setWidth($width)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,8 @@ class PHPWord_Section_Table_Cell
|
||||||
* Add a Text Element
|
* Add a Text Element
|
||||||
*
|
*
|
||||||
* @param string $text
|
* @param string $text
|
||||||
* @param mixed $style
|
* @param mixed $styleFont
|
||||||
|
* @param mixed $styleParagraph
|
||||||
* @return PHPWord_Section_Text
|
* @return PHPWord_Section_Text
|
||||||
*/
|
*/
|
||||||
public function addText($text, $styleFont = null, $styleParagraph = null)
|
public function addText($text, $styleFont = null, $styleParagraph = null)
|
||||||
|
|
@ -299,6 +300,7 @@ class PHPWord_Section_Table_Cell
|
||||||
/**
|
/**
|
||||||
* Create a new TextRun
|
* Create a new TextRun
|
||||||
*
|
*
|
||||||
|
* @param mixed $styleParagraph
|
||||||
* @return PHPWord_Section_TextRun
|
* @return PHPWord_Section_TextRun
|
||||||
*/
|
*/
|
||||||
public function createTextRun($styleParagraph = null)
|
public function createTextRun($styleParagraph = null)
|
||||||
|
|
|
||||||
|
|
@ -131,6 +131,8 @@ class PHPWord_Section_Text
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Set text content
|
||||||
|
*
|
||||||
* @param string $text
|
* @param string $text
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,9 @@ class PHPWord_Section_TextBreak
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new TextBreak Element
|
* Create a new TextBreak Element
|
||||||
|
*
|
||||||
|
* @param mixed $fontStyle
|
||||||
|
* @param mixed $paragraphStyle
|
||||||
*/
|
*/
|
||||||
public function __construct($fontStyle = null, $paragraphStyle = null)
|
public function __construct($fontStyle = null, $paragraphStyle = null)
|
||||||
{
|
{
|
||||||
|
|
@ -60,8 +63,8 @@ class PHPWord_Section_TextBreak
|
||||||
/**
|
/**
|
||||||
* Set Text style
|
* Set Text style
|
||||||
*
|
*
|
||||||
* @param null|array|\PHPWord_Style_Font $style
|
* @param mixed $style
|
||||||
* @param null|array|\PHPWord_Style_Paragraph $paragraphStyle
|
* @param mixed $paragraphStyle
|
||||||
* @return PHPWord_Style_Font
|
* @return PHPWord_Style_Font
|
||||||
*/
|
*/
|
||||||
public function setFontStyle($style = null, $paragraphStyle = null)
|
public function setFontStyle($style = null, $paragraphStyle = null)
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,8 @@ class PHPWord_Section_TextRun
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new TextRun Element
|
* Create a new TextRun Element
|
||||||
|
*
|
||||||
|
* @param mixed $styleParagraph
|
||||||
*/
|
*/
|
||||||
public function __construct($styleParagraph = null)
|
public function __construct($styleParagraph = null)
|
||||||
{
|
{
|
||||||
|
|
@ -72,8 +74,8 @@ class PHPWord_Section_TextRun
|
||||||
/**
|
/**
|
||||||
* Add a Text Element
|
* Add a Text Element
|
||||||
*
|
*
|
||||||
* @var string $text
|
* @param string $text
|
||||||
* @var mixed $styleFont
|
* @param mixed $styleFont
|
||||||
* @return PHPWord_Section_Text
|
* @return PHPWord_Section_Text
|
||||||
*/
|
*/
|
||||||
public function addText($text = null, $styleFont = null)
|
public function addText($text = null, $styleFont = null)
|
||||||
|
|
@ -113,7 +115,7 @@ class PHPWord_Section_TextRun
|
||||||
* Add a Image Element
|
* Add a Image Element
|
||||||
*
|
*
|
||||||
* @param string $imageSrc
|
* @param string $imageSrc
|
||||||
* @param mixed $styleFont
|
* @param mixed $style
|
||||||
* @return PHPWord_Section_Image
|
* @return PHPWord_Section_Image
|
||||||
*/
|
*/
|
||||||
public function addImage($imageSrc, $style = null)
|
public function addImage($imageSrc, $style = null)
|
||||||
|
|
@ -134,9 +136,9 @@ class PHPWord_Section_TextRun
|
||||||
/**
|
/**
|
||||||
* Add TextBreak
|
* Add TextBreak
|
||||||
*
|
*
|
||||||
* @param int $count
|
* @param int $count
|
||||||
* @param null|string|array|PHPWord_Style_Font $fontStyle
|
* @param mixed $fontStyle
|
||||||
* @param null|string|array|PHPWord_Style_Paragraph $paragraphStyle
|
* @param mixed $paragraphStyle
|
||||||
*/
|
*/
|
||||||
public function addTextBreak($count = 1, $fontStyle = null, $paragraphStyle = null)
|
public function addTextBreak($count = 1, $fontStyle = null, $paragraphStyle = null)
|
||||||
{
|
{
|
||||||
|
|
@ -148,7 +150,7 @@ class PHPWord_Section_TextRun
|
||||||
/**
|
/**
|
||||||
* Create a new Footnote Element
|
* Create a new Footnote Element
|
||||||
*
|
*
|
||||||
* @param string $text
|
* @param mixed $styleParagraph
|
||||||
* @return PHPWord_Section_Footnote
|
* @return PHPWord_Section_Footnote
|
||||||
*/
|
*/
|
||||||
public function createFootnote($styleParagraph = null)
|
public function createFootnote($styleParagraph = null)
|
||||||
|
|
|
||||||
|
|
@ -70,8 +70,9 @@ class PHPWord_Section_Title
|
||||||
/**
|
/**
|
||||||
* Create a new Title Element
|
* Create a new Title Element
|
||||||
*
|
*
|
||||||
* @var string $text
|
* @param string $text
|
||||||
* @var int $depth
|
* @param int $depth
|
||||||
|
* @param mixed $style
|
||||||
*/
|
*/
|
||||||
public function __construct($text, $depth = 1, $style = null)
|
public function __construct($text, $depth = 1, $style = null)
|
||||||
{
|
{
|
||||||
|
|
@ -88,7 +89,7 @@ class PHPWord_Section_Title
|
||||||
/**
|
/**
|
||||||
* Set Anchor
|
* Set Anchor
|
||||||
*
|
*
|
||||||
* @var int $anchor
|
* @param int $anchor
|
||||||
*/
|
*/
|
||||||
public function setAnchor($anchor)
|
public function setAnchor($anchor)
|
||||||
{
|
{
|
||||||
|
|
@ -108,7 +109,7 @@ class PHPWord_Section_Title
|
||||||
/**
|
/**
|
||||||
* Set Bookmark ID
|
* Set Bookmark ID
|
||||||
*
|
*
|
||||||
* @var int $bookmarkId
|
* @param int $bookmarkId
|
||||||
*/
|
*/
|
||||||
public function setBookmarkId($bookmarkId)
|
public function setBookmarkId($bookmarkId)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -44,8 +44,8 @@ class PHPWord_Shared_Font
|
||||||
/**
|
/**
|
||||||
* Calculate an (approximate) pixel size, based on inch size
|
* Calculate an (approximate) pixel size, based on inch size
|
||||||
*
|
*
|
||||||
* @param int $sizeInInch Font size (in inch)
|
* @param int $sizeInInch Font size (in inch)
|
||||||
* @return int Size (in pixels)
|
* @return int Size (in pixels)
|
||||||
*/
|
*/
|
||||||
public static function inchSizeToPixels($sizeInInch = 1)
|
public static function inchSizeToPixels($sizeInInch = 1)
|
||||||
{
|
{
|
||||||
|
|
@ -55,24 +55,42 @@ class PHPWord_Shared_Font
|
||||||
/**
|
/**
|
||||||
* Calculate an (approximate) pixel size, based on centimeter size
|
* Calculate an (approximate) pixel size, based on centimeter size
|
||||||
*
|
*
|
||||||
* @param int $sizeInCm Font size (in centimeters)
|
* @param int $sizeInCm Font size (in centimeters)
|
||||||
* @return int Size (in pixels)
|
* @return int Size (in pixels)
|
||||||
*/
|
*/
|
||||||
public static function centimeterSizeToPixels($sizeInCm = 1)
|
public static function centimeterSizeToPixels($sizeInCm = 1)
|
||||||
{
|
{
|
||||||
return ($sizeInCm * 37.795275591);
|
return ($sizeInCm * 37.795275591);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert centimeter to twip
|
||||||
|
*
|
||||||
|
* @param int $sizeInCm
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
public static function centimeterSizeToTwips($sizeInCm = 1)
|
public static function centimeterSizeToTwips($sizeInCm = 1)
|
||||||
{
|
{
|
||||||
return ($sizeInCm * 565.217);
|
return ($sizeInCm * 565.217);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert inch to twip
|
||||||
|
*
|
||||||
|
* @param int $sizeInInch
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
public static function inchSizeToTwips($sizeInInch = 1)
|
public static function inchSizeToTwips($sizeInInch = 1)
|
||||||
{
|
{
|
||||||
return self::centimeterSizeToTwips($sizeInInch * 2.54);
|
return self::centimeterSizeToTwips($sizeInInch * 2.54);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert pixel to twip
|
||||||
|
*
|
||||||
|
* @param int $sizeInPixel
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
public static function pixelSizeToTwips($sizeInPixel = 1)
|
public static function pixelSizeToTwips($sizeInPixel = 1)
|
||||||
{
|
{
|
||||||
return self::centimeterSizeToTwips($sizeInPixel / 37.795275591);
|
return self::centimeterSizeToTwips($sizeInPixel / 37.795275591);
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,7 @@ class PHPWord_Shared_XMLWriter
|
||||||
/**
|
/**
|
||||||
* Get written data
|
* Get written data
|
||||||
*
|
*
|
||||||
* @return $data
|
* @return string XML data
|
||||||
*/
|
*/
|
||||||
public function getData()
|
public function getData()
|
||||||
{
|
{
|
||||||
|
|
@ -124,8 +124,8 @@ class PHPWord_Shared_XMLWriter
|
||||||
/**
|
/**
|
||||||
* Catch function calls (and pass them to internal XMLWriter)
|
* Catch function calls (and pass them to internal XMLWriter)
|
||||||
*
|
*
|
||||||
* @param unknown_type $function
|
* @param mixed $function
|
||||||
* @param unknown_type $args
|
* @param mixed $args
|
||||||
*/
|
*/
|
||||||
public function __call($function, $args)
|
public function __call($function, $args)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,11 @@ class PHPWord_Shared_ZipStreamWrapper
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Open stream
|
* Open stream
|
||||||
|
*
|
||||||
|
* @param string $path
|
||||||
|
* @param string $mode
|
||||||
|
* @param string $options
|
||||||
|
* @param string $opened_path
|
||||||
*/
|
*/
|
||||||
public function stream_open($path, $mode, $options, &$opened_path)
|
public function stream_open($path, $mode, $options, &$opened_path)
|
||||||
{
|
{
|
||||||
|
|
@ -119,6 +124,8 @@ class PHPWord_Shared_ZipStreamWrapper
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Read stream
|
* Read stream
|
||||||
|
*
|
||||||
|
* @param int $count
|
||||||
*/
|
*/
|
||||||
public function stream_read($count)
|
public function stream_read($count)
|
||||||
{
|
{
|
||||||
|
|
@ -145,6 +152,9 @@ class PHPWord_Shared_ZipStreamWrapper
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Seek stream
|
* Seek stream
|
||||||
|
*
|
||||||
|
* @param int $offset
|
||||||
|
* @param mixed $whence
|
||||||
*/
|
*/
|
||||||
public function stream_seek($offset, $whence)
|
public function stream_seek($offset, $whence)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,9 @@ class PHPWord_Style
|
||||||
* Add a table style
|
* Add a table style
|
||||||
*
|
*
|
||||||
* @param string $styleName
|
* @param string $styleName
|
||||||
* @param array $styles
|
* @param array $styleTable
|
||||||
|
* @param null|array $styleFirstRow
|
||||||
|
* @param null|array $styleLastRow
|
||||||
*/
|
*/
|
||||||
public static function addTableStyle($styleName, $styleTable, $styleFirstRow = null, $styleLastRow = null)
|
public static function addTableStyle($styleName, $styleTable, $styleFirstRow = null, $styleLastRow = null)
|
||||||
{
|
{
|
||||||
|
|
@ -120,9 +122,9 @@ class PHPWord_Style
|
||||||
/**
|
/**
|
||||||
* Add a title style
|
* Add a title style
|
||||||
*
|
*
|
||||||
* @param string $styleName
|
* @param int $titleCount
|
||||||
* @param array $styleFont
|
* @param array $styleFont
|
||||||
* @param array $styleParagraph
|
* @param nullarray $styleParagraph
|
||||||
*/
|
*/
|
||||||
public static function addTitleStyle($titleCount, $styleFont, $styleParagraph = null)
|
public static function addTitleStyle($titleCount, $styleFont, $styleParagraph = null)
|
||||||
{
|
{
|
||||||
|
|
@ -143,7 +145,7 @@ class PHPWord_Style
|
||||||
/**
|
/**
|
||||||
* Set default paragraph style
|
* Set default paragraph style
|
||||||
*
|
*
|
||||||
* @param array $styles Paragraph style definition
|
* @param array $styles Paragraph style definition
|
||||||
*/
|
*/
|
||||||
public static function setDefaultParagraphStyle($styles)
|
public static function setDefaultParagraphStyle($styles)
|
||||||
{
|
{
|
||||||
|
|
@ -153,7 +155,7 @@ class PHPWord_Style
|
||||||
/**
|
/**
|
||||||
* Get all styles
|
* Get all styles
|
||||||
*
|
*
|
||||||
* @return PHPWord_Style_Font[]
|
* @return array
|
||||||
*/
|
*/
|
||||||
public static function getStyles()
|
public static function getStyles()
|
||||||
{
|
{
|
||||||
|
|
@ -163,8 +165,8 @@ class PHPWord_Style
|
||||||
/**
|
/**
|
||||||
* Get style
|
* Get style
|
||||||
*
|
*
|
||||||
* @param string
|
* @param string $styleName
|
||||||
* @return PHPWord_Style
|
* @return null|PHPWord_Style
|
||||||
*/
|
*/
|
||||||
public static function getStyle($styleName)
|
public static function getStyle($styleName)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -157,8 +157,8 @@ class PHPWord_Style_Cell
|
||||||
/**
|
/**
|
||||||
* Set style value
|
* Set style value
|
||||||
*
|
*
|
||||||
* @var string $key
|
* @param string $key
|
||||||
* @var mixed $value
|
* @param mixed $value
|
||||||
*/
|
*/
|
||||||
public function setStyleValue($key, $value)
|
public function setStyleValue($key, $value)
|
||||||
{
|
{
|
||||||
|
|
@ -171,36 +171,65 @@ class PHPWord_Style_Cell
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get vertical align
|
||||||
|
*/
|
||||||
public function getVAlign()
|
public function getVAlign()
|
||||||
{
|
{
|
||||||
return $this->_valign;
|
return $this->_valign;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set vertical align
|
||||||
|
*
|
||||||
|
* @param string $pValue
|
||||||
|
*/
|
||||||
public function setVAlign($pValue = null)
|
public function setVAlign($pValue = null)
|
||||||
{
|
{
|
||||||
$this->_valign = $pValue;
|
$this->_valign = $pValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get text direction
|
||||||
|
*/
|
||||||
public function getTextDirection()
|
public function getTextDirection()
|
||||||
{
|
{
|
||||||
return $this->_textDirection;
|
return $this->_textDirection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set text direction
|
||||||
|
*
|
||||||
|
* @param string $pValue
|
||||||
|
*/
|
||||||
public function setTextDirection($pValue = null)
|
public function setTextDirection($pValue = null)
|
||||||
{
|
{
|
||||||
$this->_textDirection = $pValue;
|
$this->_textDirection = $pValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get background color
|
||||||
|
*/
|
||||||
public function getBgColor()
|
public function getBgColor()
|
||||||
{
|
{
|
||||||
return $this->_bgColor;
|
return $this->_bgColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set background color
|
||||||
|
*
|
||||||
|
* @param string $pValue
|
||||||
|
*/
|
||||||
public function setBgColor($pValue = null)
|
public function setBgColor($pValue = null)
|
||||||
{
|
{
|
||||||
$this->_bgColor = $pValue;
|
$this->_bgColor = $pValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set border size
|
||||||
|
*
|
||||||
|
* @param int $pValue
|
||||||
|
*/
|
||||||
public function setBorderSize($pValue = null)
|
public function setBorderSize($pValue = null)
|
||||||
{
|
{
|
||||||
$this->_borderTopSize = $pValue;
|
$this->_borderTopSize = $pValue;
|
||||||
|
|
@ -209,6 +238,9 @@ class PHPWord_Style_Cell
|
||||||
$this->_borderBottomSize = $pValue;
|
$this->_borderBottomSize = $pValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get border size
|
||||||
|
*/
|
||||||
public function getBorderSize()
|
public function getBorderSize()
|
||||||
{
|
{
|
||||||
$t = $this->getBorderTopSize();
|
$t = $this->getBorderTopSize();
|
||||||
|
|
@ -219,6 +251,11 @@ class PHPWord_Style_Cell
|
||||||
return array($t, $l, $r, $b);
|
return array($t, $l, $r, $b);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set border color
|
||||||
|
*
|
||||||
|
* @param string $pValue
|
||||||
|
*/
|
||||||
public function setBorderColor($pValue = null)
|
public function setBorderColor($pValue = null)
|
||||||
{
|
{
|
||||||
$this->_borderTopColor = $pValue;
|
$this->_borderTopColor = $pValue;
|
||||||
|
|
@ -227,6 +264,9 @@ class PHPWord_Style_Cell
|
||||||
$this->_borderBottomColor = $pValue;
|
$this->_borderBottomColor = $pValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get border color
|
||||||
|
*/
|
||||||
public function getBorderColor()
|
public function getBorderColor()
|
||||||
{
|
{
|
||||||
$t = $this->getBorderTopColor();
|
$t = $this->getBorderTopColor();
|
||||||
|
|
@ -237,107 +277,189 @@ class PHPWord_Style_Cell
|
||||||
return array($t, $l, $r, $b);
|
return array($t, $l, $r, $b);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set border top size
|
||||||
|
*
|
||||||
|
* @param int $pValue
|
||||||
|
*/
|
||||||
public function setBorderTopSize($pValue = null)
|
public function setBorderTopSize($pValue = null)
|
||||||
{
|
{
|
||||||
$this->_borderTopSize = $pValue;
|
$this->_borderTopSize = $pValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get border top size
|
||||||
|
*/
|
||||||
public function getBorderTopSize()
|
public function getBorderTopSize()
|
||||||
{
|
{
|
||||||
return $this->_borderTopSize;
|
return $this->_borderTopSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set border top color
|
||||||
|
*
|
||||||
|
* @param string $pValue
|
||||||
|
*/
|
||||||
public function setBorderTopColor($pValue = null)
|
public function setBorderTopColor($pValue = null)
|
||||||
{
|
{
|
||||||
$this->_borderTopColor = $pValue;
|
$this->_borderTopColor = $pValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get border top color
|
||||||
|
*/
|
||||||
public function getBorderTopColor()
|
public function getBorderTopColor()
|
||||||
{
|
{
|
||||||
return $this->_borderTopColor;
|
return $this->_borderTopColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set border left size
|
||||||
|
*
|
||||||
|
* @param int $pValue
|
||||||
|
*/
|
||||||
public function setBorderLeftSize($pValue = null)
|
public function setBorderLeftSize($pValue = null)
|
||||||
{
|
{
|
||||||
$this->_borderLeftSize = $pValue;
|
$this->_borderLeftSize = $pValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get border left size
|
||||||
|
*/
|
||||||
public function getBorderLeftSize()
|
public function getBorderLeftSize()
|
||||||
{
|
{
|
||||||
return $this->_borderLeftSize;
|
return $this->_borderLeftSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set border left color
|
||||||
|
*
|
||||||
|
* @param string $pValue
|
||||||
|
*/
|
||||||
public function setBorderLeftColor($pValue = null)
|
public function setBorderLeftColor($pValue = null)
|
||||||
{
|
{
|
||||||
$this->_borderLeftColor = $pValue;
|
$this->_borderLeftColor = $pValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get border left color
|
||||||
|
*/
|
||||||
public function getBorderLeftColor()
|
public function getBorderLeftColor()
|
||||||
{
|
{
|
||||||
return $this->_borderLeftColor;
|
return $this->_borderLeftColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set border right size
|
||||||
|
*
|
||||||
|
* @param int $pValue
|
||||||
|
*/
|
||||||
public function setBorderRightSize($pValue = null)
|
public function setBorderRightSize($pValue = null)
|
||||||
{
|
{
|
||||||
$this->_borderRightSize = $pValue;
|
$this->_borderRightSize = $pValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get border right size
|
||||||
|
*/
|
||||||
public function getBorderRightSize()
|
public function getBorderRightSize()
|
||||||
{
|
{
|
||||||
return $this->_borderRightSize;
|
return $this->_borderRightSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set border right color
|
||||||
|
*
|
||||||
|
* @param string $pValue
|
||||||
|
*/
|
||||||
public function setBorderRightColor($pValue = null)
|
public function setBorderRightColor($pValue = null)
|
||||||
{
|
{
|
||||||
$this->_borderRightColor = $pValue;
|
$this->_borderRightColor = $pValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get border right color
|
||||||
|
*/
|
||||||
public function getBorderRightColor()
|
public function getBorderRightColor()
|
||||||
{
|
{
|
||||||
return $this->_borderRightColor;
|
return $this->_borderRightColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set border bottom size
|
||||||
|
*
|
||||||
|
* @param int $pValue
|
||||||
|
*/
|
||||||
public function setBorderBottomSize($pValue = null)
|
public function setBorderBottomSize($pValue = null)
|
||||||
{
|
{
|
||||||
$this->_borderBottomSize = $pValue;
|
$this->_borderBottomSize = $pValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get border bottom size
|
||||||
|
*/
|
||||||
public function getBorderBottomSize()
|
public function getBorderBottomSize()
|
||||||
{
|
{
|
||||||
return $this->_borderBottomSize;
|
return $this->_borderBottomSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set border bottom color
|
||||||
|
*
|
||||||
|
* @param string $pValue
|
||||||
|
*/
|
||||||
public function setBorderBottomColor($pValue = null)
|
public function setBorderBottomColor($pValue = null)
|
||||||
{
|
{
|
||||||
$this->_borderBottomColor = $pValue;
|
$this->_borderBottomColor = $pValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get border bottom color
|
||||||
|
*/
|
||||||
public function getBorderBottomColor()
|
public function getBorderBottomColor()
|
||||||
{
|
{
|
||||||
return $this->_borderBottomColor;
|
return $this->_borderBottomColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get default border color
|
||||||
|
*/
|
||||||
public function getDefaultBorderColor()
|
public function getDefaultBorderColor()
|
||||||
{
|
{
|
||||||
return $this->_defaultBorderColor;
|
return $this->_defaultBorderColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set grid span (colspan)
|
||||||
|
*
|
||||||
|
* @param int $pValue
|
||||||
|
*/
|
||||||
public function setGridSpan($pValue = null)
|
public function setGridSpan($pValue = null)
|
||||||
{
|
{
|
||||||
$this->_gridSpan = $pValue;
|
$this->_gridSpan = $pValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get grid span (colspan)
|
||||||
|
*/
|
||||||
public function getGridSpan()
|
public function getGridSpan()
|
||||||
{
|
{
|
||||||
return $this->_gridSpan;
|
return $this->_gridSpan;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set vertical merge (rowspan)
|
||||||
|
*
|
||||||
|
* @param string $pValue
|
||||||
|
*/
|
||||||
public function setVMerge($pValue = null)
|
public function setVMerge($pValue = null)
|
||||||
{
|
{
|
||||||
$this->_vMerge = $pValue;
|
$this->_vMerge = $pValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get vertical merge (rowspan)
|
||||||
|
*/
|
||||||
public function getVMerge()
|
public function getVMerge()
|
||||||
{
|
{
|
||||||
return $this->_vMerge;
|
return $this->_vMerge;
|
||||||
|
|
|
||||||
|
|
@ -185,6 +185,8 @@ class PHPWord_Style_Font
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Set style using associative array
|
||||||
|
*
|
||||||
* @param array $style
|
* @param array $style
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
|
|
@ -510,6 +512,8 @@ class PHPWord_Style_Font
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Get line height
|
||||||
|
*
|
||||||
* @return int|float
|
* @return int|float
|
||||||
*/
|
*/
|
||||||
public function getLineHeight()
|
public function getLineHeight()
|
||||||
|
|
|
||||||
|
|
@ -36,9 +36,32 @@ class PHPWord_Style_Image
|
||||||
const WRAPPING_STYLE_BEHIND = 'behind';
|
const WRAPPING_STYLE_BEHIND = 'behind';
|
||||||
const WRAPPING_STYLE_INFRONT = 'infront';
|
const WRAPPING_STYLE_INFRONT = 'infront';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Image width
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
private $_width;
|
private $_width;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Image width
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
private $_height;
|
private $_height;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Alignment
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
private $_align;
|
private $_align;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Wrapping style
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
private $wrappingStyle;
|
private $wrappingStyle;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -55,6 +78,9 @@ class PHPWord_Style_Image
|
||||||
*/
|
*/
|
||||||
private $_marginLeft;
|
private $_marginLeft;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->_width = null;
|
$this->_width = null;
|
||||||
|
|
@ -65,36 +91,66 @@ class PHPWord_Style_Image
|
||||||
$this->setWrappingStyle(self::WRAPPING_STYLE_INLINE);
|
$this->setWrappingStyle(self::WRAPPING_STYLE_INLINE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set style value
|
||||||
|
*
|
||||||
|
* @param string $key
|
||||||
|
* @param mixed $value
|
||||||
|
*/
|
||||||
public function setStyleValue($key, $value)
|
public function setStyleValue($key, $value)
|
||||||
{
|
{
|
||||||
$this->$key = $value;
|
$this->$key = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get width
|
||||||
|
*/
|
||||||
public function getWidth()
|
public function getWidth()
|
||||||
{
|
{
|
||||||
return $this->_width;
|
return $this->_width;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set width
|
||||||
|
*
|
||||||
|
* @param int $pValue
|
||||||
|
*/
|
||||||
public function setWidth($pValue = null)
|
public function setWidth($pValue = null)
|
||||||
{
|
{
|
||||||
$this->_width = $pValue;
|
$this->_width = $pValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get height
|
||||||
|
*/
|
||||||
public function getHeight()
|
public function getHeight()
|
||||||
{
|
{
|
||||||
return $this->_height;
|
return $this->_height;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set height
|
||||||
|
*
|
||||||
|
* @param int $pValue
|
||||||
|
*/
|
||||||
public function setHeight($pValue = null)
|
public function setHeight($pValue = null)
|
||||||
{
|
{
|
||||||
$this->_height = $pValue;
|
$this->_height = $pValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get alignment
|
||||||
|
*/
|
||||||
public function getAlign()
|
public function getAlign()
|
||||||
{
|
{
|
||||||
return $this->_align;
|
return $this->_align;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set alignment
|
||||||
|
*
|
||||||
|
* @param string $pValue
|
||||||
|
*/
|
||||||
public function setAlign($pValue = null)
|
public function setAlign($pValue = null)
|
||||||
{
|
{
|
||||||
$this->_align = $pValue;
|
$this->_align = $pValue;
|
||||||
|
|
@ -145,6 +201,8 @@ class PHPWord_Style_Image
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Set wrapping style
|
||||||
|
*
|
||||||
* @param string $wrappingStyle
|
* @param string $wrappingStyle
|
||||||
* @throws InvalidArgumentException
|
* @throws InvalidArgumentException
|
||||||
* @return $this
|
* @return $this
|
||||||
|
|
@ -167,6 +225,8 @@ class PHPWord_Style_Image
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Get wrapping style
|
||||||
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getWrappingStyle()
|
public function getWrappingStyle()
|
||||||
|
|
|
||||||
|
|
@ -133,6 +133,8 @@ class PHPWord_Style_Paragraph
|
||||||
private $_pageBreakBefore = false;
|
private $_pageBreakBefore = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Set style using associative array
|
||||||
|
*
|
||||||
* @param array $style
|
* @param array $style
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
|
|
@ -319,11 +321,11 @@ class PHPWord_Style_Paragraph
|
||||||
return $this->_tabs;
|
return $this->_tabs;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Set tabs
|
* Set tabs
|
||||||
*
|
*
|
||||||
* @param array $pValue
|
* @param array $pValue
|
||||||
* @return PHPWord_Style_Paragraph
|
* @return PHPWord_Style_Paragraph
|
||||||
*/
|
*/
|
||||||
public function setTabs($pValue = null)
|
public function setTabs($pValue = null)
|
||||||
{
|
{
|
||||||
|
|
@ -500,6 +502,8 @@ class PHPWord_Style_Paragraph
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Get line height
|
||||||
|
*
|
||||||
* @return int|float
|
* @return int|float
|
||||||
*/
|
*/
|
||||||
public function getLineHeight()
|
public function getLineHeight()
|
||||||
|
|
|
||||||
|
|
@ -54,12 +54,21 @@ class PHPWord_Style_Row
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set style value
|
* Set style value
|
||||||
|
*
|
||||||
|
* @param string $key
|
||||||
|
* @param mixed $value
|
||||||
*/
|
*/
|
||||||
public function setStyleValue($key, $value)
|
public function setStyleValue($key, $value)
|
||||||
{
|
{
|
||||||
$this->$key = $value;
|
$this->$key = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set tblHeader
|
||||||
|
*
|
||||||
|
* @param boolean $pValue
|
||||||
|
* @return PHPWord_Style_Row
|
||||||
|
*/
|
||||||
public function setTblHeader($pValue = false)
|
public function setTblHeader($pValue = false)
|
||||||
{
|
{
|
||||||
if (!is_bool($pValue)) {
|
if (!is_bool($pValue)) {
|
||||||
|
|
@ -69,11 +78,22 @@ class PHPWord_Style_Row
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get tblHeader
|
||||||
|
*
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
public function getTblHeader()
|
public function getTblHeader()
|
||||||
{
|
{
|
||||||
return $this->_tblHeader;
|
return $this->_tblHeader;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set cantSplit
|
||||||
|
*
|
||||||
|
* @param boolean $pValue
|
||||||
|
* @return PHPWord_Style_Row
|
||||||
|
*/
|
||||||
public function setCantSplit($pValue = false)
|
public function setCantSplit($pValue = false)
|
||||||
{
|
{
|
||||||
if (!is_bool($pValue)) {
|
if (!is_bool($pValue)) {
|
||||||
|
|
@ -83,6 +103,11 @@ class PHPWord_Style_Row
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get cantSplit
|
||||||
|
*
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
public function getCantSplit()
|
public function getCantSplit()
|
||||||
{
|
{
|
||||||
return $this->_cantSplit;
|
return $this->_cantSplit;
|
||||||
|
|
|
||||||
|
|
@ -30,12 +30,37 @@
|
||||||
*/
|
*/
|
||||||
class PHPWord_Style_Table
|
class PHPWord_Style_Table
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Cell margin top
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
private $_cellMarginTop;
|
private $_cellMarginTop;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cell margin left
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
private $_cellMarginLeft;
|
private $_cellMarginLeft;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cell margin right
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
private $_cellMarginRight;
|
private $_cellMarginRight;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cell margin bottom
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
private $_cellMarginBottom;
|
private $_cellMarginBottom;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->_cellMarginTop = null;
|
$this->_cellMarginTop = null;
|
||||||
|
|
@ -44,51 +69,92 @@ class PHPWord_Style_Table
|
||||||
$this->_cellMarginBottom = null;
|
$this->_cellMarginBottom = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set style value
|
||||||
|
*
|
||||||
|
* @param string $key
|
||||||
|
* @param mixed $value
|
||||||
|
*/
|
||||||
public function setStyleValue($key, $value)
|
public function setStyleValue($key, $value)
|
||||||
{
|
{
|
||||||
$this->$key = $value;
|
$this->$key = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set cell margin top
|
||||||
|
*
|
||||||
|
* @param int $pValue
|
||||||
|
*/
|
||||||
public function setCellMarginTop($pValue = null)
|
public function setCellMarginTop($pValue = null)
|
||||||
{
|
{
|
||||||
$this->_cellMarginTop = $pValue;
|
$this->_cellMarginTop = $pValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get cell margin top
|
||||||
|
*/
|
||||||
public function getCellMarginTop()
|
public function getCellMarginTop()
|
||||||
{
|
{
|
||||||
return $this->_cellMarginTop;
|
return $this->_cellMarginTop;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set cell margin left
|
||||||
|
*
|
||||||
|
* @param int $pValue
|
||||||
|
*/
|
||||||
public function setCellMarginLeft($pValue = null)
|
public function setCellMarginLeft($pValue = null)
|
||||||
{
|
{
|
||||||
$this->_cellMarginLeft = $pValue;
|
$this->_cellMarginLeft = $pValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get cell margin left
|
||||||
|
*/
|
||||||
public function getCellMarginLeft()
|
public function getCellMarginLeft()
|
||||||
{
|
{
|
||||||
return $this->_cellMarginLeft;
|
return $this->_cellMarginLeft;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set cell margin right
|
||||||
|
*
|
||||||
|
* @param int $pValue
|
||||||
|
*/
|
||||||
public function setCellMarginRight($pValue = null)
|
public function setCellMarginRight($pValue = null)
|
||||||
{
|
{
|
||||||
$this->_cellMarginRight = $pValue;
|
$this->_cellMarginRight = $pValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get cell margin right
|
||||||
|
*/
|
||||||
public function getCellMarginRight()
|
public function getCellMarginRight()
|
||||||
{
|
{
|
||||||
return $this->_cellMarginRight;
|
return $this->_cellMarginRight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set cell margin bottom
|
||||||
|
*
|
||||||
|
* @param int $pValue
|
||||||
|
*/
|
||||||
public function setCellMarginBottom($pValue = null)
|
public function setCellMarginBottom($pValue = null)
|
||||||
{
|
{
|
||||||
$this->_cellMarginBottom = $pValue;
|
$this->_cellMarginBottom = $pValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get cell margin bottom
|
||||||
|
*/
|
||||||
public function getCellMarginBottom()
|
public function getCellMarginBottom()
|
||||||
{
|
{
|
||||||
return $this->_cellMarginBottom;
|
return $this->_cellMarginBottom;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get cell margin
|
||||||
|
*/
|
||||||
public function getCellMargin()
|
public function getCellMargin()
|
||||||
{
|
{
|
||||||
return array($this->_cellMarginTop, $this->_cellMarginLeft, $this->_cellMarginRight, $this->_cellMarginBottom);
|
return array($this->_cellMarginTop, $this->_cellMarginLeft, $this->_cellMarginRight, $this->_cellMarginBottom);
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,6 @@
|
||||||
*/
|
*/
|
||||||
class PHPWord_Style_TableFull
|
class PHPWord_Style_TableFull
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Style for first row
|
* Style for first row
|
||||||
*
|
*
|
||||||
|
|
@ -160,6 +159,10 @@ class PHPWord_Style_TableFull
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new TableFull Font
|
* Create a new TableFull Font
|
||||||
|
*
|
||||||
|
* @param null|array $styleTable
|
||||||
|
* @param null|array $styleFirstRow
|
||||||
|
* @param null|array $styleLastRow
|
||||||
*/
|
*/
|
||||||
public function __construct($styleTable = null, $styleFirstRow = null, $styleLastRow = null)
|
public function __construct($styleTable = null, $styleFirstRow = null, $styleLastRow = null)
|
||||||
{
|
{
|
||||||
|
|
@ -234,11 +237,19 @@ class PHPWord_Style_TableFull
|
||||||
return $this->_lastRow;
|
return $this->_lastRow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get background color
|
||||||
|
*/
|
||||||
public function getBgColor()
|
public function getBgColor()
|
||||||
{
|
{
|
||||||
return $this->_bgColor;
|
return $this->_bgColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set background color
|
||||||
|
*
|
||||||
|
* @param string $pValue
|
||||||
|
*/
|
||||||
public function setBgColor($pValue = null)
|
public function setBgColor($pValue = null)
|
||||||
{
|
{
|
||||||
$this->_bgColor = $pValue;
|
$this->_bgColor = $pValue;
|
||||||
|
|
@ -247,7 +258,7 @@ class PHPWord_Style_TableFull
|
||||||
/**
|
/**
|
||||||
* Set TLRBVH Border Size
|
* Set TLRBVH Border Size
|
||||||
*
|
*
|
||||||
* @param int $pValue Border size in eighths of a point (1/8 point)
|
* @param int $pValue Border size in eighths of a point (1/8 point)
|
||||||
*/
|
*/
|
||||||
public function setBorderSize($pValue = null)
|
public function setBorderSize($pValue = null)
|
||||||
{
|
{
|
||||||
|
|
@ -278,6 +289,8 @@ class PHPWord_Style_TableFull
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set TLRBVH Border Color
|
* Set TLRBVH Border Color
|
||||||
|
*
|
||||||
|
* @param string $pValue
|
||||||
*/
|
*/
|
||||||
public function setBorderColor($pValue = null)
|
public function setBorderColor($pValue = null)
|
||||||
{
|
{
|
||||||
|
|
@ -306,161 +319,293 @@ class PHPWord_Style_TableFull
|
||||||
return array($t, $l, $r, $b, $h, $v);
|
return array($t, $l, $r, $b, $h, $v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set border top size
|
||||||
|
*
|
||||||
|
* @param int $pValue
|
||||||
|
*/
|
||||||
public function setBorderTopSize($pValue = null)
|
public function setBorderTopSize($pValue = null)
|
||||||
{
|
{
|
||||||
$this->_borderTopSize = $pValue;
|
$this->_borderTopSize = $pValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get border top size
|
||||||
|
*/
|
||||||
public function getBorderTopSize()
|
public function getBorderTopSize()
|
||||||
{
|
{
|
||||||
return $this->_borderTopSize;
|
return $this->_borderTopSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set border top color
|
||||||
|
*
|
||||||
|
* @param string $pValue
|
||||||
|
*/
|
||||||
public function setBorderTopColor($pValue = null)
|
public function setBorderTopColor($pValue = null)
|
||||||
{
|
{
|
||||||
$this->_borderTopColor = $pValue;
|
$this->_borderTopColor = $pValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get border top color
|
||||||
|
*/
|
||||||
public function getBorderTopColor()
|
public function getBorderTopColor()
|
||||||
{
|
{
|
||||||
return $this->_borderTopColor;
|
return $this->_borderTopColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set border left size
|
||||||
|
*
|
||||||
|
* @param int $pValue
|
||||||
|
*/
|
||||||
public function setBorderLeftSize($pValue = null)
|
public function setBorderLeftSize($pValue = null)
|
||||||
{
|
{
|
||||||
$this->_borderLeftSize = $pValue;
|
$this->_borderLeftSize = $pValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get border left size
|
||||||
|
*/
|
||||||
public function getBorderLeftSize()
|
public function getBorderLeftSize()
|
||||||
{
|
{
|
||||||
return $this->_borderLeftSize;
|
return $this->_borderLeftSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set border left color
|
||||||
|
*
|
||||||
|
* @param string $pValue
|
||||||
|
*/
|
||||||
public function setBorderLeftColor($pValue = null)
|
public function setBorderLeftColor($pValue = null)
|
||||||
{
|
{
|
||||||
$this->_borderLeftColor = $pValue;
|
$this->_borderLeftColor = $pValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get border left color
|
||||||
|
*/
|
||||||
public function getBorderLeftColor()
|
public function getBorderLeftColor()
|
||||||
{
|
{
|
||||||
return $this->_borderLeftColor;
|
return $this->_borderLeftColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set border right size
|
||||||
|
*
|
||||||
|
* @param int $pValue
|
||||||
|
*/
|
||||||
public function setBorderRightSize($pValue = null)
|
public function setBorderRightSize($pValue = null)
|
||||||
{
|
{
|
||||||
$this->_borderRightSize = $pValue;
|
$this->_borderRightSize = $pValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get border right size
|
||||||
|
*
|
||||||
|
* @param int $pValue
|
||||||
|
*/
|
||||||
public function getBorderRightSize()
|
public function getBorderRightSize()
|
||||||
{
|
{
|
||||||
return $this->_borderRightSize;
|
return $this->_borderRightSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set border right color
|
||||||
|
*
|
||||||
|
* @param string $pValue
|
||||||
|
*/
|
||||||
public function setBorderRightColor($pValue = null)
|
public function setBorderRightColor($pValue = null)
|
||||||
{
|
{
|
||||||
$this->_borderRightColor = $pValue;
|
$this->_borderRightColor = $pValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get border right color
|
||||||
|
*/
|
||||||
public function getBorderRightColor()
|
public function getBorderRightColor()
|
||||||
{
|
{
|
||||||
return $this->_borderRightColor;
|
return $this->_borderRightColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set border bottom size
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @param string $pValue
|
||||||
|
* @param int $pValue
|
||||||
|
*/
|
||||||
public function setBorderBottomSize($pValue = null)
|
public function setBorderBottomSize($pValue = null)
|
||||||
{
|
{
|
||||||
$this->_borderBottomSize = $pValue;
|
$this->_borderBottomSize = $pValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get border bottom size
|
||||||
|
*/
|
||||||
public function getBorderBottomSize()
|
public function getBorderBottomSize()
|
||||||
{
|
{
|
||||||
return $this->_borderBottomSize;
|
return $this->_borderBottomSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set border bottom color
|
||||||
|
*
|
||||||
|
* @param string $pValue
|
||||||
|
*/
|
||||||
public function setBorderBottomColor($pValue = null)
|
public function setBorderBottomColor($pValue = null)
|
||||||
{
|
{
|
||||||
$this->_borderBottomColor = $pValue;
|
$this->_borderBottomColor = $pValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get border bottom color
|
||||||
|
*/
|
||||||
public function getBorderBottomColor()
|
public function getBorderBottomColor()
|
||||||
{
|
{
|
||||||
return $this->_borderBottomColor;
|
return $this->_borderBottomColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set border inside horizontal color
|
||||||
|
*
|
||||||
|
* @param string $pValue
|
||||||
|
*/
|
||||||
public function setBorderInsideHColor($pValue = null)
|
public function setBorderInsideHColor($pValue = null)
|
||||||
{
|
{
|
||||||
$this->_borderInsideHColor = $pValue;
|
$this->_borderInsideHColor = $pValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get border inside horizontal color
|
||||||
|
*/
|
||||||
public function getBorderInsideHColor()
|
public function getBorderInsideHColor()
|
||||||
{
|
{
|
||||||
return (isset($this->_borderInsideHColor)) ? $this->_borderInsideHColor : null;
|
return (isset($this->_borderInsideHColor)) ? $this->_borderInsideHColor : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set border inside vertical color
|
||||||
|
*
|
||||||
|
* @param string $pValue
|
||||||
|
*/
|
||||||
public function setBorderInsideVColor($pValue = null)
|
public function setBorderInsideVColor($pValue = null)
|
||||||
{
|
{
|
||||||
$this->_borderInsideVColor = $pValue;
|
$this->_borderInsideVColor = $pValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get border inside vertical color
|
||||||
|
*/
|
||||||
public function getBorderInsideVColor()
|
public function getBorderInsideVColor()
|
||||||
{
|
{
|
||||||
return (isset($this->_borderInsideVColor)) ? $this->_borderInsideVColor : null;
|
return (isset($this->_borderInsideVColor)) ? $this->_borderInsideVColor : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set border inside horizontal size
|
||||||
|
*
|
||||||
|
* @param int $pValue
|
||||||
|
*/
|
||||||
public function setBorderInsideHSize($pValue = null)
|
public function setBorderInsideHSize($pValue = null)
|
||||||
{
|
{
|
||||||
$this->_borderInsideHSize = $pValue;
|
$this->_borderInsideHSize = $pValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get border inside horizontal size
|
||||||
|
*/
|
||||||
public function getBorderInsideHSize()
|
public function getBorderInsideHSize()
|
||||||
{
|
{
|
||||||
return (isset($this->_borderInsideHSize)) ? $this->_borderInsideHSize : null;
|
return (isset($this->_borderInsideHSize)) ? $this->_borderInsideHSize : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set border inside vertical size
|
||||||
|
*
|
||||||
|
* @param int $pValue
|
||||||
|
*/
|
||||||
public function setBorderInsideVSize($pValue = null)
|
public function setBorderInsideVSize($pValue = null)
|
||||||
{
|
{
|
||||||
$this->_borderInsideVSize = $pValue;
|
$this->_borderInsideVSize = $pValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get border inside vertical size
|
||||||
|
*/
|
||||||
public function getBorderInsideVSize()
|
public function getBorderInsideVSize()
|
||||||
{
|
{
|
||||||
return (isset($this->_borderInsideVSize)) ? $this->_borderInsideVSize : null;
|
return (isset($this->_borderInsideVSize)) ? $this->_borderInsideVSize : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set cell margin top
|
||||||
|
*
|
||||||
|
* @param int $pValue
|
||||||
|
*/
|
||||||
public function setCellMarginTop($pValue = null)
|
public function setCellMarginTop($pValue = null)
|
||||||
{
|
{
|
||||||
$this->_cellMarginTop = $pValue;
|
$this->_cellMarginTop = $pValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get cell margin top
|
||||||
|
*/
|
||||||
public function getCellMarginTop()
|
public function getCellMarginTop()
|
||||||
{
|
{
|
||||||
return $this->_cellMarginTop;
|
return $this->_cellMarginTop;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set cell margin left
|
||||||
|
*
|
||||||
|
* @param int $pValue
|
||||||
|
*/
|
||||||
public function setCellMarginLeft($pValue = null)
|
public function setCellMarginLeft($pValue = null)
|
||||||
{
|
{
|
||||||
$this->_cellMarginLeft = $pValue;
|
$this->_cellMarginLeft = $pValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get cell margin left
|
||||||
|
*/
|
||||||
public function getCellMarginLeft()
|
public function getCellMarginLeft()
|
||||||
{
|
{
|
||||||
return $this->_cellMarginLeft;
|
return $this->_cellMarginLeft;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set cell margin right
|
||||||
|
*
|
||||||
|
* @param int $pValue
|
||||||
|
*/
|
||||||
public function setCellMarginRight($pValue = null)
|
public function setCellMarginRight($pValue = null)
|
||||||
{
|
{
|
||||||
$this->_cellMarginRight = $pValue;
|
$this->_cellMarginRight = $pValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get cell margin right
|
||||||
|
*/
|
||||||
public function getCellMarginRight()
|
public function getCellMarginRight()
|
||||||
{
|
{
|
||||||
return $this->_cellMarginRight;
|
return $this->_cellMarginRight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set cell margin bottom
|
||||||
|
*
|
||||||
|
* @param int $pValue
|
||||||
|
*/
|
||||||
public function setCellMarginBottom($pValue = null)
|
public function setCellMarginBottom($pValue = null)
|
||||||
{
|
{
|
||||||
$this->_cellMarginBottom = $pValue;
|
$this->_cellMarginBottom = $pValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get cell margin bottom
|
||||||
|
*/
|
||||||
public function getCellMarginBottom()
|
public function getCellMarginBottom()
|
||||||
{
|
{
|
||||||
return $this->_cellMarginBottom;
|
return $this->_cellMarginBottom;
|
||||||
|
|
@ -479,6 +624,9 @@ class PHPWord_Style_TableFull
|
||||||
$this->_cellMarginBottom = $pValue;
|
$this->_cellMarginBottom = $pValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get cell margin
|
||||||
|
*/
|
||||||
public function getCellMargin()
|
public function getCellMargin()
|
||||||
{
|
{
|
||||||
return array($this->_cellMarginTop, $this->_cellMarginLeft, $this->_cellMarginRight, $this->_cellMarginBottom);
|
return array($this->_cellMarginTop, $this->_cellMarginLeft, $this->_cellMarginRight, $this->_cellMarginBottom);
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@ class PHPWord_Style_Tabs
|
||||||
private $_tabs;
|
private $_tabs;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param array $tabs
|
* @param array $tabs
|
||||||
*/
|
*/
|
||||||
|
|
@ -48,6 +49,7 @@ class PHPWord_Style_Tabs
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Convert to XML
|
||||||
*
|
*
|
||||||
* @param PHPWord_Shared_XMLWriter $objWriter
|
* @param PHPWord_Shared_XMLWriter $objWriter
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -105,6 +105,8 @@ class PHPWord_TOC
|
||||||
/**
|
/**
|
||||||
* Add a Title
|
* Add a Title
|
||||||
*
|
*
|
||||||
|
* @param string $text
|
||||||
|
* @param int $depth
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public static function addTitle($text, $depth = 0)
|
public static function addTitle($text, $depth = 0)
|
||||||
|
|
|
||||||
|
|
@ -33,8 +33,8 @@ interface PHPWord_Writer_IWriter
|
||||||
/**
|
/**
|
||||||
* Save PHPWord to file
|
* Save PHPWord to file
|
||||||
*
|
*
|
||||||
* @param string $pFileName
|
* @param string $pFilename
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function save($pFilename = null);
|
public function save($pFilename = null);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ class PHPWord_Writer_ODText implements PHPWord_Writer_IWriter
|
||||||
/**
|
/**
|
||||||
* Create a new PHPWord_Writer_ODText
|
* Create a new PHPWord_Writer_ODText
|
||||||
*
|
*
|
||||||
* @param PHPWord $pPHPWord
|
* @param PHPWord $pPHPWord
|
||||||
*/
|
*/
|
||||||
public function __construct(PHPWord $pPHPWord = null)
|
public function __construct(PHPWord $pPHPWord = null)
|
||||||
{
|
{
|
||||||
|
|
@ -98,8 +98,8 @@ class PHPWord_Writer_ODText implements PHPWord_Writer_IWriter
|
||||||
/**
|
/**
|
||||||
* Save PHPWord to file
|
* Save PHPWord to file
|
||||||
*
|
*
|
||||||
* @param string $pFileName
|
* @param string $pFilename
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function save($pFilename = null)
|
public function save($pFilename = null)
|
||||||
{
|
{
|
||||||
|
|
@ -212,8 +212,8 @@ class PHPWord_Writer_ODText implements PHPWord_Writer_IWriter
|
||||||
/**
|
/**
|
||||||
* Get PHPWord object
|
* Get PHPWord object
|
||||||
*
|
*
|
||||||
* @param PHPWord $pPHPWord PHPWord object
|
* @param PHPWord $pPHPWord PHPWord object
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
* @return PHPWord_Writer_ODText
|
* @return PHPWord_Writer_ODText
|
||||||
*/
|
*/
|
||||||
public function setPHPWord(PHPWord $pPHPWord = null)
|
public function setPHPWord(PHPWord $pPHPWord = null)
|
||||||
|
|
@ -226,6 +226,7 @@ class PHPWord_Writer_ODText implements PHPWord_Writer_IWriter
|
||||||
* Get PHPWord_Worksheet_BaseDrawing HashTable
|
* Get PHPWord_Worksheet_BaseDrawing HashTable
|
||||||
*
|
*
|
||||||
* @return PHPWord_HashTable
|
* @return PHPWord_HashTable
|
||||||
|
* @codeCoverageIgnore
|
||||||
*/
|
*/
|
||||||
public function getDrawingHashTable()
|
public function getDrawingHashTable()
|
||||||
{
|
{
|
||||||
|
|
@ -235,8 +236,8 @@ class PHPWord_Writer_ODText implements PHPWord_Writer_IWriter
|
||||||
/**
|
/**
|
||||||
* Get writer part
|
* Get writer part
|
||||||
*
|
*
|
||||||
* @param string $pPartName Writer part name
|
* @param string $pPartName Writer part name
|
||||||
* @return PHPWord_Writer_ODText_WriterPart
|
* @return PHPWord_Writer_ODText_WriterPart
|
||||||
*/
|
*/
|
||||||
public function getWriterPart($pPartName = '')
|
public function getWriterPart($pPartName = '')
|
||||||
{
|
{
|
||||||
|
|
@ -260,9 +261,9 @@ class PHPWord_Writer_ODText implements PHPWord_Writer_IWriter
|
||||||
/**
|
/**
|
||||||
* Set use disk caching where possible?
|
* Set use disk caching where possible?
|
||||||
*
|
*
|
||||||
* @param boolean $pValue
|
* @param boolean $pValue
|
||||||
* @param string $pDirectory Disk caching directory
|
* @param string $pDirectory Disk caching directory
|
||||||
* @throws Exception Exception when directory does not exist
|
* @throws Exception Exception when directory does not exist
|
||||||
* @return PHPWord_Writer_ODText
|
* @return PHPWord_Writer_ODText
|
||||||
*/
|
*/
|
||||||
public function setUseDiskCaching($pValue = false, $pDirectory = null)
|
public function setUseDiskCaching($pValue = false, $pDirectory = null)
|
||||||
|
|
|
||||||
|
|
@ -344,9 +344,9 @@ class PHPWord_Writer_ODText_Content extends PHPWord_Writer_ODText_WriterPart
|
||||||
/**
|
/**
|
||||||
* Write TextRun section
|
* Write TextRun section
|
||||||
*
|
*
|
||||||
* @param PHPWord_Shared_XMLWriter $objWriter
|
* @param PHPWord_Shared_XMLWriter $objWriter
|
||||||
* @param PHPWord_Section_TextRun $textrun
|
* @param PHPWord_Section_TextRun $textrun
|
||||||
* @todo Enable all other section types
|
* @todo Enable all other section types
|
||||||
*/
|
*/
|
||||||
protected function _writeTextRun(PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Section_TextRun $textrun)
|
protected function _writeTextRun(PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Section_TextRun $textrun)
|
||||||
{
|
{
|
||||||
|
|
@ -364,6 +364,8 @@ class PHPWord_Writer_ODText_Content extends PHPWord_Writer_ODText_WriterPart
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write TextBreak
|
* Write TextBreak
|
||||||
|
*
|
||||||
|
* @param PHPWord_Shared_XMLWriter $objWriter
|
||||||
*/
|
*/
|
||||||
protected function _writeTextBreak(PHPWord_Shared_XMLWriter $objWriter = null)
|
protected function _writeTextBreak(PHPWord_Shared_XMLWriter $objWriter = null)
|
||||||
{
|
{
|
||||||
|
|
@ -373,10 +375,22 @@ class PHPWord_Writer_ODText_Content extends PHPWord_Writer_ODText_WriterPart
|
||||||
}
|
}
|
||||||
|
|
||||||
// @codeCoverageIgnoreStart
|
// @codeCoverageIgnoreStart
|
||||||
|
/**
|
||||||
|
* Write end section
|
||||||
|
*
|
||||||
|
* @param PHPWord_Shared_XMLWriter $objWriter
|
||||||
|
* @param PHPWord_Section $section
|
||||||
|
*/
|
||||||
private function _writeEndSection(PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Section $section = null)
|
private function _writeEndSection(PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Section $section = null)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Write section
|
||||||
|
*
|
||||||
|
* @param PHPWord_Shared_XMLWriter $objWriter
|
||||||
|
* @param PHPWord_Section $section
|
||||||
|
*/
|
||||||
private function _writeSection(PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Section $section = null)
|
private function _writeSection(PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Section $section = null)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,14 +44,31 @@ class PHPWord_Writer_RTF implements PHPWord_Writer_IWriter
|
||||||
*/
|
*/
|
||||||
private $_drawingHashTable;
|
private $_drawingHashTable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Color table
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
private $_colorTable;
|
private $_colorTable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Font table
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
private $_fontTable;
|
private $_fontTable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Last paragraph style
|
||||||
|
*
|
||||||
|
* @var PHPWord_Style_Paragraph
|
||||||
|
*/
|
||||||
private $_lastParagraphStyle;
|
private $_lastParagraphStyle;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new PHPWord_Writer_ODText
|
* Create a new PHPWord_Writer_ODText
|
||||||
*
|
*
|
||||||
* @param PHPWord $pPHPWord
|
* @param PHPWord $pPHPWord
|
||||||
*/
|
*/
|
||||||
public function __construct(PHPWord $pPHPWord = null)
|
public function __construct(PHPWord $pPHPWord = null)
|
||||||
{
|
{
|
||||||
|
|
@ -65,8 +82,8 @@ class PHPWord_Writer_RTF implements PHPWord_Writer_IWriter
|
||||||
/**
|
/**
|
||||||
* Save PHPWord to file
|
* Save PHPWord to file
|
||||||
*
|
*
|
||||||
* @param string $pFileName
|
* @param string $pFilename
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function save($pFilename = null)
|
public function save($pFilename = null)
|
||||||
{
|
{
|
||||||
|
|
@ -115,8 +132,8 @@ class PHPWord_Writer_RTF implements PHPWord_Writer_IWriter
|
||||||
/**
|
/**
|
||||||
* Get PHPWord object
|
* Get PHPWord object
|
||||||
*
|
*
|
||||||
* @param PHPWord $pPHPWord PHPWord object
|
* @param PHPWord $pPHPWord PHPWord object
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
* @return PHPWord_Writer_RTF
|
* @return PHPWord_Writer_RTF
|
||||||
*/
|
*/
|
||||||
public function setPHPWord(PHPWord $pPHPWord = null)
|
public function setPHPWord(PHPWord $pPHPWord = null)
|
||||||
|
|
@ -129,12 +146,18 @@ class PHPWord_Writer_RTF implements PHPWord_Writer_IWriter
|
||||||
* Get PHPWord_Worksheet_BaseDrawing HashTable
|
* Get PHPWord_Worksheet_BaseDrawing HashTable
|
||||||
*
|
*
|
||||||
* @return PHPWord_HashTable
|
* @return PHPWord_HashTable
|
||||||
|
* @codeCoverageIgnore
|
||||||
*/
|
*/
|
||||||
public function getDrawingHashTable()
|
public function getDrawingHashTable()
|
||||||
{
|
{
|
||||||
return $this->_drawingHashTable;
|
return $this->_drawingHashTable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get document data
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
private function getData()
|
private function getData()
|
||||||
{
|
{
|
||||||
// PHPWord object : $this->_document
|
// PHPWord object : $this->_document
|
||||||
|
|
@ -188,6 +211,11 @@ class PHPWord_Writer_RTF implements PHPWord_Writer_IWriter
|
||||||
return $sRTFContent;
|
return $sRTFContent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get font table
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
private function getDataFont()
|
private function getDataFont()
|
||||||
{
|
{
|
||||||
$pPHPWord = $this->_document;
|
$pPHPWord = $this->_document;
|
||||||
|
|
@ -238,6 +266,11 @@ class PHPWord_Writer_RTF implements PHPWord_Writer_IWriter
|
||||||
return $arrFonts;
|
return $arrFonts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get color tables
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
private function getDataColor()
|
private function getDataColor()
|
||||||
{
|
{
|
||||||
$pPHPWord = $this->_document;
|
$pPHPWord = $this->_document;
|
||||||
|
|
@ -294,6 +327,11 @@ class PHPWord_Writer_RTF implements PHPWord_Writer_IWriter
|
||||||
return $arrColors;
|
return $arrColors;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get content
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
private function getDataContent()
|
private function getDataContent()
|
||||||
{
|
{
|
||||||
$pPHPWord = $this->_document;
|
$pPHPWord = $this->_document;
|
||||||
|
|
@ -342,6 +380,10 @@ class PHPWord_Writer_RTF implements PHPWord_Writer_IWriter
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get text
|
* Get text
|
||||||
|
*
|
||||||
|
* @param PHPWord_Section_Text $text
|
||||||
|
* @param boolean $withoutP
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
private function getDataContentText(PHPWord_Section_Text $text, $withoutP = false)
|
private function getDataContentText(PHPWord_Section_Text $text, $withoutP = false)
|
||||||
{
|
{
|
||||||
|
|
@ -428,11 +470,15 @@ class PHPWord_Writer_RTF implements PHPWord_Writer_IWriter
|
||||||
if (!$withoutP) {
|
if (!$withoutP) {
|
||||||
$sRTFText .= '\par' . PHP_EOL;
|
$sRTFText .= '\par' . PHP_EOL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $sRTFText;
|
return $sRTFText;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get text run content
|
* Get text run content
|
||||||
|
*
|
||||||
|
* @param PHPWord_Section_TextRun $textrun
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
private function getDataContentTextRun(PHPWord_Section_TextRun $textrun)
|
private function getDataContentTextRun(PHPWord_Section_TextRun $textrun)
|
||||||
{
|
{
|
||||||
|
|
@ -449,9 +495,15 @@ class PHPWord_Writer_RTF implements PHPWord_Writer_IWriter
|
||||||
}
|
}
|
||||||
$sRTFText .= '\par' . PHP_EOL;
|
$sRTFText .= '\par' . PHP_EOL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $sRTFText;
|
return $sRTFText;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get text break
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
private function getDataContentTextBreak()
|
private function getDataContentTextBreak()
|
||||||
{
|
{
|
||||||
$this->_lastParagraphStyle = '';
|
$this->_lastParagraphStyle = '';
|
||||||
|
|
@ -463,6 +515,7 @@ class PHPWord_Writer_RTF implements PHPWord_Writer_IWriter
|
||||||
* Write unsupported element
|
* Write unsupported element
|
||||||
*
|
*
|
||||||
* @param string $element
|
* @param string $element
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
private function getDataContentUnsupportedElement($element)
|
private function getDataContentUnsupportedElement($element)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@
|
||||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||||
* @version 0.8.0
|
* @version 0.8.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use PhpOffice\PhpWord\Exceptions\InvalidImageException;
|
use PhpOffice\PhpWord\Exceptions\InvalidImageException;
|
||||||
use PhpOffice\PhpWord\Exceptions\UnsupportedImageTypeException;
|
use PhpOffice\PhpWord\Exceptions\UnsupportedImageTypeException;
|
||||||
|
|
||||||
|
|
@ -33,15 +32,54 @@ use PhpOffice\PhpWord\Exceptions\UnsupportedImageTypeException;
|
||||||
*/
|
*/
|
||||||
class PHPWord_Writer_Word2007 implements PHPWord_Writer_IWriter
|
class PHPWord_Writer_Word2007 implements PHPWord_Writer_IWriter
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* PHPWord object
|
||||||
|
*
|
||||||
|
* @var PHPWord
|
||||||
|
*/
|
||||||
private $_document;
|
private $_document;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writer parts
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
private $_writerParts;
|
private $_writerParts;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Directory for caching
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
private $_diskCachingDirectory;
|
private $_diskCachingDirectory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use disk caching
|
||||||
|
*
|
||||||
|
* @var boolean
|
||||||
|
*/
|
||||||
private $_useDiskCaching = false;
|
private $_useDiskCaching = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Image types
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
private $_imageTypes = array();
|
private $_imageTypes = array();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Object types
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
private $_objectTypes = array();
|
private $_objectTypes = array();
|
||||||
|
|
||||||
public function __construct(PHPWord $PHPWord = null)
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param PHPWord $PHPWord
|
||||||
|
*/
|
||||||
|
public function __construct(PHPWord $PHPWord = null)
|
||||||
{
|
{
|
||||||
$this->_document = $PHPWord;
|
$this->_document = $PHPWord;
|
||||||
|
|
||||||
|
|
@ -63,6 +101,11 @@ class PHPWord_Writer_Word2007 implements PHPWord_Writer_IWriter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Save
|
||||||
|
*
|
||||||
|
* @param string $pFilename
|
||||||
|
*/
|
||||||
public function save($pFilename = null)
|
public function save($pFilename = null)
|
||||||
{
|
{
|
||||||
if (!is_null($this->_document)) {
|
if (!is_null($this->_document)) {
|
||||||
|
|
@ -204,6 +247,8 @@ class PHPWord_Writer_Word2007 implements PHPWord_Writer_IWriter
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Check content types
|
||||||
|
*
|
||||||
* @param string $src
|
* @param string $src
|
||||||
*/
|
*/
|
||||||
private function checkContentTypes($src)
|
private function checkContentTypes($src)
|
||||||
|
|
@ -230,6 +275,11 @@ class PHPWord_Writer_Word2007 implements PHPWord_Writer_IWriter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get writer part
|
||||||
|
*
|
||||||
|
* @param string $pPartName
|
||||||
|
*/
|
||||||
public function getWriterPart($pPartName = '')
|
public function getWriterPart($pPartName = '')
|
||||||
{
|
{
|
||||||
if ($pPartName != '' && isset($this->_writerParts[strtolower($pPartName)])) {
|
if ($pPartName != '' && isset($this->_writerParts[strtolower($pPartName)])) {
|
||||||
|
|
@ -239,11 +289,20 @@ class PHPWord_Writer_Word2007 implements PHPWord_Writer_IWriter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get use disk catching setting
|
||||||
|
*/
|
||||||
public function getUseDiskCaching()
|
public function getUseDiskCaching()
|
||||||
{
|
{
|
||||||
return $this->_useDiskCaching;
|
return $this->_useDiskCaching;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set use disk catching setting
|
||||||
|
*
|
||||||
|
* @param boolean $pValue
|
||||||
|
* @param string $pDirectory
|
||||||
|
*/
|
||||||
public function setUseDiskCaching($pValue = false, $pDirectory = null)
|
public function setUseDiskCaching($pValue = false, $pDirectory = null)
|
||||||
{
|
{
|
||||||
$this->_useDiskCaching = $pValue;
|
$this->_useDiskCaching = $pValue;
|
||||||
|
|
@ -259,6 +318,12 @@ class PHPWord_Writer_Word2007 implements PHPWord_Writer_IWriter
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add file to package
|
||||||
|
*
|
||||||
|
* @param mixed $objZip
|
||||||
|
* @param array $element
|
||||||
|
*/
|
||||||
private function _addFileToPackage($objZip, $element)
|
private function _addFileToPackage($objZip, $element)
|
||||||
{
|
{
|
||||||
if (isset($element['isMemImage']) && $element['isMemImage']) {
|
if (isset($element['isMemImage']) && $element['isMemImage']) {
|
||||||
|
|
|
||||||
|
|
@ -31,9 +31,10 @@
|
||||||
*/
|
*/
|
||||||
class PHPWord_Writer_Word2007_Base extends PHPWord_Writer_Word2007_WriterPart
|
class PHPWord_Writer_Word2007_Base extends PHPWord_Writer_Word2007_WriterPart
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write text
|
* Write text
|
||||||
|
*
|
||||||
|
* @param boolean $withoutP
|
||||||
*/
|
*/
|
||||||
protected function _writeText(PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Section_Text $text, $withoutP = false)
|
protected function _writeText(PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Section_Text $text, $withoutP = false)
|
||||||
{
|
{
|
||||||
|
|
@ -232,6 +233,8 @@ class PHPWord_Writer_Word2007_Base extends PHPWord_Writer_Word2007_WriterPart
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write link
|
* Write link
|
||||||
|
*
|
||||||
|
* @param boolean $withoutP
|
||||||
*/
|
*/
|
||||||
protected function _writeLink(PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Section_Link $link, $withoutP = false)
|
protected function _writeLink(PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Section_Link $link, $withoutP = false)
|
||||||
{
|
{
|
||||||
|
|
@ -791,8 +794,11 @@ class PHPWord_Writer_Word2007_Base extends PHPWord_Writer_Word2007_WriterPart
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Write image
|
||||||
|
*
|
||||||
* @param \PHPWord_Shared_XMLWriter $objWriter
|
* @param \PHPWord_Shared_XMLWriter $objWriter
|
||||||
* @param \PHPWord_Section_Image|\PHPWord_Section_MemoryImage $image
|
* @param \PHPWord_Section_Image|\PHPWord_Section_MemoryImage $image
|
||||||
|
* @param boolean $withoutP
|
||||||
*/
|
*/
|
||||||
protected function _writeImage(PHPWord_Shared_XMLWriter $objWriter = null, $image, $withoutP = false)
|
protected function _writeImage(PHPWord_Shared_XMLWriter $objWriter = null, $image, $withoutP = false)
|
||||||
{
|
{
|
||||||
|
|
@ -873,6 +879,8 @@ class PHPWord_Writer_Word2007_Base extends PHPWord_Writer_Word2007_WriterPart
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write watermark
|
* Write watermark
|
||||||
|
*
|
||||||
|
* @param PHP_Section_Image|PHP_Section_MemoryImage $image
|
||||||
*/
|
*/
|
||||||
protected function _writeWatermark(PHPWord_Shared_XMLWriter $objWriter = null, $image)
|
protected function _writeWatermark(PHPWord_Shared_XMLWriter $objWriter = null, $image)
|
||||||
{
|
{
|
||||||
|
|
@ -1003,6 +1011,8 @@ class PHPWord_Writer_Word2007_Base extends PHPWord_Writer_Word2007_WriterPart
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write footnote reference
|
* Write footnote reference
|
||||||
|
*
|
||||||
|
* @param boolean $withoutP
|
||||||
*/
|
*/
|
||||||
protected function _writeFootnoteReference(PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Section_Footnote $footnote, $withoutP = false)
|
protected function _writeFootnoteReference(PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Section_Footnote $footnote, $withoutP = false)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,15 @@
|
||||||
*/
|
*/
|
||||||
class PHPWord_Writer_Word2007_ContentTypes extends PHPWord_Writer_Word2007_WriterPart
|
class PHPWord_Writer_Word2007_ContentTypes extends PHPWord_Writer_Word2007_WriterPart
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Write contenttypes.xml
|
||||||
|
*
|
||||||
|
* @param array $_imageTypes
|
||||||
|
* @param array $_objectTypes
|
||||||
|
* @param int $_cHdrs
|
||||||
|
* @param array $footers
|
||||||
|
* @return string XML data
|
||||||
|
*/
|
||||||
public function writeContentTypes($_imageTypes, $_objectTypes, $_cHdrs, $footers)
|
public function writeContentTypes($_imageTypes, $_objectTypes, $_cHdrs, $footers)
|
||||||
{
|
{
|
||||||
// Create XML writer
|
// Create XML writer
|
||||||
|
|
@ -163,7 +171,6 @@ class PHPWord_Writer_Word2007_ContentTypes extends PHPWord_Writer_Word2007_Write
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$objWriter->endElement();
|
$objWriter->endElement();
|
||||||
|
|
||||||
// Return
|
// Return
|
||||||
|
|
@ -173,9 +180,9 @@ class PHPWord_Writer_Word2007_ContentTypes extends PHPWord_Writer_Word2007_Write
|
||||||
/**
|
/**
|
||||||
* Get image mime type
|
* Get image mime type
|
||||||
*
|
*
|
||||||
* @param string $pFile Filename
|
* @param string $pFile Filename
|
||||||
* @return string Mime Type
|
* @return string Mime Type
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
private function _getImageMimeType($pFile = '')
|
private function _getImageMimeType($pFile = '')
|
||||||
{
|
{
|
||||||
|
|
@ -190,10 +197,10 @@ class PHPWord_Writer_Word2007_ContentTypes extends PHPWord_Writer_Word2007_Write
|
||||||
/**
|
/**
|
||||||
* Write Default content type
|
* Write Default content type
|
||||||
*
|
*
|
||||||
* @param PHPWord_Shared_XMLWriter $objWriter XML Writer
|
* @param PHPWord_Shared_XMLWriter $objWriter XML Writer
|
||||||
* @param string $pPartname Part name
|
* @param string $pPartname Part name
|
||||||
* @param string $pContentType Content type
|
* @param string $pContentType Content type
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
private function _writeDefaultContentType(PHPWord_Shared_XMLWriter $objWriter = null, $pPartname = '', $pContentType = '')
|
private function _writeDefaultContentType(PHPWord_Shared_XMLWriter $objWriter = null, $pPartname = '', $pContentType = '')
|
||||||
{
|
{
|
||||||
|
|
@ -211,10 +218,10 @@ class PHPWord_Writer_Word2007_ContentTypes extends PHPWord_Writer_Word2007_Write
|
||||||
/**
|
/**
|
||||||
* Write Override content type
|
* Write Override content type
|
||||||
*
|
*
|
||||||
* @param PHPWord_Shared_XMLWriter $objWriter XML Writer
|
* @param PHPWord_Shared_XMLWriter $objWriter XML Writer
|
||||||
* @param string $pPartname Part name
|
* @param string $pPartname Part name
|
||||||
* @param string $pContentType Content type
|
* @param string $pContentType Content type
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
private function _writeOverrideContentType(PHPWord_Shared_XMLWriter $objWriter = null, $pPartname = '', $pContentType = '')
|
private function _writeOverrideContentType(PHPWord_Shared_XMLWriter $objWriter = null, $pPartname = '', $pContentType = '')
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,12 @@
|
||||||
*/
|
*/
|
||||||
class PHPWord_Writer_Word2007_DocProps extends PHPWord_Writer_Word2007_WriterPart
|
class PHPWord_Writer_Word2007_DocProps extends PHPWord_Writer_Word2007_WriterPart
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Write app.xml
|
||||||
|
*
|
||||||
|
* @param PHPWord $pPHPWord
|
||||||
|
* @return string XML data
|
||||||
|
*/
|
||||||
public function writeDocPropsApp(PHPWord $pPHPWord = null)
|
public function writeDocPropsApp(PHPWord $pPHPWord = null)
|
||||||
{
|
{
|
||||||
// Create XML writer
|
// Create XML writer
|
||||||
|
|
@ -122,7 +127,12 @@ class PHPWord_Writer_Word2007_DocProps extends PHPWord_Writer_Word2007_WriterPar
|
||||||
return $objWriter->getData();
|
return $objWriter->getData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Write core.xml
|
||||||
|
*
|
||||||
|
* @param PHPWord $pPHPWord
|
||||||
|
* @return string XML data
|
||||||
|
*/
|
||||||
public function writeDocPropsCore(PHPWord $pPHPWord = null)
|
public function writeDocPropsCore(PHPWord $pPHPWord = null)
|
||||||
{
|
{
|
||||||
// Create XML writer
|
// Create XML writer
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,9 @@
|
||||||
*/
|
*/
|
||||||
class PHPWord_Writer_Word2007_Document extends PHPWord_Writer_Word2007_Base
|
class PHPWord_Writer_Word2007_Document extends PHPWord_Writer_Word2007_Base
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Write document.xml
|
||||||
|
*/
|
||||||
public function writeDocument(PHPWord $pPHPWord = null)
|
public function writeDocument(PHPWord $pPHPWord = null)
|
||||||
{
|
{
|
||||||
// Create XML writer
|
// Create XML writer
|
||||||
|
|
@ -114,6 +116,9 @@ class PHPWord_Writer_Word2007_Document extends PHPWord_Writer_Word2007_Base
|
||||||
return $objWriter->getData();
|
return $objWriter->getData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Write section start
|
||||||
|
*/
|
||||||
private function _writeSection(PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Section $section)
|
private function _writeSection(PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Section $section)
|
||||||
{
|
{
|
||||||
$objWriter->startElement('w:p');
|
$objWriter->startElement('w:p');
|
||||||
|
|
@ -123,6 +128,9 @@ class PHPWord_Writer_Word2007_Document extends PHPWord_Writer_Word2007_Base
|
||||||
$objWriter->endElement();
|
$objWriter->endElement();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Write section end
|
||||||
|
*/
|
||||||
private function _writeEndSection(PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Section $section)
|
private function _writeEndSection(PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Section $section)
|
||||||
{
|
{
|
||||||
$settings = $section->getSettings();
|
$settings = $section->getSettings();
|
||||||
|
|
@ -256,6 +264,9 @@ class PHPWord_Writer_Word2007_Document extends PHPWord_Writer_Word2007_Base
|
||||||
$objWriter->endElement();
|
$objWriter->endElement();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Write page break element
|
||||||
|
*/
|
||||||
private function _writePageBreak(PHPWord_Shared_XMLWriter $objWriter = null)
|
private function _writePageBreak(PHPWord_Shared_XMLWriter $objWriter = null)
|
||||||
{
|
{
|
||||||
$objWriter->startElement('w:p');
|
$objWriter->startElement('w:p');
|
||||||
|
|
@ -267,6 +278,9 @@ class PHPWord_Writer_Word2007_Document extends PHPWord_Writer_Word2007_Base
|
||||||
$objWriter->endElement();
|
$objWriter->endElement();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Write list item element
|
||||||
|
*/
|
||||||
public 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();
|
$textObject = $listItem->getTextObject();
|
||||||
|
|
@ -306,6 +320,9 @@ class PHPWord_Writer_Word2007_Document extends PHPWord_Writer_Word2007_Base
|
||||||
$objWriter->endElement();
|
$objWriter->endElement();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Write object element
|
||||||
|
*/
|
||||||
protected function _writeObject(PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Section_Object $object)
|
protected function _writeObject(PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Section_Object $object)
|
||||||
{
|
{
|
||||||
$rIdObject = $object->getRelationId();
|
$rIdObject = $object->getRelationId();
|
||||||
|
|
@ -365,6 +382,9 @@ class PHPWord_Writer_Word2007_Document extends PHPWord_Writer_Word2007_Base
|
||||||
$objWriter->endElement(); // w:p
|
$objWriter->endElement(); // w:p
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Write TOC element
|
||||||
|
*/
|
||||||
private function _writeTOC(PHPWord_Shared_XMLWriter $objWriter = null)
|
private function _writeTOC(PHPWord_Shared_XMLWriter $objWriter = null)
|
||||||
{
|
{
|
||||||
$titles = PHPWord_TOC::getTitles();
|
$titles = PHPWord_TOC::getTitles();
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,12 @@
|
||||||
*/
|
*/
|
||||||
class PHPWord_Writer_Word2007_DocumentRels extends PHPWord_Writer_Word2007_WriterPart
|
class PHPWord_Writer_Word2007_DocumentRels extends PHPWord_Writer_Word2007_WriterPart
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Write word/_rels/document.xml.rels
|
||||||
|
*
|
||||||
|
* @param array $_relsCollection
|
||||||
|
* @return string XML data
|
||||||
|
*/
|
||||||
public function writeDocumentRels($_relsCollection)
|
public function writeDocumentRels($_relsCollection)
|
||||||
{
|
{
|
||||||
// Create XML writer
|
// Create XML writer
|
||||||
|
|
@ -119,6 +124,12 @@ class PHPWord_Writer_Word2007_DocumentRels extends PHPWord_Writer_Word2007_Write
|
||||||
return $objWriter->getData();
|
return $objWriter->getData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Write word/_rels/(header|footer)(\d).xml.rels
|
||||||
|
*
|
||||||
|
* @param array $_relsCollection
|
||||||
|
* @return string XML data
|
||||||
|
*/
|
||||||
public function writeHeaderFooterRels($_relsCollection)
|
public function writeHeaderFooterRels($_relsCollection)
|
||||||
{
|
{
|
||||||
// Create XML writer
|
// Create XML writer
|
||||||
|
|
@ -150,13 +161,21 @@ class PHPWord_Writer_Word2007_DocumentRels extends PHPWord_Writer_Word2007_Write
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$objWriter->endElement();
|
$objWriter->endElement();
|
||||||
|
|
||||||
// Return
|
// Return
|
||||||
return $objWriter->getData();
|
return $objWriter->getData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Write individual relations
|
||||||
|
*
|
||||||
|
* @param PHPWord_Shared_XMLWriter $objWriter
|
||||||
|
* @param int $pId
|
||||||
|
* @param string $pType
|
||||||
|
* @param string $pTarget
|
||||||
|
* @param string $pTargetMode
|
||||||
|
*/
|
||||||
private function _writeRelationship(PHPWord_Shared_XMLWriter $objWriter = null, $pId = 1, $pType = '', $pTarget = '', $pTargetMode = '')
|
private function _writeRelationship(PHPWord_Shared_XMLWriter $objWriter = null, $pId = 1, $pType = '', $pTarget = '', $pTargetMode = '')
|
||||||
{
|
{
|
||||||
if ($pType != '' && $pTarget != '') {
|
if ($pType != '' && $pTarget != '') {
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,12 @@
|
||||||
*/
|
*/
|
||||||
class PHPWord_Writer_Word2007_Footer extends PHPWord_Writer_Word2007_Base
|
class PHPWord_Writer_Word2007_Footer extends PHPWord_Writer_Word2007_Base
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Write footer
|
||||||
|
*
|
||||||
|
* @param PHPWord_Section_Footer $footer
|
||||||
|
* @return string XML data
|
||||||
|
*/
|
||||||
public function writeFooter(PHPWord_Section_Footer $footer)
|
public function writeFooter(PHPWord_Section_Footer $footer)
|
||||||
{
|
{
|
||||||
// Create XML writer
|
// Create XML writer
|
||||||
|
|
|
||||||
|
|
@ -25,9 +25,17 @@
|
||||||
* @version 0.8.0
|
* @version 0.8.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class PHPWord_Writer_Word2007_Footnotes
|
||||||
|
*/
|
||||||
class PHPWord_Writer_Word2007_Footnotes extends PHPWord_Writer_Word2007_Base
|
class PHPWord_Writer_Word2007_Footnotes extends PHPWord_Writer_Word2007_Base
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Write footnotes.xml
|
||||||
|
*
|
||||||
|
* @param array $allFootnotesCollection
|
||||||
|
* @return string XML data
|
||||||
|
*/
|
||||||
public function writeFootnotes($allFootnotesCollection)
|
public function writeFootnotes($allFootnotesCollection)
|
||||||
{
|
{
|
||||||
// Create XML writer
|
// Create XML writer
|
||||||
|
|
|
||||||
|
|
@ -25,9 +25,16 @@
|
||||||
* @version 0.8.0
|
* @version 0.8.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class PHPWord_Writer_Word2007_FootnotesRels
|
||||||
|
*/
|
||||||
class PHPWord_Writer_Word2007_FootnotesRels extends PHPWord_Writer_Word2007_WriterPart
|
class PHPWord_Writer_Word2007_FootnotesRels extends PHPWord_Writer_Word2007_WriterPart
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Write footnotes relationships
|
||||||
|
*
|
||||||
|
* @param array $_relsCollection
|
||||||
|
*/
|
||||||
public function writeFootnotesRels($_relsCollection)
|
public function writeFootnotesRels($_relsCollection)
|
||||||
{
|
{
|
||||||
// Create XML writer
|
// Create XML writer
|
||||||
|
|
@ -61,6 +68,15 @@ class PHPWord_Writer_Word2007_FootnotesRels extends PHPWord_Writer_Word2007_Writ
|
||||||
return $objWriter->getData();
|
return $objWriter->getData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Write individual relations
|
||||||
|
*
|
||||||
|
* @param PHPWord_Shared_XMLWriter $objWriter
|
||||||
|
* @param int $pId
|
||||||
|
* @param string $pType
|
||||||
|
* @param string $pTarget
|
||||||
|
* @param string $pTargetMode
|
||||||
|
*/
|
||||||
private function _writeRelationship(PHPWord_Shared_XMLWriter $objWriter = null, $pId = 1, $pType = '', $pTarget = '', $pTargetMode = '')
|
private function _writeRelationship(PHPWord_Shared_XMLWriter $objWriter = null, $pId = 1, $pType = '', $pTarget = '', $pTargetMode = '')
|
||||||
{
|
{
|
||||||
if ($pType != '' && $pTarget != '') {
|
if ($pType != '' && $pTarget != '') {
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,12 @@
|
||||||
*/
|
*/
|
||||||
class PHPWord_Writer_Word2007_Header extends PHPWord_Writer_Word2007_Base
|
class PHPWord_Writer_Word2007_Header extends PHPWord_Writer_Word2007_Base
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Write header
|
||||||
|
*
|
||||||
|
* @param PHPWord_Section_Header $header
|
||||||
|
* @return string XML data
|
||||||
|
*/
|
||||||
public function writeHeader(PHPWord_Section_Header $header)
|
public function writeHeader(PHPWord_Section_Header $header)
|
||||||
{
|
{
|
||||||
// Create XML writer
|
// Create XML writer
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,11 @@
|
||||||
*/
|
*/
|
||||||
class PHPWord_Writer_Word2007_Rels extends PHPWord_Writer_Word2007_WriterPart
|
class PHPWord_Writer_Word2007_Rels extends PHPWord_Writer_Word2007_WriterPart
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Write _rels/.rels
|
||||||
|
*
|
||||||
|
* @param PHPWord $pPHPWord
|
||||||
|
*/
|
||||||
public function writeRelationships(PHPWord $pPHPWord = null)
|
public function writeRelationships(PHPWord $pPHPWord = null)
|
||||||
{
|
{
|
||||||
// Create XML writer
|
// Create XML writer
|
||||||
|
|
|
||||||
|
|
@ -30,9 +30,18 @@
|
||||||
*/
|
*/
|
||||||
class PHPWord_Writer_Word2007_Styles extends PHPWord_Writer_Word2007_Base
|
class PHPWord_Writer_Word2007_Styles extends PHPWord_Writer_Word2007_Base
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* PHPWord object
|
||||||
|
*
|
||||||
|
* @var PHPWord
|
||||||
|
*/
|
||||||
private $_document;
|
private $_document;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Write styles
|
||||||
|
*
|
||||||
|
* @param PHPWord $pPHPWord
|
||||||
|
*/
|
||||||
public function writeStyles(PHPWord $pPHPWord = null)
|
public function writeStyles(PHPWord $pPHPWord = null)
|
||||||
{
|
{
|
||||||
// Create XML writer
|
// Create XML writer
|
||||||
|
|
@ -181,6 +190,12 @@ class PHPWord_Writer_Word2007_Styles extends PHPWord_Writer_Word2007_Base
|
||||||
return $objWriter->getData();
|
return $objWriter->getData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Write style
|
||||||
|
*
|
||||||
|
* @param PHPWord_Shared_XMLWriter $objWriter
|
||||||
|
* @param PHPWord_Style_TableFull $style
|
||||||
|
*/
|
||||||
private function _writeFullTableStyle(PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Style_TableFull $style)
|
private function _writeFullTableStyle(PHPWord_Shared_XMLWriter $objWriter = null, PHPWord_Style_TableFull $style)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
@ -302,6 +317,13 @@ class PHPWord_Writer_Word2007_Styles extends PHPWord_Writer_Word2007_Base
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Write row style
|
||||||
|
*
|
||||||
|
* @param PHPWord_Shared_XMLWriter $objWriter
|
||||||
|
* @param string $type
|
||||||
|
* @param PHPWord_Style_TableFull $style
|
||||||
|
*/
|
||||||
private function _writeRowStyle(PHPWord_Shared_XMLWriter $objWriter = null, $type, PHPWord_Style_TableFull $style)
|
private function _writeRowStyle(PHPWord_Shared_XMLWriter $objWriter = null, $type, PHPWord_Style_TableFull $style)
|
||||||
{
|
{
|
||||||
$brdSz = $style->getBorderSize();
|
$brdSz = $style->getBorderSize();
|
||||||
|
|
@ -362,7 +384,11 @@ class PHPWord_Writer_Word2007_Styles extends PHPWord_Writer_Word2007_Base
|
||||||
$objWriter->endElement();
|
$objWriter->endElement();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Write doc defaults
|
||||||
|
*
|
||||||
|
* @param PHPWord_Shared_XMLWriter $objWriter
|
||||||
|
*/
|
||||||
private function _writeDocDefaults(PHPWord_Shared_XMLWriter $objWriter = null)
|
private function _writeDocDefaults(PHPWord_Shared_XMLWriter $objWriter = null)
|
||||||
{
|
{
|
||||||
$fontName = $this->_document->getDefaultFontName();
|
$fontName = $this->_document->getDefaultFontName();
|
||||||
|
|
|
||||||
|
|
@ -30,13 +30,28 @@
|
||||||
*/
|
*/
|
||||||
abstract class PHPWord_Writer_Word2007_WriterPart
|
abstract class PHPWord_Writer_Word2007_WriterPart
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Parent writer object
|
||||||
|
*
|
||||||
|
* @var PHPWord_Writer_Word2007
|
||||||
|
*/
|
||||||
private $_parentWriter;
|
private $_parentWriter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set parent writer
|
||||||
|
*
|
||||||
|
* @param PHPWord_Writer_IWriter
|
||||||
|
*/
|
||||||
public function setParentWriter(PHPWord_Writer_IWriter $pWriter = null)
|
public function setParentWriter(PHPWord_Writer_IWriter $pWriter = null)
|
||||||
{
|
{
|
||||||
$this->_parentWriter = $pWriter;
|
$this->_parentWriter = $pWriter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get parent writer
|
||||||
|
*
|
||||||
|
* @return PHPWord_Writer_IWriter
|
||||||
|
*/
|
||||||
public function getParentWriter()
|
public function getParentWriter()
|
||||||
{
|
{
|
||||||
if (!is_null($this->_parentWriter)) {
|
if (!is_null($this->_parentWriter)) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue