summaryrefslogtreecommitdiffstats
path: root/admin/survey/export/libs/PHPPowerPoint/Shape
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2022-01-11 12:35:47 +0100
committerAnton Luka Šijanec <anton@sijanec.eu>2022-01-11 12:35:47 +0100
commit19985dbb8c0aa66dc4bf7905abc1148de909097d (patch)
tree2cd5a5d20d7e80fc2a51adf60d838d8a2c40999e /admin/survey/export/libs/PHPPowerPoint/Shape
download1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar
1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar.gz
1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar.bz2
1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar.lz
1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar.xz
1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar.zst
1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.zip
Diffstat (limited to 'admin/survey/export/libs/PHPPowerPoint/Shape')
-rw-r--r--admin/survey/export/libs/PHPPowerPoint/Shape/BaseDrawing.php272
-rw-r--r--admin/survey/export/libs/PHPPowerPoint/Shape/Drawing.php185
-rw-r--r--admin/survey/export/libs/PHPPowerPoint/Shape/MemoryDrawing.php235
-rw-r--r--admin/survey/export/libs/PHPPowerPoint/Shape/RichText.php264
-rw-r--r--admin/survey/export/libs/PHPPowerPoint/Shape/RichText/Break.php88
-rw-r--r--admin/survey/export/libs/PHPPowerPoint/Shape/RichText/ITextElement.php67
-rw-r--r--admin/survey/export/libs/PHPPowerPoint/Shape/RichText/Run.php110
-rw-r--r--admin/survey/export/libs/PHPPowerPoint/Shape/RichText/TextElement.php113
-rw-r--r--admin/survey/export/libs/PHPPowerPoint/Shape/Shadow.php314
9 files changed, 1648 insertions, 0 deletions
diff --git a/admin/survey/export/libs/PHPPowerPoint/Shape/BaseDrawing.php b/admin/survey/export/libs/PHPPowerPoint/Shape/BaseDrawing.php
new file mode 100644
index 0000000..6ce6d94
--- /dev/null
+++ b/admin/survey/export/libs/PHPPowerPoint/Shape/BaseDrawing.php
@@ -0,0 +1,272 @@
+<?php
+/**
+ * PHPPowerPoint
+ *
+ * Copyright (c) 2009 - 2010 PHPPowerPoint
+ *
+ * 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 PHPPowerPoint
+ * @package PHPPowerPoint_Shape
+ * @copyright Copyright (c) 2009 - 2010 PHPPowerPoint (http://www.codeplex.com/PHPPowerPoint)
+ * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
+ * @version 0.1.0, 2009-04-27
+ */
+
+
+/** PHPPowerPoint_IComparable */
+require_once 'PHPPowerPoint/IComparable.php';
+
+/** PHPPowerPoint_Shape */
+require_once 'PHPPowerPoint/Shape.php';
+
+/**
+ * PHPPowerPoint_Shape_BaseDrawing
+ *
+ * @category PHPPowerPoint
+ * @package PHPPowerPoint_Shape
+ * @copyright Copyright (c) 2009 - 2010 PHPPowerPoint (http://www.codeplex.com/PHPPowerPoint)
+ */
+abstract class PHPPowerPoint_Shape_BaseDrawing extends PHPPowerPoint_Shape implements PHPPowerPoint_IComparable
+{
+ /**
+ * Image counter
+ *
+ * @var int
+ */
+ private static $_imageCounter = 0;
+
+ /**
+ * Image index
+ *
+ * @var int
+ */
+ private $_imageIndex = 0;
+
+ /**
+ * Name
+ *
+ * @var string
+ */
+ protected $_name;
+
+ /**
+ * Description
+ *
+ * @var string
+ */
+ protected $_description;
+
+ /**
+ * Proportional resize
+ *
+ * @var boolean
+ */
+ protected $_resizeProportional;
+
+ /**
+ * Create a new PHPPowerPoint_Slide_BaseDrawing
+ */
+ public function __construct()
+ {
+ // Initialise values
+ $this->_name = '';
+ $this->_description = '';
+ $this->_resizeProportional = true;
+
+ // Set image index
+ self::$_imageCounter++;
+ $this->_imageIndex = self::$_imageCounter;
+
+ // Initialize parent
+ parent::__construct();
+ }
+
+ /**
+ * Get image index
+ *
+ * @return int
+ */
+ public function getImageIndex() {
+ return $this->_imageIndex;
+ }
+
+ /**
+ * Get Name
+ *
+ * @return string
+ */
+ public function getName() {
+ return $this->_name;
+ }
+
+ /**
+ * Set Name
+ *
+ * @param string $pValue
+ */
+ public function setName($pValue = '') {
+ $this->_name = $pValue;
+ }
+
+ /**
+ * Get Description
+ *
+ * @return string
+ */
+ public function getDescription() {
+ return $this->_description;
+ }
+
+ /**
+ * Set Description
+ *
+ * @param string $pValue
+ */
+ public function setDescription($pValue = '') {
+ $this->_description = $pValue;
+ }
+
+ /**
+ * Set Width
+ *
+ * @param int $pValue
+ */
+ public function setWidth($pValue = 0) {
+ // Resize proportional?
+ if ($this->_resizeProportional && $pValue != 0) {
+ $ratio = $this->_height / $this->_width;
+ $this->_height = round($ratio * $pValue);
+ }
+
+ // Set width
+ $this->_width = $pValue;
+ }
+
+ /**
+ * Set Height
+ *
+ * @param int $pValue
+ */
+ public function setHeight($pValue = 0) {
+ // Resize proportional?
+ if ($this->_resizeProportional && $pValue != 0) {
+ $ratio = $this->_width / $this->_height;
+ $this->_width = round($ratio * $pValue);
+ }
+
+ // Set height
+ $this->_height = $pValue;
+ }
+
+ /**
+ * Set width and height with proportional resize
+ * @author Vincent@luo MSN:kele_100@hotmail.com
+ * @param int $width
+ * @param int $height
+ * @example $objDrawing->setResizeProportional(true);
+ * @example $objDrawing->setWidthAndHeight(160,120);
+ */
+ public function setWidthAndHeight($width = 0, $height = 0) {
+ $xratio = $width / $this->_width;
+ $yratio = $height / $this->_height;
+ if ($this->_resizeProportional && !($width == 0 || $height == 0)) {
+ if (($xratio * $this->_height) < $height) {
+ $this->_height = ceil($xratio * $this->_height);
+ $this->_width = $width;
+ } else {
+ $this->_width = ceil($yratio * $this->_width);
+ $this->_height = $height;
+ }
+ }
+ }
+
+ /**
+ * Get ResizeProportional
+ *
+ * @return boolean
+ */
+ public function getResizeProportional() {
+ return $this->_resizeProportional;
+ }
+
+ /**
+ * Set ResizeProportional
+ *
+ * @param boolean $pValue
+ */
+ public function setResizeProportional($pValue = true) {
+ $this->_resizeProportional = $pValue;
+ }
+
+ /**
+ * Get hash code
+ *
+ * @return string Hash code
+ */
+ public function getHashCode() {
+ return md5(
+ $this->_name
+ . $this->_description
+ . parent::getHashCode()
+ . __CLASS__
+ );
+ }
+
+ /**
+ * Hash index
+ *
+ * @var string
+ */
+ private $_hashIndex;
+
+ /**
+ * Get hash index
+ *
+ * Note that this index may vary during script execution! Only reliable moment is
+ * while doing a write of a workbook and when changes are not allowed.
+ *
+ * @return string Hash index
+ */
+ public function getHashIndex() {
+ return $this->_hashIndex;
+ }
+
+ /**
+ * Set hash index
+ *
+ * Note that this index may vary during script execution! Only reliable moment is
+ * while doing a write of a workbook and when changes are not allowed.
+ *
+ * @param string $value Hash index
+ */
+ public function setHashIndex($value) {
+ $this->_hashIndex = $value;
+ }
+
+ /**
+ * Implement PHP __clone to create a deep clone, not just a shallow copy.
+ */
+ public function __clone() {
+ $vars = get_object_vars($this);
+ foreach ($vars as $key => $value) {
+ if (is_object($value)) {
+ $this->$key = clone $value;
+ } else {
+ $this->$key = $value;
+ }
+ }
+ }
+}
diff --git a/admin/survey/export/libs/PHPPowerPoint/Shape/Drawing.php b/admin/survey/export/libs/PHPPowerPoint/Shape/Drawing.php
new file mode 100644
index 0000000..feeab3c
--- /dev/null
+++ b/admin/survey/export/libs/PHPPowerPoint/Shape/Drawing.php
@@ -0,0 +1,185 @@
+<?php
+/**
+ * PHPPowerPoint
+ *
+ * Copyright (c) 2009 - 2010 PHPPowerPoint
+ *
+ * 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 PHPPowerPoint
+ * @package PHPPowerPoint_Shape
+ * @copyright Copyright (c) 2009 - 2010 PHPPowerPoint (http://www.codeplex.com/PHPPowerPoint)
+ * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
+ * @version 0.1.0, 2009-04-27
+ */
+
+
+/** PHPPowerPoint_IComparable */
+require_once 'PHPPowerPoint/IComparable.php';
+
+/** PHPPowerPoint_Shape*/
+require_once 'PHPPowerPoint/Shape.php';
+
+/** PHPPowerPoint_Shape_BaseDrawing */
+require_once 'PHPPowerPoint/Shape/BaseDrawing.php';
+
+
+/**
+ * PHPPowerPoint_Shape_Drawing
+ *
+ * @category PHPPowerPoint
+ * @package PHPPowerPoint_Shape
+ * @copyright Copyright (c) 2009 - 2010 PHPPowerPoint (http://www.codeplex.com/PHPPowerPoint)
+ */
+class PHPPowerPoint_Shape_Drawing extends PHPPowerPoint_Shape_BaseDrawing implements PHPPowerPoint_IComparable
+{
+ /**
+ * Path
+ *
+ * @var string
+ */
+ private $_path;
+
+ /**
+ * Create a new PHPPowerPoint_Slide_Drawing
+ */
+ public function __construct()
+ {
+ // Initialise values
+ $this->_path = '';
+
+ // Initialize parent
+ parent::__construct();
+ }
+
+ /**
+ * Get Filename
+ *
+ * @return string
+ */
+ public function getFilename() {
+ return basename($this->_path);
+ }
+
+ /**
+ * Get indexed filename (using image index)
+ *
+ * @return string
+ */
+ public function getIndexedFilename() {
+ return str_replace('.' . $this->getExtension(), '', $this->getFilename()) . $this->getImageIndex() . '.' . $this->getExtension();
+ }
+
+ /**
+ * Get Extension
+ *
+ * @return string
+ */
+ public function getExtension() {
+ $exploded = explode(".", basename($this->_path));
+ return $exploded[count($exploded) - 1];
+ }
+
+ /**
+ * Get Path
+ *
+ * @return string
+ */
+ public function getPath() {
+ return $this->_path;
+ }
+
+ /**
+ * Set Path
+ *
+ * @param string $pValue File path
+ * @param boolean $pVerifyFile Verify file
+ * @throws Exception
+ */
+ public function setPath($pValue = '', $pVerifyFile = true) {
+ if ($pVerifyFile) {
+ if (file_exists($pValue)) {
+ $this->_path = $pValue;
+
+ if ($this->_width == 0 && $this->_height == 0) {
+ // Get width/height
+ list($this->_width, $this->_height) = getimagesize($pValue);
+ }
+ } else {
+ throw new Exception("File $pValue not found!");
+ }
+ } else {
+ $this->_path = $pValue;
+ }
+ }
+
+ /**
+ * Get hash code
+ *
+ * @return string Hash code
+ */
+ public function getHashCode() {
+ return md5(
+ $this->_path
+ . parent::getHashCode()
+ . __CLASS__
+ );
+ }
+
+ /**
+ * Hash index
+ *
+ * @var string
+ */
+ private $_hashIndex;
+
+ /**
+ * Get hash index
+ *
+ * Note that this index may vary during script execution! Only reliable moment is
+ * while doing a write of a workbook and when changes are not allowed.
+ *
+ * @return string Hash index
+ */
+ public function getHashIndex() {
+ return $this->_hashIndex;
+ }
+
+ /**
+ * Set hash index
+ *
+ * Note that this index may vary during script execution! Only reliable moment is
+ * while doing a write of a workbook and when changes are not allowed.
+ *
+ * @param string $value Hash index
+ */
+ public function setHashIndex($value) {
+ $this->_hashIndex = $value;
+ }
+
+ /**
+ * Implement PHP __clone to create a deep clone, not just a shallow copy.
+ */
+ public function __clone() {
+ $vars = get_object_vars($this);
+ foreach ($vars as $key => $value) {
+ if (is_object($value)) {
+ $this->$key = clone $value;
+ } else {
+ $this->$key = $value;
+ }
+ }
+ }
+}
diff --git a/admin/survey/export/libs/PHPPowerPoint/Shape/MemoryDrawing.php b/admin/survey/export/libs/PHPPowerPoint/Shape/MemoryDrawing.php
new file mode 100644
index 0000000..604b671
--- /dev/null
+++ b/admin/survey/export/libs/PHPPowerPoint/Shape/MemoryDrawing.php
@@ -0,0 +1,235 @@
+<?php
+/**
+ * PHPPowerPoint
+ *
+ * Copyright (c) 2009 - 2010 PHPPowerPoint
+ *
+ * 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 PHPPowerPoint
+ * @package PHPPowerPoint_Shape
+ * @copyright Copyright (c) 2009 - 2010 PHPPowerPoint (http://www.codeplex.com/PHPPowerPoint)
+ * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
+ * @version 0.1.0, 2009-04-27
+ */
+
+
+/** PHPPowerPoint_IComparable */
+require_once 'PHPPowerPoint/IComparable.php';
+
+/** PHPPowerPoint_Shape */
+require_once 'PHPPowerPoint/Shape.php';
+
+/** PHPPowerPoint_Shape_BaseDrawing */
+require_once 'PHPPowerPoint/Shape/BaseDrawing.php';
+
+
+/**
+ * PHPPowerPoint_Shape_MemoryDrawing
+ *
+ * @category PHPPowerPoint
+ * @package PHPPowerPoint_Shape
+ * @copyright Copyright (c) 2009 - 2010 PHPPowerPoint (http://www.codeplex.com/PHPPowerPoint)
+ */
+class PHPPowerPoint_Shape_MemoryDrawing extends PHPPowerPoint_Shape_BaseDrawing implements PHPPowerPoint_IComparable
+{
+ /* Rendering functions */
+ const RENDERING_DEFAULT = 'imagepng';
+ const RENDERING_PNG = 'imagepng';
+ const RENDERING_GIF = 'imagegif';
+ const RENDERING_JPEG = 'imagejpeg';
+
+ /* MIME types */
+ const MIMETYPE_DEFAULT = 'image/png';
+ const MIMETYPE_PNG = 'image/png';
+ const MIMETYPE_GIF = 'image/gif';
+ const MIMETYPE_JPEG = 'image/jpeg';
+
+ /**
+ * Image resource
+ *
+ * @var resource
+ */
+ private $_imageResource;
+
+ /**
+ * Rendering function
+ *
+ * @var string
+ */
+ private $_renderingFunction;
+
+ /**
+ * Mime type
+ *
+ * @var string
+ */
+ private $_mimeType;
+
+ /**
+ * Unique name
+ *
+ * @var string
+ */
+ private $_uniqueName;
+
+ /**
+ * Create a new PHPPowerPoint_Slide_MemoryDrawing
+ */
+ public function __construct()
+ {
+ // Initialise values
+ $this->_imageResource = null;
+ $this->_renderingFunction = self::RENDERING_DEFAULT;
+ $this->_mimeType = self::MIMETYPE_DEFAULT;
+ $this->_uniqueName = md5(rand(0, 9999). time() . rand(0, 9999));
+
+ // Initialize parent
+ parent::__construct();
+ }
+
+ /**
+ * Get image resource
+ *
+ * @return resource
+ */
+ public function getImageResource() {
+ return $this->_imageResource;
+ }
+
+ /**
+ * Set image resource
+ *
+ * @param $value resource
+ */
+ public function setImageResource($value = null) {
+ $this->_imageResource = $value;
+
+ if (!is_null($this->_imageResource)) {
+ // Get width/height
+ $this->_width = imagesx($this->_imageResource);
+ $this->_height = imagesy($this->_imageResource);
+ }
+ }
+
+ /**
+ * Get rendering function
+ *
+ * @return string
+ */
+ public function getRenderingFunction() {
+ return $this->_renderingFunction;
+ }
+
+ /**
+ * Set rendering function
+ *
+ * @param string $value
+ */
+ public function setRenderingFunction($value = PHPPowerPoint_Slide_MemoryDrawing::RENDERING_DEFAULT) {
+ $this->_renderingFunction = $value;
+ }
+
+ /**
+ * Get mime type
+ *
+ * @return string
+ */
+ public function getMimeType() {
+ return $this->_mimeType;
+ }
+
+ /**
+ * Set mime type
+ *
+ * @param string $value
+ */
+ public function setMimeType($value = PHPPowerPoint_Slide_MemoryDrawing::MIMETYPE_DEFAULT) {
+ $this->_mimeType = $value;
+ }
+
+ /**
+ * Get indexed filename (using image index)
+ *
+ * @return string
+ */
+ public function getIndexedFilename() {
+ $extension = strtolower($this->getMimeType());
+ $extension = explode('/', $extension);
+ $extension = $extension[1];
+
+ return $this->_uniqueName . $this->getImageIndex() . '.' . $extension;
+ }
+
+ /**
+ * Get hash code
+ *
+ * @return string Hash code
+ */
+ public function getHashCode() {
+ return md5(
+ $this->_renderingFunction
+ . $this->_mimeType
+ . $this->_uniqueName
+ . parent::getHashCode()
+ . __CLASS__
+ );
+ }
+
+ /**
+ * Hash index
+ *
+ * @var string
+ */
+ private $_hashIndex;
+
+ /**
+ * Get hash index
+ *
+ * Note that this index may vary during script execution! Only reliable moment is
+ * while doing a write of a workbook and when changes are not allowed.
+ *
+ * @return string Hash index
+ */
+ public function getHashIndex() {
+ return $this->_hashIndex;
+ }
+
+ /**
+ * Set hash index
+ *
+ * Note that this index may vary during script execution! Only reliable moment is
+ * while doing a write of a workbook and when changes are not allowed.
+ *
+ * @param string $value Hash index
+ */
+ public function setHashIndex($value) {
+ $this->_hashIndex = $value;
+ }
+
+ /**
+ * Implement PHP __clone to create a deep clone, not just a shallow copy.
+ */
+ public function __clone() {
+ $vars = get_object_vars($this);
+ foreach ($vars as $key => $value) {
+ if (is_object($value)) {
+ $this->$key = clone $value;
+ } else {
+ $this->$key = $value;
+ }
+ }
+ }
+}
diff --git a/admin/survey/export/libs/PHPPowerPoint/Shape/RichText.php b/admin/survey/export/libs/PHPPowerPoint/Shape/RichText.php
new file mode 100644
index 0000000..ee2929c
--- /dev/null
+++ b/admin/survey/export/libs/PHPPowerPoint/Shape/RichText.php
@@ -0,0 +1,264 @@
+<?php
+/**
+ * PHPPowerPoint
+ *
+ * Copyright (c) 2009 - 2010 PHPPowerPoint
+ *
+ * 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 PHPPowerPoint
+ * @package PHPPowerPoint_Shape
+ * @copyright Copyright (c) 2009 - 2010 PHPPowerPoint (http://www.codeplex.com/PHPPowerPoint)
+ * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
+ * @version 0.1.0, 2009-04-27
+ */
+
+
+/** PHPPowerPoint_IComparable */
+require_once 'PHPPowerPoint/IComparable.php';
+
+/** PHPPowerPoint_Shape */
+require_once 'PHPPowerPoint/Shape.php';
+
+/** PHPPowerPoint_Shape_RichText_ITextElement */
+require_once 'PHPPowerPoint/Shape/RichText/ITextElement.php';
+
+/** PHPPowerPoint_Shape_RichText_TextElement */
+require_once 'PHPPowerPoint/Shape/RichText/TextElement.php';
+
+/** PHPPowerPoint_Shape_RichText_Run */
+require_once 'PHPPowerPoint/Shape/RichText/Run.php';
+
+/** PHPPowerPoint_Shape_RichText_Break */
+require_once 'PHPPowerPoint/Shape/RichText/Break.php';
+
+/** PHPPowerPoint_Style_Alignment */
+require_once 'PHPPowerPoint/Style/Alignment.php';
+
+/**
+ * PHPPowerPoint_Shape_RichText
+ *
+ * @category PHPPowerPoint
+ * @package PHPPowerPoint_RichText
+ * @copyright Copyright (c) 2009 - 2010 PHPPowerPoint (http://www.codeplex.com/PHPPowerPoint)
+ */
+class PHPPowerPoint_Shape_RichText extends PHPPowerPoint_Shape implements PHPPowerPoint_IComparable
+{
+ /**
+ * Rich text elements
+ *
+ * @var PHPPowerPoint_Shape_RichText_ITextElement[]
+ */
+ private $_richTextElements;
+
+ /**
+ * Alignment
+ *
+ * @var PHPPowerPoint_Style_Alignment
+ */
+ private $_alignment;
+
+ /**
+ * Create a new PHPPowerPoint_Shape_RichText instance
+ */
+ public function __construct()
+ {
+ // Initialise variables
+ $this->_richTextElements = array();
+ $this->_alignment = new PHPPowerPoint_Style_Alignment();
+
+ // Initialize parent
+ parent::__construct();
+ }
+
+ /**
+ * Get alignment
+ *
+ * @return PHPPowerPoint_Style_Alignment
+ */
+ public function getAlignment()
+ {
+ return $this->_alignment;
+ }
+
+ /**
+ * Add text
+ *
+ * @param PHPPowerPoint_Shape_RichText_ITextElement $pText Rich text element
+ * @throws Exception
+ */
+ public function addText(PHPPowerPoint_Shape_RichText_ITextElement $pText = null)
+ {
+ $this->_richTextElements[] = $pText;
+ }
+
+ /**
+ * Create text (can not be formatted !)
+ *
+ * @param string $pText Text
+ * @return PHPPowerPoint_Shape_RichText_TextElement
+ * @throws Exception
+ */
+ public function createText($pText = '')
+ {
+ $objText = new PHPPowerPoint_Shape_RichText_TextElement($pText);
+ $this->addText($objText);
+ return $objText;
+ }
+
+ /**
+ * Create break
+ *
+ * @return PHPPowerPoint_Shape_RichText_Break
+ * @throws Exception
+ */
+ public function createBreak()
+ {
+ $objText = new PHPPowerPoint_Shape_RichText_Break();
+ $this->addText($objText);
+ return $objText;
+ }
+
+ /**
+ * Create text run (can be formatted)
+ *
+ * @param string $pText Text
+ * @return PHPPowerPoint_Shape_RichText_Run
+ * @throws Exception
+ */
+ public function createTextRun($pText = '')
+ {
+ $objText = new PHPPowerPoint_Shape_RichText_Run($pText);
+ $this->addText($objText);
+ return $objText;
+ }
+
+ /**
+ * Get plain text
+ *
+ * @return string
+ */
+ public function getPlainText()
+ {
+ // Return value
+ $returnValue = '';
+
+ // Loop trough all PHPPowerPoint_Shape_RichText_ITextElement
+ foreach ($this->_richTextElements as $text) {
+ $returnValue .= $text->getText();
+ }
+
+ // Return
+ return $returnValue;
+ }
+
+ /**
+ * Convert to string
+ *
+ * @return string
+ */
+ public function __toString() {
+ return $this->getPlainText();
+ }
+
+ /**
+ * Get Rich Text elements
+ *
+ * @return PHPPowerPoint_Shape_RichText_ITextElement[]
+ */
+ public function getRichTextElements()
+ {
+ return $this->_richTextElements;
+ }
+
+ /**
+ * Set Rich Text elements
+ *
+ * @param PHPPowerPoint_Shape_RichText_ITextElement[] $pElements Array of elements
+ * @throws Exception
+ */
+ public function setRichTextElements($pElements = null)
+ {
+ if (is_array($pElements)) {
+ $this->_richTextElements = $pElements;
+ } else {
+ throw new Exception("Invalid PHPPowerPoint_Shape_RichText_ITextElement[] array passed.");
+ }
+ }
+
+ /**
+ * Get hash code
+ *
+ * @return string Hash code
+ */
+ public function getHashCode() {
+ $hashElements = '';
+ foreach ($this->_richTextElements as $element) {
+ $hashElements .= $element->getHashCode();
+ }
+
+ return md5(
+ $hashElements
+ . __CLASS__
+ );
+ }
+
+ /**
+ * Hash index
+ *
+ * @var string
+ */
+ private $_hashIndex;
+
+ /**
+ * Get hash index
+ *
+ * Note that this index may vary during script execution! Only reliable moment is
+ * while doing a write of a workbook and when changes are not allowed.
+ *
+ * @return string Hash index
+ */
+ public function getHashIndex() {
+ return $this->_hashIndex;
+ }
+
+ /**
+ * Set hash index
+ *
+ * Note that this index may vary during script execution! Only reliable moment is
+ * while doing a write of a workbook and when changes are not allowed.
+ *
+ * @param string $value Hash index
+ */
+ public function setHashIndex($value) {
+ $this->_hashIndex = $value;
+ }
+
+ /**
+ * Implement PHP __clone to create a deep clone, not just a shallow copy.
+ */
+ public function __clone() {
+ $vars = get_object_vars($this);
+ foreach ($vars as $key => $value) {
+ if ($key == '_parent') continue;
+
+ if (is_object($value)) {
+ $this->$key = clone $value;
+ } else {
+ $this->$key = $value;
+ }
+ }
+ }
+}
diff --git a/admin/survey/export/libs/PHPPowerPoint/Shape/RichText/Break.php b/admin/survey/export/libs/PHPPowerPoint/Shape/RichText/Break.php
new file mode 100644
index 0000000..2cef083
--- /dev/null
+++ b/admin/survey/export/libs/PHPPowerPoint/Shape/RichText/Break.php
@@ -0,0 +1,88 @@
+<?php
+/**
+ * PHPPowerPoint
+ *
+ * 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 PHPPowerPoint
+ * @package PHPPowerPoint_RichText
+ * @copyright Copyright (c) 2009 - 2010 PHPPowerPoint (http://www.codeplex.com/PHPPowerPoint)
+ * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
+ * @version 0.1.0, 2009-04-27
+ */
+
+
+/** PHPPowerPoint_Shape_RichText_ITextElement */
+require_once 'PHPPowerPoint/Shape/RichText/ITextElement.php';
+
+/** PHPPowerPoint_Style_Font */
+require_once 'PHPPowerPoint/Style/Font.php';
+
+
+/**
+ * PHPPowerPoint_Shape_RichText_Break
+ *
+ * @category PHPPowerPoint
+ * @package PHPPowerPoint_Shape
+ * @copyright Copyright (c) 2009 - 2010 PHPPowerPoint (http://www.codeplex.com/PHPPowerPoint)
+ */
+class PHPPowerPoint_Shape_RichText_Break implements PHPPowerPoint_Shape_RichText_ITextElement
+{
+ /**
+ * Create a new PHPPowerPoint_Shape_RichText_Break instance
+ */
+ public function __construct()
+ {
+ }
+
+ /**
+ * Get text
+ *
+ * @return string Text
+ */
+ public function getText()
+ {
+ return "\r\n";
+ }
+
+ /**
+ * Set text
+ *
+ * @param $pText string Text
+ */
+ public function setText($pText = '')
+ {
+ }
+
+ /**
+ * Get font
+ *
+ * @return PHPPowerPoint_Style_Font
+ */
+ public function getFont() {
+ return null;
+ }
+
+ /**
+ * Get hash code
+ *
+ * @return string Hash code
+ */
+ public function getHashCode() {
+ return md5(
+ __CLASS__
+ );
+ }
+}
diff --git a/admin/survey/export/libs/PHPPowerPoint/Shape/RichText/ITextElement.php b/admin/survey/export/libs/PHPPowerPoint/Shape/RichText/ITextElement.php
new file mode 100644
index 0000000..5b0b42d
--- /dev/null
+++ b/admin/survey/export/libs/PHPPowerPoint/Shape/RichText/ITextElement.php
@@ -0,0 +1,67 @@
+<?php
+/**
+ * PHPPowerPoint
+ *
+ * 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 PHPPowerPoint
+ * @package PHPPowerPoint_Shape
+ * @copyright Copyright (c) 2009 - 2010 PHPPowerPoint (http://www.codeplex.com/PHPPowerPoint)
+ * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
+ * @version 0.1.0, 2009-04-27
+ */
+
+
+/** PHPPowerPoint_Style_Font */
+require_once 'PHPPowerPoint/Style/Font.php';
+
+
+/**
+ * PHPPowerPoint_Shape_RichText_ITextElement
+ *
+ * @category PHPPowerPoint
+ * @package PHPPowerPoint_Shape
+ * @copyright Copyright (c) 2009 - 2010 PHPPowerPoint (http://www.codeplex.com/PHPPowerPoint)
+ */
+interface PHPPowerPoint_Shape_RichText_ITextElement
+{
+ /**
+ * Get text
+ *
+ * @return string Text
+ */
+ public function getText();
+
+ /**
+ * Set text
+ *
+ * @param $pText string Text
+ */
+ public function setText($pText = '');
+
+ /**
+ * Get font
+ *
+ * @return PHPPowerPoint_Style_Font
+ */
+ public function getFont();
+
+ /**
+ * Get hash code
+ *
+ * @return string Hash code
+ */
+ public function getHashCode();
+}
diff --git a/admin/survey/export/libs/PHPPowerPoint/Shape/RichText/Run.php b/admin/survey/export/libs/PHPPowerPoint/Shape/RichText/Run.php
new file mode 100644
index 0000000..5ea5525
--- /dev/null
+++ b/admin/survey/export/libs/PHPPowerPoint/Shape/RichText/Run.php
@@ -0,0 +1,110 @@
+<?php
+/**
+ * PHPPowerPoint
+ *
+ * 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 PHPPowerPoint
+ * @package PHPPowerPoint_Shape
+ * @copyright Copyright (c) 2009 - 2010 PHPPowerPoint (http://www.codeplex.com/PHPPowerPoint)
+ * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
+ * @version 0.1.0, 2009-04-27
+ */
+
+
+/** PHPPowerPoint_Shape_RichText_ITextElement */
+require_once 'PHPPowerPoint/Shape/RichText/ITextElement.php';
+
+/** PHPPowerPoint_Shape_RichText_TextElement */
+require_once 'PHPPowerPoint/Shape/RichText/TextElement.php';
+
+/** PHPPowerPoint_Style_Font */
+require_once 'PHPPowerPoint/Style/Font.php';
+
+
+/**
+ * PHPPowerPoint_Shape_RichText_Run
+ *
+ * @category PHPPowerPoint
+ * @package PHPPowerPoint_Shape
+ * @copyright Copyright (c) 2009 - 2010 PHPPowerPoint (http://www.codeplex.com/PHPPowerPoint)
+ */
+class PHPPowerPoint_Shape_RichText_Run extends PHPPowerPoint_Shape_RichText_TextElement implements PHPPowerPoint_Shape_RichText_ITextElement
+{
+ /**
+ * Font
+ *
+ * @var PHPPowerPoint_Style_Font
+ */
+ private $_font;
+
+ /**
+ * Create a new PHPPowerPoint_Shape_RichText_Run instance
+ *
+ * @param string $pText Text
+ */
+ public function __construct($pText = '')
+ {
+ // Initialise variables
+ $this->setText($pText);
+ $this->_font = new PHPPowerPoint_Style_Font();
+ }
+
+ /**
+ * Get font
+ *
+ * @return PHPPowerPoint_Style_Font
+ */
+ public function getFont() {
+ return $this->_font;
+ }
+
+ /**
+ * Set font
+ *
+ * @param PHPPowerPoint_Style_Font $pFont Font
+ * @throws Exception
+ */
+ public function setFont(PHPPowerPoint_Style_Font $pFont = null) {
+ $this->_font = $pFont;
+ }
+
+ /**
+ * Get hash code
+ *
+ * @return string Hash code
+ */
+ public function getHashCode() {
+ return md5(
+ $this->getText()
+ . $this->_font->getHashCode()
+ . __CLASS__
+ );
+ }
+
+ /**
+ * Implement PHP __clone to create a deep clone, not just a shallow copy.
+ */
+ public function __clone() {
+ $vars = get_object_vars($this);
+ foreach ($vars as $key => $value) {
+ if (is_object($value)) {
+ $this->$key = clone $value;
+ } else {
+ $this->$key = $value;
+ }
+ }
+ }
+}
diff --git a/admin/survey/export/libs/PHPPowerPoint/Shape/RichText/TextElement.php b/admin/survey/export/libs/PHPPowerPoint/Shape/RichText/TextElement.php
new file mode 100644
index 0000000..b92f607
--- /dev/null
+++ b/admin/survey/export/libs/PHPPowerPoint/Shape/RichText/TextElement.php
@@ -0,0 +1,113 @@
+<?php
+/**
+ * PHPPowerPoint
+ *
+ * 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 PHPPowerPoint
+ * @package PHPPowerPoint_RichText
+ * @copyright Copyright (c) 2009 - 2010 PHPPowerPoint (http://www.codeplex.com/PHPPowerPoint)
+ * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
+ * @version 0.1.0, 2009-04-27
+ */
+
+
+/** PHPPowerPoint_Shape_RichText_ITextElement */
+require_once 'PHPPowerPoint/Shape/RichText/ITextElement.php';
+
+/** PHPPowerPoint_Style_Font */
+require_once 'PHPPowerPoint/Style/Font.php';
+
+
+/**
+ * PHPPowerPoint_Shape_RichText_TextElement
+ *
+ * @category PHPPowerPoint
+ * @package PHPPowerPoint_Shape
+ * @copyright Copyright (c) 2009 - 2010 PHPPowerPoint (http://www.codeplex.com/PHPPowerPoint)
+ */
+class PHPPowerPoint_Shape_RichText_TextElement implements PHPPowerPoint_Shape_RichText_ITextElement
+{
+ /**
+ * Text
+ *
+ * @var string
+ */
+ private $_text;
+
+ /**
+ * Create a new PHPPowerPoint_Shape_RichText_TextElement instance
+ *
+ * @param string $pText Text
+ */
+ public function __construct($pText = '')
+ {
+ // Initialise variables
+ $this->_text = $pText;
+ }
+
+ /**
+ * Get text
+ *
+ * @return string Text
+ */
+ public function getText() {
+ return $this->_text;
+ }
+
+ /**
+ * Set text
+ *
+ * @param $pText string Text
+ */
+ public function setText($pText = '') {
+ $this->_text = $pText;
+ }
+
+ /**
+ * Get font
+ *
+ * @return PHPPowerPoint_Style_Font
+ */
+ public function getFont() {
+ return null;
+ }
+
+ /**
+ * Get hash code
+ *
+ * @return string Hash code
+ */
+ public function getHashCode() {
+ return md5(
+ $this->_text
+ . __CLASS__
+ );
+ }
+
+ /**
+ * Implement PHP __clone to create a deep clone, not just a shallow copy.
+ */
+ public function __clone() {
+ $vars = get_object_vars($this);
+ foreach ($vars as $key => $value) {
+ if (is_object($value)) {
+ $this->$key = clone $value;
+ } else {
+ $this->$key = $value;
+ }
+ }
+ }
+}
diff --git a/admin/survey/export/libs/PHPPowerPoint/Shape/Shadow.php b/admin/survey/export/libs/PHPPowerPoint/Shape/Shadow.php
new file mode 100644
index 0000000..c3a1e6d
--- /dev/null
+++ b/admin/survey/export/libs/PHPPowerPoint/Shape/Shadow.php
@@ -0,0 +1,314 @@
+<?php
+/**
+ * PHPPowerPoint
+ *
+ * Copyright (c) 2009 - 2010 PHPPowerPoint
+ *
+ * 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 PHPPowerPoint
+ * @package PHPPowerPoint_Shape
+ * @copyright Copyright (c) 2009 - 2010 PHPPowerPoint (http://www.codeplex.com/PHPPowerPoint)
+ * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
+ * @version 0.1.0, 2009-04-27
+ */
+
+
+/** PHPPowerPoint_IComparable */
+require_once 'PHPPowerPoint/IComparable.php';
+
+/** PHPPowerPoint_Slide */
+require_once 'PHPPowerPoint/Slide.php';
+
+/** PHPPowerPoint_Style_Color */
+require_once 'PHPPowerPoint/Style/Color.php';
+
+/**
+ * PHPPowerPoint_Shape_Shadow
+ *
+ * @category PHPPowerPoint
+ * @package PHPPowerPoint_Shape
+ * @copyright Copyright (c) 2009 - 2010 PHPPowerPoint (http://www.codeplex.com/PHPPowerPoint)
+ */
+class PHPPowerPoint_Shape_Shadow implements PHPPowerPoint_IComparable
+{
+ /* Shadow alignment */
+ const SHADOW_BOTTOM = 'b';
+ const SHADOW_BOTTOM_LEFT = 'bl';
+ const SHADOW_BOTTOM_RIGHT = 'br';
+ const SHADOW_CENTER = 'ctr';
+ const SHADOW_LEFT = 'l';
+ const SHADOW_TOP = 't';
+ const SHADOW_TOP_LEFT = 'tl';
+ const SHADOW_TOP_RIGHT = 'tr';
+
+ /**
+ * Visible
+ *
+ * @var boolean
+ */
+ private $_visible;
+
+ /**
+ * Blur radius
+ *
+ * Defaults to 6
+ *
+ * @var int
+ */
+ private $_blurRadius;
+
+ /**
+ * Shadow distance
+ *
+ * Defaults to 2
+ *
+ * @var int
+ */
+ private $_distance;
+
+ /**
+ * Shadow direction (in degrees)
+ *
+ * @var int
+ */
+ private $_direction;
+
+ /**
+ * Shadow alignment
+ *
+ * @var int
+ */
+ private $_alignment;
+
+ /**
+ * Color
+ *
+ * @var PHPPowerPoint_Style_Color
+ */
+ private $_color;
+
+ /**
+ * Alpha
+ *
+ * @var int
+ */
+ private $_alpha;
+
+ /**
+ * Create a new PHPPowerPoint_Shape_Shadow
+ */
+ public function __construct()
+ {
+ // Initialise values
+ $this->_visible = false;
+ $this->_blurRadius = 6;
+ $this->_distance = 2;
+ $this->_direction = 0;
+ $this->_alignment = self::SHADOW_BOTTOM_RIGHT;
+ $this->_color = new PHPPowerPoint_Style_Color(PHPPowerPoint_Style_Color::COLOR_BLACK);
+ $this->_alpha = 50;
+ }
+
+ /**
+ * Get Visible
+ *
+ * @return boolean
+ */
+ public function getVisible() {
+ return $this->_visible;
+ }
+
+ /**
+ * Set Visible
+ *
+ * @param boolean $pValue
+ */
+ public function setVisible($pValue = false) {
+ $this->_visible = $pValue;
+ }
+
+ /**
+ * Get Blur radius
+ *
+ * @return int
+ */
+ public function getBlurRadius() {
+ return $this->_blurRadius;
+ }
+
+ /**
+ * Set Blur radius
+ *
+ * @param int $pValue
+ */
+ public function setBlurRadius($pValue = 6) {
+ $this->_blurRadius = $pValue;
+ }
+
+ /**
+ * Get Shadow distance
+ *
+ * @return int
+ */
+ public function getDistance() {
+ return $this->_distance;
+ }
+
+ /**
+ * Set Shadow distance
+ *
+ * @param int $pValue
+ */
+ public function setDistance($pValue = 2) {
+ $this->_distance = $pValue;
+ }
+
+ /**
+ * Get Shadow direction (in degrees)
+ *
+ * @return int
+ */
+ public function getDirection() {
+ return $this->_direction;
+ }
+
+ /**
+ * Set Shadow direction (in degrees)
+ *
+ * @param int $pValue
+ */
+ public function setDirection($pValue = 0) {
+ $this->_direction = $pValue;
+ }
+
+ /**
+ * Get Shadow alignment
+ *
+ * @return int
+ */
+ public function getAlignment() {
+ return $this->_alignment;
+ }
+
+ /**
+ * Set Shadow alignment
+ *
+ * @param int $pValue
+ */
+ public function setAlignment($pValue = 0) {
+ $this->_alignment = $pValue;
+ }
+
+ /**
+ * Get Color
+ *
+ * @return PHPPowerPoint_Style_Color
+ */
+ public function getColor() {
+ return $this->_color;
+ }
+
+ /**
+ * Set Color
+ *
+ * @param PHPPowerPoint_Style_Color $pValue
+ * @throws Exception
+ */
+ public function setColor(PHPPowerPoint_Style_Color $pValue = null) {
+ $this->_color = $pValue;
+ }
+
+ /**
+ * Get Alpha
+ *
+ * @return int
+ */
+ public function getAlpha() {
+ return $this->_alpha;
+ }
+
+ /**
+ * Set Alpha
+ *
+ * @param int $pValue
+ */
+ public function setAlpha($pValue = 0) {
+ $this->_alpha = $pValue;
+ }
+
+ /**
+ * Get hash code
+ *
+ * @return string Hash code
+ */
+ public function getHashCode() {
+ return md5(
+ ($this->_visible ? 't' : 'f')
+ . $this->_blurRadius
+ . $this->_distance
+ . $this->_direction
+ . $this->_alignment
+ . $this->_color->getHashCode()
+ . $this->_alpha
+ . __CLASS__
+ );
+ }
+
+ /**
+ * Hash index
+ *
+ * @var string
+ */
+ private $_hashIndex;
+
+ /**
+ * Get hash index
+ *
+ * Note that this index may vary during script execution! Only reliable moment is
+ * while doing a write of a workbook and when changes are not allowed.
+ *
+ * @return string Hash index
+ */
+ public function getHashIndex() {
+ return $this->_hashIndex;
+ }
+
+ /**
+ * Set hash index
+ *
+ * Note that this index may vary during script execution! Only reliable moment is
+ * while doing a write of a workbook and when changes are not allowed.
+ *
+ * @param string $value Hash index
+ */
+ public function setHashIndex($value) {
+ $this->_hashIndex = $value;
+ }
+
+ /**
+ * Implement PHP __clone to create a deep clone, not just a shallow copy.
+ */
+ public function __clone() {
+ $vars = get_object_vars($this);
+ foreach ($vars as $key => $value) {
+ if (is_object($value)) {
+ $this->$key = clone $value;
+ } else {
+ $this->$key = $value;
+ }
+ }
+ }
+}