20 'Arab' =>
'Times New Roman',
21 'Hebr' =>
'Times New Roman',
26 'Khmr' =>
'MoolBoran',
30 'Cher' =>
'Plantagenet Cherokee',
31 'Yiii' =>
'Microsoft Yi Baiti',
32 'Tibt' =>
'Microsoft Himalaya',
37 'Syrc' =>
'Estrangelo Edessa',
40 'Laoo' =>
'DokChampa',
41 'Sinh' =>
'Iskoola Pota',
42 'Mong' =>
'Mongolian Baiti',
43 'Viet' =>
'Times New Roman',
44 'Uigh' =>
'Microsoft Uighur',
68 'Cher' =>
'Plantagenet Cherokee',
69 'Yiii' =>
'Microsoft Yi Baiti',
70 'Tibt' =>
'Microsoft Himalaya',
75 'Syrc' =>
'Estrangelo Edessa',
78 'Laoo' =>
'DokChampa',
79 'Sinh' =>
'Iskoola Pota',
80 'Mong' =>
'Mongolian Baiti',
82 'Uigh' =>
'Microsoft Uighur',
94 'accent1' =>
'4F81BD',
95 'accent2' =>
'C0504D',
96 'accent3' =>
'9BBB59',
97 'accent4' =>
'8064A2',
98 'accent5' =>
'4BACC6',
99 'accent6' =>
'F79646',
101 'folHlink' =>
'800080',
116 $objWriter =
new XMLWriter(XMLWriter::STORAGE_MEMORY);
120 $objWriter->startDocument(
'1.0',
'UTF-8',
'yes');
123 $objWriter->startElement(
'a:theme');
124 $objWriter->writeAttribute(
'xmlns:a',
'http://schemas.openxmlformats.org/drawingml/2006/main');
125 $objWriter->writeAttribute(
'name',
'Office Theme');
128 $objWriter->startElement(
'a:themeElements');
131 $objWriter->startElement(
'a:clrScheme');
132 $objWriter->writeAttribute(
'name',
'Office');
135 $objWriter->startElement(
'a:dk1');
138 $objWriter->startElement(
'a:sysClr');
139 $objWriter->writeAttribute(
'val',
'windowText');
140 $objWriter->writeAttribute(
'lastClr',
'000000');
141 $objWriter->endElement();
143 $objWriter->endElement();
146 $objWriter->startElement(
'a:lt1');
149 $objWriter->startElement(
'a:sysClr');
150 $objWriter->writeAttribute(
'val',
'window');
151 $objWriter->writeAttribute(
'lastClr',
'FFFFFF');
152 $objWriter->endElement();
154 $objWriter->endElement();
159 $objWriter->endElement();
162 $objWriter->startElement(
'a:fontScheme');
163 $objWriter->writeAttribute(
'name',
'Office');
166 $objWriter->startElement(
'a:majorFont');
167 $this->
writeFonts($objWriter,
'Cambria', self::$majorFonts);
168 $objWriter->endElement();
171 $objWriter->startElement(
'a:minorFont');
172 $this->
writeFonts($objWriter,
'Calibri', self::$minorFonts);
173 $objWriter->endElement();
175 $objWriter->endElement();
178 $objWriter->startElement(
'a:fmtScheme');
179 $objWriter->writeAttribute(
'name',
'Office');
182 $objWriter->startElement(
'a:fillStyleLst');
185 $objWriter->startElement(
'a:solidFill');
188 $objWriter->startElement(
'a:schemeClr');
189 $objWriter->writeAttribute(
'val',
'phClr');
190 $objWriter->endElement();
192 $objWriter->endElement();
195 $objWriter->startElement(
'a:gradFill');
196 $objWriter->writeAttribute(
'rotWithShape',
'1');
199 $objWriter->startElement(
'a:gsLst');
202 $objWriter->startElement(
'a:gs');
203 $objWriter->writeAttribute(
'pos',
'0');
206 $objWriter->startElement(
'a:schemeClr');
207 $objWriter->writeAttribute(
'val',
'phClr');
210 $objWriter->startElement(
'a:tint');
211 $objWriter->writeAttribute(
'val',
'50000');
212 $objWriter->endElement();
215 $objWriter->startElement(
'a:satMod');
216 $objWriter->writeAttribute(
'val',
'300000');
217 $objWriter->endElement();
219 $objWriter->endElement();
221 $objWriter->endElement();
224 $objWriter->startElement(
'a:gs');
225 $objWriter->writeAttribute(
'pos',
'35000');
228 $objWriter->startElement(
'a:schemeClr');
229 $objWriter->writeAttribute(
'val',
'phClr');
232 $objWriter->startElement(
'a:tint');
233 $objWriter->writeAttribute(
'val',
'37000');
234 $objWriter->endElement();
237 $objWriter->startElement(
'a:satMod');
238 $objWriter->writeAttribute(
'val',
'300000');
239 $objWriter->endElement();
241 $objWriter->endElement();
243 $objWriter->endElement();
246 $objWriter->startElement(
'a:gs');
247 $objWriter->writeAttribute(
'pos',
'100000');
250 $objWriter->startElement(
'a:schemeClr');
251 $objWriter->writeAttribute(
'val',
'phClr');
254 $objWriter->startElement(
'a:tint');
255 $objWriter->writeAttribute(
'val',
'15000');
256 $objWriter->endElement();
259 $objWriter->startElement(
'a:satMod');
260 $objWriter->writeAttribute(
'val',
'350000');
261 $objWriter->endElement();
263 $objWriter->endElement();
265 $objWriter->endElement();
267 $objWriter->endElement();
270 $objWriter->startElement(
'a:lin');
271 $objWriter->writeAttribute(
'ang',
'16200000');
272 $objWriter->writeAttribute(
'scaled',
'1');
273 $objWriter->endElement();
275 $objWriter->endElement();
278 $objWriter->startElement(
'a:gradFill');
279 $objWriter->writeAttribute(
'rotWithShape',
'1');
282 $objWriter->startElement(
'a:gsLst');
285 $objWriter->startElement(
'a:gs');
286 $objWriter->writeAttribute(
'pos',
'0');
289 $objWriter->startElement(
'a:schemeClr');
290 $objWriter->writeAttribute(
'val',
'phClr');
293 $objWriter->startElement(
'a:shade');
294 $objWriter->writeAttribute(
'val',
'51000');
295 $objWriter->endElement();
298 $objWriter->startElement(
'a:satMod');
299 $objWriter->writeAttribute(
'val',
'130000');
300 $objWriter->endElement();
302 $objWriter->endElement();
304 $objWriter->endElement();
307 $objWriter->startElement(
'a:gs');
308 $objWriter->writeAttribute(
'pos',
'80000');
311 $objWriter->startElement(
'a:schemeClr');
312 $objWriter->writeAttribute(
'val',
'phClr');
315 $objWriter->startElement(
'a:shade');
316 $objWriter->writeAttribute(
'val',
'93000');
317 $objWriter->endElement();
320 $objWriter->startElement(
'a:satMod');
321 $objWriter->writeAttribute(
'val',
'130000');
322 $objWriter->endElement();
324 $objWriter->endElement();
326 $objWriter->endElement();
329 $objWriter->startElement(
'a:gs');
330 $objWriter->writeAttribute(
'pos',
'100000');
333 $objWriter->startElement(
'a:schemeClr');
334 $objWriter->writeAttribute(
'val',
'phClr');
337 $objWriter->startElement(
'a:shade');
338 $objWriter->writeAttribute(
'val',
'94000');
339 $objWriter->endElement();
342 $objWriter->startElement(
'a:satMod');
343 $objWriter->writeAttribute(
'val',
'135000');
344 $objWriter->endElement();
346 $objWriter->endElement();
348 $objWriter->endElement();
350 $objWriter->endElement();
353 $objWriter->startElement(
'a:lin');
354 $objWriter->writeAttribute(
'ang',
'16200000');
355 $objWriter->writeAttribute(
'scaled',
'0');
356 $objWriter->endElement();
358 $objWriter->endElement();
360 $objWriter->endElement();
363 $objWriter->startElement(
'a:lnStyleLst');
366 $objWriter->startElement(
'a:ln');
367 $objWriter->writeAttribute(
'w',
'9525');
368 $objWriter->writeAttribute(
'cap',
'flat');
369 $objWriter->writeAttribute(
'cmpd',
'sng');
370 $objWriter->writeAttribute(
'algn',
'ctr');
373 $objWriter->startElement(
'a:solidFill');
376 $objWriter->startElement(
'a:schemeClr');
377 $objWriter->writeAttribute(
'val',
'phClr');
380 $objWriter->startElement(
'a:shade');
381 $objWriter->writeAttribute(
'val',
'95000');
382 $objWriter->endElement();
385 $objWriter->startElement(
'a:satMod');
386 $objWriter->writeAttribute(
'val',
'105000');
387 $objWriter->endElement();
389 $objWriter->endElement();
391 $objWriter->endElement();
394 $objWriter->startElement(
'a:prstDash');
395 $objWriter->writeAttribute(
'val',
'solid');
396 $objWriter->endElement();
398 $objWriter->endElement();
401 $objWriter->startElement(
'a:ln');
402 $objWriter->writeAttribute(
'w',
'25400');
403 $objWriter->writeAttribute(
'cap',
'flat');
404 $objWriter->writeAttribute(
'cmpd',
'sng');
405 $objWriter->writeAttribute(
'algn',
'ctr');
408 $objWriter->startElement(
'a:solidFill');
411 $objWriter->startElement(
'a:schemeClr');
412 $objWriter->writeAttribute(
'val',
'phClr');
413 $objWriter->endElement();
415 $objWriter->endElement();
418 $objWriter->startElement(
'a:prstDash');
419 $objWriter->writeAttribute(
'val',
'solid');
420 $objWriter->endElement();
422 $objWriter->endElement();
425 $objWriter->startElement(
'a:ln');
426 $objWriter->writeAttribute(
'w',
'38100');
427 $objWriter->writeAttribute(
'cap',
'flat');
428 $objWriter->writeAttribute(
'cmpd',
'sng');
429 $objWriter->writeAttribute(
'algn',
'ctr');
432 $objWriter->startElement(
'a:solidFill');
435 $objWriter->startElement(
'a:schemeClr');
436 $objWriter->writeAttribute(
'val',
'phClr');
437 $objWriter->endElement();
439 $objWriter->endElement();
442 $objWriter->startElement(
'a:prstDash');
443 $objWriter->writeAttribute(
'val',
'solid');
444 $objWriter->endElement();
446 $objWriter->endElement();
448 $objWriter->endElement();
451 $objWriter->startElement(
'a:effectStyleLst');
454 $objWriter->startElement(
'a:effectStyle');
457 $objWriter->startElement(
'a:effectLst');
460 $objWriter->startElement(
'a:outerShdw');
461 $objWriter->writeAttribute(
'blurRad',
'40000');
462 $objWriter->writeAttribute(
'dist',
'20000');
463 $objWriter->writeAttribute(
'dir',
'5400000');
464 $objWriter->writeAttribute(
'rotWithShape',
'0');
467 $objWriter->startElement(
'a:srgbClr');
468 $objWriter->writeAttribute(
'val',
'000000');
471 $objWriter->startElement(
'a:alpha');
472 $objWriter->writeAttribute(
'val',
'38000');
473 $objWriter->endElement();
475 $objWriter->endElement();
477 $objWriter->endElement();
479 $objWriter->endElement();
481 $objWriter->endElement();
484 $objWriter->startElement(
'a:effectStyle');
487 $objWriter->startElement(
'a:effectLst');
490 $objWriter->startElement(
'a:outerShdw');
491 $objWriter->writeAttribute(
'blurRad',
'40000');
492 $objWriter->writeAttribute(
'dist',
'23000');
493 $objWriter->writeAttribute(
'dir',
'5400000');
494 $objWriter->writeAttribute(
'rotWithShape',
'0');
497 $objWriter->startElement(
'a:srgbClr');
498 $objWriter->writeAttribute(
'val',
'000000');
501 $objWriter->startElement(
'a:alpha');
502 $objWriter->writeAttribute(
'val',
'35000');
503 $objWriter->endElement();
505 $objWriter->endElement();
507 $objWriter->endElement();
509 $objWriter->endElement();
511 $objWriter->endElement();
514 $objWriter->startElement(
'a:effectStyle');
517 $objWriter->startElement(
'a:effectLst');
520 $objWriter->startElement(
'a:outerShdw');
521 $objWriter->writeAttribute(
'blurRad',
'40000');
522 $objWriter->writeAttribute(
'dist',
'23000');
523 $objWriter->writeAttribute(
'dir',
'5400000');
524 $objWriter->writeAttribute(
'rotWithShape',
'0');
527 $objWriter->startElement(
'a:srgbClr');
528 $objWriter->writeAttribute(
'val',
'000000');
531 $objWriter->startElement(
'a:alpha');
532 $objWriter->writeAttribute(
'val',
'35000');
533 $objWriter->endElement();
535 $objWriter->endElement();
537 $objWriter->endElement();
539 $objWriter->endElement();
542 $objWriter->startElement(
'a:scene3d');
545 $objWriter->startElement(
'a:camera');
546 $objWriter->writeAttribute(
'prst',
'orthographicFront');
549 $objWriter->startElement(
'a:rot');
550 $objWriter->writeAttribute(
'lat',
'0');
551 $objWriter->writeAttribute(
'lon',
'0');
552 $objWriter->writeAttribute(
'rev',
'0');
553 $objWriter->endElement();
555 $objWriter->endElement();
558 $objWriter->startElement(
'a:lightRig');
559 $objWriter->writeAttribute(
'rig',
'threePt');
560 $objWriter->writeAttribute(
'dir',
't');
563 $objWriter->startElement(
'a:rot');
564 $objWriter->writeAttribute(
'lat',
'0');
565 $objWriter->writeAttribute(
'lon',
'0');
566 $objWriter->writeAttribute(
'rev',
'1200000');
567 $objWriter->endElement();
569 $objWriter->endElement();
571 $objWriter->endElement();
574 $objWriter->startElement(
'a:sp3d');
577 $objWriter->startElement(
'a:bevelT');
578 $objWriter->writeAttribute(
'w',
'63500');
579 $objWriter->writeAttribute(
'h',
'25400');
580 $objWriter->endElement();
582 $objWriter->endElement();
584 $objWriter->endElement();
586 $objWriter->endElement();
589 $objWriter->startElement(
'a:bgFillStyleLst');
592 $objWriter->startElement(
'a:solidFill');
595 $objWriter->startElement(
'a:schemeClr');
596 $objWriter->writeAttribute(
'val',
'phClr');
597 $objWriter->endElement();
599 $objWriter->endElement();
602 $objWriter->startElement(
'a:gradFill');
603 $objWriter->writeAttribute(
'rotWithShape',
'1');
606 $objWriter->startElement(
'a:gsLst');
609 $objWriter->startElement(
'a:gs');
610 $objWriter->writeAttribute(
'pos',
'0');
613 $objWriter->startElement(
'a:schemeClr');
614 $objWriter->writeAttribute(
'val',
'phClr');
617 $objWriter->startElement(
'a:tint');
618 $objWriter->writeAttribute(
'val',
'40000');
619 $objWriter->endElement();
622 $objWriter->startElement(
'a:satMod');
623 $objWriter->writeAttribute(
'val',
'350000');
624 $objWriter->endElement();
626 $objWriter->endElement();
628 $objWriter->endElement();
631 $objWriter->startElement(
'a:gs');
632 $objWriter->writeAttribute(
'pos',
'40000');
635 $objWriter->startElement(
'a:schemeClr');
636 $objWriter->writeAttribute(
'val',
'phClr');
639 $objWriter->startElement(
'a:tint');
640 $objWriter->writeAttribute(
'val',
'45000');
641 $objWriter->endElement();
644 $objWriter->startElement(
'a:shade');
645 $objWriter->writeAttribute(
'val',
'99000');
646 $objWriter->endElement();
649 $objWriter->startElement(
'a:satMod');
650 $objWriter->writeAttribute(
'val',
'350000');
651 $objWriter->endElement();
653 $objWriter->endElement();
655 $objWriter->endElement();
658 $objWriter->startElement(
'a:gs');
659 $objWriter->writeAttribute(
'pos',
'100000');
662 $objWriter->startElement(
'a:schemeClr');
663 $objWriter->writeAttribute(
'val',
'phClr');
666 $objWriter->startElement(
'a:shade');
667 $objWriter->writeAttribute(
'val',
'20000');
668 $objWriter->endElement();
671 $objWriter->startElement(
'a:satMod');
672 $objWriter->writeAttribute(
'val',
'255000');
673 $objWriter->endElement();
675 $objWriter->endElement();
677 $objWriter->endElement();
679 $objWriter->endElement();
682 $objWriter->startElement(
'a:path');
683 $objWriter->writeAttribute(
'path',
'circle');
686 $objWriter->startElement(
'a:fillToRect');
687 $objWriter->writeAttribute(
'l',
'50000');
688 $objWriter->writeAttribute(
't',
'-80000');
689 $objWriter->writeAttribute(
'r',
'50000');
690 $objWriter->writeAttribute(
'b',
'180000');
691 $objWriter->endElement();
693 $objWriter->endElement();
695 $objWriter->endElement();
698 $objWriter->startElement(
'a:gradFill');
699 $objWriter->writeAttribute(
'rotWithShape',
'1');
702 $objWriter->startElement(
'a:gsLst');
705 $objWriter->startElement(
'a:gs');
706 $objWriter->writeAttribute(
'pos',
'0');
709 $objWriter->startElement(
'a:schemeClr');
710 $objWriter->writeAttribute(
'val',
'phClr');
713 $objWriter->startElement(
'a:tint');
714 $objWriter->writeAttribute(
'val',
'80000');
715 $objWriter->endElement();
718 $objWriter->startElement(
'a:satMod');
719 $objWriter->writeAttribute(
'val',
'300000');
720 $objWriter->endElement();
722 $objWriter->endElement();
724 $objWriter->endElement();
727 $objWriter->startElement(
'a:gs');
728 $objWriter->writeAttribute(
'pos',
'100000');
731 $objWriter->startElement(
'a:schemeClr');
732 $objWriter->writeAttribute(
'val',
'phClr');
735 $objWriter->startElement(
'a:shade');
736 $objWriter->writeAttribute(
'val',
'30000');
737 $objWriter->endElement();
740 $objWriter->startElement(
'a:satMod');
741 $objWriter->writeAttribute(
'val',
'200000');
742 $objWriter->endElement();
744 $objWriter->endElement();
746 $objWriter->endElement();
748 $objWriter->endElement();
751 $objWriter->startElement(
'a:path');
752 $objWriter->writeAttribute(
'path',
'circle');
755 $objWriter->startElement(
'a:fillToRect');
756 $objWriter->writeAttribute(
'l',
'50000');
757 $objWriter->writeAttribute(
't',
'50000');
758 $objWriter->writeAttribute(
'r',
'50000');
759 $objWriter->writeAttribute(
'b',
'50000');
760 $objWriter->endElement();
762 $objWriter->endElement();
764 $objWriter->endElement();
766 $objWriter->endElement();
768 $objWriter->endElement();
770 $objWriter->endElement();
773 $objWriter->writeElement(
'a:objectDefaults', null);
776 $objWriter->writeElement(
'a:extraClrSchemeLst', null);
778 $objWriter->endElement();
781 return $objWriter->getData();
792 $objWriter->startElement(
'a:latin');
793 $objWriter->writeAttribute(
'typeface', $latinFont);
794 $objWriter->endElement();
797 $objWriter->startElement(
'a:ea');
798 $objWriter->writeAttribute(
'typeface',
'');
799 $objWriter->endElement();
802 $objWriter->startElement(
'a:cs');
803 $objWriter->writeAttribute(
'typeface',
'');
804 $objWriter->endElement();
806 foreach ($fontSet as $fontScript => $typeface) {
807 $objWriter->startElement(
'a:font');
808 $objWriter->writeAttribute(
'script', $fontScript);
809 $objWriter->writeAttribute(
'typeface', $typeface);
810 $objWriter->endElement();
819 foreach (self::$colourScheme as $colourName => $colourValue) {
820 $objWriter->startElement(
'a:' . $colourName);
822 $objWriter->startElement(
'a:srgbClr');
823 $objWriter->writeAttribute(
'val', $colourValue);
824 $objWriter->endElement();
826 $objWriter->endElement();
getDiskCachingDirectory()
Get disk caching directory.
writeColourScheme(XMLWriter $objWriter)
Write colour scheme to XML format.
getParentWriter()
Get parent Xlsx object.
writeFonts(XMLWriter $objWriter, string $latinFont, array $fontSet)
Write fonts to XML format.
static writeTheme(Spreadsheet $spreadsheet)
Write theme to XML format.
getUseDiskCaching()
Get use disk caching where possible?