Source for file RichText.php
Documentation is available at RichText.php
* 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)
* @var PHPPowerPoint_Shape_RichText_ITextElement[]
* @var PHPPowerPoint_Style_Alignment
* Create a new PHPPowerPoint_Shape_RichText instance
* @return PHPPowerPoint_Style_Alignment
* @param PHPPowerPoint_Shape_RichText_ITextElement $pText Rich text element
public function addText(PHPPowerPoint_Shape_RichText_ITextElement $pText = null)
* Create text (can not be formatted !)
* @param string $pText Text
* @return PHPPowerPoint_Shape_RichText_TextElement
* @return PHPPowerPoint_Shape_RichText_Break
* Create text run (can be formatted)
* @param string $pText Text
* @return PHPPowerPoint_Shape_RichText_Run
// Loop trough all PHPPowerPoint_Shape_RichText_ITextElement
$returnValue .= $text->getText();
* @return PHPPowerPoint_Shape_RichText_ITextElement[]
* @param PHPPowerPoint_Shape_RichText_ITextElement[] $pElements Array of elements
throw new Exception("Invalid PHPPowerPoint_Shape_RichText_ITextElement[] array passed.");
* @return string Hash code
$hashElements .= $element->getHashCode();
* 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
* 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
* Implement PHP __clone to create a deep clone, not just a shallow copy.
foreach ($vars as $key => $value) {
if ($key == '_parent') continue;
$this->$key = clone $value;
|