/** * 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(); }
/** * Write hyperlink * * @param PHPPowerPoint_Shared_XMLWriter $objWriter XML Writer * @param PHPPowerPoint_Shape|PHPPowerPoint_Shape_RichText_TextElement $shape */ private function _writeHyperlink(PHPPowerPoint_Shared_XMLWriter $objWriter = null, $shape = null) { // a:hlinkClick $objWriter->startElement('a:hlinkClick'); $objWriter->writeAttribute('r:id', $shape->getHyperlink()->__relationId); $objWriter->writeAttribute('tooltip', $shape->getHyperlink()->getTooltip()); if ($shape->getHyperlink()->isInternal()) { $objWriter->writeAttribute('action', $shape->getHyperlink()->getUrl()); } $objWriter->endElement(); }
/** * Get hash code * * @return string Hash code */ public function getHashCode() { $hashElements = ''; foreach ($this->_richTextParagraphs as $element) { $hashElements .= $element->getHashCode(); } return md5($hashElements . $this->_wrap . $this->_autoFit . $this->_horizontalOverflow . $this->_verticalOverflow . ($this->_upright ? '1' : '0') . ($this->_vertical ? '1' : '0') . $this->_columns . $this->_bottomInset . $this->_leftInset . $this->_rightInset . $this->_topInset . parent::getHashCode() . __CLASS__); }
/** * Add shape to slide * * @param PHPPowerPoint_Shape $shape * @return PHPPowerPoint_Shape */ public function addShape(PHPPowerPoint_Shape $shape) { $shape->setSlide($this); return $shape; }
/** * Get hash code * * @return string Hash code */ public function getHashCode() { return md5($this->getBorder()->getLineStyle() . parent::getHashCode() . __CLASS__); }
/** * Get hash code * * @return string Hash code */ public function getHashCode() { return md5($this->_name . $this->_description . parent::getHashCode() . __CLASS__); }