1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
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/.
12 #include <tools/color.hxx>
14 /* All possible data needed to do the job outside mathml limits */
15 // Ml prefix means it is part of mathml standard
16 // NMl means it is not part of mathml standard but needed info to work
18 /* For now empty, don't know yet what's needed besides default font size. */
23 /* Mhtml length tools */
24 /*************************************************************************************************/
26 enum class SmLengthUnit
: uint_fast8_t
42 SmLengthUnit m_aLengthUnit
;
43 double m_aLengthValue
;
44 // Keeps original text value to avoid numerical error data loss
45 OUString
* m_aOriginalText
;
48 /* Possible mathml elements */
49 /*************************************************************************************************/
51 enum class SmMlElementType
: uint_fast8_t
53 // Used for base element. Means no information contained.
55 // Used for structural dependencies. Means no information contained.
58 // Mathml real elements
69 /* Possible mathml attributes */
70 /*************************************************************************************************/
72 enum class SmMlAttributeValueType
: uint_fast8_t
95 /* Possible values of mathml attributes */
96 /*************************************************************************************************/
98 enum class SmMlAttributeValueEmpty
: uint_fast8_t
103 enum class SmMlAttributeValueAccent
: uint_fast8_t
109 enum class SmMlAttributeValueDir
: uint_fast8_t
115 enum class SmMlAttributeValueDisplaystyle
: uint_fast8_t
121 enum class SmMlAttributeValueFence
: uint_fast8_t
127 enum class SmMlAttributeValueForm
: uint_fast8_t
134 enum class SmMlAttributeValueHref
: uint_fast8_t
140 enum class SmMlAttributeValueLspace
: uint_fast8_t
145 enum class SmMlAttributeValueMathbackground
: uint_fast32_t
147 MlTransparent
= 0x00,
151 enum class SmMlAttributeValueMathcolor
: uint_fast8_t
157 enum class SmMlAttributeValueMathsize
: uint_fast8_t
162 enum class SmMlAttributeValueMathvariant
: uint_fast16_t
167 double_struck
= 0x004,
172 bold_italic
= 0x001 | 0x002,
173 bold_fraktur
= 0x001 | 0x010,
174 bold_script
= 0x001 | 0x008,
175 bold_sans_serif
= 0x001 | 0x020,
176 sans_serif_italic
= 0x002 | 0x20,
177 sans_serif_bold_italic
= 0x001 | 0x002 | 0x020,
185 enum class SmMlAttributeValueMaxsize
: uint_fast8_t
192 * Specifies whether attached under- and overscripts move to sub- and superscript positions when displaystyle is false.
193 * Source: https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mo
195 enum class SmMlAttributeValueMovablelimits
: uint_fast8_t
201 enum class SmMlAttributeValueRspace
: uint_fast8_t
206 enum class SmMlAttributeValueSeparator
: uint_fast8_t
212 enum class SmMlAttributeValueStretchy
: uint_fast8_t
218 enum class SmMlAttributeValueSymmetric
: uint_fast8_t
224 /* Structures for all possible attributes */
225 /*************************************************************************************************/
229 SmMlAttributeValueAccent m_aAccent
;
234 SmMlAttributeValueDir m_aDir
;
237 struct SmMlDisplaystyle
239 SmMlAttributeValueDisplaystyle m_aDisplaystyle
;
244 SmMlAttributeValueFence m_aFence
;
249 SmMlAttributeValueForm m_aForm
;
254 SmMlAttributeValueHref m_aHref
;
260 SmLengthValue m_aLengthValue
;
263 struct SmMlMathbackground
265 SmMlAttributeValueMathbackground m_aMathbackground
;
271 SmMlAttributeValueMathcolor m_aMathcolor
;
277 SmLengthValue m_aLengthValue
;
280 struct SmMlMathvariant
282 SmMlAttributeValueMathvariant m_aMathvariant
;
287 SmMlAttributeValueMaxsize m_aMaxsize
;
288 SmLengthValue m_aLengthValue
;
293 SmLengthValue m_aLengthValue
;
296 struct SmMlMovablelimits
298 SmMlAttributeValueMovablelimits m_aMovablelimits
;
303 SmLengthValue m_aLengthValue
;
308 SmMlAttributeValueSeparator m_aSeparator
;
313 SmMlAttributeValueStretchy m_aStretchy
;
318 SmMlAttributeValueSymmetric m_aSymmetric
;
321 /* order attributes */
322 /*************************************************************************************************/
324 struct SmMlAttributePos
326 SmMlAttributeValueType m_aAttributeValueType
;
330 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */