Style override

From Apache OpenOffice Wiki
Jump to: navigation, search

Writer Icon.png

Writer Project

Please view the guidelines
before contributing.

Popular Subcategories: The DPL extension (version 2.3.0) produced a SQL statement which lead to a Database error.
The reason may be an internal error of DPL or an error which you made,
especially when using DPL options like titleregexp.
Query text is:
SELECT DISTINCT `page`.page_namespace AS page_namespace,`page`.page_title AS page_title,`page`.page_id AS page_id, rev_user, rev_user_text, rev_comment, rev_timestamp FROM `revision` AS rev, `page` WHERE 1=1 AND `page`.page_namespace IN (14) AND `page`.page_is_redirect=0 AND `page`.page_id=rev.rev_page AND rev.rev_timestamp=( SELECT MAX(rev_aux.rev_timestamp) FROM `revision` AS rev_aux WHERE rev_aux.rev_page=rev.rev_page ) ORDER BY rev_timestamp DESC LIMIT 5 OFFSET 0

Error message is:
Unknown column 'rev_user' in 'field list' (127.0.0.1)


Internal Documentation: The DPL extension (version 2.3.0) produced a SQL statement which lead to a Database error.
The reason may be an internal error of DPL or an error which you made,
especially when using DPL options like titleregexp.
Query text is:
SELECT DISTINCT `page`.page_namespace AS page_namespace,`page`.page_title AS page_title,`page`.page_id AS page_id, rev_user, rev_user_text, rev_comment, rev_timestamp FROM `revision` AS rev, `page` WHERE 1=1 AND `page`.page_namespace IN (0) AND `page`.page_is_redirect=0 AND `page`.page_id=rev.rev_page AND rev.rev_timestamp=( SELECT MAX(rev_aux.rev_timestamp) FROM `revision` AS rev_aux WHERE rev_aux.rev_page=rev.rev_page ) ORDER BY rev_timestamp DESC LIMIT 5 OFFSET 0

Error message is:
Unknown column 'rev_user' in 'field list' (127.0.0.1)


API Documentation:

Ongoing Efforts: The DPL extension (version 2.3.0) produced a SQL statement which lead to a Database error.
The reason may be an internal error of DPL or an error which you made,
especially when using DPL options like titleregexp.
Query text is:
SELECT DISTINCT `page`.page_namespace AS page_namespace,`page`.page_title AS page_title,`page`.page_id AS page_id, rev_user, rev_user_text, rev_comment, rev_timestamp FROM `revision` AS rev, `page` WHERE 1=1 AND `page`.page_namespace IN (0) AND `page`.page_is_redirect=0 AND `page`.page_id=rev.rev_page AND rev.rev_timestamp=( SELECT MAX(rev_aux.rev_timestamp) FROM `revision` AS rev_aux WHERE rev_aux.rev_page=rev.rev_page ) ORDER BY rev_timestamp DESC LIMIT 5 OFFSET 0

Error message is:
Unknown column 'rev_user' in 'field list' (127.0.0.1)


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