Warning, file /office/calligra/libs/text/KoTextOdfSaveHelper.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /* This file is part of the KDE project
0002  * Copyright (C) 2008 Thorsten Zachmann <zachmann@kde.org>
0003  *
0004  * This library is free software; you can redistribute it and/or
0005  * modify it under the terms of the GNU Library General Public
0006  * License as published by the Free Software Foundation; either
0007  * version 2 of the License, or (at your option) any later version.
0008  *
0009  * This library is distributed in the hope that it will be useful,
0010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0012  * Library General Public License for more details.
0013  *
0014  * You should have received a copy of the GNU Library General Public License
0015  * along with this library; see the file COPYING.LIB.  If not, write to
0016  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0017  * Boston, MA 02110-1301, USA.
0018  */
0019 
0020 #ifndef KOTEXTODFSAVEHELPER_H
0021 #define KOTEXTODFSAVEHELPER_H
0022 
0023 #include <KoDragOdfSaveHelper.h>
0024 #ifdef SHOULD_BUILD_RDF
0025 #include <Soprano/Soprano>
0026 #include <QSharedPointer>
0027 #endif
0028 #include "kotext_export.h"
0029 
0030 class QTextDocument;
0031 class KoStyleManager;
0032 
0033 class KOTEXT_EXPORT KoTextOdfSaveHelper : public KoDragOdfSaveHelper
0034 {
0035 public:
0036     KoTextOdfSaveHelper(const QTextDocument *document, int from, int to);
0037     ~KoTextOdfSaveHelper() override;
0038 
0039     /// reimplemented
0040     bool writeBody() override;
0041 
0042     KoShapeSavingContext *context(KoXmlWriter *bodyWriter, KoGenStyles &mainStyles, KoEmbeddedDocumentSaver &embeddedSaver) override;
0043 
0044 #ifdef SHOULD_BUILD_RDF
0045     /**
0046      * The Rdf Model ownership is not taken, you must still delete it,
0047      * and you need to ensure that it lives longer than this object
0048      * unless you reset the model to 0.
0049      */
0050     void setRdfModel(QSharedPointer<Soprano::Model> m);
0051     QSharedPointer<Soprano::Model> rdfModel() const;
0052 #endif
0053 
0054     KoStyleManager *styleManager() const;
0055 private:
0056     struct Private;
0057     Private * const d;
0058 };
0059 
0060 #endif /* KOTEXTODFSAVEHELPER_H */