From koffice-devel Thu Jul 12 05:25:57 2007 From: Thorsten Zachmann Date: Thu, 12 Jul 2007 05:25:57 +0000 To: koffice-devel Subject: Re: KoSavingContext Message-Id: <200707120725.57819.t.zachmann () zagge ! de> X-MARC-Message: https://marc.info/?l=koffice-devel&m=118421802417937 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