summaryrefslogtreecommitdiff
path: root/starmath/inc/types.hxx
blob: b8cb4d06c196904fbb523153e37af3a31afcaee7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
/*************************************************************************
 *
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * Copyright 2000, 2010 Oracle and/or its affiliates.
 *
 * OpenOffice.org - a multi-platform office productivity suite
 *
 * This file is part of OpenOffice.org.
 *
 * OpenOffice.org is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License version 3
 * only, as published by the Free Software Foundation.
 *
 * OpenOffice.org is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License version 3 for more details
 * (a copy is included in the LICENSE file that accompanied this code).
 *
 * You should have received a copy of the GNU Lesser General Public License
 * version 3 along with OpenOffice.org.  If not, see
 * <http://www.openoffice.org/license.html>
 * for a copy of the LGPLv3 License.
 *
 ************************************************************************/
#ifndef TYPES_HXX
#define TYPES_HXX

#include <sal/types.h>

#define FONTNAME_MATH   "StarSymbol"
#define FONTNAME_MATH2  "OpenSymbol"

/////////////////////////////////////////////////////////////////

enum SmPrintSize { PRINT_SIZE_NORMAL, PRINT_SIZE_SCALED, PRINT_SIZE_ZOOMED };

/////////////////////////////////////////////////////////////////

#define FONT_ARIAL          "Arial"
#define FONT_SYMBOL         "Symbol"
#define FONT_MS_PMINCHO     "MS PMincho"
#define FONT_MS_PGOTHIC     "MS PGothic"
#define FONT_SUN_BATANG     "SunBatang"


inline sal_Bool IsInPrivateUseArea( sal_Unicode cChar ) { return 0xE000 <= cChar  &&  cChar <= 0xF8FF; }

// Greek char range as seen in svx/.../charmap.cxx RID_SUBSETSTR_BASIC_GREEK
inline sal_Bool IsGreekChar( sal_Unicode cChar ) { return 0x0370 <= cChar  &&  cChar <= 0x03FF; }

sal_Unicode ConvertMathPrivateUseAreaToUnicode( sal_Unicode cChar );
#ifdef TL_NOT_YET_USED
sal_Unicode ConvertUnicodeToMathPrivateUseArea( sal_Unicode cChar );

sal_Unicode ConvertMathToMathType( sal_Unicode cChar );
sal_Unicode ConvertMathTypeToMath( sal_Unicode cChar );
#endif //TL_NOT_YET_USED

sal_Unicode ConvertMathToMathML( sal_Unicode cChar );
#ifdef TL_NOT_YET_USED
sal_Unicode ConvertMathMLToMath( sal_Unicode cChar );

sal_Unicode GetTokenChar( sal_Unicode cChar, sal_Bool bConvertForExport );
#endif //TL_NOT_YET_USED

/////////////////////////////////////////////////////////////////
// enum definitions for characters from the 'StarSymbol' font
// (some chars have more than one alias!)
//! Note: not listed here does not(!) mean "not used"
//!		(see %alpha ... %gamma for example)
//
enum MathSymbol
{
    MS_FACT         = (sal_Unicode) 0x0021,
    MS_INFINITY     = (sal_Unicode) 0x221E,
    MS_SLASH        = (sal_Unicode) 0x002F,

    MS_NDIVIDES     = (sal_Unicode) 0x2224,
    MS_DRARROW      = (sal_Unicode) 0x21D2,
    MS_DLARROW      = (sal_Unicode) 0x21D0,
    MS_DLRARROW     = (sal_Unicode) 0x21D4,
    MS_UNDERBRACE   = (sal_Unicode) 0xE081,
    MS_OVERBRACE    = (sal_Unicode) 0xE082,
    MS_CIRC         = (sal_Unicode) 0x00B0,
    MS_ASSIGN       = (sal_Unicode) 0x003D,
    MS_ERROR        = (sal_Unicode) 0x00BF,

    MS_NEQ          = (sal_Unicode) 0x2260,
    MS_PLUS         = (sal_Unicode) 0xE083,
    MS_MINUS        = (sal_Unicode) 0x2212,
    MS_MULTIPLY     = (sal_Unicode) 0x2217,
    MS_TIMES        = (sal_Unicode) 0x00D7,
    MS_CDOT         = (sal_Unicode) 0x22C5,
    MS_DIV          = (sal_Unicode) 0x00F7,
    MS_PLUSMINUS    = (sal_Unicode) 0x00B1,
    MS_MINUSPLUS    = (sal_Unicode) 0x2213,
    MS_OPLUS        = (sal_Unicode) 0x2295,
    MS_OMINUS       = (sal_Unicode) 0x2296,
    MS_OTIMES       = (sal_Unicode) 0x2297,
    MS_ODIVIDE      = (sal_Unicode) 0x2298,
    MS_ODOT         = (sal_Unicode) 0x2299,
    MS_UNION        = (sal_Unicode) 0x222A,
    MS_INTERSECT    = (sal_Unicode) 0x2229,

    MS_LT           = (sal_Unicode) 0xE084,
    MS_GT           = (sal_Unicode) 0xE085,
    MS_LE           = (sal_Unicode) 0x2264,
    MS_GE           = (sal_Unicode) 0x2265,
    MS_LESLANT      = (sal_Unicode) 0xE086,
    MS_GESLANT      = (sal_Unicode) 0xE087,
    MS_LL           = (sal_Unicode) 0x226A,
    MS_GG           = (sal_Unicode) 0x226B,
    MS_SIM          = (sal_Unicode) 0x007E,
    MS_SIMEQ        = (sal_Unicode) 0x2243,
    MS_APPROX       = (sal_Unicode) 0x2248,
    MS_DEF          = (sal_Unicode) 0x225D,
    MS_EQUIV        = (sal_Unicode) 0x2261,
    MS_PROP         = (sal_Unicode) 0x221D,
    MS_PARTIAL      = (sal_Unicode) 0x2202,
    MS_SUBSET       = (sal_Unicode) 0x2282,

