File indexing completed on 2025-01-12 10:34:38

0001 /* This file is part of the KDE project
0002 
0003    SPDX-FileCopyrightText: 2012-2013 Inge Wallin <inge@lysator.liu.se>
0004 
0005    SPDX-License-Identifier: LGPL-2.0-or-later
0006 */
0007 
0008 #ifndef ODTREADER_H
0009 #define ODTREADER_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 
0025 class OdtReaderBackend;
0026 class OdfReaderContext;
0027 
0028 class OdfTextReader;
0029 
0030 
0031 /** @brief Read the XML tree of the content of an ODT file.
0032  *
0033  * The OdtReader is used to traverse (read) the contents of an ODT
0034  * file using an XML stream reader.  For every XML element that the
0035  * reading process comes across it will call a specific function in a
0036  * backend class: @see OdtReaderBackend.
0037  *
0038  * Before the reading process is started the ODT file will be
0039  * analyzed to collect some data that may be needed during the
0040  * read: metadata, manifest and styles are examples of this. This
0041  * data is stored in the so called reading context, which is kept in
0042  * an instance of the OdfReaderContext class.
0043  *
0044  * The context will be passed around to the backend in every call to a
0045  * backend callback function.
0046  *
0047  * In addition to the pre-analyzed data from the ODT file, the context
0048  * can be used to keep track of data that is used in the backend
0049  * processing such as internal links, lists of embedded data such as
0050  * pictures.
0051  */
0052 class KOODFREADER_EXPORT OdtReader : public OdfReader
0053 {
0054  public:
0055     OdtReader();
0056     ~OdtReader() override;
0057 
0058  protected:
0059     // ODT document level functions
0060     DECLARE_READER_FUNCTION(OfficeText) override;
0061 
0062  private:
0063     // Not much here. Most are already in OdfReader.
0064 };
0065 
0066 #endif // ODTREADER_H