Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / starmath / source / wordexportbase.hxx
blob33a179d05fbbd4febf147958fb1cc21b7b6e1279
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 #pragma once
12 #include <node.hxx>
14 /**
15 Base class implementing writing of formulas to Word.
17 class SmWordExportBase
19 public:
20 explicit SmWordExportBase(const SmNode* pIn);
21 virtual ~SmWordExportBase();
23 protected:
24 void HandleNode(const SmNode* pNode, int nLevel);
25 void HandleAllSubNodes(const SmNode* pNode, int nLevel);
26 void HandleTable(const SmNode* pNode, int nLevel);
27 virtual void HandleVerticalStack(const SmNode* pNode, int nLevel) = 0;
28 virtual void HandleText(const SmNode* pNode, int nLevel) = 0;
29 void HandleMath(const SmNode* pNode, int nLevel);
30 virtual void HandleFractions(const SmNode* pNode, int nLevel, const char* type) = 0;
31 void HandleUnaryOperation(const SmUnHorNode* pNode, int nLevel);
32 void HandleBinaryOperation(const SmBinHorNode* pNode, int nLevel);
33 virtual void HandleRoot(const SmRootNode* pNode, int nLevel) = 0;
34 virtual void HandleAttribute(const SmAttributeNode* pNode, int nLevel) = 0;
35 virtual void HandleOperator(const SmOperNode* pNode, int nLevel) = 0;
36 void HandleSubSupScript(const SmSubSupNode* pNode, int nLevel);
37 virtual void HandleSubSupScriptInternal(const SmSubSupNode* pNode, int nLevel, int flags) = 0;
38 virtual void HandleMatrix(const SmMatrixNode* pNode, int nLevel) = 0;
39 virtual void HandleBrace(const SmBraceNode* pNode, int nLevel) = 0;
40 virtual void HandleVerticalBrace(const SmVerticalBraceNode* pNode, int nLevel) = 0;
41 virtual void HandleBlank() = 0;
42 const SmNode* GetTree() const { return m_pTree; }
44 private:
45 const SmNode* const m_pTree;
48 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */