protected function loadShapeRichText(\DOMElement $oNodeFrame) { // Core $oShape = $this->oPhpPresentation->getActiveSlide()->createRichTextShape(); $oShape->setParagraphs(array()); $oShape->setWidth($oNodeFrame->hasAttribute('svg:width') ? (int) round(CommonDrawing::centimetersToPixels(substr($oNodeFrame->getAttribute('svg:width'), 0, -2))) : ''); $oShape->setHeight($oNodeFrame->hasAttribute('svg:height') ? (int) round(CommonDrawing::centimetersToPixels(substr($oNodeFrame->getAttribute('svg:height'), 0, -2))) : ''); $oShape->setOffsetX($oNodeFrame->hasAttribute('svg:x') ? (int) round(CommonDrawing::centimetersToPixels(substr($oNodeFrame->getAttribute('svg:x'), 0, -2))) : ''); $oShape->setOffsetY($oNodeFrame->hasAttribute('svg:y') ? (int) round(CommonDrawing::centimetersToPixels(substr($oNodeFrame->getAttribute('svg:y'), 0, -2))) : ''); foreach ($this->oXMLReader->getElements('draw:text-box/*', $oNodeFrame) as $oNodeParagraph) { $this->levelParagraph = 0; if ($oNodeParagraph->nodeName == 'text:p') { $this->readParagraph($oShape, $oNodeParagraph); } if ($oNodeParagraph->nodeName == 'text:list') { $this->readList($oShape, $oNodeParagraph); } } if (count($oShape->getParagraphs()) > 0) { $oShape->setActiveParagraph(0); } }