    MS_SUPSET       = (sal_Unicode) 0x2283,
    MS_SUBSETEQ     = (sal_Unicode) 0x2286,
    MS_SUPSETEQ     = (sal_Unicode) 0x2287,
    MS_NSUBSET      = (sal_Unicode) 0x2284,
    MS_NSUPSET      = (sal_Unicode) 0x2285,
    MS_NSUBSETEQ    = (sal_Unicode) 0x2288,
    MS_NSUPSETEQ    = (sal_Unicode) 0x2289,
    MS_IN           = (sal_Unicode) 0x2208,
    MS_NOTIN        = (sal_Unicode) 0x2209,
    MS_EXISTS       = (sal_Unicode) 0x2203,
    MS_BACKEPSILON  = (sal_Unicode) 0x220D,
    MS_ALEPH        = (sal_Unicode) 0x2135,
    MS_IM           = (sal_Unicode) 0x2111,
    MS_RE           = (sal_Unicode) 0x211C,
    MS_WP           = (sal_Unicode) 0x2118,

    MS_LINE         = (sal_Unicode) 0x2223,
    MS_DLINE        = (sal_Unicode) 0x2225,
    MS_ORTHO        = (sal_Unicode) 0x22A5,
    MS_DOTSLOW      = (sal_Unicode) 0xE08B,
    MS_DOTSAXIS     = (sal_Unicode) 0x22EF,
    MS_DOTSVERT     = (sal_Unicode) 0x22EE,
    MS_DOTSUP       = (sal_Unicode) 0x22F0,
    MS_DOTSDOWN     = (sal_Unicode) 0x22F1,
    MS_TRANSR       = (sal_Unicode) 0x22B6,
    MS_TRANSL       = (sal_Unicode) 0x22B7,
    MS_RIGHTARROW   = (sal_Unicode) 0xE08C,
    MS_BACKSLASH    = (sal_Unicode) 0x2216,
    MS_NEG          = (sal_Unicode) 0x00AC,

    MS_INT          = (sal_Unicode) 0x222B,
    MS_IINT         = (sal_Unicode) 0x222C,
    MS_IIINT        = (sal_Unicode) 0x222D,
    MS_LINT         = (sal_Unicode) 0x222E,
    MS_LLINT        = (sal_Unicode) 0x222F,
    MS_LLLINT       = (sal_Unicode) 0x2230,
    MS_SQRT         = (sal_Unicode) 0xE08D,
    MS_COPROD       = (sal_Unicode) 0x2210,
    MS_PROD         = (sal_Unicode) 0x220F,
    MS_SUM          = (sal_Unicode) 0x2211,
    MS_NABLA        = (sal_Unicode) 0x2207,
    MS_FORALL       = (sal_Unicode) 0x2200,

    MS_HAT          = (sal_Unicode) 0xE091,
    MS_CHECK        = (sal_Unicode) 0xE092,
    MS_BREVE        = (sal_Unicode) 0xE093,
    MS_ACUTE        = (sal_Unicode) 0xE094,
    MS_GRAVE        = (sal_Unicode) 0xE095,
    MS_TILDE        = (sal_Unicode) 0xE096,
    MS_BAR          = (sal_Unicode) 0xE097,
    MS_VEC          = (sal_Unicode) 0xE098,
    MS_DOT          = (sal_Unicode) 0x02D9,
    MS_DDOT         = (sal_Unicode) 0x00A8,
    MS_DDDOT        = (sal_Unicode) 0xE09B,
    MS_CIRCLE       = (sal_Unicode) 0x02DA,
    MS_AND          = (sal_Unicode) 0x2227,
    MS_OR           = (sal_Unicode) 0x2228,
    MS_NI           = (sal_Unicode) 0x220B,
    MS_EMPTYSET     = (sal_Unicode) 0x2205,

    MS_LBRACE       = (sal_Unicode) 0x007B,
    MS_RBRACE       = (sal_Unicode) 0x007D,
    MS_LPARENT      = (sal_Unicode) 0xE09E,
    MS_RPARENT      = (sal_Unicode) 0xE09F,
    MS_LANGLE       = (sal_Unicode) 0x2329,
    MS_RANGLE       = (sal_Unicode) 0x232A,
    MS_LBRACKET     = (sal_Unicode) 0x005B,
    MS_RBRACKET     = (sal_Unicode) 0x005D,

    MS_LDBRACKET    = (sal_Unicode) 0x301A,
    MS_RDBRACKET    = (sal_Unicode) 0x301B,
    MS_PLACE        = (sal_Unicode) 0xE0AA,

    MS_LCEIL        = (sal_Unicode) 0x2308,
    MS_LFLOOR       = (sal_Unicode) 0x230A,
    MS_RCEIL        = (sal_Unicode) 0x2309,
    MS_RFLOOR       = (sal_Unicode) 0x230B,

    MS_HBAR         = (sal_Unicode) 0x210F,
    MS_LAMBDABAR    = (sal_Unicode) 0x019B,
    MS_LEFTARROW    = (sal_Unicode) 0xE0DB,
    MS_UPARROW      = (sal_Unicode) 0xE0DC,
    MS_DOWNARROW    = (sal_Unicode) 0xE0DD,
    MS_SETN         = (sal_Unicode) 0x2115,
    MS_SETZ         = (sal_Unicode) 0x2124,
    MS_SETQ         = (sal_Unicode) 0x211A,
    MS_SETR         = (sal_Unicode) 0x211D,
    MS_SETC         = (sal_Unicode) 0x2102
};


#endif