Difference between revisions of "Style override"

From Apache OpenOffice Wiki
Jump to: navigation, search
 
 
Line 1: Line 1:
 +
{{Writer Project|Category=Writer Numbering}}
 
== Enhancement of <text:numbered-paragraph> and <text:list> with text:style-override attribute ==
 
== Enhancement of <text:numbered-paragraph> and <text:list> with text:style-override attribute ==
  

Latest revision as of 11:31, 15 March 2010

Writer Icon.png

Writer Project

Please view the guidelines
before contributing.

Popular Subcategories:

Extension:DynamicPageList (DPL), version 2.3.0 : Warning: No results.

Internal Documentation:

Extension:DynamicPageList (DPL), version 2.3.0 : Warning: No results.

API Documentation:

Ongoing Efforts:

Extension:DynamicPageList (DPL), version 2.3.0 : Warning: No results.

Sw.OpenOffice.org

Enhancement of <text:numbered-paragraph> and <text:list> with text:style-override attribute

Problem:

Currently <text:numbered-paragraph> and <text:list> plus <text:list-item> have the following attributes:

  • text:continue-numbering
  • text:level
  • text:start-value
  • text:style-name

We propose to add the attribute “text:style-override” to <text:numbered-paragraph> and <text:list>, which allows to override list styles.

Currently it is not possible to construct lists of the following form:

1. Text
1.1 A
1.2 B
1.c C
1.d D

where the whole lists uses the same counter domain, but different style. E.g. when you insert an item “I” after „B“, then yo get

1. Text
1.1 A
1.2 B
1.3 I
1.d C
1.e D

where „1.c“ and „1.d“ are automatically updated to „1.d“ and „1.e“, because of the same counter domain.

List of the above form would be expressible using the new attribute in the following way:

<text:numbered-paragraph text:style-name=“L1“ text:level=“1“>
<text:p>Text</text:p>
</text:numbered-paragraph>
<text:numbered-paragraph text:style-name=“L1“ text:level=“2“>
<text:p>A</text:p>
</text:numbered-paragraph>
<text:numbered-paragraph text:style-name=“L1“ text:level=“2“>
<text:p>B</text:p>
</text:numbered-paragraph>
<text:numbered-paragraph text:style-name=“L1“ text:style-override=“L2“ text:level=“2“>
<text:p>C</text:p>
</text:numbered-paragraph>
<text:numbered-paragraph text:style-name=“L1“ text:style-override=“L2“ text:level=“2“>
<text:p>D</text:p>
</text:numbered-paragraph>

with

<text:list-style style:name="L1">
   <text:list-level-style-number text:level="1" style:num-suffix="." style:num-format="1">
   ...
   </text:list-level-style-number>
   <text:list-level-style-number text:level="2" style:num-suffix="." style:num-format="1">
   ...
   </text:list-level-style-number>
...
  </text:list-style>
and
<text:list-style style:name="L2">
   <text:list-level-style-number text:level="2" style:num-suffix="." style:num-format="a">
   ...
   </text:list-level-style-number>
...
  </text:list-style>

Schema extension:

We propose to extend the schema in the following way:

<define name="text-list-attr" combine="interleave">
<optional>
<attribute name="text:style-override">
<ref name="ID"/>
</attribute>
</optional>
</define>

Description

The “text:style-override” attribute overrides the list style referenced by the “text:style-name” attribute.

Personal tools