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 
23 {
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 &);
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  void processXmlDocument(librevenge::RVNGInputStream *input, VSDXRelationships &rels);
58  void processXmlNode(xmlTextReaderPtr reader);
59 
60  // Functions reading the Visio 2013 OPC document content
61 
62  void extractBinaryData(librevenge::RVNGInputStream *input, const char *name);
63 
64  void readPageSheetProperties(xmlTextReaderPtr reader);
65 
66  void readStyleProperties(xmlTextReaderPtr reader);
67 
68  void readShapeProperties(xmlTextReaderPtr reader);
69 
70  void getBinaryData(xmlTextReaderPtr reader);
71 
72  void readParagraph(xmlTextReaderPtr reader);
73  void readCharacter(xmlTextReaderPtr reader);
74  void readFonts(xmlTextReaderPtr reader);
75 
76  // Private data
77 
78  librevenge::RVNGInputStream *m_input;
79  librevenge::RVNGDrawingInterface *m_painter;
83 };
84 
85 } // namespace libvisio
86 
87 #endif // __VSDXPARSER_H__
88 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */

Generated for libvisio by doxygen 1.8.4