ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
Styles.php
Go to the documentation of this file.
1 <?php
38 {
46  public function write(PHPExcel $pPHPExcel = null)
47  {
48  if (!$pPHPExcel) {
49  $pPHPExcel = $this->getParentWriter()->getPHPExcel();
50  }
51 
52  $objWriter = null;
53  if ($this->getParentWriter()->getUseDiskCaching()) {
55  } else {
57  }
58 
59  // XML header
60  $objWriter->startDocument('1.0', 'UTF-8');
61 
62  // Content
63  $objWriter->startElement('office:document-styles');
64  $objWriter->writeAttribute('xmlns:office', 'urn:oasis:names:tc:opendocument:xmlns:office:1.0');
65  $objWriter->writeAttribute('xmlns:style', 'urn:oasis:names:tc:opendocument:xmlns:style:1.0');
66  $objWriter->writeAttribute('xmlns:text', 'urn:oasis:names:tc:opendocument:xmlns:text:1.0');
67  $objWriter->writeAttribute('xmlns:table', 'urn:oasis:names:tc:opendocument:xmlns:table:1.0');
68  $objWriter->writeAttribute('xmlns:draw', 'urn:oasis:names:tc:opendocument:xmlns:drawing:1.0');
69  $objWriter->writeAttribute('xmlns:fo', 'urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0');
70  $objWriter->writeAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink');
71  $objWriter->writeAttribute('xmlns:dc', 'http://purl.org/dc/elements/1.1/');
72  $objWriter->writeAttribute('xmlns:meta', 'urn:oasis:names:tc:opendocument:xmlns:meta:1.0');
73  $objWriter->writeAttribute('xmlns:number', 'urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0');
74  $objWriter->writeAttribute('xmlns:presentation', 'urn:oasis:names:tc:opendocument:xmlns:presentation:1.0');
75  $objWriter->writeAttribute('xmlns:svg', 'urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0');
76  $objWriter->writeAttribute('xmlns:chart', 'urn:oasis:names:tc:opendocument:xmlns:chart:1.0');
77  $objWriter->writeAttribute('xmlns:dr3d', 'urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0');
78  $objWriter->writeAttribute('xmlns:math', 'http://www.w3.org/1998/Math/MathML');
79  $objWriter->writeAttribute('xmlns:form', 'urn:oasis:names:tc:opendocument:xmlns:form:1.0');
80  $objWriter->writeAttribute('xmlns:script', 'urn:oasis:names:tc:opendocument:xmlns:script:1.0');
81  $objWriter->writeAttribute('xmlns:ooo', 'http://openoffice.org/2004/office');
82  $objWriter->writeAttribute('xmlns:ooow', 'http://openoffice.org/2004/writer');
83  $objWriter->writeAttribute('xmlns:oooc', 'http://openoffice.org/2004/calc');
84  $objWriter->writeAttribute('xmlns:dom', 'http://www.w3.org/2001/xml-events');
85  $objWriter->writeAttribute('xmlns:rpt', 'http://openoffice.org/2005/report');
86  $objWriter->writeAttribute('xmlns:of', 'urn:oasis:names:tc:opendocument:xmlns:of:1.2');
87  $objWriter->writeAttribute('xmlns:xhtml', 'http://www.w3.org/1999/xhtml');
88  $objWriter->writeAttribute('xmlns:grddl', 'http://www.w3.org/2003/g/data-view#');
89  $objWriter->writeAttribute('xmlns:tableooo', 'http://openoffice.org/2009/table');
90  $objWriter->writeAttribute('xmlns:css3t', 'http://www.w3.org/TR/css3-text/');
91  $objWriter->writeAttribute('office:version', '1.2');
92 
93  $objWriter->writeElement('office:font-face-decls');
94  $objWriter->writeElement('office:styles');
95  $objWriter->writeElement('office:automatic-styles');
96  $objWriter->writeElement('office:master-styles');
97  $objWriter->endElement();
98 
99  return $objWriter->getData();
100  }
101 }
write(PHPExcel $pPHPExcel=null)
Write styles.xml to XML format.
Definition: Styles.php:46
getParentWriter()
Get parent IWriter object.
Definition: WriterPart.php:61
$objWriter
const STORAGE_MEMORY
Temporary storage method.
Definition: XMLWriter.php:46