ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
PHPExcel_Writer_OpenDocument_Settings Class Reference
+ Inheritance diagram for PHPExcel_Writer_OpenDocument_Settings:
+ Collaboration diagram for PHPExcel_Writer_OpenDocument_Settings:

Public Member Functions

 write (PHPExcel $pPHPExcel=null)
 Write settings.xml to XML format. More...
 
- Public Member Functions inherited from PHPExcel_Writer_Excel2007_WriterPart
 setParentWriter (PHPExcel_Writer_IWriter $pWriter=null)
 Set parent IWriter object. More...
 
 getParentWriter ()
 Get parent IWriter object. More...
 
 __construct (PHPExcel_Writer_IWriter $pWriter=null)
 Set parent IWriter object. More...
 

Detailed Description

Definition at line 37 of file Settings.php.

Member Function Documentation

◆ write()

PHPExcel_Writer_OpenDocument_Settings::write ( PHPExcel  $pPHPExcel = null)

Write settings.xml to XML format.

Parameters
PHPExcel$pPHPExcel
Returns
string XML Output
Exceptions
PHPExcel_Writer_Exception

Definition at line 46 of file Settings.php.

References $objWriter, PHPExcel_Writer_Excel2007_WriterPart\getParentWriter(), PHPExcel_Shared_XMLWriter\STORAGE_DISK, and PHPExcel_Shared_XMLWriter\STORAGE_MEMORY.

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  // Settings
63  $objWriter->startElement('office:document-settings');
64  $objWriter->writeAttribute('xmlns:office', 'urn:oasis:names:tc:opendocument:xmlns:office:1.0');
65  $objWriter->writeAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink');
66  $objWriter->writeAttribute('xmlns:config', 'urn:oasis:names:tc:opendocument:xmlns:config:1.0');
67  $objWriter->writeAttribute('xmlns:ooo', 'http://openoffice.org/2004/office');
68  $objWriter->writeAttribute('office:version', '1.2');
69 
70  $objWriter->startElement('office:settings');
71  $objWriter->startElement('config:config-item-set');
72  $objWriter->writeAttribute('config:name', 'ooo:view-settings');
73  $objWriter->startElement('config:config-item-map-indexed');
74  $objWriter->writeAttribute('config:name', 'Views');
75  $objWriter->endElement();
76  $objWriter->endElement();
77  $objWriter->startElement('config:config-item-set');
78  $objWriter->writeAttribute('config:name', 'ooo:configuration-settings');
79  $objWriter->endElement();
80  $objWriter->endElement();
81  $objWriter->endElement();
82 
83  return $objWriter->getData();
84  }
getParentWriter()
Get parent IWriter object.
Definition: WriterPart.php:61
$objWriter
const STORAGE_MEMORY
Temporary storage method.
Definition: XMLWriter.php:46
+ Here is the call graph for this function:

The documentation for this class was generated from the following file: