fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / helpcompiler / inc / BasCodeTagger.hxx
bloba0c7f29e7a56a2f4eeacc8f3947e21da11c9df9a
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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 */
10 #ifndef INCLUDED_HELPCOMPILER_INC_BASCODETAGGER_HXX
11 #define INCLUDED_HELPCOMPILER_INC_BASCODETAGGER_HXX
13 #include <iostream>
14 #include <cstdlib>
15 #include <string>
16 #include <list>
17 #include <libxml/xmlmemory.h>
18 #include <libxml/parser.h>
19 #include <rtl/ustring.hxx>
20 #include <comphelper/syntaxhighlight.hxx>
21 #include <helpcompiler/dllapi.h>
23 class BasicCodeTagger;
24 class LibXmlTreeWalker;
26 //!Tagger class.
27 class L10N_DLLPUBLIC BasicCodeTagger
29 private:
30 xmlDocPtr m_pDocument;
31 std::list<xmlNodePtr> m_BasicCodeContainerTags;
32 LibXmlTreeWalker *m_pXmlTreeWalker;
33 std::list<std::string> m_BasicCodeStringList;
34 SyntaxHighlighter m_Highlighter;
35 bool m_bTaggingCompleted;
36 void tagParagraph( xmlNodePtr paragraph );
37 static xmlChar* getTypeString( TokenTypes tokenType );
38 void getBasicCodeContainerNodes();
39 void tagBasCodeParagraphs();
41 public:
42 enum TaggerException { FILE_WRITING, NULL_DOCUMENT, EMPTY_DOCUMENT };
43 BasicCodeTagger( xmlDocPtr rootDoc );
44 ~BasicCodeTagger();
45 void tagBasicCodes();
48 //================LibXmlTreeWalker===========================================================
50 class L10N_DLLPUBLIC LibXmlTreeWalker
52 private:
53 xmlNodePtr m_pCurrentNode;
54 std::list<xmlNodePtr> m_Queue; //!Queue for breath-first search
56 public:
57 LibXmlTreeWalker( xmlDocPtr doc );
58 ~LibXmlTreeWalker() {}
59 void nextNode();
60 xmlNodePtr currentNode() { return m_pCurrentNode;}
61 bool end();
62 void ignoreCurrNodesChildren();
65 #endif
67 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */