Skip to content

Commit c1979d9

Browse files
committed
ODPresentation Reader : Initial Commit - GH-113 (Fix PHPCS)
1 parent 403cffa commit c1979d9

File tree

2 files changed

+23
-23
lines changed

2 files changed

+23
-23
lines changed

docs/intro.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Writers
4848
+---------------------------+----------------------+--------+-------+-------+-------+
4949
| **Element Shape** | Image ||| | |
5050
+---------------------------+----------------------+--------+-------+-------+-------+
51-
| | Hyperlink || | | |
51+
| | Hyperlink || | | |
5252
+---------------------------+----------------------+--------+-------+-------+-------+
5353
| | Line ||| | |
5454
+---------------------------+----------------------+--------+-------+-------+-------+
@@ -74,19 +74,19 @@ Readers
7474
+---------------------------+----------------------+--------+-------+-------+-------+-------+
7575
| Features | | PPTX | ODP | HTML | PDF | PPT |
7676
+===========================+======================+========+=======+=======+=======+=======+
77-
| **Document Properties** | Standard | | | | | |
77+
| **Document Properties** | Standard | | | | | |
7878
+---------------------------+----------------------+--------+-------+-------+-------+-------+
7979
| | Custom | | | | | |
8080
+---------------------------+----------------------+--------+-------+-------+-------+-------+
81-
| **Element Shape** | Image | | | | ||
81+
| **Element Shape** | Image | | | | ||
8282
+---------------------------+----------------------+--------+-------+-------+-------+-------+
83-
| | Hyperlink | | | | ||
83+
| | Hyperlink | | | | ||
8484
+---------------------------+----------------------+--------+-------+-------+-------+-------+
85-
| | RichText | | | | ||
85+
| | RichText | | | | ||
8686
+---------------------------+----------------------+--------+-------+-------+-------+-------+
8787
| | Table | | | | | |
8888
+---------------------------+----------------------+--------+-------+-------+-------+-------+
89-
| | Text | | | | ||
89+
| | Text | | | | ||
9090
+---------------------------+----------------------+--------+-------+-------+-------+-------+
9191
| **Charts** | Bar3D | | | | | |
9292
+---------------------------+----------------------+--------+-------+-------+-------+-------+

