#23 : Implement Word97 aka MsDoc Reader (PHPCS-PHPMD Fixes)

This commit is contained in:
Progi1984 2014-08-16 12:44:12 +02:00
parent 4ade9c3c6e
commit 90d64bd347
2 changed files with 6 additions and 6 deletions

View File

@ -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_2000);
$pos = $this->readBlockFibRgFcLcb($data, $pos, self::VERSION_2002); $pos = $this->readBlockFibRgFcLcb($data, $pos, self::VERSION_2002);
break; break;
case 0x00A4 : case 0x00A4:
$pos = $this->readBlockFibRgFcLcb($data, $pos, self::VERSION_97); $pos = $this->readBlockFibRgFcLcb($data, $pos, self::VERSION_97);
$pos = $this->readBlockFibRgFcLcb($data, $pos, self::VERSION_2000); $pos = $this->readBlockFibRgFcLcb($data, $pos, self::VERSION_2000);
$pos = $this->readBlockFibRgFcLcb($data, $pos, self::VERSION_2002); $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); $aPnBteChpx[$inc] = self::getInt4d($this->data1Table, $posMem);
$posMem += 4; $posMem += 4;
} }
$PnFkpChpx = self::getInt4d($this->data1Table, $posMem); $pnFkpChpx = self::getInt4d($this->data1Table, $posMem);
$posMem += 4; $posMem += 4;
$offsetBase = $PnFkpChpx * 512; $offsetBase = $pnFkpChpx * 512;
$offset = $offsetBase; $offset = $offsetBase;
// ChpxFkp // ChpxFkp
@ -2258,7 +2258,7 @@ class MsDoc extends AbstractReader implements ReaderInterface
if (empty($sHYPERLINK)) { if (empty($sHYPERLINK)) {
if (ord($sText[0]) > 20) { if (ord($sText[0]) > 20) {
if (strpos(trim($sText), 'HYPERLINK "') === 0) { if (strpos(trim($sText), 'HYPERLINK "') === 0) {
$sHYPERLINK = $sText; $sHYPERLINK = $sText;
} else { } else {
$oSection->addText($sText, $styleFont); $oSection->addText($sText, $styleFont);
// print_r('>addText<'.$sText.'>'.ord($sText[0]).EOL); // print_r('>addText<'.$sText.'>'.ord($sText[0]).EOL);

View File

@ -55,7 +55,7 @@ class OLERead
public $wrkData = null; public $wrkData = null;
public $wrkObjectPool = null; public $wrkObjectPool = null;
public $summaryInformation = null; public $summaryInformation = null;
public $docSummaryInformation = null; public $docSummaryInfos = null;
/** /**
@ -281,7 +281,7 @@ class OLERead
// Additional Document Summary information // Additional Document Summary information
if ($name == chr(5) . 'DocumentSummaryInformation') { if ($name == chr(5) . 'DocumentSummaryInformation') {
$this->docSummaryInformation = count($this->props) - 1; $this->docSummaryInfos = count($this->props) - 1;
} }
$offset += self::PROPERTY_STORAGE_BLOCK_SIZE; $offset += self::PROPERTY_STORAGE_BLOCK_SIZE;