[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: ODF Lists
From:       Roopesh Chander <roop () forwardbias ! in>
Date:       2008-07-28 10:59:00
Message-ID: 488DA3A4.6000001 () forwardbias ! in
[Download RAW message or body]

It looks like headings need not be part of a list at all. This is how 
simple headings are to be handled. They should only become part of a 
qtextlist (or a koliststyle) if they're enclosed within <list> tags.

This revelation :) was brought about with ODF1.1 section 14.1 'List 
style', which says:
"A paragraph style and styles of other families that may contain 
paragraph properties can have an associated list style. This applies to 
automatic and common styles.
The list style specified by the style:list-style-name attribute is only 
applied to headings and to paragraphs that are contained in a list, 
where the list does not specify a list style itself, and the list has no 
list style specification for any of its parents."

This implies that:
<text:h>Heading</text:h>
should not have any list style applied on it (it consequently will have 
no numbering), but
<text:list><text:list-item><text:h>Heading</text:h></text:list-item></text:list>
will be part of a qtextlist. The list style of this qtextlist will be 
derived as it's done for paragraphs (check if there's a list style 
specified on the <text:list> itself, or maybe it's parent list? Else the 
paragraph's list style. Barring all, look at default list style.)

However, ODF1.1 section 14.11 'Outline style' says (quoted earlier):
"The outline style is a list style that is applied to all headings 
within a text document where the heading's paragraph style does not 
define a list style to use itself."

In my understanding, this means that if there's an outline level 
specified, all headings not within a <text:list> (which would otherwise 
have been without a qtextlist), will have to be added to the qtextlist 
corresponding to the outline style's qtextlist (for the heading's 
outline level).

So my take aways from these two snips from the specs (which are 
completely different from what I was thinking of headings before) are:
   a) there can be headings which are associated with no list style - in 
kword terms, they need not be part of any qtextlist
   b) heading blocks should be part of a qtextlist if and only if
      either (b1) the heading is part of a <text:list>
          or (b2) the styles.xml specifies an outline-style
   c) user can change association of list styles to headings using the 
stylemanager ui in the same way as is done for paragraphs.

In fact, this implies that headers are really a lot like paragraphs (the 
only difference being they need to be included in the TOC) and not at 
all like lists.

When I tried OO.o, just making a text heading and saving it results in 
just the <text:h> tag, but when you add numbering to it (by modifying 
the Heading1 paragraph style' list style from empty to some numbering 
style), it is written out as a list.

I just wanted to make sure everyone else is in agreement to this 
understanding of the spec.

Regards,
roop.
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic