Skip to content

Commit 3edd852

Browse files
committed
#161 : Clean dead code
1 parent a0a7457 commit 3edd852

File tree

5 files changed

+1
-163
lines changed

5 files changed

+1
-163
lines changed

src/PhpPresentation/Reader/PowerPoint2007.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717

1818
namespace PhpOffice\PhpPresentation\Reader;
1919

20-
/** This file will be edited to also read slideLayout things */
21-
2220
use PhpOffice\PhpPresentation\Shape\RichText\Paragraph;
2321
use PhpOffice\PhpPresentation\Slide\AbstractSlide;
2422
use PhpOffice\PhpPresentation\Shape\Placeholder;

src/PhpPresentation/Style/TextStyle.php

Lines changed: 0 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -165,114 +165,4 @@ public function getOtherStyle()
165165
{
166166
return $this->otherStyle;
167167
}
168-
//
169-
//
170-
//
171-
//
172-
//
173-
//
174-
//
175-
//
176-
//
177-
//
178-
//
179-
//<p:titleStyle>
180-
// <a:lvl1pPr algn="ctr" defTabSz="914400" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1">
181-
// <a:spcBef>
182-
// <a:spcPct val="0" />
183-
// </a:spcBef>
184-
// <a:buNone />
185-
// <a:defRPr sz="4400" kern="1200">
186-
// <a:solidFill>
187-
// <a:schemeClr val="tx1" />
188-
// </a:solidFill>
189-
// <a:latin typeface="+mj-lt" />
190-
// <a:ea typeface="+mj-ea" />
191-
// <a:cs typeface="+mj-cs" />
192-
// </a:defRPr>
193-
// </a:lvl1pPr>
194-
//</p:titleStyle>
195-
//
196-
//
197-
// // Create a shape (text)
198-
//echo date('H:i:s') . ' Create a shape (rich text)'.EOL;
199-
//$shape = $currentSlide->createRichTextShape();
200-
//$shape->setHeight(600)
201-
//->setWidth(930)
202-
//->setOffsetX(10)
203-
//->setOffsetY(130);
204-
//$shape->getActiveParagraph()->getAlignment()->setHorizontal(Alignment::HORIZONTAL_LEFT)
205-
//->setMarginLeft(25)
206-
//->setIndent(-25);
207-
//$shape->getActiveParagraph()->getFont()->setSize(36)
208-
//->setColor($colorBlack);
209-
//$shape->getActiveParagraph()->getBulletStyle()->setBulletType(Bullet::TYPE_BULLET);
210-
//
211-
//$shape->createTextRun('Generate slide decks');
212-
//
213-
//$shape->createParagraph()->getAlignment()->setLevel(1)
214-
//->setMarginLeft(75)
215-
//->setIndent(-25);
216-
//$shape->createTextRun('Represent business data');
217-
//$shape->createParagraph()->createTextRun('Show a family slide show');
218-
//$shape->createParagraph()->createTextRun('...');
219-
//
220-
//$shape->createParagraph()->getAlignment()->setLevel(0)
221-
//->setMarginLeft(25)
222-
//->setIndent(-25);
223-
//$shape->createTextRun('Export these to different formats');
224-
//$shape->createParagraph()->getAlignment()->setLevel(1)
225-
//->setMarginLeft(75)
226-
//->setIndent(-25);
227-
//$shape->createTextRun('PHPPresentation 2007');
228-
//$shape->createParagraph()->createTextRun('Serialized');
229-
//$shape->createParagraph()->createTextRun('... (more to come) ...');
230-
//
231-
/**
232-
* Text Styles
233-
* p:bodyStyle
234-
* p:titleStyle
235-
* p:otherStyle
236-
*
237-
* a:defPPr
238-
* a:lvl1pPr
239-
* .
240-
* .
241-
* .
242-
* a:lvl9pPr
243-
* attributes
244-
* - algn (alignment)
245-
* - defTabSz (default tab size)
246-
* - fontAlgn (font alignment)
247-
* - hangingPunct (specifies the handling of hanging text)
248-
* - indent (indentation for the first line of text)
249-
* - latinLnBrk (specifies whether to break words)
250-
* - marL and marR (left and right margins)
251-
* - lang
252-
*elements*
253-
*
254-
* Bullets & Numbering (http://officeopenxml.com/drwSp-text-paraProps-numbering.php)
255-
* <a:buAutoNum/> (auto-numbering bullet)
256-
* <a:buBlip> (picture bullet)
257-
* <a:buChar/> (character bullet)
258-
* <a:buClr> (color of bullets)
259-
* <a:buClrTx> (color of bullets is same as text run)
260-
* <a:buFont/> (font for bullets)
261-
* <a:buFontTx> (font for bullets is same as text run)
262-
* <a:buNone> (no bullet)
263-
* <a:buSzPct> (size in percentage of bullet characters)
264-
* <a:buSzPts/> (size in points of bullet characters)
265-
* <a:buSzTx> (size of bullet characters to be size of text run)
266-
*
267-
* List Properties and Default Style. (http://officeopenxml.com/drwSp-text-lstPr.php)
268-
* <a:defRPr> (default text run properties)
269-
*
270-
* Text - Spacing, Indents and Margins. (http://officeopenxml.com/drwSp-text-paraProps-margins.php)
271-
* <a:lnSpc> (line spacing)
272-
* <a:spcAft> (spacing after the paragraph)
273-
* <a:spcBef> (spacing before the paragraph)
274-
*
275-
* Text - Alignment, Tabs, Other (http://officeopenxml.com/drwSp-text-paraProps-align.php)
276-
* <a:tabLst> (list of tab stops in a paragraph)
277-
*/
278168
}

