https://bugs.documentfoundation.org/show_bug.cgi?id=157350
--- Comment #18 from Jambunathan K <[email protected]> --- (In reply to Stéphane Guillou (stragu) from comment #17) > (In reply to Regina Henschel from comment #16) > > You need to remove direct formatting from the table. Otherwise the styles > > from the template will not become active. > > Thank you Regina for pointing what should have been my obvious first try, > before digging into the XML... > > Jambunathan, if you clear the table's direct formatting in both the before > and after ODTs, you'll end up with the same formatting. There is NO direct formatting in the second table ... There are really no style names attached to any of the table row entities -- table, col, row, or cell --- apart from the template name. ```xml <table:table table:name="Table1" table:template-name="BoxListRed"> <table:table-column table:number-columns-repeated="5"/> <table:table-row> <table:table-cell office:value-type="string"> <text:p text:style-name="P1"/> </table:table-cell> <table:table-cell office:value-type="string"> <text:p text:style-name="P1"/> </table:table-cell> <table:table-cell office:value-type="string"> <text:p text:style-name="P1"/> </table:table-cell> <table:table-cell office:value-type="string"> <text:p text:style-name="P1"/> </table:table-cell> <table:table-cell office:value-type="string"> <text:p text:style-name="P1"/> </table:table-cell> </table:table-row> <table:table-row> <table:table-cell office:value-type="string"> <text:p text:style-name="P2"/> </table:table-cell> <table:table-cell> <text:p text:style-name="P2"/> </table:table-cell> <table:table-cell> <text:p text:style-name="P2"/> </table:table-cell> <table:table-cell> <text:p text:style-name="P2"/> </table:table-cell> <table:table-cell> <text:p text:style-name="P2"/> </table:table-cell> </table:table-row> <table:table-row> <table:table-cell office:value-type="string"> <text:p text:style-name="P2"/> </table:table-cell> <table:table-cell> <text:p text:style-name="P2"/> </table:table-cell> <table:table-cell> <text:p text:style-name="P2"/> </table:table-cell> <table:table-cell> <text:p text:style-name="P2"/> </table:table-cell> <table:table-cell> <text:p text:style-name="P2"/> </table:table-cell> </table:table-row> <table:table-row> <table:table-cell office:value-type="string"> <text:p text:style-name="P2"/> </table:table-cell> <table:table-cell> <text:p text:style-name="P2"/> </table:table-cell> <table:table-cell> <text:p text:style-name="P2"/> </table:table-cell> <table:table-cell> <text:p text:style-name="P2"/> </table:table-cell> <table:table-cell> <text:p text:style-name="P2"/> </table:table-cell> </table:table-row> <table:table-row> <table:table-cell office:value-type="string"> <text:p text:style-name="P3"/> </table:table-cell> <table:table-cell> <text:p text:style-name="P3"/> </table:table-cell> <table:table-cell> <text:p text:style-name="P3"/> </table:table-cell> <table:table-cell> <text:p text:style-name="P3"/> </table:table-cell> <table:table-cell> <text:p text:style-name="P3"/> </table:table-cell> </table:table-row> </table:table> ``` Just to be sure, I nuked the paragraph styles with following regexp replacement text:style-name=".*?" → When I load the ODT file, I see plain vanilla table. I also opened the hand-modified ODT file in LO, did Table->Select->Table and did Format->Clear Direct Formatting. The table continues to remain vanilla ... > > Can you please check that your script also deals with (removing) direct > formatting, so your custom table style is actually visible? I think we have different notions of what "direct formatting" means. To me, if an element is LEAVES OUT the style name attribute, it has NO formatting whatsoever (including direct formatting / content.xml-specific automatic styles) May I know how you "removed direct formatting" from the ODT file I shared. > If there is a remaining issue, maybe better to start fresh with a new > report. So closing as "not a bug". May be there is no bug LO ... I think you can help me with clearing the bug in my understanding. Could you please share the recipe on how you hand-fixed the ODT xml. If you have a diff, I will be happy to take a look at it. -- You are receiving this mail because: You are the assignee for the bug.
