Skip to content

Commit eb0e826

Browse files
committed
Minor changes in stylefactory.php:
- in function createTextStyle(): - added support for 'padding' - added support for specific borders per side (use 'border-left', 'border-right', 'border-top' and 'border-bottom' instead of 'border') - in function createParagraphStyle(): - padding belongs to the text section of the style not to the paragraph section
1 parent 3aef70f commit eb0e826

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

helper/stylefactory.php

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,14 @@ public static function createTextStyle(&$style, $properties, $disabled_props = N
135135
static $params = array (
136136
'style-name' => array ('section' => 'header', 'name' => 'style:name', 'is_attr' => false),
137137
'style-display-name' => array ('section' => 'header', 'name' => 'style:display-name', 'is_attr' => false),
138-
'border' => array ('section' => 'text', 'name' => 'fo:border', 'is_attr' => true),
138+
'padding-top' => array ('section' => 'text', 'name' => 'fo:padding-top', 'is_attr' => true),
139+
'padding-bottom' => array ('section' => 'text', 'name' => 'fo:padding-bottom', 'is_attr' => true),
140+
'padding-left' => array ('section' => 'text', 'name' => 'fo:padding-left', 'is_attr' => true),
141+
'padding-right' => array ('section' => 'text', 'name' => 'fo:padding-right', 'is_attr' => true),
142+
'border-left' => array ('section' => 'text', 'name' => 'fo:border-left', 'is_attr' => true),
143+
'border-right' => array ('section' => 'text', 'name' => 'fo:border-right', 'is_attr' => true),
144+
'border-top' => array ('section' => 'text', 'name' => 'fo:border-top', 'is_attr' => true),
145+
'border-bottom' => array ('section' => 'text', 'name' => 'fo:border-bottom', 'is_attr' => true),
139146
'color' => array ('section' => 'text', 'name' => 'fo:color', 'is_attr' => true),
140147
'background-color' => array ('section' => 'text', 'name' => 'fo:background-color', 'is_attr' => true),
141148
'background-image' => array ('section' => 'text', 'name' => 'fo:background-image', 'is_attr' => true),
@@ -283,10 +290,10 @@ public static function createParagraphStyle(&$style, $properties, $disabled_prop
283290
'margin-bottom' => array ('section' => 'paragraph', 'name' => 'fo:margin-bottom', 'is_attr' => true),
284291
'margin-left' => array ('section' => 'paragraph', 'name' => 'fo:margin-left', 'is_attr' => true),
285292
'margin-right' => array ('section' => 'paragraph', 'name' => 'fo:margin-right', 'is_attr' => true),
286-
'padding-top' => array ('section' => 'paragraph', 'name' => 'fo:padding-top', 'is_attr' => true),
287-
'padding-bottom' => array ('section' => 'paragraph', 'name' => 'fo:padding-bottom', 'is_attr' => true),
288-
'padding-left' => array ('section' => 'paragraph', 'name' => 'fo:padding-left', 'is_attr' => true),
289-
'padding-right' => array ('section' => 'paragraph', 'name' => 'fo:padding-right', 'is_attr' => true),
293+
'padding-top' => array ('section' => 'text', 'name' => 'fo:padding-top', 'is_attr' => true),
294+
'padding-bottom' => array ('section' => 'text', 'name' => 'fo:padding-bottom', 'is_attr' => true),
295+
'padding-left' => array ('section' => 'text', 'name' => 'fo:padding-left', 'is_attr' => true),
296+
'padding-right' => array ('section' => 'text', 'name' => 'fo:padding-right', 'is_attr' => true),
290297
'border-left' => array ('section' => 'text', 'name' => 'fo:border-left', 'is_attr' => true),
291298
'border-right' => array ('section' => 'text', 'name' => 'fo:border-right', 'is_attr' => true),
292299
'border-top' => array ('section' => 'text', 'name' => 'fo:border-top', 'is_attr' => true),

0 commit comments

Comments
 (0)