[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:       Pierre Stirnweiss <pstirnweiss () googlemail ! com>
Date:       2009-02-04 7:57:02
Message-ID: af76e3dc0902032357o74c63a07ua96a3a22c875eb5d () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Wed, Feb 4, 2009 at 5:57 AM, Thorsten Zachmann <t.zachmann@zagge.de>wrote:

> Hello,
>
> > I am looking into the kotext/opendocument/tests/TestLoading problems.
> > They seem mostly related to formating problems. I am singeling out the
> > different tests and analysing one by one.
>
> So you got the binding build? Last time I tried this failed for me.


I am not sure to understand this one;)


>
> > - 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"

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


>
>
> > - then there is the question, if a style is defined in the file but do
> not
> > set all the "default" properties, it seem we do not set the missing ones.
> I
> > have to say that I might have overlooked something on that one, but so
> far
> > I have not seen a mechanism to do this.
>
> In ODF 1.2 there are some default values defined for some attributes.
> However
> I'm not sure we need default values for all attributes.


I didn't want to say all properties, but all the properties we decided to
set in KoStyleManager::defaultParagraphStyle (and I think also, the default
font/foreground we are setting would be better of in a
KoStyleManager::defaultCharacterStyle, rather than in KoTextShapeData, since
we also have a KoStyleManager::defaultListStyle).
The default values of ODF 1.2 seem good candidates for this. By the way, I
didn't seem to be able to find the 1.2 spec, all I have found is 1.1.


>
>
> > I'll work more on this normally, tomorrow (wednesday) evening.
>
> Good work.
>
> Thorsten



Pierre (not me) wrote:

About your question : what do you mean with "'default' properties" ? This
doesn't exist in OpenDocument, we just can't invent a default value where
there is none. The test case should just ignore these attributes. And then
there is a tricky part : how can you easily compare if there are too many
information missing, for instance if the font size is not specified and the
default font size is used... The default font size may (should ?) be
configurable, it means it'd be depending on user settings... so how can the
scripts handle that ?


And Pierre (me) answers:

by default properties, I mean the one we judge absolute minimal to work (see
above, ODF 1.2 values?). I agree, they should be configurable, but we should
also have a preset value, just in case the configuration has not been done.
Plus, making this configurable is a next step (there are actually a lot of
comments in the code saying, "we should really make this configurable",
"make this configurable when we make KoXMLElement read/write" and so on).
Then, yes it will be a bit tricky for the testcases.

