Suspicious <style:Default-background> element

Regina Henschel rb.henschel at t-online.de
Fri Sep 1 19:39:26 UTC 2023


Hi all,

When you have a
   <style:master-page style:name="Default" style:page-layout-name="PM1" 
draw:style-name="dp1"> ...
element,
then LibreOffice writes e.g. an element
   <style:style style:name="Default-background" style:family="presentation">
    <style:graphic-properties draw:stroke="none" draw:fill="solid" 
draw:fill-color="#d5ffd5">
     <loext:fill-complex-color loext:theme-type="accent2" 
loext:color-type="theme">
      <loext:transformation loext:type="lummod" loext:value="1000"/>
      <loext:transformation loext:type="lumoff" loext:value="9000"/>
     </loext:fill-complex-color>
    </style:graphic-properties>
    <style:text-properties style:letter-kerning="true"/>
   </style:style>

and an element
   <style:style style:name="dp1" style:family="drawing-page">
    <style:drawing-page-properties draw:background-size="border" 
draw:fill="solid" draw:fill-color="#d5ffd5"/>
   </style:style>

LibreOffice uses only the fill properties from the "Default-background" 
element although this style is nowhere referenced. PowerPoint, 
OnlyOffice and Scribus e.g. use correctly the "dp1" style, which is 
referenced in the master-page element. (Set the fill-color to a 
different value than in "Default-background" style to test it.)

Such element "Default-background" should not exist at all for documents 
in ODF. The background of a master-page is described in the drawing-page 
style which is referenced in the draw:style-name attribute.

So a correct markup would be

   <style:style style:name="dp1" style:family="drawing-page">
    <style:drawing-page-properties draw:background-size="border" 
draw:fill="solid" draw:fill-color="#d5ffd5" draw:stroke="none">
      <loext:fill-complex-color loext:theme-type="accent2" 
loext:color-type="theme">
       <loext:transformation loext:type="lummod" loext:value="1000"/>
       <loext:transformation loext:type="lumoff" loext:value="9000"/>
     </loext:fill-complex-color>
    </style:drawing-page-properties
   </style:style>

The currently included <style:text-properties 
style:letter-kerning="true"/> element is meaningless for backgrounds. It 
should be in a parent style element of the styles of all the placeholder 
objects on the master page, in case such default is intended.

Shouldn't we get rid of this "Default-background" style? That means, as 
first step implement to use the fill and stroke properties of the 
drawing-page-properties instead of those from the "Default-background" 
style.

Kind regards,
Regina


More information about the LibreOffice mailing list