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

List:       koffice-devel
Subject:    Re: ODF Lists
From:       Pierre <pinaraf () pinaraf ! info>
Date:       2008-07-28 12:32:22
Message-ID: 200807281432.22519.pinaraf () pinaraf ! info
[Download RAW message or body]

On Monday 28 July 2008 14:21:20 Thomas Zander wrote:
> On Monday 28. July 2008 13:39:38 Pierre wrote:
> > > Is there a reason why this is in KoTextBlockData and not just a
> > > KoParagraphStyle property just like the rest?
> >
> > Because it's not bound to a style but to a text block.
>
> Maybe I'm reading too much into this sentence, but I'm reading this as
> formats are bound with styles somehow.
> This is not the case, though I can see where the confusion can come from.
>
> formats (QTextFormat and descendants) are part of the *document*, which
> indeed includes styling information.  But formats also hold info like
> rowspan and objectId (for referring to QTextObjects).
> But maybe keep the argument simple; QTextFormat objects are part of Qt, and
> Qt doesn't know about styles at all.
>
> KoTextBlockData is totally about layout information, which actually is
> added when rendering the document. Its meant as a storage of data to make
> repainting faster.
> The API for KoTextBlockData says;
>   This class is used to store properties for KoText layouting inside Qt
>   QTextBlock instances
>
> > I already discussed this endless times on IRC,
>
> Lets keep an open mind :)  Open source means taking advantage of peer
> review, after all.
Yes, but I'm quite tired of this discussion, sorry.
I already explained that I stored it there because when saving, we could 
duplicate styles if we use the TextFormats.
This attribute is not to be shared between several blocks, if we store it in a 
KoParagraphStyle, it could be "shared".
Example :
<text:p text:style-name="ParagStyle">Hello world, I'm a paragraph</text:p>
<text:h text:style-name="ParagStyle">Hello world, I'm a heading</text:p>
Since we use only the style name to distinguish the paragraph styles, we would 
have either the two blocks being headings,  either the two blocks being 
paragraphs.

_______________________________________________
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