00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef KOOASISSTORE_H
00019 #define KOOASISSTORE_H
00020
00021 #include <KoXmlReader.h>
00022
00023 class QString;
00024 class QDomDocument;
00025 class KTemporaryFile;
00026 class KoXmlWriter;
00027 class KoStore;
00028 class KoStoreDevice;
00029 class QIODevice;
00030
00051 #include <koffice_export.h>
00052
00053 class KOFFICECORE_EXPORT KoOasisStore
00054 {
00055 public:
00057 KoOasisStore( KoStore* store );
00058
00059 ~KoOasisStore();
00060
00061 KoStore* store() const { return m_store; }
00062
00064 KoXmlWriter* contentWriter();
00065
00068 KoXmlWriter* bodyWriter();
00069
00073 bool closeContentWriter();
00074
00075
00076
00078 KoXmlWriter* manifestWriter( const char* mimeType );
00079
00081 bool closeManifestWriter();
00082
00084 bool loadAndParse( const QString& fileName, KoXmlDocument& doc, QString& errorMessage );
00085
00087 static QString mimeForPath( const KoXmlDocument& doc, const QString& fullPath );
00088
00089 private:
00090 KoStore* m_store;
00091 KoStoreDevice* m_storeDevice;
00092 KoXmlWriter* m_contentWriter;
00093 KoXmlWriter* m_bodyWriter;
00094 KoXmlWriter* m_manifestWriter;
00095 KTemporaryFile* m_contentTmpFile;
00096 };
00097
00098 #endif