[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [office-comment] covered-table-cell
On 12/17/2014 07:05 PM, Zorg wrote:
Thanks for your reply, I'm confused, shouldn't <t:covered-table-cell t:number-columns-repeated="2"/> from your first example be <t:covered-table-cell t:number-columns-repeated="1"/> or just <t:covered-table-cell/>? Because the previous cell only spans across 2 cols.. unless I'm misunderstanding something?
You are right, I mixed up the values for columns and rows in the first example. The numbers are correct in the second example.
A second attempt: <t:table-row> <t:table-cell t:number-rows-spanned="2" t:number-columns-spanned="3"/> <t:covered-table-cell t:number-columns-repeated="2"/> </t:table-row> <t:table-row> <t:covered-table-cell t:number-columns-repeated="3"/> </t:table-row>
Since I didn't (fully) support the number-rows-span attribute (only read/write it), I'll come back to the covered-table-cell question later (after I try adding full support for number-rows-span), if you don't mind?
Of course. That is fine.
On Wed, Dec 17, 2014 at 12:11 PM, Jos van den Oever <jos.van.den.oever@kogmbh.com> wrote:On 12/17/2014 04:44 AM, Zorg wrote:Hi, I'm writing a Qt library for .ods files, available at: https://github.com/f35f22fan/QOds Can you please explain why one needs a special type of cell (covered-table-cell) to designate the cells that are next to the spanned ones? I mean programmatically it's easy/possible to figure it out which cells are covered, hence apparently the office suit shouldn't need a hint for this.It is indeed possible to calculate the positions of cells by evaluating all the table:number-columns-spanned and table:number-rows-spanned attributes. Infering the empty positions is quite cheap to do for the table:number-columns-spanned attribute, but requires iterating through previous rows for the table:number-rows-spanned attribute. You can reduce the number of required table:covered-table-cell elements by using them like this: <t:table-row> <t:table-cell t:number-rows-spanned="3" t:number-columns-spanned="2"/> <t:covered-table-cell t:number-columns-repeated="2"/> </t:table-row> <t:table-row> <t:table-cell t:number-rows-spanned="3"/> <t:covered-table-cell t:number-columns-repeated="2"/> </t:table-row> The explanation in version 1.0 of the specification adds: "The <table:covered-table-cell> is especially used by spreadsheet applications, where it is a common use case that a covered cell contains content." Here is a real world example for row 1 and 2 in a spreadsheet: <table:table-row> <table:table-cell table:formula="of:=[.B1]" table:number-columns-spanned="3" table:number-rows-spanned="2"/> <table:covered-table-cell office:value-type="string"> <text:p>hello</text:p> </table:covered-table-cell> <table:covered-table-cell/> </table:table-row> <table:table-row> <table:covered-table-cell table:number-columns-repeated="3"/> </table:table-row> As you can see, the word 'hello' from hidden cell b1 is also shown in cell A1. Cheers, Jos -- This publicly archived list offers a means to provide input to the OASIS Open Document Format for Office Applications (OpenDocument) TC. In order to verify user consent to the Feedback License terms and to minimize spam in the list archive, subscription is required before posting. Subscribe: office-comment-subscribe@lists.oasis-open.org Unsubscribe: office-comment-unsubscribe@lists.oasis-open.org List help: office-comment-help@lists.oasis-open.org List archive: http://lists.oasis-open.org/archives/office-comment/ Feedback License: http://www.oasis-open.org/who/ipr/feedback_license.pdf List Guidelines: http://www.oasis-open.org/maillists/guidelines.php Committee: http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=office Join OASIS: http://www.oasis-open.org/join/
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]