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

List:       koffice-devel
Subject:    Re: koffice/libs/kotext
From:       Pierre Stirnweiss <pstirnweiss () googlemail ! com>
Date:       2009-02-27 13:31:18
Message-ID: af76e3dc0902270531j1ff693degd2348b3182956c68 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Fri, Feb 27, 2009 at 2:05 PM, Thorsten Zachmann <t.zachmann@zagge.de>wrote:

> On Friday 27 February 2009, Pierre Stirnweiss wrote:
> > On Fri, Feb 27, 2009 at 7:14 AM, Thorsten Zachmann
> <t.zachmann@zagge.de>wrote:
>
>
> Is that possible at the moment to define a parent style in the ui
> somewhere?


I removed it from the ui 2 month ago because it didn't work
(setVisible=false).


>
> You are right if Basic Highlight is inherited from Basic it should inherit
> the font from Basic. If that does not work at the moment this should be
> fixed. The fix would be when applying an inherited style that all
> properties
> (also the one from the parent styles) are be applied. If a style that has
> no
> inheritance only the properties the style has are applied.


Provided the default properties are considered part of the inheritance, I
agree. But then also, say we do not apply a foreground color and relying on
Qt to say if no foreground color then use black is a bit contradictory. Once
again, I am speaking the very basic properties: font, size color.


>
> >
> > This means that inheriting from the previous span is *not* foreseen in
> the
> > spec.
>
> I had a discussion with David Faure about this and we both agree that
>
> <span style="italic">italic <span style="bold">bold</span></span> means
> that
> the text "bold" will be italic and bold.
>
> Well, if we decide that this is Koffice desired behaviour then fine by me.
I am not sure it is following the odf spec, since nowhere in the spec is
mentioned that the span takes style properties from the previous span.


>
>
> > As far as the: what problem are you trying to solve there, they are
> > actually two-fold:
> > - first, currently if we create a new style in the styleManager, it will
> > not inherit the defaultstyles.xml properties. there is a risk our default
> > values are not set. Which means that this new style will rely on Qt
> default
> > (which can be set system wide and can be different from ours), whereas
> the
> > loaded styles are relying on defaultstyles.xml defaults.
>
> That should be fixed by either copying all data into the style when it is
> generated or by fixing inheritance.


fixing inheritance is for me the most logical and cleaner solution. That is
maybe post 2.0 stuff. I we want it fixed before, I'll gladly do it.

>
>
> > - second, should something (script or external apps) use kotext/textshape
> > with a created QTextDoc, and styles, without using the whole odf loading
> > mechanism (and as far as I can see, this includes our loadXML mechanism
> for
> > loading 1.6 docs), then the defaultstyles.xml are not available (even if
> > the file is actually there). Plus, do we really want to force let's say
> > Krita to load always, default text styles just in case they might include
> a
> > textshape layer?, what about default properties of KSpread,....
>
> for krita it would not be needed. For KSpread it would be needed once it
> uses
> kotext.


since we advertise that you can have a textshape layer in Krita, and making
it a differenciation point over other graphical apps, I'd say that the
question is still valid, also for krita.

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 Fri, Feb 27, 2009 at 2:05 PM, 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;"> <div><div></div><div \
class="Wj3C7c">On Friday 27 February 2009, Pierre Stirnweiss wrote:<br> &gt; On Fri, \
Feb 27, 2009 at 7:14 AM, Thorsten Zachmann<br> &lt;<a \
href="mailto:t.zachmann@zagge.de">t.zachmann@zagge.de</a>&gt;wrote:<br> <br>
<br>
</div></div>Is that possible at the moment to define a parent style in the ui \
somewhere?</blockquote><div><br>I removed it from the ui 2 month ago because it \
didn&#39;t work (setVisible=false).<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>
You are right if Basic Highlight is inherited from Basic it should inherit<br>
the font from Basic. If that does not work at the moment this should be<br>
fixed. The fix would be when applying an inherited style that all properties<br>
(also the one from the parent styles) are be applied. If a style that has no<br>
inheritance only the properties the style has are \
applied.</blockquote><div><br>Provided the default properties are considered part of \
the inheritance, I agree. But then also, say we do not apply a foreground color and \
relying on Qt to say if no foreground color then use black is a bit contradictory. \
Once again, I am speaking the very basic properties: font, size color.<br>  \
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, \
204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div class="Wj3C7c"><br> \
&gt;<br> &gt; This means that inheriting from the previous span is *not* foreseen in \
the<br> &gt; spec.<br>
<br>
</div></div>I had a discussion with David Faure about this and we both agree that<br>
<br>
&lt;span style=&quot;italic&quot;&gt;italic &lt;span \
style=&quot;bold&quot;&gt;bold&lt;/span&gt;&lt;/span&gt; means that<br> the text \
&quot;bold&quot; will be italic and bold.<br> <br>
<div class="Ih2E3d"></div></blockquote><div>Well, if we decide that this is Koffice \
desired behaviour then fine by me. I am not sure it is following the odf spec, since \
nowhere in the spec is mentioned that the span takes style properties from the \
previous span.<br> </div><div> </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; As far as the: what problem are you trying to solve there, they are<br>
&gt; actually two-fold:<br>
&gt; - first, currently if we create a new style in the styleManager, it will<br>
&gt; not inherit the defaultstyles.xml properties. there is a risk our default<br>
&gt; values are not set. Which means that this new style will rely on Qt default<br>
&gt; (which can be set system wide and can be different from ours), whereas the<br>
&gt; loaded styles are relying on defaultstyles.xml defaults.<br>
<br>
</div>That should be fixed by either copying all data into the style when it is<br>
generated or by fixing inheritance.</blockquote><div><br>fixing inheritance is for me \
the most logical and cleaner solution. That is maybe post 2.0 stuff. I we want it \
fixed before, I&#39;ll gladly do it. <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; - second, should something (script or external apps) use kotext/textshape<br>
&gt; with a created QTextDoc, and styles, without using the whole odf loading<br>
&gt; mechanism (and as far as I can see, this includes our loadXML mechanism for<br>
&gt; loading 1.6 docs), then the defaultstyles.xml are not available (even if<br>
&gt; the file is actually there). Plus, do we really want to force let&#39;s say<br>
&gt; Krita to load always, default text styles just in case they might include a<br>
&gt; textshape layer?, what about default properties of KSpread,....<br>
<br>
</div>for krita it would not be needed. For KSpread it would be needed once it \
uses<br> kotext.</blockquote><div class="Wj3C7c"><br>since we advertise that you can \
have a textshape layer in Krita, and making it a differenciation point over other \
graphical apps, I&#39;d say that the question is still valid, also for krita. <br> \
<br>Pierre<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> \
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, \
204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"></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