kword
KWOasisSaver.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef KWOASISSAVER_H
00020 #define KWOASISSAVER_H
00021
00022 #include <qbuffer.h>
00023 #include <KoGenStyles.h>
00024 #include <KoOasisStore.h>
00025
00026 class KWDocument;
00027 class KoSavingContext;
00028 class KoXmlWriter;
00029 class KoTextParag;
00030 class KoStore;
00031 template <class T> class QValueList;
00032
00039 class KWOasisSaver
00040 {
00041 public:
00043 KWOasisSaver( KWDocument* doc );
00044 ~KWOasisSaver();
00045
00047 void saveParagraphs( const QValueList<const KoTextParag *>& paragraphs );
00048
00050 void saveParagraph( const KoTextParag* parag );
00051
00054 KoXmlWriter& bodyWriter() { return *m_oasisStore->bodyWriter(); }
00055 KoSavingContext& savingContext() { return *m_savingContext; }
00056
00059 bool finish();
00060
00062 QByteArray data() const;
00063
00065 static void writeAutomaticStyles( KoXmlWriter& contentWriter, KoGenStyles& mainStyles, bool stylesDotXml );
00066
00067 static const char* selectionMimeType();
00068
00069 private:
00070 QBuffer m_buffer;
00071 KoStore* m_store;
00072 KoOasisStore* m_oasisStore;
00073 KoGenStyles m_mainStyles;
00074 KoSavingContext* m_savingContext;
00075 KWDocument* m_doc;
00076 };
00077
00078 #endif
|