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

List:       koffice-devel
Subject:    Re: KoText odf loading (was On the road to 2.0)
From:       Thorsten Zachmann <t.zachmann () zagge ! de>
Date:       2009-02-05 6:15:30
Message-ID: 200902050715.30766.t.zachmann () zagge ! de
[Download RAW message or body]

Hello Pierre,

> > > - one thing I found odd is: the test document defines a masterstyle
> > > called
> > > standard in styles.xml. In content.xml, a paragraph style is declared
> > > with
> > > parent="standard". the loading mechanism however does not recognise the
> > > master style, I get a: "standard" style not found, using default style
> > > instead. I am not sure this is correct.
> >
> > Can you tell me a test file where this happens? I would like to have a
> > look at
> > that. Loading of parent styles does work so the problem should be
> > somewhere else.
>
> this is I think for all of them. I am not sure I was entirely clear. the
> "standard" style that is not found is defined in styles.xml as a
> "master-style"

Ok the problem lies in the odt file. It is broken.

In content.xml there is 

<style:style style:name="P1" style:family="paragraph" 
style:parent-style-name="Standard" style:list-style-name="L1"/>

however the only defined style with the name Standard in styles.xml is 

<style:master-page style:name="Standard" 
style:page-layout-name="PageLayout-1">

You get the error message as there is no <style:style> with the style:name 
Standard and with style:family paragraph. The parent style always has to have 
the same family as the style that refers to it. In this case it mean you need 
a 

<style:style style:name="Standard" style:family="paragraph" ...>  

inside the <office:styles> tag.

> > > - on an equivalent note, when a style is defined in content.xml (for
> > > example P1), the KoTextLoader::loadParagraph does not find it (style
> > > "P1" not found, using default instead). The same is true in loadSpan
> > > for the characterStyle.
> >
> > Also the styles in the content.xml should be found. Can you point to a
> > test doc that has the problem so I can have a look at it?
>
> I think it affects all of them, the one I am currently looking at is
> tests/data/textcontents/list/multilevellist

I don't have the problem you describt with style "P1" not found, using default 
instead in the above document. Can you please verify?

Have a nice day,

Thorsten
_______________________________________________
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