Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 :
20 : #ifndef INCLUDED_STARMATH_INC_TYPES_HXX
21 : #define INCLUDED_STARMATH_INC_TYPES_HXX
22 :
23 : #include <sal/types.h>
24 : #define FONTNAME_MATH "OpenSymbol"
25 :
26 :
27 :
28 : enum SmPrintSize { PRINT_SIZE_NORMAL, PRINT_SIZE_SCALED, PRINT_SIZE_ZOOMED };
29 :
30 :
31 :
32 2772 : inline bool IsInPrivateUseArea( sal_Unicode cChar ) { return 0xE000 <= cChar && cChar <= 0xF8FF; }
33 :
34 : sal_Unicode ConvertMathToMathML( sal_Unicode cChar );
35 :
36 :
37 : // enum definitions for characters from the 'StarSymbol' font
38 : // (some chars have more than one alias!)
39 : //! Note: not listed here does not(!) mean "not used"
40 : //! (see %alpha ... %gamma for example)
41 :
42 : enum MathSymbol
43 : {
44 : MS_FACT = (sal_Unicode) 0x0021,
45 : MS_INFINITY = (sal_Unicode) 0x221E,
46 : MS_SLASH = (sal_Unicode) 0x002F,
47 :
48 : MS_NDIVIDES = (sal_Unicode) 0x2224,
49 : MS_DRARROW = (sal_Unicode) 0x21D2,
50 : MS_DLARROW = (sal_Unicode) 0x21D0,
51 : MS_DLRARROW = (sal_Unicode) 0x21D4,
52 : MS_OVERBRACE = (sal_Unicode) 0x23DE,
53 : MS_UNDERBRACE = (sal_Unicode) 0x23DF,
54 : MS_CIRC = (sal_Unicode) 0x2218,
55 : MS_ASSIGN = (sal_Unicode) 0x003D,
56 : MS_ERROR = (sal_Unicode) 0x00BF,
57 :
58 : MS_NEQ = (sal_Unicode) 0x2260,
59 : MS_PLUS = (sal_Unicode) 0x002B,
60 : MS_MINUS = (sal_Unicode) 0x2212,
61 : MS_MULTIPLY = (sal_Unicode) 0x2217,
62 : MS_TIMES = (sal_Unicode) 0x00D7,
63 : MS_CDOT = (sal_Unicode) 0x22C5,
64 : MS_DIV = (sal_Unicode) 0x00F7,
65 : MS_PLUSMINUS = (sal_Unicode) 0x00B1,
66 : MS_MINUSPLUS = (sal_Unicode) 0x2213,
67 : MS_OPLUS = (sal_Unicode) 0x2295,
68 : MS_OMINUS = (sal_Unicode) 0x2296,
69 : MS_OTIMES = (sal_Unicode) 0x2297,
70 : MS_ODIVIDE = (sal_Unicode) 0x2298,
71 : MS_ODOT = (sal_Unicode) 0x2299,
72 : MS_UNION = (sal_Unicode) 0x222A,
73 : MS_INTERSECT = (sal_Unicode) 0x2229,
74 :
75 : MS_LT = (sal_Unicode) 0x003C,
76 : MS_GT = (sal_Unicode) 0x003E,
77 : MS_LE = (sal_Unicode) 0x2264,
78 : MS_GE = (sal_Unicode) 0x2265,
79 : MS_LESLANT = (sal_Unicode) 0x2A7D,
80 : MS_GESLANT = (sal_Unicode) 0x2A7E,
81 : MS_LL = (sal_Unicode) 0x226A,
82 : MS_GG = (sal_Unicode) 0x226B,
83 : MS_SIM = (sal_Unicode) 0x223C,
84 : MS_SIMEQ = (sal_Unicode) 0x2243,
85 : MS_APPROX = (sal_Unicode) 0x2248,
86 : MS_DEF = (sal_Unicode) 0x225D,
87 : MS_EQUIV = (sal_Unicode) 0x2261,
88 : MS_PROP = (sal_Unicode) 0x221D,
89 : MS_PARTIAL = (sal_Unicode) 0x2202,
90 :
91 : MS_SUBSET = (sal_Unicode) 0x2282,
92 : MS_SUPSET = (sal_Unicode) 0x2283,
93 : MS_SUBSETEQ = (sal_Unicode) 0x2286,
94 : MS_SUPSETEQ = (sal_Unicode) 0x2287,
95 : MS_NSUBSET = (sal_Unicode) 0x2284,
96 : MS_NSUPSET = (sal_Unicode) 0x2285,
97 : MS_NSUBSETEQ = (sal_Unicode) 0x2288,
98 : MS_NSUPSETEQ = (sal_Unicode) 0x2289,
99 : MS_IN = (sal_Unicode) 0x2208,
100 : MS_NOTIN = (sal_Unicode) 0x2209,
101 : MS_EXISTS = (sal_Unicode) 0x2203,
102 : MS_NOTEXISTS = (sal_Unicode) 0x2204,
103 : MS_BACKEPSILON = (sal_Unicode) 0x220D,
104 : MS_ALEPH = (sal_Unicode) 0x2135,
105 : MS_IM = (sal_Unicode) 0x2111,
106 : MS_RE = (sal_Unicode) 0x211C,
107 : MS_WP = (sal_Unicode) 0x2118,
108 :
109 : MS_LINE = (sal_Unicode) 0x2223,
110 : MS_VERTLINE = (sal_Unicode) 0x007C,
111 : MS_DLINE = (sal_Unicode) 0x2225,
112 : MS_DVERTLINE = (sal_Unicode) 0x2016,
113 : MS_ORTHO = (sal_Unicode) 0x22A5,
114 : MS_DOTSLOW = (sal_Unicode) 0x2026,
115 : MS_DOTSAXIS = (sal_Unicode) 0x22EF,
116 : MS_DOTSVERT = (sal_Unicode) 0x22EE,
117 : MS_DOTSUP = (sal_Unicode) 0x22F0,
118 : MS_DOTSDOWN = (sal_Unicode) 0x22F1,
119 : MS_TRANSR = (sal_Unicode) 0x22B6,
120 : MS_TRANSL = (sal_Unicode) 0x22B7,
121 : MS_BACKSLASH = (sal_Unicode) 0x2216,
122 : MS_NEG = (sal_Unicode) 0x00AC,
123 :
124 : MS_FORALL = (sal_Unicode) 0x2200,
125 : MS_NABLA = (sal_Unicode) 0x2207,
126 : MS_PROD = (sal_Unicode) 0x220F,
127 : MS_COPROD = (sal_Unicode) 0x2210,
128 : MS_SUM = (sal_Unicode) 0x2211,
129 : MS_SQRT = (sal_Unicode) 0x221A,
130 : MS_INT = (sal_Unicode) 0x222B,
131 : MS_IINT = (sal_Unicode) 0x222C,
132 : MS_IIINT = (sal_Unicode) 0x222D,
133 : MS_LINT = (sal_Unicode) 0x222E,
134 : MS_LLINT = (sal_Unicode) 0x222F,
135 : MS_LLLINT = (sal_Unicode) 0x2230,
136 :
137 : MS_GRAVE = (sal_Unicode) 0x0060,
138 : MS_COMBGRAVE = (sal_Unicode) 0x0300,
139 : MS_ACUTE = (sal_Unicode) 0x00B4,
140 : MS_COMBACUTE = (sal_Unicode) 0x0301,
141 : MS_HAT = (sal_Unicode) 0x005E,
142 : MS_COMBHAT = (sal_Unicode) 0x0302,
143 : MS_TILDE = (sal_Unicode) 0x007E,
144 : MS_COMBTILDE = (sal_Unicode) 0x0303,
145 : MS_BAR = (sal_Unicode) 0x00AF,
146 : MS_COMBBAR = (sal_Unicode) 0x0304,
147 : MS_BREVE = (sal_Unicode) 0x02D8,
148 : MS_COMBBREVE = (sal_Unicode) 0x0306,
149 : MS_CIRCLE = (sal_Unicode) 0x02DA,
150 : MS_COMBCIRCLE = (sal_Unicode) 0x030A,
151 : MS_CHECK = (sal_Unicode) 0x02C7,
152 : MS_COMBCHECK = (sal_Unicode) 0x030C,
153 : MS_VEC = (sal_Unicode) 0x20D7,
154 : MS_DOT = (sal_Unicode) 0x02D9,
155 : MS_DDOT = (sal_Unicode) 0x00A8,
156 : MS_DDDOT = (sal_Unicode) 0x20DB,
157 : MS_AND = (sal_Unicode) 0x2227,
158 : MS_OR = (sal_Unicode) 0x2228,
159 : MS_NI = (sal_Unicode) 0x220B,
160 : MS_EMPTYSET = (sal_Unicode) 0x2205,
161 :
162 : MS_LPARENT = (sal_Unicode) 0x0028,
163 : MS_RPARENT = (sal_Unicode) 0x0029,
164 : MS_LBRACKET = (sal_Unicode) 0x005B,
165 : MS_RBRACKET = (sal_Unicode) 0x005D,
166 : MS_LBRACE = (sal_Unicode) 0x007B,
167 : MS_RBRACE = (sal_Unicode) 0x007D,
168 : MS_LCEIL = (sal_Unicode) 0x2308,
169 : MS_RCEIL = (sal_Unicode) 0x2309,
170 : MS_LFLOOR = (sal_Unicode) 0x230A,
171 : MS_RFLOOR = (sal_Unicode) 0x230B,
172 : MS_LANGLE = (sal_Unicode) 0x2329,
173 : MS_RANGLE = (sal_Unicode) 0x232A,
174 : MS_LDBRACKET = (sal_Unicode) 0x27E6,
175 : MS_RDBRACKET = (sal_Unicode) 0x27E7,
176 : MS_LMATHANGLE = (sal_Unicode) 0x27E8,
177 : MS_RMATHANGLE = (sal_Unicode) 0x27E9,
178 :
179 : MS_PLACE = (sal_Unicode) 0x2751,
180 :
181 : MS_LAMBDABAR = (sal_Unicode) 0x019B,
182 : MS_HBAR = (sal_Unicode) 0x210F,
183 : MS_LEFTARROW = (sal_Unicode) 0x2190,
184 : MS_UPARROW = (sal_Unicode) 0x2191,
185 : MS_RIGHTARROW = (sal_Unicode) 0x2192,
186 : MS_DOWNARROW = (sal_Unicode) 0x2193,
187 : MS_SETN = (sal_Unicode) 0x2115,
188 : MS_SETZ = (sal_Unicode) 0x2124,
189 : MS_SETQ = (sal_Unicode) 0x211A,
190 : MS_SETR = (sal_Unicode) 0x211D,
191 : MS_SETC = (sal_Unicode) 0x2102,
192 :
193 : MS_PERCENT = (sal_Unicode) 0x0025,
194 :
195 : MS_PRECEDES = (sal_Unicode) 0x227A,
196 : MS_PRECEDESEQUAL= (sal_Unicode) 0x227C,
197 : MS_PRECEDESEQUIV= (sal_Unicode) 0x227E,
198 : MS_SUCCEEDS = (sal_Unicode) 0x227B,
199 : MS_SUCCEEDSEQUAL= (sal_Unicode) 0x227D,
200 : MS_SUCCEEDSEQUIV= (sal_Unicode) 0x227F,
201 : MS_NOTPRECEDES = (sal_Unicode) 0x2280,
202 : MS_NOTSUCCEEDS = (sal_Unicode) 0x2281,
203 : };
204 :
205 : #endif
206 :
207 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|