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

List:       koffice-devel
Subject:    Re: KoSavingContext
From:       Thorsten Zachmann <t.zachmann () zagge ! de>
Date:       2007-07-12 5:25:57
Message-ID: 200707120725.57819.t.zachmann () zagge ! de
[Download RAW message or body]

Hello Martin,

> Hi again,
> I now stumbled across the same phaenomenon with loading:
> for loadOdf I need:
> KoShapeLoadingContext
> which needs
> KoOasisLoadingContext
> which needs
> KoDocument, KoOasisStyles, KoStore
>
> This is simply too much, if I just want to open and load some MathML in a
> running KWord, I don't see why I need a KoStore, oasis style management and
> a whole document class.
> Could this case be please simplyfied, too ?

This is not a problem when you load a formula shape from kword as kword should 
offer all this as it is needed for the other shapes. I can however see that 
it is a problem if you just want to load/save from kformula. For this case I 
would propose additional load/save methods with only the parameters you need. 
In the loadOdf/saveOdf methods you would than call your methods.

e.g.:

bool loadOdf( const KoXmlElement & element, KoShapeLoadingContext &context )
{
	loadOdf( element );
}

loadOdf( const KoXmlElement & element )
{
	// do loading here
}

And something like this for the save method too.

Hope this helps,

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