Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef __ABWSTYLESCOLLECTOR_H__
00011 #define __ABWSTYLESCOLLECTOR_H__
00012
00013 #include <stack>
00014 #include <librevenge/librevenge.h>
00015 #include "ABWCollector.h"
00016
00017 namespace libabw
00018 {
00019
00020 struct ABWStylesTableState
00021 {
00022 ABWStylesTableState();
00023 ABWStylesTableState(const ABWStylesTableState &ts);
00024 ~ABWStylesTableState();
00025
00026 ABWPropertyMap m_currentCellProperties;
00027
00028 int m_currentTableWidth;
00029 int m_currentTableRow;
00030 int m_currentTableId;
00031 };
00032
00033 struct ABWStylesParsingState
00034 {
00035 ABWStylesParsingState();
00036 ABWStylesParsingState(const ABWStylesParsingState &ps);
00037 ~ABWStylesParsingState();
00038
00039 std::stack<ABWStylesTableState> m_tableStates;
00040 };
00041
00042 class ABWStylesCollector : public ABWCollector
00043 {
00044 public:
00045 ABWStylesCollector(std::map<int, int> &tableSizes,
00046 std::map<std::string, ABWData> &data,
00047 std::map<int, ABWListElement *> &listElements);
00048 virtual ~ABWStylesCollector();
00049
00050
00051
00052 void collectTextStyle(const char *, const char *, const char *, const char *) {}
00053 void collectDocumentProperties(const char *) {}
00054 void collectParagraphProperties(const char *level, const char *listid, const char *parentid,
00055 const char *style, const char *props);
00056 void collectSectionProperties(const char *, const char *, const char *, const char *,
00057 const char *, const char *, const char *, const char *,
00058 const char *) {}
00059 void collectCharacterProperties(const char *, const char *) {}
00060 void collectPageSize(const char *, const char *, const char *, const char *) {}
00061 void closeParagraphOrListElement() {}
00062 void closeSpan() {}
00063 void openLink(const char *) {}
00064 void closeLink() {}
00065 void openFoot(const char *) {}
00066 void closeFoot() {}
00067 void openEndnote(const char *) {}
00068 void closeEndnote() {}
00069 void endSection() {}
00070 void startDocument() {}
00071 void endDocument() {}
00072 void insertLineBreak() {}
00073 void insertColumnBreak() {}
00074 void insertPageBreak() {}
00075 void insertText(const char *) {}
00076 void insertImage(const char *, const char *) {}
00077
00078 void collectData(const char *name, const char *mimeType, const librevenge::RVNGBinaryData &data);
00079 void collectHeaderFooter(const char *, const char *) {}
00080 void collectList(const char *id, const char *listDecimal, const char *listDelim,
00081 const char *parentid, const char *startValue, const char *type);
00082
00083 void openTable(const char *props);
00084 void closeTable();
00085 void openCell(const char *props);
00086 void closeCell();
00087
00088 void addMetadataEntry(const char *, const char *) {}
00089
00090 private:
00091 ABWStylesCollector(const ABWStylesCollector &);
00092 ABWStylesCollector &operator=(const ABWStylesCollector &);
00093
00094 std::string _findCellProperty(const char *name);
00095 void _processList(int id, const char *listDelim, int parentid, int startValue, int type);
00096
00097 ABWStylesParsingState *m_ps;
00098 std::map<int, int> &m_tableSizes;
00099 std::map<std::string, ABWData> &m_data;
00100 int m_tableCounter;
00101 std::map<int, ABWListElement *> &m_listElements;
00102 };
00103
00104 }
00105
00106 #endif
00107