LibreOffice Module starmath (master)
1
starmath
inc
mathml
mathmlattr.hxx
Go to the documentation of this file.
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
2
/*
3
* This file is part of the LibreOffice project.
4
*
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
*/
9
10
#pragma once
11
12
#include <
sal/config.h
>
13
14
#include <string_view>
15
16
#include <rtl/ustring.hxx>
17
#include <
tools/fract.hxx
>
18
19
// MathML 3: 2.1.5.1 Syntax notation used in the MathML specification
20
// <https://www.w3.org/TR/MathML/chapter2.html#id.2.1.5.1>
21
// MathML 2: 2.4.4.2 Attributes with units
22
// <https://www.w3.org/TR/MathML2/chapter2.html#fund.attval>
23
// MathML 3: 2.1.5.2 Length Valued Attributes
24
// <https://www.w3.org/TR/MathML/chapter2.html#fund.units>
25
26
enum class
MathMLLengthUnit
27
{
28
None
,
29
Em
,
30
Ex
,
31
Px
,
32
In
,
33
Cm
,
34
Mm
,
35
Pt
,
36
Pc
,
37
Percent
38
};
39
40
struct
MathMLAttributeLengthValue
41
{
42
Fraction
aNumber
;
43
MathMLLengthUnit
eUnit
;
44
MathMLAttributeLengthValue
()
45
:
eUnit
(
MathMLLengthUnit
::
None
)
46
{
47
}
48
};
49
50
bool
ParseMathMLAttributeLengthValue
(std::u16string_view rStr,
MathMLAttributeLengthValue
& rV);
51
52
// MathML 3: 3.2.2 Mathematics style attributes common to token elements
53
// <https://www.w3.org/TR/MathML3/chapter3.html#presm.commatt>
54
55
enum class
MathMLMathvariantValue
56
{
57
Normal
,
58
Bold
,
59
Italic
,
60
BoldItalic
,
61
DoubleStruck
,
62
BoldFraktur
,
63
Script
,
64
BoldScript
,
65
Fraktur
,
66
SansSerif
,
67
BoldSansSerif
,
68
SansSerifItalic
,
69
SansSerifBoldItalic
,
70
Monospace
,
71
Initial
,
72
Tailed
,
73
Looped
,
74
Stretched
75
};
76
77
bool
GetMathMLMathvariantValue
(
const
OUString& rStr,
MathMLMathvariantValue
& rV);
78
79
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
SvxChartKindError::Percent
@ Percent
Fraction
config.h
SwFieldIds::Script
@ Script
ImplFontAttrs::Italic
@ Italic
ImplFontAttrs::SansSerif
@ SansSerif
fract.hxx
ParseMathMLAttributeLengthValue
bool ParseMathMLAttributeLengthValue(std::u16string_view rStr, MathMLAttributeLengthValue &rV)
Definition:
mathmlattr.cxx:84
MathMLMathvariantValue
MathMLMathvariantValue
Definition:
mathmlattr.hxx:56
MathMLMathvariantValue::BoldFraktur
@ BoldFraktur
MathMLMathvariantValue::BoldItalic
@ BoldItalic
MathMLMathvariantValue::Fraktur
@ Fraktur
MathMLMathvariantValue::Initial
@ Initial
MathMLMathvariantValue::BoldSansSerif
@ BoldSansSerif
MathMLMathvariantValue::SansSerifItalic
@ SansSerifItalic
MathMLMathvariantValue::SansSerifBoldItalic
@ SansSerifBoldItalic
MathMLMathvariantValue::BoldScript
@ BoldScript
MathMLMathvariantValue::Tailed
@ Tailed
MathMLMathvariantValue::Stretched
@ Stretched
MathMLMathvariantValue::Monospace
@ Monospace
MathMLMathvariantValue::DoubleStruck
@ DoubleStruck
MathMLMathvariantValue::Looped
@ Looped
MathMLLengthUnit
MathMLLengthUnit
Definition:
mathmlattr.hxx:27
MathMLLengthUnit::Mm
@ Mm
MathMLLengthUnit::Cm
@ Cm
MathMLLengthUnit::Em
@ Em
MathMLLengthUnit::Ex
@ Ex
MathMLLengthUnit::Pt
@ Pt
MathMLLengthUnit::Pc
@ Pc
MathMLLengthUnit::Px
@ Px
GetMathMLMathvariantValue
bool GetMathMLMathvariantValue(const OUString &rStr, MathMLMathvariantValue &rV)
Definition:
mathmlattr.cxx:133
None
None
SVGToken::In
@ In
FontTypeFaces::Bold
@ Bold
SdXMLFilterMode::Normal
@ Normal
MathMLAttributeLengthValue
Definition:
mathmlattr.hxx:41
MathMLAttributeLengthValue::MathMLAttributeLengthValue
MathMLAttributeLengthValue()
Definition:
mathmlattr.hxx:44
MathMLAttributeLengthValue::eUnit
MathMLLengthUnit eUnit
Definition:
mathmlattr.hxx:43
MathMLAttributeLengthValue::aNumber
Fraction aNumber
Definition:
mathmlattr.hxx:42
Generated on Sun Jul 30 2023 04:34:34 for LibreOffice Module starmath (master) by
1.9.3