Lines Matching full:style

18         // Fields belonging to "style:master-page"
19 … 'style-name' => array ('style:name', 'style', false),
20 … 'style-page-usage' => array ('style:page-usage', 'style', false),
24 // Fields belonging to "style:page-layout-properties"
27 …'num-format' => array ('style:num-format', 'props', true),
28 …'num-letter-sync' => array ('style:num-letter-sync', 'props', true),
29 …'num-prefix' => array ('style:num-prefix', 'props', true),
30 …'num-suffix' => array ('style:num-suffix', 'props', true),
31 …'paper-tray-name' => array ('style:paper-tray-name', 'props', true),
32 …'print-orientation' => array ('style:print-orientation', 'props', true),
43 …'border-line-width' => array ('style:border-line-width', 'props', true),
44 …'border-line-width-top' => array ('style:border-line-width-top', 'props', true),
45 …'border-line-width-bottom' => array ('style:border-line-width-bottom', 'props', true),
46 …'border-line-width-left' => array ('style:border-line-width-left', 'props', true),
47 …'border-line-width-right' => array ('style:border-line-width-right', 'props', true),
53 …'shadow' => array ('style:shadow', 'props', true),
55 …'register-truth-ref-style-name' => array ('style:register-truth-ref-style-name', 'props', true),
56 …'print' => array ('style:print', 'props', true),
57 …'print-page-order' => array ('style:print-page-order', 'props', true),
58 …'first-page-number' => array ('style:first-page-number', 'props', true),
59 …'scale-to' => array ('style:scale-to', 'props', true),
60 …'scale-to-pages' => array ('style:scale-to-pages', 'props', true),
61 …'table-centering' => array ('style:table-centering', 'props', true),
62 …'footnote-max-height' => array ('style:footnote-max-height', 'props', true),
63 …'writing-mode' => array ('style:writing-mode', 'props', true),
64 …'layout-grid-mode' => array ('style:layout-grid-mode', 'props', true),
65 …'layout-grid-standard-mode' => array ('style:layout-grid-standard-mode', 'props', true),
66 …'layout-grid-base-height' => array ('style:layout-grid-base-height', 'props', true),
67 …'layout-grid-ruby-height' => array ('style:layout-grid-ruby-height', 'props', true),
68 …'layout-grid-lines' => array ('style:layout-grid-lines', 'props', true),
69 …'layout-grid-base-width' => array ('style:layout-grid-base-width', 'props', true),
70 …'layout-grid-color' => array ('style:layout-grid-color', 'props', true),
71 …'layout-grid-ruby-below' => array ('style:layout-grid-ruby-below', 'props', true),
72 …'layout-grid-print' => array ('style:layout-grid-print', 'props', true),
73 …'layout-grid-display' => array ('style:layout-grid-display', 'props', true),
74 …'layout-grid-snap-to' => array ('style:layout-grid-snap-to', 'props', true),
78 // Fields belonging to "style:background-image"
79 // The content of element "style:background-image" will be saved as is
80 'repeat' => array ('style:repeat', 'bgi', true),
81 'position' => array ('style:position', 'bgi', true),
82 'filter-name' => array ('style:filter-name', 'bgi', true),
91 // Fields belonging to "style:columns"
92 // The content of element "style:columns" will be saved as is
99 // Fields belonging to "style:footnote-sep"
100 'ftsep-width' => array ('style:width', 'ftsep', true),
101 'ftsep-rel-width' => array ('style:rel-width', 'ftsep', true),
102 'ftsep-color' => array ('style:color', 'ftsep', true),
103 'ftsep-line-style' => array ('style:line-style', 'ftsep', true),
104 'ftsep-adjustment' => array ('style:adjustment', 'ftsep', true),
105 'ftsep-distance-before-sep' => array ('style:distance-before-sep', 'ftsep', true),
106 'ftsep-distance-after-sep' => array ('style:distance-after-sep', 'ftsep', true),
121 * Get the element name for the ODT XML encoding of the style.
124 return 'style:page-layout';
128 * Set style properties by importing values from a properties array.
130 * The style must have been previously created.
144 * Check if a style is a common style.
146 * @return bool Is common style
212 * Create new style by importing ODT style definition.
214 * @param $xmlCode Style definition in ODT XML format
215 * @return ODTStyle New specific style
218 $style = new ODTPageLayoutStyle();
220 // Get attributes for element 'style:master-page'
221 $open = XMLUtil::getElementOpenTag('style:page-layout', $xmlCode);
223 … $style->importODTStyleInternal(self::$page_layout_fields, $open, $style->page_layout_style);
225 $childs = XMLUtil::getElementContent ('style:page-layout', $xmlCode);
227 // Get attributes for element 'style:page-layout-properties'
228 $open = XMLUtil::getElementOpenTag('style:page-layout-properties', $childs);
229 $style->content_header = XMLUtil::getElement ('style:header-style', $childs);
230 $style->content_footer = XMLUtil::getElement ('style:footer-style', $childs);
232 … $style->importODTStyleInternal(self::$layout_props_fields, $open, $style->layout_props);
234 $childs = XMLUtil::getElementContent ('style:page-layout-properties', $xmlCode);
236 // Get 'style:background-image'
237 $open = XMLUtil::getElementOpenTag('style:background-image', $childs);
239 … $style->importODTStyleInternal(self::$bgi_fields, $open, $style->bgi_props);
240 … $style->content_bgi = XMLUtil::getElementContent ('style:background-image', $childs);
243 // Get 'style:columns'
244 $open = XMLUtil::getElementOpenTag('style:columns', $childs);
246 … $style->importODTStyleInternal(self::$columns_fields, $open, $style->columns_props);
247 … $style->content_columns = XMLUtil::getElementContent ('style:columns', $childs);
250 // Get 'style:footnote-sep'
251 $open = XMLUtil::getElementOpenTag('style:footnote-sep', $childs);
253 … $style->importODTStyleInternal(self::$footnote_fields, $open, $style->footnote_props);
260 return $style;
264 * Encode current style values in a string and return it.
266 * @return string ODT XML encoded style
275 // Get page layout style ODT properties
300 // Build style.
301 $style = '<style:page-layout '.$layout_style.">\n";
304 $style .= '<style:page-layout-properties '.$layout.">\n";
307 $style .= '<style:background-image '.$bgi.">\n";
308 $style .= $this->content_bgi;
309 $style .= '</style:background-image>'."\n";
312 $style .= '<style:columns '.$columns.">\n";
313 $style .= $this->content_columns;
314 $style .= '</style:columns>'."\n";
317 $style .= '<style:footnote-sep '.$footnote."/>\n";
320 $style .= '</style:page-layout-properties>'."\n";
323 $style .= $this->content_header;
324 $style .= $this->content_footer;
326 $style .= '</style:page-layout'.">\n";
327 return $style;
331 * This function creates a page layout style with the parameters given in $properies.
334 * style-name, width, height, margin-top, margin-bottom, margin-right and margin-left.
335 * All properties except the style-name are expected to be numeric values.
338 * The function returns the name of the new style or NULL if all relevant properties are empty.
347 // Create style name (if not given).
348 $style_name = $properties ['style-name'];
351 $properties ['style-name'] = $style_name;
353 $style = '<style:page-layout style:name="'.$style_name.'">
354style:page-layout-properties fo:page-width="'.$properties ['width'].'cm" fo:page-height="'.$proper…
355style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.1cm" style:distance-after-se…
356 </style:page-layout-properties>
357 <style:header-style/>
358 <style:footer-style/>
359 </style:page-layout>';
360 return self::importODTStyle($style);