source: extensions/GrumPluginClasses/classes/External/odsPhpGenerator/class/odsStyle.php @ 17735

Last change on this file since 17735 was 17735, checked in by grum, 12 years ago

version 3.5.4 - fix minor bug & add new functions to framework

  • Property svn:executable set to *
File size: 45.0 KB
Line 
1<?php
2/*-
3 * Copyright (c) 2009 Laurent VUIBERT
4 * License : GNU Lesser General Public License v3
5 */
6
7abstract class odsStyle {
8        protected $name;
9        protected $family; // table-column, table-row, table, table-cell
10       
11        protected function __construct($name, $family) {
12                if($name == null) $name = $this->getType().'-'.$this->randString();
13               
14                $this->name   = $name;
15                $this->family = $family;
16        }
17       
18        protected function getContent(ods $ods, DOMDocument $dom) {
19                $style_style = $dom->createElement('style:style');
20                        $style_style->setAttribute("style:name", $this->name);
21                        $style_style->setAttribute("style:family", $this->family);
22                return $style_style;
23        } 
24
25        public function getName() {
26                return $this->name;
27        }
28       
29        public function __clone() {
30                $this->name = 'clone-'.$this->name.'-'.rand(0,99999999999);
31        }
32       
33        public function setName($name) {
34                $this->name = $name;
35        }
36       
37        abstract protected function getType();
38       
39        protected function randString() {
40                return md5(time().rand().$this->getType());
41        }
42       
43}
44
45class odsStyleTableColumn extends odsStyle {
46        private $breakBefore;         // auto
47        private $columnWidth;         // 2.267cm
48       
49        public function __construct($name = null) {
50                parent::__construct($name, "table-column");
51                $this->breakBefore = "auto";
52                $this->columnWidth = "2.267cm";
53        }
54       
55        public function getContent(ods $ods,DOMDocument $dom) {
56                $style_style = parent::getContent($ods,$dom);
57                       
58                        // style:table-column-properties
59                        $style_table_column_properties = $dom->createElement('style:table-column-properties');
60                                $style_table_column_properties->setAttribute("fo:break-before", $this->breakBefore);
61                                $style_table_column_properties->setAttribute("style:column-width", $this->columnWidth);
62                                $style_style->appendChild($style_table_column_properties);
63
64                return $style_style;
65        }
66       
67        public function getType() {
68                return 'odsStyleTableColumn';
69        }
70       
71        public function setColumnWidth($columnWidth) {
72                $this->columnWidth = $columnWidth;
73        }
74       
75        public function setBreakBefore($breakBefore) {
76                $this->breakBefore = $breakBefore;
77        }
78}
79
80class odsStyleTable extends odsStyle {
81        private $masterPageName;      // Default
82        private $display;             // true
83        private $writingMode;         // lr-tb
84
85        public function __construct($name = null) {
86                parent::__construct($name, "table");
87                $this->masterPageName = "Default";
88                $this->display        = "true";
89                $this->writingMode    = "lr-tb";
90        }
91       
92        public function getContent(ods $ods, DOMDocument $dom) {
93                $style_style = parent::getContent($ods,$dom);
94                        $style_style->setAttribute("style:master-page-name", $this->masterPageName);
95                       
96                        // style:table-properties
97                        $style_table_properties = $dom->createElement('style:table-properties');
98                                $style_table_properties->setAttribute("table:display", $this->display);
99                                $style_table_properties->setAttribute("style:writing-mode", $this->writingMode);
100                                $style_style->appendChild($style_table_properties);
101                return $style_style;
102        }
103       
104        public function getType() {
105                return 'odsStyleTable';
106        }
107}
108
109class odsStyleTableRow extends odsStyle {
110        private $rowHeight;           // 0.52cm
111        private $breakBefore;         // auto
112        private $useOptimalRowHeight; // true, false
113       
114        public function __construct($name = null) {
115                parent::__construct($name, "table-row");
116                $this->rowHeight           = "0.52cm";
117                $this->breakBefore         = "auto";
118                $this->useOptimalRowHeight = "true";
119        }
120
121        public function setRowHeight($rowHeight) {
122                $this->rowHeight = $rowHeight;
123        }
124
125        public function setBreakBefore($breakBefore) {
126                $this->breakBefore = $breakBefore;
127        }
128
129        public function setUseOptimalRowHeight($useOptimalRowHeight) {
130                $this->useOptimalRowHeight = $useOptimalRowHeight;
131        }
132
133        public function getContent(ods $ods, DOMDocument $dom) {
134                $style_style = parent::getContent($ods,$dom);
135                       
136                        // style:table-row-properties
137                        $style_table_row_properties = $dom->createElement('style:table-row-properties');
138                                $style_table_row_properties->setAttribute("style:row-height", $this->rowHeight);
139                                $style_table_row_properties->setAttribute("fo:break-before", $this->breakBefore);
140                                $style_table_row_properties->setAttribute("style:use-optimal-row-height", $this->useOptimalRowHeight);
141                                $style_style->appendChild($style_table_row_properties);
142                               
143                return $style_style; 
144        }
145       
146        public function getType() {
147                return 'odsStyleTableRow';
148        }
149}
150
151class odsStyleTableCell extends odsStyle {
152        private $parentStyleName;     // Default
153        private $textAlignSource;     // fix
154        private $repeatContent;       // true, false
155        private $color;               // opt: #ffffff
156        private $backgroundColor;     // opt: #ffffff
157        private $border;              // opt: 0.002cm solid #000000
158        private $textAlign;           // opt: center
159        private $marginLeft;          // opt: 0cm
160        private $fontWeight;          // opt: bold
161        private $fontSize;            // opt: 18pt;
162        private $fontStyle;           // opt: italic, normal
163        private $underline;           // opt: font-color, #000000, null
164        private $fontFace;            // opt: fontFace
165        private $styleDataName;       // opt: interne
166       
167        public function __construct($name = null) {
168                parent::__construct($name, "table-cell");
169                $this->parentStyleName     = "Default";
170                $this->textAlignSource     = "fix";
171                $this->repeatContent       = "false";
172                $this->color               = false;
173                $this->backgroundColor     = false;
174                $this->border              = false;
175                $this->textAlign           = false;
176                $this->marginLeft          = false;
177                $this->fontWeight          = false;
178                $this->fontSize            = false;
179                $this->fontStyle           = false;
180                $this->underline           = false;
181                $this->fontFace            = false;
182                $this->styleDataName       = false;
183        }
184       
185        public function setColor($color) {
186                $this->color = $color;
187        }
188       
189        public function setBackgroundColor($color) {
190                $this->backgroundColor = $color;
191        }
192
193        public function setBorder($border) {
194                $this->border = $border;
195        }
196       
197        public function setTextAlign($textAlign) {
198                $this->textAlign = $textAlign;
199        }
200       
201        public function setFontWeight($weight) {
202                $this->fontWeight = $weight;
203        }
204       
205        public function setFontStyle($fontStyle) {
206                $this->fontStyle = $fontStyle;
207        }
208       
209        public function setUnderline($underline) {
210                $this->underline = $underline;
211        }
212       
213        public function setStyleDataName($styleDataName) {
214                $this->styleDataName = $styleDataName;
215        }
216       
217        public function setFontSize($fontSize) {
218                $this->fontSize = $fontSize;
219        }
220       
221        public function setFontFace(odsFontFace $fontFace) {
222                $this->fontFace = $fontFace;
223        }
224       
225        public function getContent(ods $ods, DOMDocument $dom) {
226                // style:style
227                $style_style = parent::getContent($ods,$dom);
228                        $style_style->setAttribute("style:parent-style-name", $this->parentStyleName);
229                        if($this->styleDataName)
230                                $style_style->setAttribute("style:data-style-name", $this->styleDataName);
231                       
232                        // style:table-cell-properties
233                        $style_table_cell_properties = $dom->createElement('style:table-cell-properties');
234                                $style_table_cell_properties->setAttribute("style:text-align-source", $this->textAlignSource);
235                                $style_table_cell_properties->setAttribute("style:repeat-content", $this->repeatContent);
236                               
237                                if($this->backgroundColor)
238                                        $style_table_cell_properties->setAttribute("fo:background-color", $this->backgroundColor);
239                                       
240                                if($this->border)
241                                        $style_table_cell_properties->setAttribute("fo:border", $this->border);
242                               
243                                $style_style->appendChild($style_table_cell_properties);
244
245                                if($this->textAlign) {
246                                        // style:paragraph-properties
247                                        $style_paragraph_properties = $dom->createElement('style:paragraph-properties');
248                                                $style_paragraph_properties->setAttribute("fo:text-align", $this->textAlign);
249                                                $style_paragraph_properties->setAttribute("fo:margin-left", "0cm");
250                                                $style_style->appendChild($style_paragraph_properties);
251                                }
252                               
253                                if($this->color OR $this->fontWeight OR $this->fontStyle OR $this->underline OR $this->fontSize OR $this->fontFace) {
254                                        // style:text-properties
255                                        $style_text_properties = $dom->createElement('style:text-properties');
256                                       
257                                                if($this->color)
258                                                        $style_text_properties->setAttribute("fo:color", $this->color);
259                                                       
260                                                if($this->fontWeight) {
261                                                        $style_text_properties->setAttribute("fo:font-weight", $this->fontWeight);
262                                                        $style_text_properties->setAttribute("style:font-weight-asian", $this->fontWeight);
263                                                        $style_text_properties->setAttribute("style:font-weight-complex", $this->fontWeight);
264                                                }
265                                               
266                                                if($this->fontStyle) {
267                                                        $style_text_properties->setAttribute("fo:font-style", $this->fontStyle);
268                                                        $style_text_properties->setAttribute("fo:font-style-asian", $this->fontStyle);
269                                                        $style_text_properties->setAttribute("fo:font-style-complex", $this->fontStyle);
270                                                }
271                                               
272                                                if($this->underline) {
273                                                        $style_text_properties->setAttribute("style:text-underline-style", 'solid');
274                                                        $style_text_properties->setAttribute("style:text-underline-width", 'auto');
275                                                        $style_text_properties->setAttribute("style:text-underline-color", $this->underline);
276                                                }
277                                               
278                                                if($this->fontSize) {
279                                                        $style_text_properties->setAttribute("fo:font-size", $this->fontSize);
280                                                        $style_text_properties->setAttribute("style:font-size-asian", $this->fontSize);
281                                                        $style_text_properties->setAttribute("style:font-size-complex", $this->fontSize);
282                                                }
283                                               
284                                                if($this->fontFace) {
285                                                        $style_text_properties->setAttribute("style:font-name", $this->fontFace->getFontName());
286                                                }
287                                               
288                                                $style_style->appendChild($style_text_properties);
289                                }
290                               
291                               
292                return $style_style;
293        }
294         
295        public function getType() {
296                return 'odsStyleTableCell';
297        }
298}
299
300class odsStyleGraphic extends odsStyle {
301        private $stroke;    // none
302        private $fill;      // none
303        private $luminance; // 0%
304        private $contrast;  // 0%
305        private $gamma;     // 100%
306        private $red;       // 0%
307        private $green;     // 0%
308        private $blue;      // 0% 
309        private $opacity;   // 100%
310
311        public function __construct($name = null) {
312                parent::__construct($name, "graphic");
313                $this->stroke    = "none";
314                $this->fill      = "none";
315                $this->luminance = "0%";
316                $this->contrast  = "0%";
317                $this->gamma     = "100%";
318                $this->red       = "0%";
319                $this->green     = "0%";
320                $this->blue      = "0%";
321                $this->opacity   = "100%";
322        }
323       
324        public function setStroke($stroke) {
325                $this->stroke = $stroke;
326        }
327       
328        public function setFill($fill) {
329                $this->fill = $fill;
330        }
331       
332        public function setLuminance($luminance) {
333                $this->luminance = $luminance;
334        }
335       
336        public function setContrast($contrast) {
337                $this->contrast = $contrast;
338        }
339       
340        public function setGamma($gamma) {
341                $this->gamma = $gamma;
342        }
343       
344        public function setRed($red) {
345                $this->red = $red;
346        }
347       
348        public function setGreen($green) {
349                $this->green = $green;
350        }
351       
352        public function setBlue($blue) {
353                $this->blue = $blue;
354        }
355       
356        public function setOpacity($opacity) {
357                $this->opacity = $opacity;
358        }
359       
360        public function getContent(ods $ods,DOMDocument $dom) {
361                $style_style = parent::getContent($ods,$dom);
362               
363                        // style:table-row-properties
364                        $style_graphic_properties = $dom->createElement('style:graphic-properties');
365                                $style_graphic_properties->setAttribute("draw:stroke",        $this->stroke);
366                                $style_graphic_properties->setAttribute("draw:fill",          $this->fill);
367                                $style_graphic_properties->setAttribute("draw:textarea-horizontal-align", "center");
368                                $style_graphic_properties->setAttribute("draw:textarea-vertical-align", "middle");
369                                $style_graphic_properties->setAttribute("draw:color-mode", "standard");
370                                $style_graphic_properties->setAttribute("draw:luminance",     $this->luminance);
371                                $style_graphic_properties->setAttribute("draw:contrast",      $this->contrast);
372                                $style_graphic_properties->setAttribute("draw:gamma",         $this->gamma);
373                                $style_graphic_properties->setAttribute("draw:red",           $this->red);
374                                $style_graphic_properties->setAttribute("draw:green",         $this->green);
375                                $style_graphic_properties->setAttribute("draw:blue",          $this->blue);
376                                $style_graphic_properties->setAttribute("fo:clip", "rect(0cm, 0cm, 0cm, 0cm)");
377                                $style_graphic_properties->setAttribute("draw:image-opacity", $this->opacity);
378                                $style_graphic_properties->setAttribute("style:mirror", "none");
379                                $style_style->appendChild($style_graphic_properties);
380                               
381                return $style_style;
382        }
383
384        public function getType() {
385                return 'odsStyleGraphic';
386        }
387       
388}
389
390
391abstract class odsStyleMoney extends odsStyle {
392        //abstract protected function __construct();
393        //abstract protected function getContent();
394        //abstract protected function getType();
395}
396
397
398class odsStyleMoneyEUR extends odsStyleMoney {
399       
400        public function __construct() {
401                $this->name='NCur-EUR-P0';
402        }
403       
404        public function getContent(ods $ods, DOMDocument $dom) {
405                $number_currency_style = $dom->createElement('number:currency-style');
406                        $number_currency_style->setAttribute("style:name", "NCur-EUR-P0");
407                        $number_currency_style->setAttribute("style:volatile", "true");
408               
409                        $number_number = $dom->createElement('number:number');
410                                $number_number->setAttribute("number:decimal-places", "2");
411                                $number_number->setAttribute("number:min-integer-digits", "1");
412                                $number_number->setAttribute("number:grouping", "true");
413                                $number_currency_style->appendChild($number_number);
414                               
415                        $number_text = $dom->createElement('number:text', ' ');
416                                $number_currency_style->appendChild($number_text);
417               
418                        $number_currency_symbol = $dom->createElement('number:currency-symbol', '€');
419                                $number_currency_symbol->setAttribute("number:language", "fr");
420                                $number_currency_symbol->setAttribute("number:country", "FR");
421                                $number_number->setAttribute("number:grouping", "true");
422                                $number_currency_style->appendChild($number_currency_symbol);
423                return $number_currency_style;
424        }
425       
426        public function getType() {
427                return 'odsStyleMoneyEUR';
428        }
429}
430
431class odsStyleMoneyEURNeg extends odsStyleMoney {
432       
433        public function __construct() {
434                $this->name='NCur-EUR';
435        }
436       
437        public function getContent(ods $ods, DOMDocument $dom) {
438       
439                $number_currency_style = $dom->createElement('number:currency-style');
440                        $number_currency_style->setAttribute("style:name", "NCur-EUR");
441       
442                        $style_text_properties = $dom->createElement('style:text-properties');
443                                $style_text_properties->setAttribute("fo:color", "#ff0000");
444                                $number_currency_style->appendChild($style_text_properties);
445       
446                        $number_text = $dom->createElement('number:text', '-');
447                                $number_currency_style->appendChild($number_text);
448               
449                        $number_number = $dom->createElement('number:number');
450                                $number_number->setAttribute("number:decimal-places", "2");
451                                $number_number->setAttribute("number:min-integer-digits", "1");
452                                $number_number->setAttribute("number:grouping", "true");
453                                $number_currency_style->appendChild($number_number);
454                               
455                        $number_text = $dom->createElement('number:text', ' ');
456                                $number_currency_style->appendChild($number_text);
457               
458                        $number_currency_symbol = $dom->createElement('number:currency-symbol', '€');
459                                $number_currency_symbol->setAttribute("number:language", "fr");
460                                $number_currency_symbol->setAttribute("number:country", "FR");
461                                $number_currency_style->appendChild($number_currency_symbol);
462               
463                        $style_map = $dom->createElement('style:map');
464                                $style_map->setAttribute("style:condition", "value()>=0");
465                                $style_map->setAttribute("style:apply-style-name", "NCur-EUR-P0");
466                                $number_currency_style->appendChild($style_map);
467
468                return $number_currency_style;
469        }
470
471        public function getType() {
472                return 'odsStyleMoneyEURNeg';
473        }
474}
475
476class odsStyleMoneyUSD extends odsStyleMoney {
477       
478        public function __construct() {
479                $this->name='NCur-USD-P0';
480        }
481       
482        public function getContent(ods $ods, DOMDocument $dom) {
483                $number_currency_style = $dom->createElement('number:currency-style');
484                        $number_currency_style->setAttribute("style:name", "NCur-USD-P0");
485                        $number_currency_style->setAttribute("style:volatile", "true");
486
487                        $number_currency_symbol = $dom->createElement('number:currency-symbol', '$');
488                                $number_currency_symbol->setAttribute("number:language", "en");
489                                $number_currency_symbol->setAttribute("number:country", "US");
490                                $number_currency_symbol->setAttribute("number:grouping", "true");
491                                $number_currency_style->appendChild($number_currency_symbol);
492               
493                        $number_number = $dom->createElement('number:number');
494                                $number_number->setAttribute("number:decimal-places", "2");
495                                $number_number->setAttribute("number:min-integer-digits", "1");
496                                $number_number->setAttribute("number:grouping", "true");
497                                $number_currency_style->appendChild($number_number);
498                return $number_currency_style;
499               
500        }
501       
502        public function getType() {
503                return 'odsStyleMoneyUSD';
504        }
505}
506
507class odsStyleMoneyUSDNeg extends odsStyleMoney {
508       
509        public function __construct(){
510                $this->name='NCur-USD';
511        }
512       
513        public function getContent(ods $ods, DOMDocument $dom) {
514                $number_currency_style = $dom->createElement('number:currency-style');
515                        $number_currency_style->setAttribute("style:name", "NCur-USD");
516
517                        $style_text_properties = $dom->createElement('style:text-properties');
518                                $style_text_properties->setAttribute("fo:color", "#ff0000");
519                                $number_currency_style->appendChild($style_text_properties);
520
521                        $number_text = $dom->createElement('number:text', '-');
522                                $number_currency_style->appendChild($number_text);
523               
524                        $number_currency_symbol = $dom->createElement('number:currency-symbol', '$');
525                                $number_currency_symbol->setAttribute("number:language", "en");
526                                $number_currency_symbol->setAttribute("number:country", "US");
527                                $number_currency_style->appendChild($number_currency_symbol);
528               
529                        $number_number = $dom->createElement('number:number');
530                                $number_number->setAttribute("number:decimal-places", "2");
531                                $number_number->setAttribute("number:min-integer-digits", "1");
532                                $number_number->setAttribute("number:grouping", "true");
533                                $number_currency_style->appendChild($number_number);
534                                                               
535                        $style_map = $dom->createElement('style:map');
536                                $style_map->setAttribute("style:condition", "value()>=0");
537                                $style_map->setAttribute("style:apply-style-name", "NCur-USD-P0");
538                                $number_currency_style->appendChild($style_map);
539                return $number_currency_style;
540        }
541       
542        public function getType() {
543                return 'odsStyleMoneyUSDNeg';
544        }
545}
546
547class odsStyleMoneyGBP extends odsStyleMoney {
548       
549        public function __construct() {
550                $this->name='NCur-GBP-P0';
551        }
552       
553        public function getContent(ods $ods, DOMDocument $dom) {
554                $number_currency_style = $dom->createElement('number:currency-style');
555                        $number_currency_style->setAttribute("style:name", "NCur-GBP-P0");
556                        $number_currency_style->setAttribute("style:volatile", "true");
557
558                        $number_currency_symbol = $dom->createElement('number:currency-symbol', '£');
559                                $number_currency_symbol->setAttribute("number:language", "en");
560                                $number_currency_symbol->setAttribute("number:country", "GB");
561                                $number_currency_style->appendChild($number_currency_symbol);
562               
563                        $number_number = $dom->createElement('number:number');
564                                $number_number->setAttribute("number:decimal-places", "2");
565                                $number_number->setAttribute("number:min-integer-digits", "1");
566                                $number_number->setAttribute("number:grouping", "true");
567                                $number_currency_style->appendChild($number_number);
568                return $number_currency_style;
569        }
570       
571        public function getType() {
572                return 'odsStyleMoneyGBP';
573        }
574}
575
576class odsStyleMoneyGBPNeg extends odsStyleMoney {
577       
578        public function __construct() {
579                $this->name='NCur-GBP';
580        }
581       
582        public function getContent(ods $ods, DOMDocument $dom) {
583                $number_currency_style = $dom->createElement('number:currency-style');
584                        $number_currency_style->setAttribute("style:name", "NCur-GBP");
585
586                        $style_text_properties = $dom->createElement('style:text-properties');
587                                $style_text_properties->setAttribute("fo:color", "#ff0000");
588                                $number_currency_style->appendChild($style_text_properties);
589
590                        $number_text = $dom->createElement('number:text', '-');
591                                $number_currency_style->appendChild($number_text);
592               
593                        $number_currency_symbol = $dom->createElement('number:currency-symbol', '£');
594                                $number_currency_symbol->setAttribute("number:language", "en");
595                                $number_currency_symbol->setAttribute("number:country", "GB");
596                                $number_currency_style->appendChild($number_currency_symbol);
597               
598                        $number_number = $dom->createElement('number:number');
599                                $number_number->setAttribute("number:decimal-places", "2");
600                                $number_number->setAttribute("number:min-integer-digits", "1");
601                                $number_number->setAttribute("number:grouping", "true");
602                                $number_currency_style->appendChild($number_number);
603                                                               
604                        $style_map = $dom->createElement('style:map');
605                                $style_map->setAttribute("style:condition", "value()>=0");
606                                $style_map->setAttribute("style:apply-style-name", "NCur-GBP-P0");
607                                $number_currency_style->appendChild($style_map);
608                return $number_currency_style;
609        }
610       
611        public function getType() {
612                return 'odsStyleMoneyGBPNeg';
613        }
614}
615
616abstract class odsStyleDate extends odsStyle {
617        protected $language;
618       
619        protected function setLanguage($number_date_style) {
620                if(!isset($this->language)) return;
621                $number_date_style->setAttribute("number:language", $this->language);
622                $number_date_style->setAttribute("number:country", $this->language);
623        }
624}
625
626class odsStyleDateMMDDYYYY extends odsStyleDate {
627        public function __construct($language) {
628                $this->name='Date-MMDDYYYY';
629                $this->language = $language;
630        }
631       
632        public function getContent(ods $ods, DOMDocument $dom) {
633                $number_date_style = $dom->createElement('number:date-style');
634                        $number_date_style->setAttribute("style:name", $this->name);
635                        $number_date_style->setAttribute("number:automatic-order", "true");
636                        $this->setLanguage($number_date_style);
637                       
638                        $number_month = $dom->createElement('number:month');
639                                $number_month->setAttribute("number:style", "long");
640                                $number_date_style->appendChild($number_month);
641
642                        $number_text = $dom->createElement('number:text', '/');
643                                $number_date_style->appendChild($number_text);
644
645                        $number_day = $dom->createElement('number:day');
646                                $number_day->setAttribute("number:style", "long");
647                                $number_date_style->appendChild($number_day);
648
649                        $number_text = $dom->createElement('number:text', '/');
650                                $number_date_style->appendChild($number_text);
651
652                        $number_year = $dom->createElement('number:year');
653                                $number_year->setAttribute("number:style", "long");
654                                $number_date_style->appendChild($number_year);
655                       
656                return $number_date_style;
657        }
658
659        public function getType() {
660                return 'odsStyleDateMMDDYYYY';
661        }
662}
663
664class odsStyleDateMMDDYY extends odsStyleDate {
665        public function __construct($language) {
666                $this->name='Date-MMDDYY';
667                $this->language = $language;
668        }
669       
670        public function getContent(ods $ods, DOMDocument $dom) {
671                $number_date_style = $dom->createElement('number:date-style');
672                        $number_date_style->setAttribute("style:name", $this->name);
673                        $number_date_style->setAttribute("number:automatic-order", "true");
674                        $this->setLanguage($number_date_style);
675                       
676                        $number_month = $dom->createElement('number:month');
677                                $number_month->setAttribute("number:style", "long");
678                                $number_date_style->appendChild($number_month);
679
680                        $number_text = $dom->createElement('number:text', '/');
681                                $number_date_style->appendChild($number_text);
682
683                        $number_day = $dom->createElement('number:day');
684                                $number_day->setAttribute("number:style", "long");
685                                $number_date_style->appendChild($number_day);
686
687                        $number_text = $dom->createElement('number:text', '/');
688                                $number_date_style->appendChild($number_text);
689
690                        $number_year = $dom->createElement('number:year');
691                                $number_date_style->appendChild($number_year);
692                       
693                return $number_date_style;
694        }
695
696        public function getType() {
697                return 'odsStyleDateMMDDYY';
698        }
699}
700
701class odsStyleDateDDMMYYYY extends odsStyleDate {
702        public function __construct($language) {
703                $this->name='Date-DDMMYYYY';
704                $this->language = $language;
705        }
706       
707        public function getContent(ods $ods, DOMDocument $dom) {
708                $number_date_style = $dom->createElement('number:date-style');
709                        $number_date_style->setAttribute("style:name", $this->name);
710                        $number_date_style->setAttribute("number:automatic-order", "true");
711                        $this->setLanguage($number_date_style);
712                       
713                        $number_day = $dom->createElement('number:day');
714                                $number_day->setAttribute("number:style", "long");
715                                $number_date_style->appendChild($number_day);
716
717                        $number_text = $dom->createElement('number:text', '/');
718                                $number_date_style->appendChild($number_text);
719       
720                        $number_month = $dom->createElement('number:month');
721                                $number_month->setAttribute("number:style", "long");
722                                $number_date_style->appendChild($number_month);
723
724                        $number_text = $dom->createElement('number:text', '/');
725                                $number_date_style->appendChild($number_text);
726
727                        $number_year = $dom->createElement('number:year');
728                                $number_year->setAttribute("number:style", "long");
729                                $number_date_style->appendChild($number_year);
730                       
731                return $number_date_style;
732        }
733
734        public function getType() {
735                return 'odsStyleDateDDMMYYYY';
736        }
737}
738
739class odsStyleDateDDMMYY extends odsStyleDate {
740        public function __construct($language) {
741                $this->name='Date-DDMMYY';
742                $this->language = $language;
743        }
744       
745        public function getContent(ods $ods, DOMDocument $dom) {
746                $number_date_style = $dom->createElement('number:date-style');
747                        $number_date_style->setAttribute("style:name", $this->name);
748                        $number_date_style->setAttribute("number:automatic-order", "true");
749                        $this->setLanguage($number_date_style);
750                       
751                        $number_day = $dom->createElement('number:day');
752                                $number_day->setAttribute("number:style", "long");
753                                $number_date_style->appendChild($number_day);
754
755                        $number_text = $dom->createElement('number:text', '/');
756                                $number_date_style->appendChild($number_text);
757       
758                        $number_month = $dom->createElement('number:month');
759                                $number_month->setAttribute("number:style", "long");
760                                $number_date_style->appendChild($number_month);
761
762                        $number_text = $dom->createElement('number:text', '/');
763                                $number_date_style->appendChild($number_text);
764
765                        $number_year = $dom->createElement('number:year');
766                                $number_date_style->appendChild($number_year);
767                       
768                return $number_date_style;
769        }
770
771        public function getType() {
772                return 'odsStyleDateDDMMYY';
773        }
774}
775
776class odsStyleDateDMMMYYYY extends odsStyleDate {
777        public function __construct($language) {
778                $this->name='Date-DMMMYYYY';
779                $this->language = $language;
780        }
781       
782        public function getContent(ods $ods, DOMDocument $dom) {
783                $number_date_style = $dom->createElement('number:date-style');
784                        $number_date_style->setAttribute("style:name", $this->name);
785                        $number_date_style->setAttribute("number:automatic-order", "true");
786                        $this->setLanguage($number_date_style);
787                       
788                        $number_day = $dom->createElement('number:day');
789                                $number_date_style->appendChild($number_day);
790
791                        $number_text = $dom->createElement('number:text', ' ');
792                                $number_date_style->appendChild($number_text);
793       
794                        $number_month = $dom->createElement('number:month');
795                                $number_month->setAttribute("number:textual", "true");
796                                $number_date_style->appendChild($number_month);
797
798                        $number_text = $dom->createElement('number:text', ' ');
799                                $number_date_style->appendChild($number_text);
800
801                        $number_year = $dom->createElement('number:year');
802                                $number_year->setAttribute("number:style", "long");
803                                $number_date_style->appendChild($number_year);
804                       
805                return $number_date_style;
806        }
807
808        public function getType() {
809                return 'odsStyleDateDMMMYYYY';
810        }
811}
812
813class odsStyleDateDMMMYY extends odsStyleDate {
814        public function __construct($language) {
815                $this->name='Date-DMMMYY';
816                $this->language = $language;
817        }
818       
819        public function getContent(ods $ods, DOMDocument $dom) {
820                $number_date_style = $dom->createElement('number:date-style');
821                        $number_date_style->setAttribute("style:name", $this->name);
822                        $number_date_style->setAttribute("number:automatic-order", "true");
823                        $this->setLanguage($number_date_style);
824                       
825                        $number_day = $dom->createElement('number:day');
826                                $number_date_style->appendChild($number_day);
827
828                        $number_text = $dom->createElement('number:text', ' ');
829                                $number_date_style->appendChild($number_text);
830       
831                        $number_month = $dom->createElement('number:month');
832                                $number_month->setAttribute("number:textual", "true");
833                                $number_date_style->appendChild($number_month);
834
835                        $number_text = $dom->createElement('number:text', ' ');
836                                $number_date_style->appendChild($number_text);
837
838                        $number_year = $dom->createElement('number:year');
839                                $number_date_style->appendChild($number_year);
840                       
841                return $number_date_style;
842        }
843
844        public function getType() {
845                return 'odsStyleDateDMMMYY';
846        }
847}
848
849class odsStyleDateDMMMMYYYY extends odsStyleDate {
850        public function __construct($language) {
851                $this->name='Date-DMMMMYYYY';
852                $this->language = $language;
853        }
854       
855        public function getContent(ods $ods, DOMDocument $dom) {
856                $number_date_style = $dom->createElement('number:date-style');
857                        $number_date_style->setAttribute("style:name", $this->name);
858                        $number_date_style->setAttribute("number:automatic-order", "true");
859                        $this->setLanguage($number_date_style);
860                       
861                        $number_day = $dom->createElement('number:day');
862                                $number_date_style->appendChild($number_day);
863
864                        $number_text = $dom->createElement('number:text', ' ');
865                                $number_date_style->appendChild($number_text);
866       
867                        $number_month = $dom->createElement('number:month');
868                                $number_month->setAttribute("number:textual", "true");
869                                $number_month->setAttribute(" number:style", "long");
870                                $number_date_style->appendChild($number_month);
871
872                        $number_text = $dom->createElement('number:text', ' ');
873                                $number_date_style->appendChild($number_text);
874
875                        $number_year = $dom->createElement('number:year');
876                                $number_year->setAttribute("number:style", "long");
877                                $number_date_style->appendChild($number_year);
878                       
879                return $number_date_style;
880        }
881
882        public function getType() {
883                return 'odsStyleDateDMMMMYYYY';
884        }
885}
886
887class odsStyleDateDMMMMYY extends odsStyleDate {
888        public function __construct($language) {
889                $this->name='Date-DMMMMYY';
890                $this->language = $language;
891        }
892       
893        public function getContent(ods $ods, DOMDocument $dom) {
894                $number_date_style = $dom->createElement('number:date-style');
895                        $number_date_style->setAttribute("style:name", $this->name);
896                        $number_date_style->setAttribute("number:automatic-order", "true");
897                        $this->setLanguage($number_date_style);
898                       
899                        $number_day = $dom->createElement('number:day');
900                                $number_date_style->appendChild($number_day);
901
902                        $number_text = $dom->createElement('number:text', ' ');
903                                $number_date_style->appendChild($number_text);
904       
905                        $number_month = $dom->createElement('number:month');
906                                $number_month->setAttribute("number:textual", "true");
907                                $number_month->setAttribute(" number:style", "long");
908                                $number_date_style->appendChild($number_month);
909
910                        $number_text = $dom->createElement('number:text', ' ');
911                                $number_date_style->appendChild($number_text);
912
913                        $number_year = $dom->createElement('number:year');
914                                $number_date_style->appendChild($number_year);
915                       
916                return $number_date_style;
917        }
918
919        public function getType() {
920                return 'odsStyleDateDMMMMYY';
921        }
922}
923
924class odsStyleDateMMMDYYYY extends odsStyleDate {
925        public function __construct($language) {
926                $this->name='Date-MMMDYYYY';
927                $this->language = $language;
928        }
929       
930        public function getContent(ods $ods, DOMDocument $dom) {
931                $number_date_style = $dom->createElement('number:date-style');
932                        $number_date_style->setAttribute("style:name", $this->name);
933                        $number_date_style->setAttribute("number:automatic-order", "true");
934                        $this->setLanguage($number_date_style);
935                       
936                        $number_month = $dom->createElement('number:month');
937                                $number_month->setAttribute("number:textual", "true");
938                                $number_date_style->appendChild($number_month);
939
940                        $number_text = $dom->createElement('number:text', ' ');
941                                $number_date_style->appendChild($number_text);
942
943                        $number_day = $dom->createElement('number:day');
944                                $number_date_style->appendChild($number_day);   
945
946                        $number_text = $dom->createElement('number:text', ', ');
947                                $number_date_style->appendChild($number_text);
948
949                        $number_year = $dom->createElement('number:year');
950                                $number_year->setAttribute("number:style", "long");
951                                $number_date_style->appendChild($number_year);
952                       
953                return $number_date_style;
954        }
955
956        public function getType() {
957                return 'odsStyleDateDMMMMYY';
958        }
959}
960
961class odsStyleDateMMMDYY extends odsStyleDate {
962        public function __construct($language) {
963                $this->name='Date-MMMDYY';
964                $this->language = $language;
965        }
966       
967        public function getContent(ods $ods, DOMDocument $dom) {
968                $number_date_style = $dom->createElement('number:date-style');
969                        $number_date_style->setAttribute("style:name", $this->name);
970                        $number_date_style->setAttribute("number:automatic-order", "true");
971                        $this->setLanguage($number_date_style);
972                       
973                        $number_month = $dom->createElement('number:month');
974                                $number_month->setAttribute("number:textual", "true");
975                                $number_date_style->appendChild($number_month);
976
977                        $number_text = $dom->createElement('number:text', ' ');
978                                $number_date_style->appendChild($number_text);
979
980                        $number_day = $dom->createElement('number:day');
981                                $number_date_style->appendChild($number_day);   
982
983                        $number_text = $dom->createElement('number:text', ', ');
984                                $number_date_style->appendChild($number_text);
985
986                        $number_year = $dom->createElement('number:year');
987                                $number_date_style->appendChild($number_year);
988                       
989                return $number_date_style;
990        }
991
992        public function getType() {
993                return 'odsStyleDateDMMMM';
994        }
995}
996
997abstract class odsStyleTime extends odsStyle {
998}
999
1000class odsStyleTimeHHMMSS extends odsStyleTime {
1001        public function __construct() {
1002                $this->name='Time-HHMMSS';
1003        }
1004       
1005        public function getContent(ods $ods, DOMDocument $dom) {
1006                $number_time_style = $dom->createElement('number:time-style');
1007                        $number_time_style->setAttribute("style:name", $this->name);
1008                       
1009                        $number_hours = $dom->createElement('number:hours');
1010                                $number_hours->setAttribute("number:style", "long");
1011                                $number_time_style->appendChild($number_hours);
1012
1013                        $number_text = $dom->createElement('number:text', ':');
1014                                $number_time_style->appendChild($number_text);
1015
1016                        $number_minutes = $dom->createElement('number:minutes');
1017                                $number_minutes->setAttribute("number:style", "long");
1018                                $number_time_style->appendChild($number_minutes);       
1019
1020                        $number_text = $dom->createElement('number:text', ':');
1021                                $number_time_style->appendChild($number_text);
1022
1023                        $number_seconds = $dom->createElement('number:seconds');
1024                                $number_seconds->setAttribute("number:style", "long");
1025                                $number_time_style->appendChild($number_seconds);       
1026                       
1027                return $number_time_style;
1028        }
1029
1030        public function getType() {
1031                return 'odsStyleTimeHHMMSS';
1032        }
1033}
1034
1035class odsStyleTimeHHMM extends odsStyleTime {
1036        public function __construct() {
1037                $this->name='Time-HHMM';
1038        }
1039       
1040        public function getContent(ods $ods, DOMDocument $dom) {
1041                $number_time_style = $dom->createElement('number:time-style');
1042                        $number_time_style->setAttribute("style:name", $this->name);
1043                       
1044                        $number_hours = $dom->createElement('number:hours');
1045                                $number_hours->setAttribute("number:style", "long");
1046                                $number_time_style->appendChild($number_hours);
1047
1048                        $number_text = $dom->createElement('number:text', ':');
1049                                $number_time_style->appendChild($number_text);
1050
1051                        $number_minutes = $dom->createElement('number:minutes');
1052                                $number_minutes->setAttribute("number:style", "long");
1053                                $number_time_style->appendChild($number_minutes);       
1054                       
1055                return $number_time_style;
1056        }
1057
1058        public function getType() {
1059                return 'odsStyleTimeHHMM';
1060        }
1061}
1062
1063class odsStyleTimeHHMMSSAMPM extends odsStyleTime {
1064        public function __construct() {
1065                $this->name='Time-HHMMSSAMPM';
1066        }
1067       
1068        public function getContent(ods $ods, DOMDocument $dom) {
1069                $number_time_style = $dom->createElement('number:time-style');
1070                        $number_time_style->setAttribute("style:name", $this->name);
1071                       
1072                        $number_hours = $dom->createElement('number:hours');
1073                                $number_hours->setAttribute("number:style", "long");
1074                                $number_time_style->appendChild($number_hours);
1075
1076                        $number_text = $dom->createElement('number:text', ':');
1077                                $number_time_style->appendChild($number_text);
1078
1079                        $number_minutes = $dom->createElement('number:minutes');
1080                                $number_minutes->setAttribute("number:style", "long");
1081                                $number_time_style->appendChild($number_minutes);       
1082
1083                        $number_text = $dom->createElement('number:text', ':');
1084                                $number_time_style->appendChild($number_text);
1085
1086                        $number_seconds = $dom->createElement('number:seconds');
1087                                $number_seconds->setAttribute("number:style", "long");
1088                                $number_time_style->appendChild($number_seconds);       
1089
1090                        $number_text = $dom->createElement('number:text', ' ');
1091                                $number_time_style->appendChild($number_text);
1092
1093                        $number_am_pm = $dom->createElement('number:am-pm');
1094                                $number_am_pm->setAttribute("number:style", "long");
1095                                $number_time_style->appendChild($number_am_pm); 
1096                       
1097                return $number_time_style;
1098        }
1099
1100        public function getType() {
1101                return 'odsStyleTimeHHMMSSAMPM';
1102        }
1103}
1104
1105class odsStyleTimeHHMMAMPM extends odsStyleTime {
1106        public function __construct() {
1107                $this->name='Time-HHMMAMPM';
1108        }
1109       
1110        public function getContent(ods $ods, DOMDocument $dom) {
1111                $number_time_style = $dom->createElement('number:time-style');
1112                        $number_time_style->setAttribute("style:name", $this->name);
1113                       
1114                        $number_hours = $dom->createElement('number:hours');
1115                                $number_hours->setAttribute("number:style", "long");
1116                                $number_time_style->appendChild($number_hours);
1117
1118                        $number_text = $dom->createElement('number:text', ':');
1119                                $number_time_style->appendChild($number_text);
1120
1121                        $number_minutes = $dom->createElement('number:minutes');
1122                                $number_minutes->setAttribute("number:style", "long");
1123                                $number_time_style->appendChild($number_minutes);       
1124
1125                        $number_text = $dom->createElement('number:text', ' ');
1126                                $number_time_style->appendChild($number_text);
1127                       
1128                        $number_text = $dom->createElement('number:text', ' ');
1129                                $number_date_style->appendChild($number_text);
1130
1131                        $number_am_pm = $dom->createElement('number:am-pm');
1132                                $number_am_pm->setAttribute("number:style", "long");
1133                                $number_time_style->appendChild($number_am_pm); 
1134                       
1135                return $number_time_style;
1136        }
1137
1138        public function getType() {
1139                return 'odsStyleTimeHHMMAMPM';
1140        }
1141}
1142
1143abstract class odsStyleDateTime extends odsStyleDate {
1144}
1145
1146class odsStyleDateTimeMMDDYYHHMMSSAMPM extends odsStyleDateTime {
1147        public function __construct($language) {
1148                $this->name='DateTime-MMDDYYHHMMSSAMPM';
1149                $this->language = $language;
1150        }
1151       
1152        public function getContent(ods $ods, DOMDocument $dom) {
1153                $number_date_style = $dom->createElement('number:date-style');
1154                        $number_date_style->setAttribute("style:name", $this->name);
1155                        $number_date_style->setAttribute("number:automatic-order", "true");
1156                        $this->setLanguage($number_date_style);
1157                       
1158                        $number_month = $dom->createElement('number:month');
1159                                $number_date_style->appendChild($number_month);
1160
1161                        $number_text = $dom->createElement('number:text', '/');
1162                                $number_date_style->appendChild($number_text);
1163
1164                        $number_day = $dom->createElement('number:day');
1165                                $number_date_style->appendChild($number_day);   
1166
1167                        $number_text = $dom->createElement('number:text', '/');
1168                                $number_date_style->appendChild($number_text);
1169
1170                        $number_year = $dom->createElement('number:year');
1171                                $number_date_style->appendChild($number_year);
1172
1173                        $number_text = $dom->createElement('number:text', ' ');
1174                                $number_date_style->appendChild($number_text);
1175
1176                        $number_hours = $dom->createElement('number:hours');
1177                        $number_hours->setAttribute("number:style", "long");
1178                                $number_date_style->appendChild($number_hours);
1179
1180                        $number_text = $dom->createElement('number:text', ':');
1181                                $number_date_style->appendChild($number_text);
1182
1183                        $number_minutes = $dom->createElement('number:minutes');
1184                        $number_minutes->setAttribute("number:style", "long");
1185                                $number_date_style->appendChild($number_minutes);
1186                               
1187                        $number_text = $dom->createElement('number:text', ':');
1188                                $number_date_style->appendChild($number_text);
1189
1190                        $number_seconds = $dom->createElement('number:seconds');
1191                                $number_seconds->setAttribute("number:style", "long");
1192                                $number_date_style->appendChild($number_seconds);
1193                               
1194                        $number_text = $dom->createElement('number:text', ' ');
1195                                $number_date_style->appendChild($number_text);
1196                       
1197                        $number_am_pm = $dom->createElement('number:am-pm');
1198                                $number_date_style->appendChild($number_am_pm);
1199                       
1200                return $number_date_style;
1201        }
1202
1203        public function getType() {
1204                return 'odsStyleDateTimeMMDDYYHHMMSSAMPM';
1205        }
1206}
1207
1208class odsStyleDateTimeMMDDYYHHMMAMPM extends odsStyleDateTime {
1209        public function __construct($language) {
1210                $this->name='DateTime-MMDDYYHHMMAMPM';
1211                $this->language = $language;
1212        }
1213       
1214        public function getContent(ods $ods, DOMDocument $dom) {
1215                $number_date_style = $dom->createElement('number:date-style');
1216                        $number_date_style->setAttribute("style:name", $this->name);
1217                        $number_date_style->setAttribute("number:automatic-order", "true");
1218                        $this->setLanguage($number_date_style);
1219                       
1220                        $number_month = $dom->createElement('number:month');
1221                                $number_date_style->appendChild($number_month);
1222
1223                        $number_text = $dom->createElement('number:text', '/');
1224                                $number_date_style->appendChild($number_text);
1225
1226                        $number_day = $dom->createElement('number:day');
1227                                $number_date_style->appendChild($number_day);   
1228
1229                        $number_text = $dom->createElement('number:text', '/');
1230                                $number_date_style->appendChild($number_text);
1231
1232                        $number_year = $dom->createElement('number:year');
1233                                $number_date_style->appendChild($number_year);
1234
1235                        $number_text = $dom->createElement('number:text', ' ');
1236                                $number_date_style->appendChild($number_text);
1237
1238                        $number_hours = $dom->createElement('number:hours');
1239                        $number_hours->setAttribute("number:style", "long");
1240                                $number_date_style->appendChild($number_hours);
1241
1242                        $number_text = $dom->createElement('number:text', ':');
1243                                $number_date_style->appendChild($number_text);
1244
1245                        $number_minutes = $dom->createElement('number:minutes');
1246                        $number_minutes->setAttribute("number:style", "long");
1247                                $number_date_style->appendChild($number_minutes);
1248                       
1249                        $number_am_pm = $dom->createElement('number:am-pm');
1250                                $number_date_style->appendChild($number_am_pm);
1251                       
1252                return $number_date_style;
1253        }
1254
1255        public function getType() {
1256                return 'odsStyleDateTimeMMDDYYHHMMAMPM';
1257        }
1258}
1259
1260class odsStyleDateTimeDDMMYYHHMMSS extends odsStyleDateTime {
1261        public function __construct($language) {
1262                $this->name='DateTime-DDMMYYHHMMSS';
1263                $this->language = $language;
1264        }
1265       
1266        public function getContent(ods $ods, DOMDocument $dom) {
1267                $number_date_style = $dom->createElement('number:date-style');
1268                        $number_date_style->setAttribute("style:name", $this->name);
1269                        $number_date_style->setAttribute("number:automatic-order", "true");
1270                        $this->setLanguage($number_date_style);
1271                       
1272                        $number_day = $dom->createElement('number:day');
1273                                $number_date_style->appendChild($number_day);   
1274
1275                        $number_text = $dom->createElement('number:text', '/');
1276                                $number_date_style->appendChild($number_text);
1277                       
1278                        $number_month = $dom->createElement('number:month');
1279                                $number_date_style->appendChild($number_month);
1280
1281                        $number_text = $dom->createElement('number:text', '/');
1282                                $number_date_style->appendChild($number_text);
1283
1284                        $number_year = $dom->createElement('number:year');
1285                                $number_date_style->appendChild($number_year);
1286
1287                        $number_text = $dom->createElement('number:text', ' ');
1288                                $number_date_style->appendChild($number_text);
1289
1290                        $number_hours = $dom->createElement('number:hours');
1291                        $number_hours->setAttribute("number:style", "long");
1292                                $number_date_style->appendChild($number_hours);
1293
1294                        $number_text = $dom->createElement('number:text', ':');
1295                                $number_date_style->appendChild($number_text);
1296
1297                        $number_minutes = $dom->createElement('number:minutes');
1298                        $number_minutes->setAttribute("number:style", "long");
1299                                $number_date_style->appendChild($number_minutes);
1300                               
1301                        $number_text = $dom->createElement('number:text', ':');
1302                                $number_date_style->appendChild($number_text);
1303
1304                        $number_seconds = $dom->createElement('number:seconds');
1305                                $number_seconds->setAttribute("number:style", "long");
1306                                $number_date_style->appendChild($number_seconds);
1307                               
1308                return $number_date_style;
1309        }
1310
1311        public function getType() {
1312                return 'odsStyleDateTimeDDMMYYHHMMSS';
1313        }
1314}
1315
1316class odsStyleDateTimeDDMMYYHHMM extends odsStyleDateTime {
1317        public function __construct($language) {
1318                $this->name='DateTime-DDMMYYHHMM';
1319                $this->language = $language;
1320        }
1321       
1322        public function getContent(ods $ods, DOMDocument $dom) {
1323                $number_date_style = $dom->createElement('number:date-style');
1324                        $number_date_style->setAttribute("style:name", $this->name);
1325                        $number_date_style->setAttribute("number:automatic-order", "true");
1326                        $this->setLanguage($number_date_style);
1327                       
1328                        $number_day = $dom->createElement('number:day');
1329                                $number_date_style->appendChild($number_day);   
1330
1331                        $number_text = $dom->createElement('number:text', '/');
1332                                $number_date_style->appendChild($number_text);
1333                       
1334                        $number_month = $dom->createElement('number:month');
1335                                $number_date_style->appendChild($number_month);
1336
1337                        $number_text = $dom->createElement('number:text', '/');
1338                                $number_date_style->appendChild($number_text);
1339
1340                        $number_year = $dom->createElement('number:year');
1341                                $number_date_style->appendChild($number_year);
1342
1343                        $number_text = $dom->createElement('number:text', ' ');
1344                                $number_date_style->appendChild($number_text);
1345
1346                        $number_hours = $dom->createElement('number:hours');
1347                        $number_hours->setAttribute("number:style", "long");
1348                                $number_date_style->appendChild($number_hours);
1349
1350                        $number_text = $dom->createElement('number:text', ':');
1351                                $number_date_style->appendChild($number_text);
1352
1353                        $number_minutes = $dom->createElement('number:minutes');
1354                        $number_minutes->setAttribute("number:style", "long");
1355                                $number_date_style->appendChild($number_minutes);
1356                               
1357                return $number_date_style;
1358        }
1359
1360        public function getType() {
1361                return 'odsStyleDateTimeDDMMYYHHMM';
1362        }
1363}
1364
1365?>
Note: See TracBrowser for help on using the repository browser.