update dev300-m58
[ooovba.git] / hwpfilter / source / formula.h
blob56b3a50e7da8f7b709c955dcd66f609d517e2cf5
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: formula.h,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef __FORMULA_H__
32 #define __FORMULA_H__
34 // DVO: remove DEBUG dependency
35 // #ifndef DEBUG
36 #include <com/sun/star/xml/sax/XDocumentHandler.hpp>
37 #include "attributes.hxx"
38 // DVO: remove DEBUG dependency
39 // #endif
41 class Node;
43 // DVO: remove DEBUG dependency
44 // #ifndef DEBUG
45 using namespace ::com::sun::star::xml::sax;
46 // #endif
49 class Formula{
50 public:
51 Formula(char *_eq, int _ishwpeq = 1) {
52 eq = _eq;
53 isHwpEQ = _ishwpeq;
54 trim();
56 virtual ~Formula(){ }
58 // DVO: remove DEBUG dependency
59 // #ifndef DEBUG
60 void setDocumentHandler(Reference < XDocumentHandler > xHandler ){
61 rDocumentHandler = xHandler;
63 void setAttributeListImpl( AttributeListImpl *p ){
64 pList = p;
65 rList = (XAttributeList *) pList;
67 // DVO: remove DEBUG dependency
68 // #endif
69 int parse();
70 private:
71 void trim();
72 void makeMathML(Node *res);
73 void makeLines(Node *res);
74 void makeLine(Node *res);
75 void makeExprList(Node *res);
76 void makeExpr(Node *res);
77 void makePrimary(Node *res);
78 void makeIdentifier(Node *res);
79 void makeSubSup(Node *res);
80 void makeFraction(Node *res);
81 void makeDecoration(Node *res);
82 void makeFunction(Node *res);
83 void makeRoot(Node *res);
84 void makeArrow(Node *res);
85 void makeAccent(Node *res);
86 void makeParenth(Node *res);
87 void makeFence(Node *res);
88 void makeBracket(Node *res);
89 void makeBlock(Node *res);
90 void makeBegin(Node *res);
91 void makeEnd(Node *res);
93 private:
94 // DVO: remove DEBUG dependency
95 // #ifndef DEBUG
96 Reference< XDocumentHandler > rDocumentHandler;
97 Reference< XAttributeList > rList;
98 AttributeListImpl *pList;
99 // DVO: remove DEBUG dependency
100 // #endif
101 char *eq;
102 int isHwpEQ;
105 #endif