Version 3.6.0.4, tag libreoffice-3.6.0.4
[LibreOffice.git] / hwpfilter / source / formula.h
blobd43694374c8244abb20b5bc46424313250237ad6
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef __FORMULA_H__
30 #define __FORMULA_H__
32 // DVO: remove DEBUG dependency
33 // #ifndef DEBUG
34 #include <com/sun/star/xml/sax/XDocumentHandler.hpp>
35 #include "attributes.hxx"
36 // DVO: remove DEBUG dependency
37 // #endif
39 class Node;
41 // DVO: remove DEBUG dependency
42 // #ifndef DEBUG
43 using namespace ::com::sun::star::xml::sax;
44 // #endif
46 class Formula
48 public:
49 Formula(char *_eq, int _ishwpeq = 1)
50 : pList(NULL)
52 eq = _eq;
53 isHwpEQ = _ishwpeq;
54 trim();
56 virtual ~Formula(){ }
58 void setDocumentHandler(Reference < XDocumentHandler > xHandler )
60 m_rxDocumentHandler = xHandler;
62 void setAttributeListImpl( AttributeListImpl *p )
64 pList = p;
65 rList = (XAttributeList *) pList;
67 int parse();
68 private:
69 void trim();
70 void makeMathML(Node *res);
71 void makeLines(Node *res);
72 void makeLine(Node *res);
73 void makeExprList(Node *res);
74 void makeExpr(Node *res);
75 void makePrimary(Node *res);
76 void makeIdentifier(Node *res);
77 void makeSubSup(Node *res);
78 void makeFraction(Node *res);
79 void makeDecoration(Node *res);
80 void makeFunction(Node *res);
81 void makeRoot(Node *res);
82 void makeArrow(Node *res);
83 void makeAccent(Node *res);
84 void makeParenth(Node *res);
85 void makeFence(Node *res);
86 void makeBracket(Node *res);
87 void makeBlock(Node *res);
88 void makeBegin(Node *res);
89 void makeEnd(Node *res);
91 private:
92 Reference< XDocumentHandler > m_rxDocumentHandler;
93 Reference< XAttributeList > rList;
94 AttributeListImpl *pList;
95 char *eq;
96 int isHwpEQ;
99 #endif
101 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */