I'm trying to save a table style as a named style in LibreOffice writer. My process so far has been as follows:
Select the table whose style I want to save, then use the following
Format Menu -> Styles and Formatting -> Styles and Formatting Dialog -> New Style From Selection -> Enter style name and save.
Writer puts the new style under the
Table Contents sub-tree within the Styles and Formatting tree view. The
Borders property seems to be saved, but the
Background property is not.
Per How to save table cell's background colour and styles of border line (OO.Org Writer)?, I made sure that I had chosen 'Paragraph Styles' before I saved the table style. I have also ensured that I'm only selecting a style from a single cell, thereby ensuring that I'm not trying to save conflicting background styles.
By right-clicking on the name of my style, I can see that there is no background color set. I can modify the background manually -- however, the background color doesn't extend all the way to the border of the cell; it only covers the text area.
So far, I've been using
LibreOffice 184.108.40.206 Build ID: 350m1(Build:2)
Running on Ubuntu 10.04.
I unzipped the ODF file and opened styles.xml and content.xml.
Both files contain style information; styles.xml contains the default ODF styles, plus any named styles created by users. Content.xml contains anonymous style information tied directly to content (E.g. if you high-light text using the 'high-light' tool, this style information will be saved to content.xml). Here's the interesting thing:
This is from styles.xml:
<style:style style:name="new_20_table_20_heading" style:display-name="new table heading" style:family="paragraph" style:parent-style-name="Table_20_Heading"> <style:paragraph-properties fo:background-color="#c0c0c0"> <style:background-image /> </style:paragraph-properties> </style:style>
Notice that background-color is inside style:paragraph-properties
Here's a background-color from content.xml:
<style:style style:name="Table1.C1" style:family="table-cell"> <style:table-cell-properties fo:background-color="#cccccc" fo:padding="0.0382in" fo:border="0.05pt solid #000000"> <style:background-image /> </style:table-cell-properties> </style:style>
Here, background-color is within style:table-cell-properties
It seems that LibreOffice should have a 'Cell Styles' button in the
Styles and Formatting dialog box (analogous to the 'Paragraph Styles' button).
Is this a bug?