I am not sure the test case should ignore the attributes (plus I am not sure
how the test case could make the difference). I think the test case should
set the same defaults (which is actually what is done, it just seems that
somewhere, the "foreground" property was added to
KoStyleManager::defaultParagStyle and not to the test case control doc
(testdoc.qs or common.qs).


Pierre



>
>
> _______________________________________________
> koffice-devel mailing list
> koffice-devel@kde.org
> https://mail.kde.org/mailman/listinfo/koffice-devel
>

[Attachment #5 (text/html)]

<br><br><div class="gmail_quote">On Wed, Feb 4, 2009 at 5:57 AM, Thorsten Zachmann \
<span dir="ltr">&lt;<a \
href="mailto:t.zachmann@zagge.de">t.zachmann@zagge.de</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, \
204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Hello,<br>
<div class="Ih2E3d"><br>
&gt; I am looking into the kotext/opendocument/tests/TestLoading problems.<br>
&gt; They seem mostly related to formating problems. I am singeling out the<br>
&gt; different tests and analysing one by one.<br>
<br>
</div>So you got the binding build? Last time I tried this failed for \
me.</blockquote><div>&nbsp;</div><div>I am not sure to understand this \
one;)<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid \
rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <br>
<div class="Ih2E3d"><br>
&gt; - one thing I found odd is: the test document defines a masterstyle called<br>
&gt; standard in styles.xml. In content.xml, a paragraph style is declared with<br>
&gt; parent=&quot;standard&quot;. the loading mechanism however does not recognise \
the<br> &gt; master style, I get a: &quot;standard&quot; style not found, using \
default style<br> &gt; instead. I am not sure this is correct.<br>
<br>
</div>Can you tell me a test file where this happens? I would like to have a look \
at<br> that. Loading of parent styles does work so the problem should be \
somewhere<br> else.</blockquote><div><br>this is I think for all of them. I am not \
sure I was entirely clear. the &quot;standard&quot; style that is not found is \
defined in styles.xml as a &quot;master-style&quot; <br></div><blockquote \
class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt \
0pt 0.8ex; padding-left: 1ex;"> <br>
<div class="Ih2E3d"><br>
&gt; - on an equivalent note, when a style is defined in content.xml (for<br>
&gt; example P1), the KoTextLoader::loadParagraph does not find it (style \
&quot;P1&quot;<br> &gt; not found, using default instead). The same is true in \
loadSpan for the<br> &gt; characterStyle.<br>
<br>
</div>Also the styles in the content.xml should be found. Can you point to a test<br>
doc that has the problem so I can have a look at it?</blockquote><div><br>I think it \
affects all of them, the one I am currently looking at is \
tests/data/textcontents/list/multilevellist<br>&nbsp;</div><blockquote \
class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt \
0pt 0.8ex; padding-left: 1ex;"> <br>
<div class="Ih2E3d"><br>
&gt; - then there is the question, if a style is defined in the file but do not<br>
&gt; set all the &quot;default&quot; properties, it seem we do not set the missing \
ones. I<br> &gt; have to say that I might have overlooked something on that one, but \
so far<br> &gt; I have not seen a mechanism to do this.<br>
<br>
</div>In ODF 1.2 there are some default values defined for some attributes. \
However<br> I&#39;m not sure we need default values for all \
attributes.</blockquote><div><br>I didn&#39;t want to say all properties, but all the \
properties we decided to set in KoStyleManager::defaultParagraphStyle (and I think \
also, the default font/foreground we are setting would be better of in a \
KoStyleManager::defaultCharacterStyle, rather than in KoTextShapeData, since we also \
have a KoStyleManager::defaultListStyle).<br> The default values of ODF 1.2 seem good \
candidates for this. By the way, I didn&#39;t seem to be able to find the 1.2 spec, \
all I have found is 1.1.<br>&nbsp;</div><blockquote class="gmail_quote" \
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; \
padding-left: 1ex;"> <br>
<div class="Ih2E3d"><br>
&gt; I&#39;ll work more on this normally, tomorrow (wednesday) evening.<br>
<br>
</div>Good work.<br>
<br>
Thorsten</blockquote><div><br><br>Pierre (not me) wrote:<br><br>About your question : \
what do you mean with &quot;&#39;default&#39; properties&quot; ? This<br> doesn&#39;t \
exist in OpenDocument, we just can&#39;t invent a default value where<br> there is \
none. The test case should just ignore these attributes. And then<br> there is a \
tricky part : how can you easily compare if there are too many<br> information \
missing, for instance if the font size is not specified and the<br> default font size \
is used... The default font size may (should ?) be<br> configurable, it means \
it&#39;d be depending on user settings... so how can the<br> scripts handle that \
?<br><br><br>And Pierre (me) answers:<br><br>by default properties, I mean the one we \
judge absolute minimal to work (see above, ODF 1.2 values?). I agree, they should be \
configurable, but we should also have a preset value, just in case the configuration \
has not been done. Plus, making this configurable is a next step (there are actually \
a lot of comments in the code saying, &quot;we should really make this \
configurable&quot;, &quot;make this configurable when we make KoXMLElement \
read/write&quot; and so on). Then, yes it will be a bit tricky for the testcases.<br> \
<br>I am not sure the test case should ignore the attributes (plus I am not sure how \
the test case could make the difference). I think the test case should set the same \
defaults (which is actually what is done, it just seems that somewhere, the \
&quot;foreground&quot; property was added to KoStyleManager::defaultParagStyle and \
not to the test case control doc (testdoc.qs or common.qs).<br> \
<br><br>Pierre<br><br>&nbsp;</div><blockquote class="gmail_quote" style="border-left: \
1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br> \
<br> _______________________________________________<br>
koffice-devel mailing list<br>
<a href="mailto:koffice-devel@kde.org">koffice-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/koffice-devel" \
target="_blank">https://mail.kde.org/mailman/listinfo/koffice-devel</a><br> \
</blockquote></div><br>



_______________________________________________
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