Uploaded image for project: 'OASIS Open Document Format for Office Applications (OpenDocument) TC'
  1. OASIS Open Document Format for Office Applications (OpenDocument) TC
  2. OFFICE-4125

allow draw:fill on non-graphic objects header/footer, paragraph, section, table

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: ODF 1.4
    • Component/s: None
    • Labels:
      None
    • Proposal:
      Hide

      Changes to the specification text

      The new element

      17.nnn <style:background-fill>
      The <style:background-fill> element serves as a container for fill attributes to specify a background. It has the mandatory attribute draw:fill (20.118) to specify the kind of fill. The other attributes specify details to the fill.
      The <style:background-fill> element takes precedence over element <style:background-image> (17.3), attribute fo:background-color (20.182) and attribute style:background-transparency (20.247). Consumers not able to use the <style:background-fill> element may ignore it and use a given <style:background-image> element or fo:background-color and fo:background-transparency attributes instead.
      The background of an object is transparent if none of the styles applied following the rules specified in section 16.2 defines a background formatting.

      In these attributes the term 'graphic object' or 'drawing object' is replaced by 'object' because now the attributes can be applied to non-graphic objects as well. There are no other changes made.

      20.118 draw:fill
      The draw:fill attribute specifies the fill style for an object.
      The defined values for the draw:fill attribute are:
      bitmap: the object is filled with the bitmap specified by the draw:fill-image-name 20.124 attribute. 
      gradient: the object is filled with the gradient specified by the draw:fill-gradient-name 20.120 attribute. 
      hatch: the object is filled with the hatch specified by the draw:fill-hatch-name 20.121 attribute. 
      none: the object is not filled. 
      solid: the object is filled with the color specified by the draw:fill-color 20.119 attribute.

      20.119 draw:fill-color
      The draw:fill-color attribute specifies the color of the fill for an object. It is used only if the draw:fill 20.118 attribute has one of the values solid or hatch.

      20.120 draw:fill-gradient-name
      The draw:fill-gradient-name attribute specifies a gradient style that is used for filling objects. It is used only if the draw:fill 20.118 attribute has the value gradient.

      20.121 draw:fill-hatch-name
      The draw:fill-hatch-name attribute specifies a hatch style that is used for filling. It is used only if the draw:fill 20.118 attribute has the value hatch.

      20.152 draw:opacity
      The draw:opacity attribute specifies the opacity for an image or object. The value is a percentage, where 0% is transparent and 100% is opaque.
      The defined value range for the draw:opacity attribute is 0% to 100%, inclusive.
      Use of the draw:opacity attribute disables any transparency effect and set the opacity for the fill area of an object.

      20.153 draw:opacity-name
      The draw:opacity-name attribute specifies an opacity gradient that defines the opacity for the fill area of an object. When applying an opacity gradient, the opacity is interpolated as defined in the referenced opacity gradient style. Opacity is applied after other fill styles have been applied to an image or object.
      The value of this attribute overrides the draw:opacity 20.152 attribute.

      Changes to the schema

      The already existing style-graphic-fill-properties-attlist is split in common-draw-fill-kind-attlist and common-draw-fill-details-attlist to be able to make attribute draw:fill mandatory for the new element and keep it optional for element <style:graphic-fill-properties>.

      The new element is allowed, where already a <style:background-image> is allowed.

      --- OpenDocument-v1.3-schema_orig.rng	2021-04-27 18:00:00.000000000 +0200
      +++ OpenDocument-v1.3-schema_Regina_20220402.rng	2022-04-02 14:49:48.197088500 +0200
      @@ -9614,10 +9614,18 @@
           </rng:choice>
         </rng:define>
         <rng:define name="string">
           <rng:data type="string"/>
         </rng:define>
      +  <rng:define name="style-background-fill">
      +    <rng:optional>
      +      <rng:element name="style:background-fill">
      +        <rng:ref name="common-draw-fill-kind-attlist"/>
      +        <rng:ref name="common-draw-fill-details-attlist"/>
      +      </rng:element>
      +    </rng:optional>
      +  </rng:define>
         <rng:define name="style-background-image">
           <rng:optional>
             <rng:element name="style:background-image">
               <rng:ref name="style-background-image-attlist"/>
               <rng:choice>
      @@ -10768,20 +10776,28 @@
           </rng:optional>
         </rng:define>
         <rng:define name="style-graphic-fill-properties-attlist">
           <rng:interleave>
             <rng:optional>
      -        <rng:attribute name="draw:fill">
      -          <rng:choice>
      -            <rng:value>none</rng:value>
      -            <rng:value>solid</rng:value>
      -            <rng:value>bitmap</rng:value>
      -            <rng:value>gradient</rng:value>
      -            <rng:value>hatch</rng:value>
      -          </rng:choice>
      -        </rng:attribute>
      +        <rng:ref name="common-draw-fill-kind-attlist"/>
             </rng:optional>
      +      <rng:ref name="common-draw-fill-details-attlist"/>
      +    </rng:interleave>
      +  </rng:define>
      +  <rng:define name="common-draw-fill-kind-attlist">
      +    <rng:attribute name="draw:fill">
      +      <rng:choice>
      +        <rng:value>none</rng:value>
      +        <rng:value>solid</rng:value>
      +        <rng:value>bitmap</rng:value>
      +        <rng:value>gradient</rng:value>
      +        <rng:value>hatch</rng:value>
      +      </rng:choice>
      +    </rng:attribute>
      +  </rng:define>
      +  <rng:define name="common-draw-fill-details-attlist">
      +    <rng:interleave>
             <rng:optional>
               <rng:attribute name="draw:fill-color">
                 <rng:ref name="color"/>
               </rng:attribute>
             </rng:optional>
      @@ -11836,10 +11852,11 @@
           <rng:ref name="style-header-footer-properties-attlist"/>
           <rng:ref name="style-header-footer-properties-elements"/>
         </rng:define>
         <rng:define name="style-header-footer-properties-elements">
           <rng:ref name="style-background-image"/>
      +    <rng:ref name="style-background-fill"/>
         </rng:define>
         <rng:define name="style-header-left">
           <rng:element name="style:header-left">
             <rng:ref name="common-style-header-footer-attlist"/>
             <rng:ref name="header-footer-content"/>
      @@ -12458,10 +12475,11 @@
         <rng:define name="style-paragraph-properties-elements">
           <rng:interleave>
             <rng:ref name="style-tab-stops"/>
             <rng:ref name="style-drop-cap"/>
             <rng:ref name="style-background-image"/>
      +      <rng:ref name="style-background-fill"/>
           </rng:interleave>
         </rng:define>
         <rng:define name="style-presentation-page-layout">
           <rng:element name="style:presentation-page-layout">
             <rng:attribute name="style:name">
      @@ -12555,10 +12573,11 @@
           <rng:ref name="style-section-properties-elements"/>
         </rng:define>
         <rng:define name="style-section-properties-elements">
           <rng:interleave>
             <rng:ref name="style-background-image"/>
      +      <rng:ref name="style-background-fill"/>
             <rng:ref name="style-columns"/>
             <rng:zeroOrMore>
               <rng:ref name="text-notes-configuration"/>
             </rng:zeroOrMore>
           </rng:interleave>
      @@ -12963,10 +12982,11 @@
           <rng:ref name="style-table-cell-properties-attlist"/>
           <rng:ref name="style-table-cell-properties-elements"/>
         </rng:define>
         <rng:define name="style-table-cell-properties-elements">
           <rng:ref name="style-background-image"/>
      +    <rng:ref name="style-background-fill"/>
         </rng:define>
         <rng:define name="style-table-column-properties">
           <rng:element name="style:table-column-properties">
             <rng:ref name="style-table-column-properties-content-strict"/>
           </rng:element>
      @@ -13064,10 +13084,11 @@
           <rng:ref name="style-table-properties-attlist"/>
           <rng:ref name="style-table-properties-elements"/>
         </rng:define>
         <rng:define name="style-table-properties-elements">
           <rng:ref name="style-background-image"/>
      +    <rng:ref name="style-background-fill"/>
         </rng:define>
         <rng:define name="style-table-row-properties">
           <rng:element name="style:table-row-properties">
             <rng:ref name="style-table-row-properties-content-strict"/>
           </rng:element>
      @@ -13105,10 +13126,11 @@
           <rng:ref name="style-table-row-properties-attlist"/>
           <rng:ref name="style-table-row-properties-elements"/>
         </rng:define>
         <rng:define name="style-table-row-properties-elements">
           <rng:ref name="style-background-image"/>
      +    <rng:ref name="style-background-fill"/>
         </rng:define>
         <rng:define name="style-text-properties">
           <rng:element name="style:text-properties">
             <rng:ref name="style-text-properties-content-strict"/>
           </rng:element>
      
      Show
      Changes to the specification text The new element 17.nnn <style:background-fill> The <style:background-fill> element serves as a container for fill attributes to specify a background. It has the mandatory attribute draw:fill (20.118) to specify the kind of fill. The other attributes specify details to the fill. The <style:background-fill> element takes precedence over element <style:background-image> (17.3), attribute fo:background-color (20.182) and attribute style:background-transparency (20.247). Consumers not able to use the <style:background-fill> element may ignore it and use a given <style:background-image> element or fo:background-color and fo:background-transparency attributes instead. The background of an object is transparent if none of the styles applied following the rules specified in section 16.2 defines a background formatting. In these attributes the term 'graphic object' or 'drawing object' is replaced by 'object' because now the attributes can be applied to non-graphic objects as well. There are no other changes made. 20.118 draw:fill The draw:fill attribute specifies the fill style for an object. The defined values for the draw:fill attribute are: • bitmap : the object is filled with the bitmap specified by the draw:fill-image-name 20.124 attribute.  • gradient : the object is filled with the gradient specified by the draw:fill-gradient-name 20.120 attribute.  • hatch : the object is filled with the hatch specified by the draw:fill-hatch-name 20.121 attribute.  • none : the object is not filled.  • solid : the object is filled with the color specified by the draw:fill-color 20.119 attribute. 20.119 draw:fill-color The draw:fill-color attribute specifies the color of the fill for an object. It is used only if the draw:fill 20.118 attribute has one of the values solid or hatch . 20.120 draw:fill-gradient-name The draw:fill-gradient-name attribute specifies a gradient style that is used for filling objects. It is used only if the draw:fill 20.118 attribute has the value gradient . 20.121 draw:fill-hatch-name The draw:fill-hatch-name attribute specifies a hatch style that is used for filling. It is used only if the draw:fill 20.118 attribute has the value hatch . 20.152 draw:opacity The draw:opacity attribute specifies the opacity for an image or object. The value is a percentage, where 0% is transparent and 100% is opaque. The defined value range for the draw:opacity attribute is 0% to 100% , inclusive. Use of the draw:opacity attribute disables any transparency effect and set the opacity for the fill area of an object. 20.153 draw:opacity-name The draw:opacity-name attribute specifies an opacity gradient that defines the opacity for the fill area of an object. When applying an opacity gradient, the opacity is interpolated as defined in the referenced opacity gradient style. Opacity is applied after other fill styles have been applied to an image or object. The value of this attribute overrides the draw:opacity 20.152 attribute. Changes to the schema The already existing style-graphic-fill-properties-attlist is split in common-draw-fill-kind-attlist and common-draw-fill-details-attlist to be able to make attribute draw:fill mandatory for the new element and keep it optional for element <style:graphic-fill-properties> . The new element is allowed, where already a <style:background-image> is allowed. --- OpenDocument-v1.3-schema_orig.rng 2021-04-27 18:00:00.000000000 +0200 +++ OpenDocument-v1.3-schema_Regina_20220402.rng 2022-04-02 14:49:48.197088500 +0200 @@ -9614,10 +9614,18 @@ </rng:choice> </rng:define> <rng:define name= "string" > <rng:data type= "string" /> </rng:define> + <rng:define name= "style-background-fill" > + <rng:optional> + <rng:element name= "style:background-fill" > + <rng:ref name= "common-draw-fill-kind-attlist" /> + <rng:ref name= "common-draw-fill-details-attlist" /> + </rng:element> + </rng:optional> + </rng:define> <rng:define name= "style-background-image" > <rng:optional> <rng:element name= "style:background-image" > <rng:ref name= "style-background-image-attlist" /> <rng:choice> @@ -10768,20 +10776,28 @@ </rng:optional> </rng:define> <rng:define name= "style-graphic-fill-properties-attlist" > <rng:interleave> <rng:optional> - <rng:attribute name= "draw:fill" > - <rng:choice> - <rng:value> none </rng:value> - <rng:value> solid </rng:value> - <rng:value> bitmap </rng:value> - <rng:value> gradient </rng:value> - <rng:value> hatch </rng:value> - </rng:choice> - </rng:attribute> + <rng:ref name= "common-draw-fill-kind-attlist" /> </rng:optional> + <rng:ref name= "common-draw-fill-details-attlist" /> + </rng:interleave> + </rng:define> + <rng:define name= "common-draw-fill-kind-attlist" > + <rng:attribute name= "draw:fill" > + <rng:choice> + <rng:value> none </rng:value> + <rng:value> solid </rng:value> + <rng:value> bitmap </rng:value> + <rng:value> gradient </rng:value> + <rng:value> hatch </rng:value> + </rng:choice> + </rng:attribute> + </rng:define> + <rng:define name= "common-draw-fill-details-attlist" > + <rng:interleave> <rng:optional> <rng:attribute name= "draw:fill-color" > <rng:ref name= "color" /> </rng:attribute> </rng:optional> @@ -11836,10 +11852,11 @@ <rng:ref name= "style-header-footer-properties-attlist" /> <rng:ref name= "style-header-footer-properties-elements" /> </rng:define> <rng:define name= "style-header-footer-properties-elements" > <rng:ref name= "style-background-image" /> + <rng:ref name= "style-background-fill" /> </rng:define> <rng:define name= "style-header-left" > <rng:element name= "style:header-left" > <rng:ref name= "common-style-header-footer-attlist" /> <rng:ref name= "header-footer-content" /> @@ -12458,10 +12475,11 @@ <rng:define name= "style-paragraph-properties-elements" > <rng:interleave> <rng:ref name= "style-tab-stops" /> <rng:ref name= "style-drop-cap" /> <rng:ref name= "style-background-image" /> + <rng:ref name= "style-background-fill" /> </rng:interleave> </rng:define> <rng:define name= "style-presentation-page-layout" > <rng:element name= "style:presentation-page-layout" > <rng:attribute name= "style:name" > @@ -12555,10 +12573,11 @@ <rng:ref name= "style-section-properties-elements" /> </rng:define> <rng:define name= "style-section-properties-elements" > <rng:interleave> <rng:ref name= "style-background-image" /> + <rng:ref name= "style-background-fill" /> <rng:ref name= "style-columns" /> <rng:zeroOrMore> <rng:ref name= "text-notes-configuration" /> </rng:zeroOrMore> </rng:interleave> @@ -12963,10 +12982,11 @@ <rng:ref name= "style-table-cell-properties-attlist" /> <rng:ref name= "style-table-cell-properties-elements" /> </rng:define> <rng:define name= "style-table-cell-properties-elements" > <rng:ref name= "style-background-image" /> + <rng:ref name= "style-background-fill" /> </rng:define> <rng:define name= "style-table-column-properties" > <rng:element name= "style:table-column-properties" > <rng:ref name= "style-table-column-properties-content-strict" /> </rng:element> @@ -13064,10 +13084,11 @@ <rng:ref name= "style-table-properties-attlist" /> <rng:ref name= "style-table-properties-elements" /> </rng:define> <rng:define name= "style-table-properties-elements" > <rng:ref name= "style-background-image" /> + <rng:ref name= "style-background-fill" /> </rng:define> <rng:define name= "style-table-row-properties" > <rng:element name= "style:table-row-properties" > <rng:ref name= "style-table-row-properties-content-strict" /> </rng:element> @@ -13105,10 +13126,11 @@ <rng:ref name= "style-table-row-properties-attlist" /> <rng:ref name= "style-table-row-properties-elements" /> </rng:define> <rng:define name= "style-table-row-properties-elements" > <rng:ref name= "style-background-image" /> + <rng:ref name= "style-background-fill" /> </rng:define> <rng:define name= "style-text-properties" > <rng:element name= "style:text-properties" > <rng:ref name= "style-text-properties-content-strict" /> </rng:element>
    • Resolution:
      Hide

      17.26 <style:background-fill>

      The <style:background-fill> element serves as a container for fill attributes to specify a background. It has a mandatory attribute draw:fill 20.121 to specify the kind of fill. The other attributes specify details to the fill.
      The <style:background-fill> element takes precedence over element <style:background-image> 17.3, attribute fo:background-color 20.185 and attribute style:background-transparency 20.250. Consumers not able to use the <style:background-fill> element may ignore it and use a given <style:background-image> element or fo:background-color and fo:background-transparency attributes instead.
      The background of an object is transparent if none of the styles applied following the rules specified in section 16.2 defines a background formatting.

      ...

      20.121 draw:fill

      The draw:fill attribute specifies the fill style for an object. Graphic objects that are not closed will not be filled.

      Note: A path without a closepath at the end is open and will not be filled.

      The defined values for the draw:fill attribute are:

      ...

      20.122 draw:fill-color

      The draw:fill-color attribute specifies the color of the fill for an object. It is used only if the draw:fill 20.121 attribute has one of the values solid or hatch.

      ...

      20.123 draw:fill-gradient-name

      The draw:fill-gradient-name attribute specifies a gradient style that is used for filling objects. It is used only if the draw:fill 20.121 attribute has the value gradient.

      ...

      20.124 draw:fill-hatch-name

      The draw:fill-hatch-name attribute specifies a hatch style that is used for filling objects. It is used only if the draw:fill 20.121 attribute has the value hatch.

      ...

      20.155 draw:opacity

      The draw:opacity attribute specifies the opacity for an image or graphic object. The value is a percentage, where 0% is transparent and 100% is opaque.

      The defined value range for the draw:opacity attribute is 0% to 100%, inclusive.

      Use of the draw:opacity attribute disables any transparency effect and set the opacity for the fill area of an object.

      ...

      20.156 draw:opacity-name

      The draw:opacity-name attribute specifies an opacity gradient that defines the opacity for the fill area of an object. When applying an opacity gradient, the opacity is interpolated as defined in the referenced opacity gradient style. Opacity is applied after other fill styles have been applied to an image or graphic object.

      The value of this attribute overrides the draw:opacity 20.155 attribute.

      Show
      17.26 <style:background-fill> The <style:background-fill> element serves as a container for fill attributes to specify a background. It has a mandatory attribute draw:fill 20.121 to specify the kind of fill. The other attributes specify details to the fill. The <style:background-fill> element takes precedence over element <style:background-image> 17.3, attribute fo:background-color 20.185 and attribute style:background-transparency 20.250. Consumers not able to use the <style:background-fill> element may ignore it and use a given <style:background-image> element or fo:background-color and fo:background-transparency attributes instead. The background of an object is transparent if none of the styles applied following the rules specified in section 16.2 defines a background formatting. ... 20.121 draw:fill The draw:fill attribute specifies the fill style for an object. Graphic objects that are not closed will not be filled. Note: A path without a closepath at the end is open and will not be filled. The defined values for the draw:fill attribute are: ... 20.122 draw:fill-color The draw:fill-color attribute specifies the color of the fill for an object. It is used only if the draw:fill 20.121 attribute has one of the values solid or hatch . ... 20.123 draw:fill-gradient-name The draw:fill-gradient-name attribute specifies a gradient style that is used for filling objects. It is used only if the draw:fill 20.121 attribute has the value gradient . ... 20.124 draw:fill-hatch-name The draw:fill-hatch-name attribute specifies a hatch style that is used for filling objects. It is used only if the draw:fill 20.121 attribute has the value hatch . ... 20.155 draw:opacity The draw:opacity attribute specifies the opacity for an image or graphic object. The value is a percentage, where 0% is transparent and 100% is opaque. The defined value range for the draw:opacity attribute is 0% to 100%, inclusive. Use of the draw:opacity attribute disables any transparency effect and set the opacity for the fill area of an object. ... 20.156 draw:opacity-name The draw:opacity-name attribute specifies an opacity gradient that defines the opacity for the fill area of an object. When applying an opacity gradient, the opacity is interpolated as defined in the referenced opacity gradient style. Opacity is applied after other fill styles have been applied to an image or graphic object. The value of this attribute overrides the draw:opacity 20.155 attribute.

      Description

      This proposal extends filling with color and transparency gradients and with hatches to the non-graphic objects header, footer, paragraph, section, table, table-row and table-cell. Currently only color and image is allowed for filling these objects. It introduces a new element <style:background-fill> as container for the attributes needed to describe these more complex filling.

      It is allowed to write element <style:background-image> or attributes style:background-color and style-background-transparency same as now in ODF 1.3 in addition to the new element to support consumers, which are not yet able to use the new element <style:background-fill>.

      Users wishes such complex filling and it is partly implemented in LibreOffice already six years ago.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              regina.henschel Regina Henschel
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: