File indexing completed on 2025-01-19 10:49:28
0001 /* This file is part of the KDE project 0002 0003 SPDX-FileCopyrightText: 2012-2014 Inge Wallin <inge@lysator.liu.se> 0004 0005 SPDX-License-Identifier: LGPL-2.0-or-later 0006 */ 0007 0008 #ifndef ODSREADER_H 0009 #define ODSREADER_H 0010 0011 // Qt 0012 #include <QHash> 0013 #include <QString> 0014 0015 // Calligra 0016 #include <KoXmlStreamReader.h> 0017 0018 // this library 0019 #include "koodfreader_export.h" 0020 #include "OdfReader.h" 0021 #include "OdfReaderInternals.h" 0022 0023 0024 class QSizeF; 0025 0026 class KoXmlWriter; 0027 class KoStore; 0028 0029 class OdsReaderBackend; 0030 class OdfReaderContext; 0031 0032 class OdfTextReader; 0033 0034 0035 /** @brief Read the XML tree of the content of an ODS file. 0036 * 0037 * The OdsReader is used to traverse (read) the contents of an ODS 0038 * file using an XML stream reader. For every XML element that the 0039 * reading process comes across it will call a specific function in a 0040 * backend class: @see OdsReaderBackend. 0041 * 0042 * Before the reading process is started the ODS file will be 0043 * analyzed to collect some data that may be needed during the 0044 * read: metadata, manifest and styles are examples of this. This 0045 * data is stored in the so called reading context, which is kept in 0046 * an instance of the OdfReaderContext class. 0047 * 0048 * The context will be passed around to the backend in every call to a 0049 * backend callback function. 0050 * 0051 * In addition to the pre-analyzed data from the ODS file, the context 0052 * can be used to keep track of data that is used in the backend 0053 * processing such as internal links, lists of embedded data such as 0054 * pictures. 0055 */ 0056 class KOODFREADER_EXPORT OdsReader : public OdfReader 0057 { 0058 public: 0059 OdsReader(); 0060 ~OdsReader() override; 0061 0062 protected: 0063 // All readElement*() are named after the full qualifiedName of 0064 // the element in ODF that they handle. 0065 0066 // ODS document level functions 0067 DECLARE_READER_FUNCTION(OfficeSpreadsheet) override; 0068 0069 private: 0070 // Not much here. Most are already in OdfReader. 0071 }; 0072 0073 #endif // ODSREADER_H