Total Complexity | 60 |
Total Lines | 518 |
Duplicated Lines | 0 % |
Coverage | 84.02% |
Changes | 0 |
Complex classes like Xlsx often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use Xlsx, and based on these observations, apply Extract Interface, too.
1 | <?php |
||
28 | class Xlsx extends BaseWriter |
||
29 | { |
||
30 | /** |
||
31 | * Office2003 compatibility. |
||
32 | * |
||
33 | * @var bool |
||
34 | */ |
||
35 | private $office2003compatibility = false; |
||
36 | |||
37 | /** |
||
38 | * Private writer parts. |
||
39 | * |
||
40 | * @var Xlsx\WriterPart[] |
||
41 | */ |
||
42 | private $writerParts = []; |
||
43 | |||
44 | /** |
||
45 | * Private Spreadsheet. |
||
46 | * |
||
47 | * @var Spreadsheet |
||
48 | */ |
||
49 | private $spreadSheet; |
||
50 | |||
51 | /** |
||
52 | * Private string table. |
||
53 | * |
||
54 | * @var string[] |
||
55 | */ |
||
56 | private $stringTable = []; |
||
57 | |||
58 | /** |
||
59 | * Private unique Conditional HashTable. |
||
60 | * |
||
61 | * @var HashTable |
||
62 | */ |
||
63 | private $stylesConditionalHashTable; |
||
64 | |||
65 | /** |
||
66 | * Private unique Style HashTable. |
||
67 | * |
||
68 | * @var HashTable |
||
69 | */ |
||
70 | private $styleHashTable; |
||
71 | |||
72 | /** |
||
73 | * Private unique Fill HashTable. |
||
74 | * |
||
75 | * @var HashTable |
||
76 | */ |
||
77 | private $fillHashTable; |
||
78 | |||
79 | /** |
||
80 | * Private unique \PhpOffice\PhpSpreadsheet\Style\Font HashTable. |
||
81 | * |
||
82 | * @var HashTable |
||
83 | */ |
||
84 | private $fontHashTable; |
||
85 | |||
86 | /** |
||
87 | * Private unique Borders HashTable. |
||
88 | * |
||
89 | * @var HashTable |
||
90 | */ |
||
91 | private $bordersHashTable; |
||
92 | |||
93 | /** |
||
94 | * Private unique NumberFormat HashTable. |
||
95 | * |
||
96 | * @var HashTable |
||
97 | */ |
||
98 | private $numFmtHashTable; |
||
99 | |||
100 | /** |
||
101 | * Private unique \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet\BaseDrawing HashTable. |
||
102 | * |
||
103 | * @var HashTable |
||
104 | */ |
||
105 | private $drawingHashTable; |
||
106 | |||
107 | /** |
||
108 | * Create a new Xlsx Writer. |
||
109 | * |
||
110 | * @param Spreadsheet $spreadsheet |
||
111 | */ |
||
112 | 79 | public function __construct(Spreadsheet $spreadsheet) |
|
113 | { |
||
114 | // Assign PhpSpreadsheet |
||
115 | 79 | $this->setSpreadsheet($spreadsheet); |
|
116 | |||
117 | $writerPartsArray = [ |
||
118 | 79 | 'stringtable' => StringTable::class, |
|
119 | 'contenttypes' => ContentTypes::class, |
||
120 | 'docprops' => DocProps::class, |
||
121 | 'rels' => Rels::class, |
||
122 | 'theme' => Theme::class, |
||
123 | 'style' => Style::class, |
||
124 | 'workbook' => Workbook::class, |
||
125 | 'worksheet' => Worksheet::class, |
||
126 | 'drawing' => Drawing::class, |
||
127 | 'comments' => Comments::class, |
||
128 | 'chart' => Chart::class, |
||
129 | 'relsvba' => RelsVBA::class, |
||
130 | 'relsribbonobjects' => RelsRibbon::class, |
||
131 | ]; |
||
132 | |||
133 | // Initialise writer parts |
||
134 | // and Assign their parent IWriters |
||
135 | 79 | foreach ($writerPartsArray as $writer => $class) { |
|
136 | 79 | $this->writerParts[$writer] = new $class($this); |
|
137 | } |
||
138 | |||
139 | 79 | $hashTablesArray = ['stylesConditionalHashTable', 'fillHashTable', 'fontHashTable', |
|
140 | 'bordersHashTable', 'numFmtHashTable', 'drawingHashTable', |
||
141 | 'styleHashTable', |
||
142 | ]; |
||
143 | |||
144 | // Set HashTable variables |
||
145 | 79 | foreach ($hashTablesArray as $tableName) { |
|
146 | 79 | $this->$tableName = new HashTable(); |
|
147 | } |
||
148 | 79 | } |
|
149 | |||
150 | /** |
||
151 | * Get writer part. |
||
152 | * |
||
153 | * @param string $pPartName Writer part name |
||
154 | * |
||
155 | * @return \PhpOffice\PhpSpreadsheet\Writer\Xlsx\WriterPart |
||
156 | */ |
||
157 | 78 | public function getWriterPart($pPartName) |
|
158 | { |
||
159 | 78 | if ($pPartName != '' && isset($this->writerParts[strtolower($pPartName)])) { |
|
160 | 78 | return $this->writerParts[strtolower($pPartName)]; |
|
161 | } |
||
162 | |||
163 | return null; |
||
164 | } |
||
165 | |||
166 | /** |
||
167 | * Save PhpSpreadsheet to file. |
||
168 | * |
||
169 | * @param string $pFilename |
||
170 | * |
||
171 | * @throws WriterException |
||
172 | */ |
||
173 | 78 | public function save($pFilename) |
|
174 | { |
||
175 | 78 | if ($this->spreadSheet !== null) { |
|
176 | // garbage collect |
||
177 | 78 | $this->spreadSheet->garbageCollect(); |
|
178 | |||
179 | // If $pFilename is php://output or php://stdout, make it a temporary file... |
||
180 | 78 | $originalFilename = $pFilename; |
|
181 | 78 | if (strtolower($pFilename) == 'php://output' || strtolower($pFilename) == 'php://stdout') { |
|
182 | $pFilename = @tempnam(File::sysGetTempDir(), 'phpxltmp'); |
||
183 | if ($pFilename == '') { |
||
184 | $pFilename = $originalFilename; |
||
185 | } |
||
186 | } |
||
187 | |||
188 | 78 | $saveDebugLog = Calculation::getInstance($this->spreadSheet)->getDebugLog()->getWriteDebugLog(); |
|
189 | 78 | Calculation::getInstance($this->spreadSheet)->getDebugLog()->setWriteDebugLog(false); |
|
190 | 78 | $saveDateReturnType = Functions::getReturnDateType(); |
|
191 | 78 | Functions::setReturnDateType(Functions::RETURNDATE_EXCEL); |
|
192 | |||
193 | // Create string lookup table |
||
194 | 78 | $this->stringTable = []; |
|
195 | 78 | for ($i = 0; $i < $this->spreadSheet->getSheetCount(); ++$i) { |
|
196 | 78 | $this->stringTable = $this->getWriterPart('StringTable')->createStringTable($this->spreadSheet->getSheet($i), $this->stringTable); |
|
|
|||
197 | } |
||
198 | |||
199 | // Create styles dictionaries |
||
200 | 78 | $this->styleHashTable->addFromSource($this->getWriterPart('Style')->allStyles($this->spreadSheet)); |
|
201 | 78 | $this->stylesConditionalHashTable->addFromSource($this->getWriterPart('Style')->allConditionalStyles($this->spreadSheet)); |
|
202 | 78 | $this->fillHashTable->addFromSource($this->getWriterPart('Style')->allFills($this->spreadSheet)); |
|
203 | 78 | $this->fontHashTable->addFromSource($this->getWriterPart('Style')->allFonts($this->spreadSheet)); |
|
204 | 78 | $this->bordersHashTable->addFromSource($this->getWriterPart('Style')->allBorders($this->spreadSheet)); |
|
205 | 78 | $this->numFmtHashTable->addFromSource($this->getWriterPart('Style')->allNumberFormats($this->spreadSheet)); |
|
206 | |||
207 | // Create drawing dictionary |
||
208 | 78 | $this->drawingHashTable->addFromSource($this->getWriterPart('Drawing')->allDrawings($this->spreadSheet)); |
|
209 | |||
210 | 78 | $zip = new ZipArchive(); |
|
211 | |||
212 | 78 | if (file_exists($pFilename)) { |
|
213 | 22 | unlink($pFilename); |
|
214 | } |
||
215 | // Try opening the ZIP file |
||
216 | 78 | if ($zip->open($pFilename, ZipArchive::OVERWRITE) !== true) { |
|
217 | 78 | if ($zip->open($pFilename, ZipArchive::CREATE) !== true) { |
|
218 | throw new WriterException('Could not open ' . $pFilename . ' for writing.'); |
||
219 | } |
||
220 | } |
||
221 | |||
222 | // Add [Content_Types].xml to ZIP file |
||
223 | 78 | $zip->addFromString('[Content_Types].xml', $this->getWriterPart('ContentTypes')->writeContentTypes($this->spreadSheet, $this->includeCharts)); |
|
224 | |||
225 | //if hasMacros, add the vbaProject.bin file, Certificate file(if exists) |
||
226 | 78 | if ($this->spreadSheet->hasMacros()) { |
|
227 | 1 | $macrosCode = $this->spreadSheet->getMacrosCode(); |
|
228 | 1 | if ($macrosCode !== null) { |
|
229 | // we have the code ? |
||
230 | 1 | $zip->addFromString('xl/vbaProject.bin', $macrosCode); //allways in 'xl', allways named vbaProject.bin |
|
231 | 1 | if ($this->spreadSheet->hasMacrosCertificate()) { |
|
232 | //signed macros ? |
||
233 | // Yes : add the certificate file and the related rels file |
||
234 | $zip->addFromString('xl/vbaProjectSignature.bin', $this->spreadSheet->getMacrosCertificate()); |
||
235 | $zip->addFromString('xl/_rels/vbaProject.bin.rels', $this->getWriterPart('RelsVBA')->writeVBARelationships($this->spreadSheet)); |
||
236 | } |
||
237 | } |
||
238 | } |
||
239 | //a custom UI in this workbook ? add it ("base" xml and additional objects (pictures) and rels) |
||
240 | 78 | if ($this->spreadSheet->hasRibbon()) { |
|
241 | $tmpRibbonTarget = $this->spreadSheet->getRibbonXMLData('target'); |
||
242 | $zip->addFromString($tmpRibbonTarget, $this->spreadSheet->getRibbonXMLData('data')); |
||
243 | if ($this->spreadSheet->hasRibbonBinObjects()) { |
||
244 | $tmpRootPath = dirname($tmpRibbonTarget) . '/'; |
||
245 | $ribbonBinObjects = $this->spreadSheet->getRibbonBinObjects('data'); //the files to write |
||
246 | foreach ($ribbonBinObjects as $aPath => $aContent) { |
||
247 | $zip->addFromString($tmpRootPath . $aPath, $aContent); |
||
248 | } |
||
249 | //the rels for files |
||
250 | $zip->addFromString($tmpRootPath . '_rels/' . basename($tmpRibbonTarget) . '.rels', $this->getWriterPart('RelsRibbonObjects')->writeRibbonRelationships($this->spreadSheet)); |
||
251 | } |
||
252 | } |
||
253 | |||
254 | // Add relationships to ZIP file |
||
255 | 78 | $zip->addFromString('_rels/.rels', $this->getWriterPart('Rels')->writeRelationships($this->spreadSheet)); |
|
256 | 78 | $zip->addFromString('xl/_rels/workbook.xml.rels', $this->getWriterPart('Rels')->writeWorkbookRelationships($this->spreadSheet)); |
|
257 | |||
258 | // Add document properties to ZIP file |
||
259 | 78 | $zip->addFromString('docProps/app.xml', $this->getWriterPart('DocProps')->writeDocPropsApp($this->spreadSheet)); |
|
260 | 78 | $zip->addFromString('docProps/core.xml', $this->getWriterPart('DocProps')->writeDocPropsCore($this->spreadSheet)); |
|
261 | 78 | $customPropertiesPart = $this->getWriterPart('DocProps')->writeDocPropsCustom($this->spreadSheet); |
|
262 | 78 | if ($customPropertiesPart !== null) { |
|
263 | 2 | $zip->addFromString('docProps/custom.xml', $customPropertiesPart); |
|
264 | } |
||
265 | |||
266 | // Add theme to ZIP file |
||
267 | 78 | $zip->addFromString('xl/theme/theme1.xml', $this->getWriterPart('Theme')->writeTheme($this->spreadSheet)); |
|
268 | |||
269 | // Add string table to ZIP file |
||
270 | 78 | $zip->addFromString('xl/sharedStrings.xml', $this->getWriterPart('StringTable')->writeStringTable($this->stringTable)); |
|
271 | |||
272 | // Add styles to ZIP file |
||
273 | 78 | $zip->addFromString('xl/styles.xml', $this->getWriterPart('Style')->writeStyles($this->spreadSheet)); |
|
274 | |||
275 | // Add workbook to ZIP file |
||
276 | 78 | $zip->addFromString('xl/workbook.xml', $this->getWriterPart('Workbook')->writeWorkbook($this->spreadSheet, $this->preCalculateFormulas)); |
|
277 | |||
278 | 78 | $chartCount = 0; |
|
279 | // Add worksheets |
||
280 | 78 | for ($i = 0; $i < $this->spreadSheet->getSheetCount(); ++$i) { |
|
281 | 78 | $zip->addFromString('xl/worksheets/sheet' . ($i + 1) . '.xml', $this->getWriterPart('Worksheet')->writeWorksheet($this->spreadSheet->getSheet($i), $this->stringTable, $this->includeCharts)); |
|
282 | 78 | if ($this->includeCharts) { |
|
283 | 14 | $charts = $this->spreadSheet->getSheet($i)->getChartCollection(); |
|
284 | 14 | if (count($charts) > 0) { |
|
285 | 13 | foreach ($charts as $chart) { |
|
286 | 13 | $zip->addFromString('xl/charts/chart' . ($chartCount + 1) . '.xml', $this->getWriterPart('Chart')->writeChart($chart, $this->preCalculateFormulas)); |
|
287 | 13 | ++$chartCount; |
|
288 | } |
||
289 | } |
||
290 | } |
||
291 | } |
||
292 | |||
293 | 78 | $chartRef1 = 0; |
|
294 | // Add worksheet relationships (drawings, ...) |
||
295 | 78 | for ($i = 0; $i < $this->spreadSheet->getSheetCount(); ++$i) { |
|
296 | // Add relationships |
||
297 | 78 | $zip->addFromString('xl/worksheets/_rels/sheet' . ($i + 1) . '.xml.rels', $this->getWriterPart('Rels')->writeWorksheetRelationships($this->spreadSheet->getSheet($i), ($i + 1), $this->includeCharts)); |
|
298 | |||
299 | // Add unparsedLoadedData |
||
300 | 78 | $sheetCodeName = $this->spreadSheet->getSheet($i)->getCodeName(); |
|
301 | 78 | $unparsedLoadedData = $this->spreadSheet->getUnparsedLoadedData(); |
|
302 | 78 | if (isset($unparsedLoadedData['sheets'][$sheetCodeName]['ctrlProps'])) { |
|
303 | 1 | foreach ($unparsedLoadedData['sheets'][$sheetCodeName]['ctrlProps'] as $ctrlProp) { |
|
304 | 1 | $zip->addFromString($ctrlProp['filePath'], $ctrlProp['content']); |
|
305 | } |
||
306 | } |
||
307 | 78 | if (isset($unparsedLoadedData['sheets'][$sheetCodeName]['printerSettings'])) { |
|
308 | 4 | foreach ($unparsedLoadedData['sheets'][$sheetCodeName]['printerSettings'] as $ctrlProp) { |
|
309 | 4 | $zip->addFromString($ctrlProp['filePath'], $ctrlProp['content']); |
|
310 | } |
||
311 | } |
||
312 | |||
313 | 78 | $drawings = $this->spreadSheet->getSheet($i)->getDrawingCollection(); |
|
314 | 78 | $drawingCount = count($drawings); |
|
315 | 78 | if ($this->includeCharts) { |
|
316 | 14 | $chartCount = $this->spreadSheet->getSheet($i)->getChartCount(); |
|
317 | } |
||
318 | |||
319 | // Add drawing and image relationship parts |
||
320 | 78 | if (($drawingCount > 0) || ($chartCount > 0)) { |
|
321 | // Drawing relationships |
||
322 | 22 | $zip->addFromString('xl/drawings/_rels/drawing' . ($i + 1) . '.xml.rels', $this->getWriterPart('Rels')->writeDrawingRelationships($this->spreadSheet->getSheet($i), $chartRef1, $this->includeCharts)); |
|
323 | |||
324 | // Drawings |
||
325 | 22 | $zip->addFromString('xl/drawings/drawing' . ($i + 1) . '.xml', $this->getWriterPart('Drawing')->writeDrawings($this->spreadSheet->getSheet($i), $this->includeCharts)); |
|
326 | 57 | } elseif (isset($unparsedLoadedData['sheets'][$sheetCodeName]['drawingAlternateContents'])) { |
|
327 | // Drawings |
||
328 | 1 | $zip->addFromString('xl/drawings/drawing' . ($i + 1) . '.xml', $this->getWriterPart('Drawing')->writeDrawings($this->spreadSheet->getSheet($i), $this->includeCharts)); |
|
329 | } |
||
330 | |||
331 | // Add comment relationship parts |
||
332 | 78 | if (count($this->spreadSheet->getSheet($i)->getComments()) > 0) { |
|
333 | // VML Comments |
||
334 | 10 | $zip->addFromString('xl/drawings/vmlDrawing' . ($i + 1) . '.vml', $this->getWriterPart('Comments')->writeVMLComments($this->spreadSheet->getSheet($i))); |
|
335 | |||
336 | // Comments |
||
337 | 10 | $zip->addFromString('xl/comments' . ($i + 1) . '.xml', $this->getWriterPart('Comments')->writeComments($this->spreadSheet->getSheet($i))); |
|
338 | } |
||
339 | |||
340 | // Add unparsed relationship parts |
||
341 | 78 | if (isset($unparsedLoadedData['sheets'][$this->spreadSheet->getSheet($i)->getCodeName()]['vmlDrawings'])) { |
|
342 | 1 | foreach ($unparsedLoadedData['sheets'][$this->spreadSheet->getSheet($i)->getCodeName()]['vmlDrawings'] as $vmlDrawing) { |
|
343 | 1 | $zip->addFromString($vmlDrawing['filePath'], $vmlDrawing['content']); |
|
344 | } |
||
345 | } |
||
346 | |||
347 | // Add header/footer relationship parts |
||
348 | 78 | if (count($this->spreadSheet->getSheet($i)->getHeaderFooter()->getImages()) > 0) { |
|
349 | // VML Drawings |
||
350 | 1 | $zip->addFromString('xl/drawings/vmlDrawingHF' . ($i + 1) . '.vml', $this->getWriterPart('Drawing')->writeVMLHeaderFooterImages($this->spreadSheet->getSheet($i))); |
|
351 | |||
352 | // VML Drawing relationships |
||
353 | 1 | $zip->addFromString('xl/drawings/_rels/vmlDrawingHF' . ($i + 1) . '.vml.rels', $this->getWriterPart('Rels')->writeHeaderFooterDrawingRelationships($this->spreadSheet->getSheet($i))); |
|
354 | |||
355 | // Media |
||
356 | 1 | foreach ($this->spreadSheet->getSheet($i)->getHeaderFooter()->getImages() as $image) { |
|
357 | 1 | $zip->addFromString('xl/media/' . $image->getIndexedFilename(), file_get_contents($image->getPath())); |
|
358 | } |
||
359 | } |
||
360 | } |
||
361 | |||
362 | // Add media |
||
363 | 78 | for ($i = 0; $i < $this->getDrawingHashTable()->count(); ++$i) { |
|
364 | 10 | if ($this->getDrawingHashTable()->getByIndex($i) instanceof WorksheetDrawing) { |
|
365 | 6 | $imageContents = null; |
|
366 | 6 | $imagePath = $this->getDrawingHashTable()->getByIndex($i)->getPath(); |
|
1 ignored issue
–
show
|
|||
367 | 6 | if (strpos($imagePath, 'zip://') !== false) { |
|
368 | 2 | $imagePath = substr($imagePath, 6); |
|
369 | 2 | $imagePathSplitted = explode('#', $imagePath); |
|
370 | |||
371 | 2 | $imageZip = new ZipArchive(); |
|
372 | 2 | $imageZip->open($imagePathSplitted[0]); |
|
373 | 2 | $imageContents = $imageZip->getFromName($imagePathSplitted[1]); |
|
374 | 2 | $imageZip->close(); |
|
375 | 2 | unset($imageZip); |
|
376 | } else { |
||
377 | 5 | $imageContents = file_get_contents($imagePath); |
|
378 | } |
||
379 | |||
380 | 6 | $zip->addFromString('xl/media/' . str_replace(' ', '_', $this->getDrawingHashTable()->getByIndex($i)->getIndexedFilename()), $imageContents); |
|
381 | 4 | } elseif ($this->getDrawingHashTable()->getByIndex($i) instanceof MemoryDrawing) { |
|
382 | 4 | ob_start(); |
|
383 | 4 | call_user_func( |
|
384 | 4 | $this->getDrawingHashTable()->getByIndex($i)->getRenderingFunction(), |
|
1 ignored issue
–
show
|
|||
385 | 4 | $this->getDrawingHashTable()->getByIndex($i)->getImageResource() |
|
1 ignored issue
–
show
|
|||
386 | ); |
||
387 | 4 | $imageContents = ob_get_contents(); |
|
388 | 4 | ob_end_clean(); |
|
389 | |||
390 | 4 | $zip->addFromString('xl/media/' . str_replace(' ', '_', $this->getDrawingHashTable()->getByIndex($i)->getIndexedFilename()), $imageContents); |
|
391 | } |
||
392 | } |
||
393 | |||
394 | 78 | Functions::setReturnDateType($saveDateReturnType); |
|
395 | 78 | Calculation::getInstance($this->spreadSheet)->getDebugLog()->setWriteDebugLog($saveDebugLog); |
|
396 | |||
397 | // Close file |
||
398 | 78 | if ($zip->close() === false) { |
|
399 | throw new WriterException("Could not close zip file $pFilename."); |
||
400 | } |
||
401 | |||
402 | // If a temporary file was used, copy it to the correct file stream |
||
403 | 78 | if ($originalFilename != $pFilename) { |
|
404 | if (copy($pFilename, $originalFilename) === false) { |
||
405 | throw new WriterException("Could not copy temporary zip file $pFilename to $originalFilename."); |
||
406 | } |
||
407 | 78 | @unlink($pFilename); |
|
1 ignored issue
–
show
|
|||
408 | } |
||
409 | } else { |
||
410 | throw new WriterException('PhpSpreadsheet object unassigned.'); |
||
411 | } |
||
412 | 78 | } |
|
413 | |||
414 | /** |
||
415 | * Get Spreadsheet object. |
||
416 | * |
||
417 | * @throws WriterException |
||
418 | * |
||
419 | * @return Spreadsheet |
||
420 | */ |
||
421 | 78 | public function getSpreadsheet() |
|
422 | { |
||
423 | 78 | if ($this->spreadSheet !== null) { |
|
424 | 78 | return $this->spreadSheet; |
|
425 | } |
||
426 | |||
427 | throw new WriterException('No Spreadsheet object assigned.'); |
||
428 | } |
||
429 | |||
430 | /** |
||
431 | * Set Spreadsheet object. |
||
432 | * |
||
433 | * @param Spreadsheet $spreadsheet PhpSpreadsheet object |
||
434 | * |
||
435 | * @return Xlsx |
||
436 | */ |
||
437 | 79 | public function setSpreadsheet(Spreadsheet $spreadsheet) |
|
438 | { |
||
439 | 79 | $this->spreadSheet = $spreadsheet; |
|
440 | |||
441 | 79 | return $this; |
|
442 | } |
||
443 | |||
444 | /** |
||
445 | * Get string table. |
||
446 | * |
||
447 | * @return string[] |
||
448 | */ |
||
449 | public function getStringTable() |
||
450 | { |
||
451 | return $this->stringTable; |
||
452 | } |
||
453 | |||
454 | /** |
||
455 | * Get Style HashTable. |
||
456 | * |
||
457 | * @return HashTable |
||
458 | */ |
||
459 | public function getStyleHashTable() |
||
460 | { |
||
461 | return $this->styleHashTable; |
||
462 | } |
||
463 | |||
464 | /** |
||
465 | * Get Conditional HashTable. |
||
466 | * |
||
467 | * @return HashTable |
||
468 | */ |
||
469 | 78 | public function getStylesConditionalHashTable() |
|
470 | { |
||
471 | 78 | return $this->stylesConditionalHashTable; |
|
472 | } |
||
473 | |||
474 | /** |
||
475 | * Get Fill HashTable. |
||
476 | * |
||
477 | * @return HashTable |
||
478 | */ |
||
479 | 78 | public function getFillHashTable() |
|
480 | { |
||
481 | 78 | return $this->fillHashTable; |
|
482 | } |
||
483 | |||
484 | /** |
||
485 | * Get \PhpOffice\PhpSpreadsheet\Style\Font HashTable. |
||
486 | * |
||
487 | * @return HashTable |
||
488 | */ |
||
489 | 78 | public function getFontHashTable() |
|
490 | { |
||
491 | 78 | return $this->fontHashTable; |
|
492 | } |
||
493 | |||
494 | /** |
||
495 | * Get Borders HashTable. |
||
496 | * |
||
497 | * @return HashTable |
||
498 | */ |
||
499 | 78 | public function getBordersHashTable() |
|
502 | } |
||
503 | |||
504 | /** |
||
505 | * Get NumberFormat HashTable. |
||
506 | * |
||
507 | * @return HashTable |
||
508 | */ |
||
509 | 78 | public function getNumFmtHashTable() |
|
510 | { |
||
511 | 78 | return $this->numFmtHashTable; |
|
512 | } |
||
513 | |||
514 | /** |
||
515 | * Get \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet\BaseDrawing HashTable. |
||
516 | * |
||
517 | * @return HashTable |
||
518 | */ |
||
519 | 78 | public function getDrawingHashTable() |
|
520 | { |
||
521 | 78 | return $this->drawingHashTable; |
|
522 | } |
||
523 | |||
524 | /** |
||
525 | * Get Office2003 compatibility. |
||
526 | * |
||
527 | * @return bool |
||
528 | */ |
||
529 | 78 | public function getOffice2003Compatibility() |
|
532 | } |
||
533 | |||
534 | /** |
||
535 | * Set Office2003 compatibility. |
||
536 | * |
||
537 | * @param bool $pValue Office2003 compatibility? |
||
538 | * |
||
539 | * @return Xlsx |
||
540 | */ |
||
541 | public function setOffice2003Compatibility($pValue) |
||
546 | } |
||
547 | } |
||
548 |