OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

office message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Proposal for table templates

The idea here is to define "table templates". This is a set
of settings (frame borders, background color, and text properties)
that can be applied to a table when creating it (see attached screenshot).

That's not really a "style" since we don't really want existing
tables to point to a style defined that way (but to have one style
per actual cell instead).
If someone wants to change existing tables afterwards, he'll have
to change the cell styles (either the style properties or which
style is used in which cell). This is really only for new tables,
which also means it has little impact in cross-application
document exchange. However it's something that we need to store in
the files (and templates) nonetheless (*).

First, this relies on styles for table cells, defining the
 - the frame style ( borders, and background color )
 - the paragraph and text properties.

* Then we can define a "table template". Current model would look like:
   <table:first-row table:style-name="graystyle" table:topleftcorner="yes" table:toprightcorner="yes"/>
   <table:first-col table:style-name="lightgray" table:topleftcorner="no" table:bottomleftcorner="yes"/>
   <table:body      table:style-name="default"/>

(with similar tags for last-row and last-col)

Slightly redundant model: first-row and first-col could both claim
the topleftcorner.

<table:table-template table:topleftcorner="top" table:toprightcorner="top" table:bottomleftcorner="left">
   <table:first-row table:style-name="graystyle"/>
   <table:first-col table:style-name="lightgray"/>
   <table:body      table:style-name="default"/>

topleftcorner be either "top" (which means it belongs to first-row)
or "left" (which means it belongs to first-col).
bottomleftcorner can be either "bottom" or "left", etc.
bottomrightcorner doesn't need to be specified in this example
since there's no specific settings for last-row or for last-col.

How does the OO model deal with corners? In the example at the end of 4.7,
if the "Col1" style defined a red background color, it's not clear to me
whether the top-left corner is going to be red, or blue (since the first
row is defined to be blue).

(*) a more general question. If an application adds its own stuff to the
XML - as could be a solution for the above issue - other apps should happily
ignore that. Currently, by simply adding an attribute when saving to the OOo format,
OOo refused to load the file (because it validated the file against a DTD...). Only
removing the office:version attribute fixed it - see 
 http://lists.kde.org/?l=koffice-devel&m=106201904703783&w=2 for details.
Hmm, I guess this is the wrong list for this, if it's just a OOo bug.

Anyway. I'm fine if the answer to this proposal is "this is too 
application-specific, and not needed to model actual document contents".
But I think it raises an interesting question about corner cells, which needs
to be solved anyway.

David FAURE, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]