File indexing completed on 2025-01-19 10:49:27

0001 /* This file is part of the KDE project
0002 
0003    SPDX-FileCopyrightText: 2013-2014 Inge Wallin <inge@lysator.liu.se>
0004 
0005    SPDX-License-Identifier: LGPL-2.0-or-later
0006 */
0007 
0008 #ifndef ODFCHARTREADERBACKEND_H
0009 #define ODFCHARTREADERBACKEND_H
0010 
0011 // Calligra
0012 #include <KoXmlStreamReader.h>
0013 #include <KoFilter.h>
0014 
0015 // this library
0016 #include "koodfreader_export.h"
0017 #include "OdfChartReader.h"
0018 #include "OdfReaderInternals.h"
0019 
0020 
0021 class QByteArray;
0022 class QSizeF;
0023 class QStringList;
0024 class KoStore;
0025 class OdfReaderContext;
0026 
0027 
0028 /** @brief A default backend for the OdfChartReader class.
0029  *
0030  * This class defines an interface and the default behaviour for the
0031  * backend to the ODF chart reader (@see OdfChartReader). When the
0032  * reader is called upon to traverse a certain XML tree, there will
0033  * be two parameters to the root traverse function: a pointer to a
0034  * backend object and a pointer to a context object.
0035  *
0036  * The reader will traverse (read) the XML tree and for every element
0037  * it comes across it will call a specific function in the backend and
0038  * every call will pass the pointer to the context object.
0039  *
0040  * Each supported XML tag has a corresponding callback function. This
0041  * callback function will be called twice: once when the tag is first
0042  * encountered anc once when the tag is closed.  This means that an
0043  * element with no child elements will be called twice in succession.
0044  */
0045 class KOODFREADER_EXPORT OdfChartReaderBackend
0046 {
0047  public:
0048     explicit OdfChartReaderBackend();
0049     virtual ~OdfChartReaderBackend();
0050 
0051     DECLARE_BACKEND_FUNCTION(OfficeChart);
0052     DECLARE_BACKEND_FUNCTION(ChartChart);           // ODF 1.2  11.1
0053 
0054     DECLARE_BACKEND_FUNCTION(ChartFooter);      // ODF 1.2  11.2.3
0055     DECLARE_BACKEND_FUNCTION(ChartSubtitle);        // ODF 1.2  11.2.2
0056     DECLARE_BACKEND_FUNCTION(ChartTitle);       // ODF 1.2  11.2.1
0057     DECLARE_BACKEND_FUNCTION(ChartLegend);      // ODF 1.2  11.3
0058     DECLARE_BACKEND_FUNCTION(ChartPlotArea);        // ODF 1.2  11.4
0059     DECLARE_BACKEND_FUNCTION(ChartWall);        // ODF 1.2  11.6
0060     DECLARE_BACKEND_FUNCTION(ChartFloor);           // ODF 1.2  11.7
0061     DECLARE_BACKEND_FUNCTION(ChartAxis);            // ODF 1.2  11.8
0062     DECLARE_BACKEND_FUNCTION(ChartCategories);      // ODF 1.2  11.9
0063     DECLARE_BACKEND_FUNCTION(ChartGrid);        // ODF 1.2  11.10
0064     DECLARE_BACKEND_FUNCTION(ChartSeries);      // ODF 1.2  11.11
0065     DECLARE_BACKEND_FUNCTION(ChartDomain);      // ODF 1.2  11.12
0066     DECLARE_BACKEND_FUNCTION(ChartDataPoint);       // ODF 1.2  11.13
0067     DECLARE_BACKEND_FUNCTION(ChartDataLabel);       // ODF 1.2  11.14
0068     DECLARE_BACKEND_FUNCTION(ChartMeanValue);       // ODF 1.2  11.15
0069     DECLARE_BACKEND_FUNCTION(ChartErrorIndicator);  // ODF 1.2  11.16
0070     DECLARE_BACKEND_FUNCTION(ChartRegressionCurve); // ODF 1.2  11.17
0071     DECLARE_BACKEND_FUNCTION(ChartEquation);        // ODF 1.2  11.18
0072     DECLARE_BACKEND_FUNCTION(ChartStockGainMarker); // ODF 1.2  11.19
0073     DECLARE_BACKEND_FUNCTION(ChartStockLossMarker); // ODF 1.2  11.20
0074     DECLARE_BACKEND_FUNCTION(ChartStockRangeLine);  // ODF 1.2  11.21
0075 
0076  private:
0077     class Private;
0078     Private * const d;
0079 };
0080 
0081 
0082 #endif // ODFCHARTREADERBACKEND_H