File indexing completed on 2024-05-12 04:43:22
0001 /* This file is part of the KDE project 0002 Copyright (C) 2010 by Adam Pigg (adam@piggz.co.uk) 0003 Copyright (C) 2011, 2012 by Dag Andersen (danders@get2net.dk) 0004 0005 This library is free software; you can redistribute it and/or 0006 modify it under the terms of the GNU Library General Public 0007 License as published by the Free Software Foundation; either 0008 version 2.1 of the License, or (at your option) any later version. 0009 0010 This library is distributed in the hope that it will be useful, 0011 but WITHOUT ANY WARRANTY; without even the implied warranty of 0012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0013 Library General Public License for more details. 0014 0015 You should have received a copy of the GNU Library General Public License 0016 along with this library; see the file COPYING.LIB. If not, write to 0017 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0018 Boston, MA 02110-1301, USA. 0019 */ 0020 0021 #ifndef KOODTFRAMEREPORTDOCUMENT_H 0022 #define KOODTFRAMEREPORTDOCUMENT_H 0023 0024 #include <QFile> 0025 #include <QMap> 0026 #include <QList> 0027 0028 #include "reportpageoptions.h" 0029 0030 class KoOdfWriteStore; 0031 class KoXmlWriter; 0032 class KoOdtFrameReportPrimitive; 0033 class KoGenStyles; 0034 0035 class OROSection; 0036 0037 class KoOdtFrameReportDocument 0038 { 0039 public: 0040 KoOdtFrameReportDocument(); 0041 ~KoOdtFrameReportDocument(); 0042 0043 void startTable(OROSection *section); 0044 void addPrimitive(KoOdtFrameReportPrimitive *data); 0045 void setPageOptions(const ReportPageOptions &pageOptions); 0046 QFile::FileError saveDocument(const QString&); 0047 0048 private: 0049 void createStyles(KoGenStyles *coll); 0050 bool createContent(KoOdfWriteStore* odfStore, KoGenStyles *coll); 0051 void createPages(KoXmlWriter* bodyWriter, KoGenStyles *coll); 0052 0053 KoXmlWriter* manifestWriter; 0054 ReportPageOptions m_pageOptions; 0055 0056 QMap<int, QList<KoOdtFrameReportPrimitive*> > m_pagemap; 0057 }; 0058 0059 #endif // KOODTFRAMESREPORTDOCUMENT_H