1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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
29 #include <sal/types.h>
30 #include <rtl/ustring.hxx>
34 // https://www.w3.org/TR/MathML3/appendixc.html
36 enum class moOpDP
: sal_uInt16
37 { // moOperatorDataProperty
44 linebreakstyleAfter
= 0x0020,
46 movablelimits
= 0x0100,
47 starmathCustom
= 0x0200,
48 starmathCustomMo
= 0x0400,
49 stretchyfence
= 0x0006,
50 movablelargeop
= 0x0180
53 enum class moOpDF
: sal_uInt16
54 { // moOperatorDataForm
66 sal_uInt16 m_priority
;
71 moOperatorData(OUString motxt
, moOpDF form
, sal_uInt16 priority
, sal_uInt16 lspace
,
72 sal_uInt16 rspace
, moOpDP properties
)
73 : m_motxt(std::move(motxt
))
75 , m_priority(priority
)
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: */