VSDXParser.h Source File documentation

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

VSDXParser.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /*
3 * This file is part of the libvisio project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
9
10 #ifndef __VSDXPARSER_H__
11 #define __VSDXPARSER_H__
12
13 #include <librevenge/librevenge.h>
14 #include "VSDXTheme.h"
15 #include "VSDXMLParserBase.h"
16
17 namespace libvisio
18 {
19
20 class VSDCollector;
21
22 class VSDXParser : public VSDXMLParserBase
23 {
24 using VSDXMLParserBase::readExtendedColourData;
25 using VSDXMLParserBase::readDoubleData;
26 using VSDXMLParserBase::readBoolData;
27 using VSDXMLParserBase::readLongData;
28
29 public:
30 explicit VSDXParser(librevenge::RVNGInputStream *input, librevenge::RVNGDrawingInterface *painter);
31 virtual ~VSDXParser();
32 bool parseMain();
33 bool extractStencils();
34
35 private:
36 VSDXParser();
37 VSDXParser(const VSDXParser &);
38 VSDXParser &operator=(const VSDXParser &);
39
40 // Helper functions
41
42 xmlChar *readStringData(xmlTextReaderPtr reader);
43
44 int getElementToken(xmlTextReaderPtr reader);
45 int getElementDepth(xmlTextReaderPtr reader);
46
47 int skipSection(xmlTextReaderPtr reader);
48
49 // Functions parsing the Visio 2013 OPC document structure
50
51 bool parseDocument(librevenge::RVNGInputStream *input, const char *name);
52 bool parseMasters(librevenge::RVNGInputStream *input, const char *name);
53 bool parseMaster(librevenge::RVNGInputStream *input, const char *name);
54 bool parsePages(librevenge::RVNGInputStream *input, const char *name);
55 bool parsePage(librevenge::RVNGInputStream *input, const char *name);
56 bool parseTheme(librevenge::RVNGInputStream *input, const char *name);
57 bool parseMetaData(librevenge::RVNGInputStream *input, const char *name);
58 void processXmlDocument(librevenge::RVNGInputStream *input, VSDXRelationships &rels);
59 void processXmlNode(xmlTextReaderPtr reader);
60
61 // Functions reading the Visio 2013 OPC document content
62
63 void extractBinaryData(librevenge::RVNGInputStream *input, const char *name);
64
65 void readPageSheetProperties(xmlTextReaderPtr reader);
66
67 void readStyleProperties(xmlTextReaderPtr reader);
68
69 void readShapeProperties(xmlTextReaderPtr reader);
70
71 void getBinaryData(xmlTextReaderPtr reader);
72
73 void readParagraph(xmlTextReaderPtr reader);
74 void readCharacter(xmlTextReaderPtr reader);
75 void readFonts(xmlTextReaderPtr reader);
76
77 // Private data
78
79 librevenge::RVNGInputStream *m_input;
80 librevenge::RVNGDrawingInterface *m_painter;
81 int m_currentDepth;
82 VSDXRelationships *m_rels;
83 VSDXTheme m_currentTheme;
84 };
85
86 } // namespace libvisio
87
88 #endif // __VSDXPARSER_H__
89 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libvisio::VSDXParser::getElementDepth
int getElementDepth(xmlTextReaderPtr reader)
Definition: VSDXParser.cpp:916
libvisio::VSDXParser::readCharacter
void readCharacter(xmlTextReaderPtr reader)
Definition: VSDXParser.cpp:1287
libvisio::VSDXParser::m_currentTheme
VSDXTheme m_currentTheme
Definition: VSDXParser.h:83
libvisio::VSDXParser::parseMetaData
bool parseMetaData(librevenge::RVNGInputStream *input, const char *name)
Definition: VSDXParser.cpp:283
libvisio::VSDXParser::processXmlNode
void processXmlNode(xmlTextReaderPtr reader)
Definition: VSDXParser.cpp:362
libvisio::VSDXParser::extractBinaryData
void extractBinaryData(librevenge::RVNGInputStream *input, const char *name)
Definition: VSDXParser.cpp:521
libvisio::VSDXMLParserBase::readBoolData
int readBoolData(boost::optional< bool > &value, xmlTextReaderPtr reader)
Definition: VSDXMLParserBase.cpp:2033
libvisio::VSDXParser::parseMaster
bool parseMaster(librevenge::RVNGInputStream *input, const char *name)
Definition: VSDXParser.cpp:197
libvisio::VSDXParser::VSDXParser
VSDXParser()
libvisio::VSDXParser
Definition: VSDXParser.h:22
libvisio::VSDXParser::getElementToken
int getElementToken(xmlTextReaderPtr reader)
Definition: VSDXParser.cpp:554
VSDXMLParserBase.h
libvisio::VSDXMLParserBase::readDoubleData
int readDoubleData(boost::optional< double > &value, xmlTextReaderPtr reader)
Definition: VSDXMLParserBase.cpp:1977
libvisio::VSDXParser::readStyleProperties
void readStyleProperties(xmlTextReaderPtr reader)
Definition: VSDXParser.cpp:694
libvisio::VSDXParser::~VSDXParser
virtual ~VSDXParser()
Definition: VSDXParser.cpp:59
libvisio::VSDXParser::readFonts
void readFonts(xmlTextReaderPtr reader)
Definition: VSDXParser.cpp:662
libvisio::VSDXParser::processXmlDocument
void processXmlDocument(librevenge::RVNGInputStream *input, VSDXRelationships &rels)
Definition: VSDXParser.cpp:302
libvisio::VSDXRelationships
Definition: VSDXMLHelper.h:71
libvisio::VSDXParser::skipSection
int skipSection(xmlTextReaderPtr reader)
Definition: VSDXParser.cpp:1335
libvisio::VSDXParser::parsePage
bool parsePage(librevenge::RVNGInputStream *input, const char *name)
Definition: VSDXParser.cpp:243
libvisio::VSDXMLParserBase::readLongData
int readLongData(boost::optional< long > &value, xmlTextReaderPtr reader)
Definition: VSDXMLParserBase.cpp:2005
libvisio::VSDXMLParserBase::readExtendedColourData
int readExtendedColourData(Colour &value, long &idx, xmlTextReaderPtr reader)
Definition: VSDXMLParserBase.cpp:2073
libvisio::VSDXParser::parseMain
bool parseMain()
Definition: VSDXParser.cpp:63
libvisio::VSDXParser::getBinaryData
void getBinaryData(xmlTextReaderPtr reader)
Definition: VSDXParser.cpp:1308
libvisio::VSDXParser::operator=
VSDXParser & operator=(const VSDXParser &)
libvisio
Definition: libvisio_utils.h:68
libvisio::VSDXParser::parseTheme
bool parseTheme(librevenge::RVNGInputStream *input, const char *name)
Definition: VSDXParser.cpp:266
libvisio::VSDXMLParserBase
Definition: VSDXMLParserBase.h:28
libvisio::VSDXParser::m_rels
VSDXRelationships * m_rels
Definition: VSDXParser.h:82
libvisio::VSDXParser::parseDocument
bool parseDocument(librevenge::RVNGInputStream *input, const char *name)
Definition: VSDXParser.cpp:119
VSDXTheme.h
libvisio::VSDXParser::readStringData
xmlChar * readStringData(xmlTextReaderPtr reader)
Definition: VSDXParser.cpp:543
libvisio::VSDXParser::m_input
librevenge::RVNGInputStream * m_input
Definition: VSDXParser.h:79
libvisio::VSDXParser::readPageSheetProperties
void readPageSheetProperties(xmlTextReaderPtr reader)
Definition: VSDXParser.cpp:596
libvisio::VSDXParser::parseMasters
bool parseMasters(librevenge::RVNGInputStream *input, const char *name)
Definition: VSDXParser.cpp:174
libvisio::VSDXParser::m_painter
librevenge::RVNGDrawingInterface * m_painter
Definition: VSDXParser.h:80
libvisio::VSDXTheme
Definition: VSDXTheme.h:56
libvisio::VSDXParser::readParagraph
void readParagraph(xmlTextReaderPtr reader)
Definition: VSDXParser.cpp:1266
libvisio::VSDXParser::extractStencils
bool extractStencils()
Definition: VSDXParser.cpp:113
libvisio::VSDXParser::m_currentDepth
int m_currentDepth
Definition: VSDXParser.h:81
libvisio::VSDXParser::parsePages
bool parsePages(librevenge::RVNGInputStream *input, const char *name)
Definition: VSDXParser.cpp:220
libvisio::VSDXParser::readShapeProperties
void readShapeProperties(xmlTextReaderPtr reader)
Definition: VSDXParser.cpp:921