sw: clean up Start/EndAction in SwViewShell hierarchy
[LibreOffice.git] / starmath / inc / mathml / mathmlMo.hxx
blobe6457fd459c6352c0d8d115e173b320d07d733b1
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 .
21 Warning: The SvXMLElementExport helper class creates the beginning and
22 closing tags of xml elements in its constructor and destructor, so there's
23 hidden stuff going on, on occasion the ordering of these classes declarations
24 may be significant
27 #pragma once
29 #include <sal/types.h>
30 #include <rtl/ustring.hxx>
31 #include <utility>
32 #include <vector>
34 // https://www.w3.org/TR/MathML3/appendixc.html
36 enum class moOpDP : sal_uInt16
37 { // moOperatorDataProperty
38 nonedp = 0x0000,
39 accent = 0x0001,
40 fence = 0x0002,
41 stretchy = 0x0004,
42 symmetric = 0x0008,
43 separator = 0x0010,
44 linebreakstyleAfter = 0x0020,
45 largeop = 0x0080,
46 movablelimits = 0x0100,
47 starmathCustom = 0x0200,
48 starmathCustomMo = 0x0400,
49 stretchyfence = 0x0006,
50 movablelargeop = 0x0180
53 enum class moOpDF : sal_uInt16
54 { // moOperatorDataForm
55 nonedf = 0x0000,
56 prefix = 0x0001,
57 infix = 0x0002,
58 postfix = 0x0004,
59 prepostfix = 0x0005
62 struct moOperatorData
64 OUString m_motxt;
65 moOpDF m_form;
66 sal_uInt16 m_priority;
67 sal_uInt16 m_lspace;
68 sal_uInt16 m_rspace;
69 moOpDP m_properties;
71 moOperatorData(OUString motxt, moOpDF form, sal_uInt16 priority, sal_uInt16 lspace,
72 sal_uInt16 rspace, moOpDP properties)
73 : m_motxt(std::move(motxt))
74 , m_form(form)
75 , m_priority(priority)
76 , m_lspace(lspace)
77 , m_rspace(rspace)
78 , m_properties(properties)
83 inline moOpDF operator|(moOpDF a, moOpDF b)
85 return static_cast<moOpDF>(static_cast<sal_uInt16>(a) | static_cast<sal_uInt16>(b));
88 inline moOpDF operator&(moOpDF a, moOpDF b)
90 return static_cast<moOpDF>(static_cast<sal_uInt16>(a) & static_cast<sal_uInt16>(b));
93 inline moOpDP operator|(moOpDP a, moOpDP b)
95 return static_cast<moOpDP>(static_cast<sal_uInt16>(a) | static_cast<sal_uInt16>(b));
98 inline moOpDP operator&(moOpDP a, moOpDP b)
100 return static_cast<moOpDP>(static_cast<sal_uInt16>(a) & static_cast<sal_uInt16>(b));
103 namespace starmathdatabase
105 constexpr size_t MATHML_MO_COUNT = 1100;
107 extern std::vector<moOperatorData> moOperatorDataDictionary;
110 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */