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

List:       koffice-devel
Subject:    Re: Berlin Sprint Action List Update
From:       Thorsten Zachmann <t.zachmann () zagge ! de>
Date:       2007-11-09 5:53:47
Message-ID: 200711090653.47146.t.zachmann () zagge ! de
[Download RAW message or body]

On Friday 09 November 2007, Thorsten Zachmann wrote:
> On Thursday 08 November 2007, Thomas Zander wrote:
> > On Monday 05 November 2007 15:46:07 Boudewijn Rempt wrote:
> > > * all apps need the style manager, because now everyone crashes when a
> > > new style is added, except KWord. It is a document-wide resource, so
> > > KoCanvasResourceProvider is not the right place. Maybe KoDocument?
> >
> > There are two things;
> > a) it needs to be stored document wide
>
> I think that is the way we should take.
>
> > b) it needs to be added to each QTextDocument instance used (in a kotext
> > shape).
> >
> > Storing it in the KoDocument is not going to be a good idea as that means
> > it needs to link to libKoText. And it doesn't help anyway since the code
> > to add shapes is not there anyway so point (b) can't be fulfilled here.
> >
> > Now, we can add the code to have a KoStyleManager in each app and add the
> > code to the addShape of each app as well. But that means that app would
> > immediately link against libkotext.
>
> The addShape code is not called during loading of a document, neither is it
> used in copy and paste of pages in kopageapp applications for example. So
> addShape is never called and therefore it does not work.
>

I had a look at the code and I think we should put this kind of stuff into the 
shape creation.

How about creating a class "KoDocumentData" containing document specific data 
that is passed to the factory methods on shape creation? A virtual abstract 
method in KoCanvasBase could return that class so that is available in the 
KoCreateShapesTool and it would have to be passed to the KoShapeRegistry for 
shape creation.

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