fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / hwpfilter / source / formula.h
blobd0d4f9805c4e76a505d42afc7ef8463fe679289c
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/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_HWPFILTER_SOURCE_FORMULA_H
21 #define INCLUDED_HWPFILTER_SOURCE_FORMULA_H
23 // DVO: remove DEBUG dependency
24 // #ifndef DEBUG
25 #include <com/sun/star/xml/sax/XDocumentHandler.hpp>
26 #include "attributes.hxx"
27 // DVO: remove DEBUG dependency
28 // #endif
30 class Node;
32 // DVO: remove DEBUG dependency
33 // #ifndef DEBUG
34 using namespace ::com::sun::star::xml::sax;
35 // #endif
37 class Formula
39 public:
40 Formula(char *_eq, int _ishwpeq = 1)
41 : pList(NULL)
43 eq = _eq;
44 isHwpEQ = _ishwpeq;
45 trim();
47 virtual ~Formula(){ }
49 void setDocumentHandler(Reference < XDocumentHandler > xHandler )
51 m_rxDocumentHandler = xHandler;
53 void setAttributeListImpl( AttributeListImpl *p )
55 pList = p;
56 rList = (XAttributeList *) pList;
58 int parse();
59 private:
60 void trim();
61 void makeMathML(Node *res);
62 void makeLines(Node *res);
63 void makeLine(Node *res);
64 void makeExprList(Node *res);
65 void makeExpr(Node *res);
66 void makePrimary(Node *res);
67 void makeIdentifier(Node *res);
68 void makeSubSup(Node *res);
69 void makeFraction(Node *res);
70 void makeDecoration(Node *res);
71 void makeFunction(Node *res);
72 void makeRoot(Node *res);
73 void makeAccent(Node *res);
74 void makeParenth(Node *res);
75 void makeFence(Node *res);
76 void makeBracket(Node *res);
77 void makeBlock(Node *res);
79 private:
80 Reference< XDocumentHandler > m_rxDocumentHandler;
81 Reference< XAttributeList > rList;
82 AttributeListImpl *pList;
83 char *eq;
84 int isHwpEQ;
87 #endif
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */