[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice
Subject: Re: Loading and saving
From: David Faure <faure () kde ! org>
Date: 1999-11-17 20:49:26
[Download RAW message or body]
On Wed, Nov 17, 1999 at 10:37:27PM +0100, Michael Koch wrote:
> Hi all,
>
>
> Currently I try to implement loading and saving in KImage. Therefore I have
> several questions:
>
> What shall I use ? DOM (QDom and friends) or KOML ?
QDom and QXml, strongly recommended.
> I want to write 2 files packed in a tgz each time (like KWord) does it. But I
> can only write a XML-file. I dont know why.
Because you need to reimplement bool hasToWriteMultipart(); to say TRUE.
Use the koStore interface (creating a KTarStore), with tar:0 tar:1 as internal filenames
They will become part0.xml and part1.xml in the tar file, see docu :
// tar:/0 is saved as part0.xml
// tar:/0/1 is saved as part0/part1.xml
// tar:/0/1/pictures/picture0.png is saved as part0/part1/pictures/picture0.png
(this conversion exists for compatibility reasons)
> Which methods do I have to overload to implement this (Saving data as embedded
> part shall work too)
The protected methods of KOfficeDoc :
virtual bool saveChildren( KoStore* store, const char *path );
virtual bool loadChildren( KoStore* );
Generally, the docu says which methods to overload.
Feel free to ask if anything is unclear.
--
David FAURE
david@mandrakesoft.com, faure@kde.org
http://home.clara.net/faure/
KDE, Making The Future of Computing Available Today
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic