Hi Jörg,
I know why it happens and I was the programmer how implemented it.
The reason is a little bit complicated, but I will try to explain it:
The ODF 1.1 specification states:
"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 OOo Writer a paragraph becomes a heading, when it applies one of the
paragraph styles, which are assigned to the outline style (Menu Tools -
Outline Numbering). The paragraph styles, which are assigned to outline
style in OOo Writer have the outline style set as its list style. But in
ODF 1.1 the outline style can not be referenced as the other list
styles. Thus, these paragraph style have no style:list-style-name
attribute. But, if in OOo Writer one of the parent paragraph styles of
these paragraph styles have a list style set, these paragraph styles
would inherit this list style. This is not intented, because in this
case the heading would not apply the outline style as its list style.
But OOo Writer would interpret the ODF in a way, which does not conform
to the ODF specification. Thus, I included the stuff you have noticed in
order to better conform to ODF:
- Each paragraph style, which is assigned to the outline style in OOo
Writer gets the list style "outline" set as its list style. This list
style has the same attributes as the outline style. This list style is
stored into the ODF instead of the outline style.
- Each heading applies this list style as a normal list style. Thus, it
is included in a <text:list> element.
In ODF 1.2 the outline style gets a mandatory style:name attribute and
can know be referenced as a normal list style. I hope I can provide a
corresponding change to OOo 3.1 to simplify the stuff I have integrated
into OOo.
Best regards, Oliver.
Jörg von Frantzius wrote:
Hi Michael,
I just tried with OpenOffice 3.0.0.3.5, and it happens there as well.
Do you per chance have an idea as to why it happens at all?
Regards,
Jörg
Michael Brauer - Sun Germany - ham02 - Hamburg wrote:
Hi Jörg,
Did you also try if the same happens in OOo 3.0?
Best regards
Michael
On 11/14/08 01:58 PM, Jörg von Frantzius wrote:
Hi,
I'm using OpenOffice 2.4.0, Build 2.4.0.14 (openSUSE build
2.4.0.14-1.1-i586).
Regards,
Jörg
Michael Brauer - Sun Germany - ham02 - Hamburg wrote:
Hi,
which version of OpenOffice.org are you using?
Michael
On 11/12/08 03:40 PM, Jörg von Frantzius wrote:
Hi,
we have a large document that was originally converted from Word.
In the
contents.xml, the <text:h> are always wrapped like this:
<text:list text:style-name="Outline"
text:continue-numbering="true">
<text:list-item>
<text:list text:continue-numbering="true">
<text:list-item>
<text:list text:continue-numbering="true">
<text:list-item>
<text:h text:style-name="Heading_20_3"
text:outline-level="3"><text:bookmark
text:name="_Toc179693173"/><text:bookmark
text:name="_Toc125171365"/><text:bookmark
text:name="_Toc124251776"/>Sales region, countr
ies and tax rates</text:h>
</text:list-item>
</text:list>
</text:list-item>
</text:list>
</text:list-item>
</text:list>
From a simple example file that I created with OpenOffice, I can see
that the
<text:h> tags normally seem to be stored without being wrapped like
the above. Also, it seems that the "Outline" list-style exists only
for
documents converted from Word (see
http://www.openoffice.org/issues/show_bug.cgi?id=65787)
So I wrote an XSL that unwraps the text:h tags, and also I turned the
<text:list-style style:name="Outline"> in styles.xml into an
equivalent
<text:outline-style>.
The modified .odt file can be read succesfully by OpenOffice (and this
already solved some issues we had with chapter numbering). However,
after storing it again with OpenOffice, the <text:h> are wrapped
again,
and the "Outline" list-style turns up again in styles.xml.
This doesn't happen with my simple example file containing a few
headings on 3 levels (which doesn't originate from Word).
Can anybody explain when and why the "Outline" list-style is
enforced by
OpenOffice?
Thanks for any explanations,
Jörg
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]