Hi all,
I’m trying to programmatically create some .ods
files, and can’t seem to get row formatting right. I have an automatic style called “bold”:
<office:automatic-styles>
<style:style style:family="table-cell" style:name="bold" style:display-name="bold">
<style:text-properties fo:font-weight="bold" />
<style:table-cell-properties fo:background-color="#FFFF87" />
</style:style>
...
and then try the following:
<table:table-row table:default-cell-style-name="bold">
<table:table-cell office:value-type="string">
<text:p>foo</text:p>
</table:table-cell>
<table:table-cell office:value-type="string">
<text:p>bar</text:p>
</table:table-cell>
</table:table-row>
but the cells are not formatted at all.
If I add a table column and put the default-cell-style-name attribute in there:
<table:table-column table:default-cell-style-name="bold" table:number-columns-repeated="2" />
<table:table-row>
<table:table-cell office:value-type="string">
<text:p>foo</text:p>
</table:table-cell>
<table:table-cell office:value-type="string">
<text:p>bar</text:p>
</table:table-cell>
</table:table-row>
then the two cells are displayed in the desired style.
Is this a quirk of LibreOffice, or am I misunderstanding the specification?
Thanks and best regards