Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef QXPTEXTPARSER_H_INCLUDED
00011 #define QXPTEXTPARSER_H_INCLUDED
00012
00013 #include <memory>
00014 #include <vector>
00015
00016 #include "libqxp_utils.h"
00017 #include "QXPBlockParser.h"
00018
00019 namespace libqxp
00020 {
00021
00022 class QXPHeader;
00023
00024 struct CharFormat;
00025 struct ParagraphFormat;
00026 struct Text;
00027
00028 class QXPTextParser
00029 {
00030
00031 QXPTextParser(const QXPTextParser &other) = delete;
00032 QXPTextParser &operator=(const QXPTextParser &other) = delete;
00033
00034 public:
00035 QXPTextParser(const std::shared_ptr<librevenge::RVNGInputStream> &input, const std::shared_ptr<QXPHeader> &header);
00036
00037 std::shared_ptr<Text> parseText(unsigned index,
00038 const std::vector<std::shared_ptr<CharFormat>> &charFormats,
00039 const std::vector<std::shared_ptr<ParagraphFormat>> ¶graphFormats);
00040
00041 private:
00042 const std::shared_ptr<QXPHeader> m_header;
00043 const bool be;
00044 const char *m_encoding;
00045 QXPBlockParser m_blockParser;
00046 };
00047
00048 }
00049
00050 #endif // QXPTEXTPARSER_H_INCLUDED
00051
00052