src/PhpPresentation/Writer/PowerPoint2007/ContentTypes.php

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -85,26 +85,6 @@ public function render()
8585
}
8686
}
8787

88-
// Add layoutpack content types
89-
/* $otherRelations = $oLayoutPack->getMasterSlideRelations();
90-
foreach ($otherRelations as $otherRelation) {
91-
if (strpos($otherRelation['target'], 'http://') !== 0 && $otherRelation['contentType'] != '') {
92-
$this->writeOverrideContentType($objWriter, '/ppt/slideMasters/' . $otherRelation['target'], $otherRelation['contentType']);
93-
}
94-
}
95-
$otherRelations = $oLayoutPack->getThemeRelations();
96-
foreach ($otherRelations as $otherRelation) {
97-
if (strpos($otherRelation['target'], 'http://') !== 0 && $otherRelation['contentType'] != '') {
98-
$this->writeOverrideContentType($objWriter, '/ppt/theme/' . $otherRelation['target'], $otherRelation['contentType']);
99-
}
100-
}
101-
$otherRelations = $oLayoutPack->getLayoutRelations();
102-
foreach ($otherRelations as $otherRelation) {
103-
if (strpos($otherRelation['target'], 'http://') !== 0 && $otherRelation['contentType'] != '') {
104-
$this->writeOverrideContentType($objWriter, '/ppt/slideLayouts/' . $otherRelation['target'], $otherRelation['contentType']);
105-
}
106-
}
107-
*/
10888
// Add media content-types
10989
$aMediaContentTypes = array();
11090

src/PhpPresentation/Writer/PowerPoint2007/PptSlideLayouts.php

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,6 @@ public function render()
2222
}
2323
}
2424

25-
/*
26-
foreach ($oLayoutPack->getLayoutRelations() as $otherRelation) {
27-
if (strpos($otherRelation['target'], 'http://') === 0) {
28-
continue;
29-
}
30-
$this->oZip->addFromString($this->absoluteZipPath('ppt/slideLayouts/' . $otherRelation['target']), $otherRelation['contents']);
31-
}
32-
*/
33-
3425
return $this->oZip;
3526
}
3627

@@ -58,17 +49,6 @@ public function writeSlideLayoutRelationships($slideLayoutIndex, $masterId = 1)
5849
// Write slideMaster relationship
5950
$this->writeRelationship($objWriter, 1, 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster', '../slideMasters/slideMaster' . $masterId . '.xml');
6051

61-
// Other relationships
62-
//@todo
63-
$slideLayoutIndex;
64-
/*
65-
foreach ($oLayoutPack->getLayoutRelations() as $otherRelation) {
66-
if ($otherRelation['layoutId'] == $slideLayoutIndex) {
67-
$this->writeRelationship($objWriter, $otherRelation['id'], $otherRelation['type'], $otherRelation['target']);
68-
}
69-
}
70-
*/
71-
7252
$objWriter->endElement();
7353

7454
// Return

src/PhpPresentation/Writer/PowerPoint2007/PptSlideMasters.php

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,7 @@ public function render()
2525
// Add the information from the masterSlide to the ZIP file
2626
$this->oZip->addFromString('ppt/slideMasters/slideMaster' . $oMasterSlide->getRelsIndex() . '.xml', $this->writeSlideMaster($oMasterSlide));
2727
}
28-
29-
// // Add layoutpack relations
30-
// $otherRelations = $oLayoutPack->getMasterSlideRelations();
31-
// foreach ($otherRelations as $otherRelation) {
32-
// if (strpos($otherRelation['target'], 'http://') !== 0) {
33-
// $this->oZip->addFromString(
34-
// $this->absoluteZipPath('ppt/slideMasters/' . $otherRelation['target']),
35-
// $otherRelation['contents']
36-
// );
37-
// }
38-
// }
28+
3929
return $this->oZip;
4030
}
4131

0 commit comments

Comments
 (0)