build fix
[LibreOffice.git] / starmath / source / mathmlattr.hxx
blob75dddb06d40269c71b19e6b205b68bc4a7bb3d08
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.
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 #ifndef INCLUDED_STARMATH_SOURCE_MATHMLATTR_HXX
11 #define INCLUDED_STARMATH_SOURCE_MATHMLATTR_HXX
13 #include <rtl/ustring.hxx>
14 #include <sal/types.h>
15 #include <tools/fract.hxx>
17 // MathML 3: 2.1.5.1 Syntax notation used in the MathML specification
18 // <https://www.w3.org/TR/MathML/chapter2.html#id.2.1.5.1>
19 // MathML 2: 2.4.4.2 Attributes with units
20 // <https://www.w3.org/TR/MathML2/chapter2.html#fund.attval>
22 sal_Int32 ParseMathMLUnsignedNumber(const OUString &rStr, Fraction *pUN);
24 sal_Int32 ParseMathMLNumber(const OUString &rStr, Fraction *pN);
26 // MathML 3: 2.1.5.2 Length Valued Attributes
27 // <https://www.w3.org/TR/MathML/chapter2.html#fund.units>
29 enum class MathMLLengthUnit {
30 None,
31 Em,
32 Ex,
33 Px,
34 In,
35 Cm,
36 Mm,
37 Pt,
38 Pc,
39 Percent
42 struct MathMLAttributeLengthValue
44 Fraction aNumber;
45 MathMLLengthUnit eUnit;
48 sal_Int32 ParseMathMLAttributeLengthValue(const OUString &rStr, MathMLAttributeLengthValue *pV);
50 #endif
52 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */