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] proposal for new position and space attributesfor the list level


Dear TC members;

wrt. Oliver's proposal I would like to suggest a different solution, which will provide more interoperability with other standards --- I guess :-):

Enhancements to the spec:
a) add a text:min-label-width-suffix attribute to the style-list-level-properties-attlist.
b) add a <style:paragraph-properties> child element to <text:list-level-style-number> and < text:list-level-style-bullet>.
c) add a text:paragraph-style-name attribute to the text-list-level-style-number-attr.

A detailed discussion can be found at “http://wiki.services.openoffice.org/wiki/Number_layout”.

Please note that the most important enhancement is the text:min-label-width-suffix attribute, which when set will switch to a new numbering mode.
The enhancements b) and c) are needed to store paragraph formatting properties on which the new numbering mode relies. This is the biggest diff to Olivers proposal which introduces the new paragraph propertiy-like attributes text:list-tab-stop-position and fo:margin-left.


~Florian



>>> Oliver-Rainer Wittmann - Software Engineer - Sun Microsystems <Oliver-Rainer.Wittmann@Sun.COM> 01/26/07 1:27 PM >>>
Dear TC members,

this is a proposal for new attributes for the list-level style (element 
<style:list-level-properties>) to provide an new possibility to specify 
the position und spacing of the list label and the list item itself:

The new attributes for the list level style are:
- text:label-followed-by
- text:list-tab-stop-position
- text:label-aligned-at
- fo:margin-left
These new attributes plus the existing attribute fo:text-align give the 
possibility to specify the position and spacing of the list label and 
the list item in a new way, which could be called position and spacing 
via label alignment.
The existing attributes text:space-before, text:min-label-width and 
text:min-label-distance plus fo:text-align defines somehow the position 
and spacing via label size and position.

The new attributes are grouped together in a new element, named
style:list-level-label-alignment. This element has to contain the
attribute text:label-followed-by. Attributes
text:list-tab-stop-position, text:label-aligned-at and fo:margin-left
are optional. if any of these attributes are missing, its values is
assumed to be 0.

In order to decide, which group of attributes are used to define the
position and spacing of the list label and the list item the new
attribute text:list-level-position-and-space-mode is introduced.

- text:list-level-position-and-space-mode:
<define name="style-list-level-properties-attlist" combine="interleave">
	<optional>
               <attribute name="text:list-level-position-and-space-mode">
			<choice>
				<value>label-width-and-position</value>
				<value>label-alignment</value>
			</choice>
	      </attribute>
	</optional>
</define>

Meaning of these values:
- label-width-and-position:
The existing attributes text:space-before, text:minimum-label-width,
text:minimum-label-distance and fo:text-align are used to define the
position and spacing of the list label and the list item.

- label-alignment:
The new attributes and fo:text-align are used to define the position and
spacing of the list label and the list item. The values of the existing
attributes for text:space-before, text:minimum-label-width and
text:minimum-label-distance are treated as 0.

If attribute text:list-level-position-and-space-mode is missing, which
is hold for documents conforming previous ODF versions, its value is
assumed to be label-width-and-position.


- text:label-followed-by:
<define name="style-list-level-label-alignment-attlist"
combine="interleave">
	<attribute name="text:label-followed-by">
		<choice>
			<value>listtab</value>
			<value>space</value>
			<value>nothing</value>
		</choice>
	</attribute>
</define>

Meaning of the values of attribute text:label-followed-by:
- listtab - a tab stop follows the list label before the text starts.
- space - a space character is inserted after the list label before
the text starts.
- nothing - the text starts directly after the list label.


- text:list-tab-stop-position:
<define name="style-list-level-label-alignment-attlist"
combine="interleave">
	<optional>
		<attribute name="text:list-tab-stop-position">
			<ref name="nonNegativeLength"/>
		</attribute>
	</optional>
</define>

Attribute text:list-tab-stop-position is only relevant, if attribute
text:label-followed-by is defined and its value equals "listtab". In all
other cases, attribute text:list-tab-stop-position isn't evaluated.
Attribute text:list-tab-stop-position specifies an additional tab stop,
which is inserted into the list item. Typically, this tab stop is the
one, which is applied after the list label. Thus, the text of the
first line of list item typically starts at this tab stop. In
left-to-right layout environments this tab stop is interpreted as a
left tab. While in right-to-left layout environments its interpreted
as a right tab.
There exists two cases in which this additional tab stop isn't applied
to start the text of the first line of the list item after the list label:
- The position of the additional tab stop is before the end of the
list label.
- Between the end of the list label and the position of the additional
tab stop exists already a tab stop at the list item.
In these cases an existing respectively a default tab stop is applied
after the list label. The additional tab stop can be applied by normal
inserted tab characters in the list item in these cases.
The additional tab stop can also been applied in the text lines, which
follow the first line of the list item.


- text:label-aligned-at
<define name="style-list-level-label-alignment-attlist"
combine="interleave">
	<optional>
		<attribute name="text:label-align-at">
			<ref name="Length"/>
		</attribute>
	</optional>
</define>

The new attribute text:label-aligned-at specifies the alignment position
for the list label. The list label is aligned at this position, because
value of text:minimum-label-width is treated as 0:
- fo:text-align = "left": The list label starts at the alignment position.
- fo:text-align = "center": The center of the list label is positioned
at the alignment position.
- fo:text-align = "right": The list label ends at the alignment position.


- fo:margin-left
<define name="style-list-level-label-alignment-attlist"
combine="interleave">
	<optional>
		<attribute name="fo:margin-left">
			<ref name="Length"/>
		</attribute>
	</optional>
</define>

The new attribute fo:margin-left is only relevant, if attribute
text:label-followed-by is defined. It specifies the indent of the text
lines of the list item following the first line.


The new attributes text:label-aligned-at and fo:margin-left for a list
level style are competing with the paragraph indent attributes
fo:text-indent and fo:margin-left. The same is hold for the
corresponding paragraph indent attributes for a paragraph style.
These paragraph indent attributes are used to calculate the indent of
first line of the paragraph and the indent of the following lines:
- first line indent = fo:text-indent + fo:margin-left
- following lines indent = fo:margin-left

In the following is described how this competition is solved.

- List style with list level style directly applied to a paragraph via
an automatic paragraph style:
If neither paragraph indent attribute fo:text-indent nor paragraph
indent attribute fo:margin-left are defined, the new list level style
attributes text:label-aligned-at and fo:margin-left are used in order
to determine the indentation of the paragraph.
If one of the paragraph indent attributes are defined - the value of
the missing one is assumed to be 0 -, the given values of list level
style attributes text:label-aligned-at and fo:margin-left are ignored.
For the alignment position for the list label the first line indent is
used. For the indent of the following lines of the list item the
paragraph following line indent is used.

- List style with list level style applied to a paragraph via an
attribute of a paragraph style:
The new attributes label-aligned-at and indent-at of a certain list
level of a list style are used as indent attributes for a paragraph,
which have such a paragraph style applied, if neither the automatic
paragraph style nor the paragraph style provides own indent attributes (
fo:text-indent and fo:margin-left). If indent attributes are given at
the automatic paragraph style or the paragraph style, these attributes
are used to determine the alignment position and the indent for the text
lines following the first line.


Regards, Oliver.




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