PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.0.3
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.0.3
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.10.1 3.10.10 3.10.11 3.10.12 3.10.13 3.10.14 3.10.15 3.10.2 3.10.3 All 149 releases
visualizer / vendor / phpoffice / phpexcel / Classes / PHPExcel / Writer / OpenDocument / Styles.php

Styles.php in Visualizer – Tables & Charts Manager with Built-in AI Generator 3.0.3, at vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/OpenDocument/Styles.php

102 lines 5.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * PHPExcel
4 *
5 * Copyright (c) 2006 - 2014 PHPExcel
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 *
21 * @category PHPExcel
22 * @package PHPExcel_Writer_OpenDocument
23 * @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
25 * @version ##VERSION##, ##DATE##
26 */
27
28
29 /**
30 * PHPExcel_Writer_OpenDocument_Styles
31 *
32 * @category PHPExcel
33 * @package PHPExcel_Writer_OpenDocument
34 * @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
35 * @author Alexander Pervakov <frost-nzcr4@jagmort.com>
36 */
37 class PHPExcel_Writer_OpenDocument_Styles extends PHPExcel_Writer_OpenDocument_WriterPart
38 {
39 /**
40 * Write styles.xml to XML format
41 *
42 * @param PHPExcel $pPHPExcel
43 * @return string XML Output
44 * @throws PHPExcel_Writer_Exception
45 */
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()) {
54 $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory());
55 } else {
56 $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY);
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 }
102