src/PhpPresentation/Reader/ODPresentation.php

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -192,21 +192,21 @@ protected function loadStyle(\DOMElement $nodeStyle)
192192
{
193193
$keyStyle = $nodeStyle->getAttribute('style:name');
194194

195-
$nodeGraphicProperties = $this->oXMLReader->getElement('style:graphic-properties', $nodeStyle);
196-
if ($nodeGraphicProperties) {
195+
$nodeGraphicProps = $this->oXMLReader->getElement('style:graphic-properties', $nodeStyle);
196+
if ($nodeGraphicProps) {
197197
// Read Shadow
198-
if ($nodeGraphicProperties->hasAttribute('draw:shadow') && $nodeGraphicProperties->getAttribute('draw:shadow') == 'visible') {
198+
if ($nodeGraphicProps->hasAttribute('draw:shadow') && $nodeGraphicProps->getAttribute('draw:shadow') == 'visible') {
199199
$oShadow = new Shadow();
200200
$oShadow->setVisible(true);
201-
if ($nodeGraphicProperties->hasAttribute('draw:shadow-color')) {
202-
$oShadow->getColor()->setRGB(substr($nodeGraphicProperties->getAttribute('draw:shadow-color'), -6));
201+
if ($nodeGraphicProps->hasAttribute('draw:shadow-color')) {
202+
$oShadow->getColor()->setRGB(substr($nodeGraphicProps->getAttribute('draw:shadow-color'), -6));
203203
}
204-
if ($nodeGraphicProperties->hasAttribute('draw:shadow-opacity')) {
205-
$oShadow->setAlpha( 100 - (int)substr($nodeGraphicProperties->getAttribute('draw:shadow-opacity'), 0, -1));
204+
if ($nodeGraphicProps->hasAttribute('draw:shadow-opacity')) {
205+
$oShadow->setAlpha(100 - (int)substr($nodeGraphicProps->getAttribute('draw:shadow-opacity'), 0, -1));
206206
}
207-
if ($nodeGraphicProperties->hasAttribute('draw:shadow-offset-x') && $nodeGraphicProperties->hasAttribute('draw:shadow-offset-y')) {
208-
$offsetX = substr($nodeGraphicProperties->getAttribute('draw:shadow-offset-x'), 0, -2);
209-
$offsetY = substr($nodeGraphicProperties->getAttribute('draw:shadow-offset-y'), 0, -2);
207+
if ($nodeGraphicProps->hasAttribute('draw:shadow-offset-x') && $nodeGraphicProps->hasAttribute('draw:shadow-offset-y')) {
208+
$offsetX = substr($nodeGraphicProps->getAttribute('draw:shadow-offset-x'), 0, -2);
209+
$offsetY = substr($nodeGraphicProps->getAttribute('draw:shadow-offset-y'), 0, -2);
210210
$distance = 0;
211211
if ($offsetX != 0) {
212212
$distance = ($offsetX < 0 ? $offsetX * -1 : $offsetX);
@@ -235,17 +235,17 @@ protected function loadStyle(\DOMElement $nodeStyle)
235235
$oFont->setSize(substr($nodeTextProperties->getAttribute('fo:font-size'), 0, -2));
236236
}
237237
}
238-
$nodeParagraphProperties = $this->oXMLReader->getElement('style:paragraph-properties', $nodeStyle);
239-
if ($nodeParagraphProperties) {
238+
$nodeParagraphProps = $this->oXMLReader->getElement('style:paragraph-properties', $nodeStyle);
239+
if ($nodeParagraphProps) {
240240
$oAlignment = new Alignment();
241-
if ($nodeParagraphProperties->hasAttribute('fo:text-align')) {
242-
$oAlignment->setHorizontal($nodeParagraphProperties->getAttribute('fo:text-align'));
241+
if ($nodeParagraphProps->hasAttribute('fo:text-align')) {
242+
$oAlignment->setHorizontal($nodeParagraphProps->getAttribute('fo:text-align'));
243243
}
244244
}
245245

246246
if ($nodeStyle->nodeName == 'text:list-style') {
247247
$arrayListStyle = array();
248-
foreach ($this->oXMLReader->getElements('text:list-level-style-bullet' , $nodeStyle) as $oNodeListLevel) {
248+
foreach ($this->oXMLReader->getElements('text:list-level-style-bullet', $nodeStyle) as $oNodeListLevel) {
249249
$oAlignment = new Alignment();
250250
$oBullet = new Bullet();
251251
$oBullet->setBulletType(Bullet::TYPE_NONE);
@@ -390,7 +390,7 @@ protected function loadShapeRichText(\DOMElement $oNodeFrame)
390390
* @param RichText $oShape
391391
* @param \DOMElement $oNodeParent
392392
*/
393-
protected function readParagraph(RichText $oShape, \DOMElement $oNodeParent)
393+
protected function readParagraph(RichText $oShape, \DOMElement $oNodeParent)
394394
{
395395
$oParagraph = $oShape->createParagraph();
396396
foreach ($this->oXMLReader->getElements('text:span', $oNodeParent) as $oNodeRichTextElement) {
@@ -446,7 +446,7 @@ protected function readList(RichText $oShape, \DOMElement $oNodeParent)
446446
* @param \DOMElement $oNodeParent
447447
* @param \DOMElement $oNodeParagraph
448448
*/
449-
protected function readListItem(RichText $oShape, \DOMElement $oNodeParent, \DOMElement $oNodeParagraph)
449+
protected function readListItem(RichText $oShape, \DOMElement $oNodeParent, \DOMElement $oNodeParagraph)
450450
{
451451
$oParagraph = $oShape->createParagraph();
452452
if ($oNodeParagraph->hasAttribute('text:style-name')) {

0 commit comments

Comments
 (0)