Skip to content

Commit 1464791

Browse files
committed
Refactored the PowerPoint97 Reader for managing the group shape and improving evolutions - @Progi1984 GH-110
Fixes some Scrutinizer CI issues
1 parent 3689062 commit 1464791

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

src/PhpPowerpoint/Reader/PowerPoint97.php

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
use PhpOffice\PhpPowerpoint\Shape\MemoryDrawing;
2424
use PhpOffice\PhpPowerpoint\Style\Alignment;
2525
use PhpOffice\PhpPowerpoint\Style\Color;
26-
use PhpOffice\PhpPowerpoint\Shape\RichText\Paragraph;
2726
use PhpOffice\PhpPowerpoint\Shape\RichText;
2827
use PhpOffice\PhpPowerpoint\AbstractShape;
2928
use PhpOffice\PhpPowerpoint\Style\Bullet;
@@ -1174,7 +1173,6 @@ private function readRecordOfficeArtClientAnchor($stream, $pos)
11741173
break;
11751174
case 0x00000010:
11761175
throw new \Exception('PowerPoint97 Reader : record OfficeArtClientAnchor (0x00000010)');
1177-
break;
11781176
}
11791177
}
11801178

@@ -1405,10 +1403,10 @@ private function readRecordOfficeArtSpContainer($stream, $pos)
14051403
if (is_object($this->oCurrentGroup)) {
14061404
if (!$this->bFirstShapeGroup) {
14071405
if ($clientAnchor['length'] > 0) {
1408-
$this->oCurrentGroup->setOffsetX($clientAnchor['left']);
1409-
$this->oCurrentGroup->setOffsetY($clientAnchor['top']);
1410-
$this->oCurrentGroup->setHeight($clientAnchor['height']);
1411-
$this->oCurrentGroup->setWidth($clientAnchor['width']);
1406+
// $this->oCurrentGroup->setOffsetX($clientAnchor['left']);
1407+
// $this->oCurrentGroup->setOffsetY($clientAnchor['top']);
1408+
// $this->oCurrentGroup->setHeight($clientAnchor['height']);
1409+
// $this->oCurrentGroup->setWidth($clientAnchor['width']);
14121410
}
14131411
$bIsGroup = true;
14141412
$this->bFirstShapeGroup = true;
@@ -2238,6 +2236,8 @@ private function readRecordOfficeArtClientData($stream, $pos)
22382236
/**
22392237
* An atom record that specifies a persist object directory. Each persist object identifier specified MUST be unique in that persist object directory.
22402238
* @link http://msdn.microsoft.com/en-us/library/dd952680(v=office.12).aspx
2239+
* @param string $stream
2240+
* @param integer $pos
22412241
* @throws \Exception
22422242
*/
22432243
private function readRecordPersistDirectoryAtom($stream, $pos)
@@ -2735,6 +2735,8 @@ private function readRecordSlideShowSlideInfoAtom($stream, $pos)
27352735
/**
27362736
* UserEditAtom
27372737
* @link http://msdn.microsoft.com/en-us/library/dd945746(v=office.12).aspx
2738+
* @param string $stream
2739+
* @param integer $pos
27382740
* @throws \Exception
27392741
*/
27402742
private function readRecordUserEditAtom($stream, $pos)
@@ -2860,15 +2862,15 @@ private function readStructureTextCFRun($stream, $pos, $strLenRT)
28602862
$arrayReturn['fontName'] = isset($this->arrayFonts[$data]) ? $this->arrayFonts[$data] : '';
28612863
}
28622864
if ($masksData['oldEATypeface'] == 1) {
2863-
$data = self::getInt2d($stream, $pos + $arrayReturn['length']);
2865+
// $data = self::getInt2d($stream, $pos + $arrayReturn['length']);
28642866
$arrayReturn['length'] += 2;
28652867
}
28662868
if ($masksData['ansiTypeface'] == 1) {
2867-
$data = self::getInt2d($stream, $pos + $arrayReturn['length']);
2869+
// $data = self::getInt2d($stream, $pos + $arrayReturn['length']);
28682870
$arrayReturn['length'] += 2;
28692871
}
28702872
if ($masksData['symbolTypeface'] == 1) {
2871-
$data = self::getInt2d($stream, $pos + $arrayReturn['length']);
2873+
// $data = self::getInt2d($stream, $pos + $arrayReturn['length']);
28722874
$arrayReturn['length'] += 2;
28732875
}
28742876
if ($masksData['size'] == 1) {
@@ -2903,7 +2905,7 @@ private function readStructureTextCFRun($stream, $pos, $strLenRT)
29032905
/**
29042906
* A structure that specifies the paragraph-level formatting of a run of text.
29052907
* @param string $stream
2906-
* @param itn $pos
2908+
* @param integer $pos
29072909
* @link https://msdn.microsoft.com/en-us/library/dd923535(v=office.12).aspx
29082910
*/
29092911
private function readStructureTextPFRun($stream, $pos, $strLenRT)
@@ -3068,7 +3070,7 @@ private function readStructureTextPFRun($stream, $pos, $strLenRT)
30683070
/**
30693071
* A structure that specifies language and spelling information for a run of text.
30703072
* @param string $stream
3071-
* @param itn $pos
3073+
* @param integer $pos
30723074
* @link https://msdn.microsoft.com/en-us/library/dd909603(v=office.12).aspx
30733075
*/
30743076
private function readStructureTextSIRun($stream, $pos, $strLenRT)
@@ -3127,7 +3129,7 @@ private function readStructureTextSIRun($stream, $pos, $strLenRT)
31273129
/**
31283130
* A structure that specifies tabbing, margins, and indentation for text.
31293131
* @param string $stream
3130-
* @param int $pos
3132+
* @param integer $pos
31313133
* @link https://msdn.microsoft.com/en-us/library/dd922749(v=office.12).aspx
31323134
*/
31333135
private function readStructureTextRuler($stream, $pos)

0 commit comments

Comments
 (0)