KoOasisStore.h
1/* This file is part of the KDE project
2 Copyright (C) 2005 David Faure <faure@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License version 2 as published by the Free Software Foundation.
7
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Library General Public License
14 along with this library; see the file COPYING.LIB. If not, write to
15 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 * Boston, MA 02110-1301, USA.
17*/
18#ifndef KOOASISSTORE_H
19#define KOOASISSTORE_H
20
21class TQString;
22class TQDomDocument;
23class KTempFile;
24class KoXmlWriter;
25class KoStore;
26class KoStoreDevice;
27class TQIODevice;
28
49#include <koffice_export.h>
50
51class KOFFICECORE_EXPORT KoOasisStore
52{
53public:
55 KoOasisStore( KoStore* store );
56
58
59 KoStore* store() const { return m_store; }
60
62 KoXmlWriter* contentWriter();
63
66 KoXmlWriter* bodyWriter();
67
71 bool closeContentWriter();
72
73 // For other files in the store, use open/addManifestEntry/KoStoreDevice/createOasisXmlWriter/close
74
76 KoXmlWriter* manifestWriter( const char* mimeType );
77
79 bool closeManifestWriter();
80
82 bool loadAndParse( const TQString& fileName, TQDomDocument& doc, TQString& errorMessage );
83
85 static TQString mimeForPath( const TQDomDocument& doc, const TQString& fullPath );
86
87private:
88 KoStore* m_store;
89 KoStoreDevice* m_storeDevice;
90 KoXmlWriter* m_contentWriter;
91 KoXmlWriter* m_bodyWriter;
92 KoXmlWriter* m_manifestWriter;
93 KTempFile* m_contentTmpFile;
94};
95
96#endif /* KOOASISSTORE_H */
Helper class around KoStore for writing out OASIS files.
This class implements a TQIODevice around KoStore, so that it can be used to create a TQDomDocument f...
Saves and loads KOffice documents using various backends.
Definition KoStore.h:40
A class for writing out XML (to any TQIODevice), with a special attention on performance.
Definition KoXmlWriter.h:37