From 90d64bd3475c05814d47ba497dba5c392308b7cd Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Sat, 16 Aug 2014 12:44:12 +0200 Subject: [PATCH] #23 : Implement Word97 aka MsDoc Reader (PHPCS-PHPMD Fixes) --- src/PhpWord/Reader/MsDoc.php | 8 ++++---- src/PhpWord/Shared/OLERead.php | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/PhpWord/Reader/MsDoc.php b/src/PhpWord/Reader/MsDoc.php index d3f5a44b..c63d8d9e 100644 --- a/src/PhpWord/Reader/MsDoc.php +++ b/src/PhpWord/Reader/MsDoc.php @@ -318,7 +318,7 @@ class MsDoc extends AbstractReader implements ReaderInterface $pos = $this->readBlockFibRgFcLcb($data, $pos, self::VERSION_2000); $pos = $this->readBlockFibRgFcLcb($data, $pos, self::VERSION_2002); break; - case 0x00A4 : + case 0x00A4: $pos = $this->readBlockFibRgFcLcb($data, $pos, self::VERSION_97); $pos = $this->readBlockFibRgFcLcb($data, $pos, self::VERSION_2000); $pos = $this->readBlockFibRgFcLcb($data, $pos, self::VERSION_2002); @@ -1438,10 +1438,10 @@ class MsDoc extends AbstractReader implements ReaderInterface $aPnBteChpx[$inc] = self::getInt4d($this->data1Table, $posMem); $posMem += 4; } - $PnFkpChpx = self::getInt4d($this->data1Table, $posMem); + $pnFkpChpx = self::getInt4d($this->data1Table, $posMem); $posMem += 4; - $offsetBase = $PnFkpChpx * 512; + $offsetBase = $pnFkpChpx * 512; $offset = $offsetBase; // ChpxFkp @@ -2258,7 +2258,7 @@ class MsDoc extends AbstractReader implements ReaderInterface if (empty($sHYPERLINK)) { if (ord($sText[0]) > 20) { if (strpos(trim($sText), 'HYPERLINK "') === 0) { - $sHYPERLINK = $sText; + $sHYPERLINK = $sText; } else { $oSection->addText($sText, $styleFont); // print_r('>addText<'.$sText.'>'.ord($sText[0]).EOL); diff --git a/src/PhpWord/Shared/OLERead.php b/src/PhpWord/Shared/OLERead.php index aa1ad48a..82815afc 100644 --- a/src/PhpWord/Shared/OLERead.php +++ b/src/PhpWord/Shared/OLERead.php @@ -55,7 +55,7 @@ class OLERead public $wrkData = null; public $wrkObjectPool = null; public $summaryInformation = null; - public $docSummaryInformation = null; + public $docSummaryInfos = null; /** @@ -281,7 +281,7 @@ class OLERead // Additional Document Summary information if ($name == chr(5) . 'DocumentSummaryInformation') { - $this->docSummaryInformation = count($this->props) - 1; + $this->docSummaryInfos = count($this->props) - 1; } $offset += self::PROPERTY_STORAGE_BLOCK_SIZE;