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: Re: [office] "User-defined character and paragraph styles" updated

On Monday 01 December 2008, Oliver-Rainer Wittmann - Software Engineer - Sun Microsystems wrote:
> Dear TC members,
> David Faure wrote:
> > Hello,
> > 
> > I updated
> > http://wiki.oasis-open.org/office/User-defined_character_and_paragraph_styles
> > (some time ago). What do I need to do for it to be discussed during a
> > phone call and voted upon?
> > 
> I have some comments/questions on this proposal.
> (1) Allowing a character style at paragraph styles will in my opinion 
> complicate the determination of a certain character property's value for 
> a certain paragraph.
> Currently we have one or more straight search paths, namely the 
> paragraph's paragraph style hierarchy.
> When we allow a character style at paragraph styles, these straight 
> search paths are no longer straight. At each paragraph style on the 
> paragraph style hierarchy the possible existing character style and its 
> style hierarchy has to be searched additionally.
> Illustration of the search paths for existing ODF:
> paragraph
>    |
>    |
> automatic paragraph style
>    |
>    |
> paragraph style
>    |
>    |
> parent paragraph style
>    |
>    |
> granparent paragraph style
>    |
>    |
> ...
> Illustration of the search paths when allowing a character style at a 
> paragraph style:
> paragraph
>    |
>    |
> automatic paragraph style -- character style -- char. style -- ...
>    |
>    |
> paragraph style -- character style -- parent char. style -- ...
>    |
>    |
> parent paragraph style -- character style -- parent char. style -- ...
>    |
>    |
> granparent paragraph style -- char. style -- parent char. style -- ...
>    |
>    |
> ...

Well, this is called recursivity ;-)  (or cutting a big problem into smaller ones).

Honestly I don't see the problem there. When looking at a paragraph style
instead of just looking at the paragraph-properties we would look at the
named character style (which includes its parents, that's usual).
Only for properties that are nowhere defined in the row
"paragraph style -- character style -- parent char. style -- ..."
would you go up to the parent paragraph style.

An example: I create a paragraph style "Heading 1" and I associate it to
the character style "Heading 1 characters", if that character style
or one of its parent char styles says "text is bold" then obviously we want
the text to be bold. If we don't say anything about the font family then
yes we'll look up in the parent paragraph style, this is standard behavior.

> (2) Question:
> At the moment the proposal does not state which property value is the 
> one which has to be applied, when e.g. the paragraph style of a 
> paragraph has a character style with a value for a certain character 
> property and the parent paragraph style has a value for the same 
> character property.
> Does the character style's value or the parent paragraph style's value 
> is applied?

See above, the character style's value has priority. It is part of the
definition of the paragraph style, conceptually. Where we looked at
paragraph-properties before we would now also look at the named
character style. All this happens before a possible fallback to the
parent paragraph style.

> (3) There exists already a solution for the use case which is mentioned 
> in the proposal. In this solution the properties "arial, 20, bold" have 
> only been specified once.
> The solution is to use property text:class-names.
> For the proposal's use case the user has to specify a paragraph style 
> "big" with character properties "arial, 20, bold". Then this paragraph 
> style can be used as the value for property text:class-names. Paragraph 
> style "big" will be applied after the paragraph's standard paragraph 
> style and its style hierarchy has been applied.
> Note: Depending on the answer to my question above this solution may be 
> different to the one allowing a character style at paragraph styles. But 
> I still think that the "text:class-names" solution is powerful enough to 
> fulfill the user's needs.

I completely disagree here. I think you're missing the starting point of the
use case, which is: "the user defines a character style named big".
That is a character style, not a paragraph style. We cannot change that part,
it's the user's action, for whom it makes sense to do that because he/she wants
to use that character style for runs of character too, elsewhere in the document.
The question is, how to use that character style in paragraph styles *as well*.

text:class-names is nice for entirely generated documents, but it certainly
doesn't map to the standard GUI of office suites, does it? (people apply one
paragraph style to a paragraph, not more than one).

David Faure, faure@kde.org, sponsored by Qt Software @ Nokia 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]