[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [office] table:style-name vs table:default-cell-style-name
Hi, On Thursday, 2009-07-02 14:11:49 -0600, Andreas J. Guelzow wrote: > On Thu, 2009-07-02 at 15:11 -0400, Patrick Durusau wrote: > > Andreas J. Guelzow wrote: > > > A table:table-row can have both or any of the attributes > > > table:style-name and table:default-cell-style-name > > > They both seem to set the style of a table-cell in that row that doesn't > > > have its own style. > > > > > > > > Is this in response to my note on Office-1566, > > table:default-cell-style-name? > > It was inspired by it. > > > > > The reason I ask is that the amended text that I have applied reads: > > > > "Cells contained in a row without a table:style-name attribute value and > > that are defined by a <table:table:cell> element use this default cell > > style." This is misleading, and was already in ODF 1.1; this was not meant as cells contained in "a row without table:style-name", but as cells in a row that (the cells) do not have a table:style-name attribute. I'll add a comment to Office-1566 with a hopefully better wording. > By the way , I assume you applied: ...<table:table-cell>... > > > > > This attribute is relevant if and only if the row is missing a > > table:style-name attribute. That's wrong. > > In that case the table:default-cell-style-name attribute supplies the > > name of the style to be applied. > > > > If there is a table:style-name attribute with a value on the row, then > > even if there were a table:default-cell-style-name attribute with a > > value, it is ignored. Wrong also. table:default-cell-style-name takes precedence. Btw, in 17.728.15 <table:table-row> the draft says: | The table:style-name attribute specifies a <style:style> element of type | table-row. The draft doesn't explicitly state that The table:default-cell-style-name attribute specifies a <style:style> element of type table-cell. I think it should. Note that OOoCalc does not write cell style information to the table-row style, just attribution that is applicable to entire rows, such as row height. However, other implementations may do, which already caused confusion in the past. As the table:default-cell-style-name cell attributes take precedence over those in table:style-name, the correct order would be style given in table:table-cell style given as table:default-cell-style-name attribute of table:table-row style given as table:style-name attribute of table:table-row style given as table:default-cell-style-name attribute of table:table-column style given as default-style for table cells. > So I wonder about 2 things: > Why are there 2 attributes for table:table-row that do essentially the > same thing. I hope this is clarified? > Why are we jumping over the table level, ie. do not have > table:style-name or table:default-cell-style-name attributes for > table:table. It isn't really needed. In fact, having the default styles at the columns (and/or rows) is an optimization to not have to write and read a style information for each cell in case an entire column is formatted identically. We could define that for the table level as well, but it wouldn't save much, maybe a few columns' attributes. Eike -- OpenOffice.org / StarOffice Calc core developer and i18n transpositionizer. SunSign 0x87F8D412 : 2F58 5236 DB02 F335 8304 7D6C 65C9 F9B5 87F8 D412 OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]