xref: /AOO41X/main/starmath/inc/types.hxx (revision 1ecadb572e7010ff3b3382ad9bf179dbc6efadbb)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 #ifndef TYPES_HXX
28 #define TYPES_HXX
29 
30 #include <sal/types.h>
31 #include <tools/debug.hxx>
32 
33 #define FONTNAME_MATH   "OpenSymbol"
34 
35 /////////////////////////////////////////////////////////////////
36 
37 enum SmPrintSize { PRINT_SIZE_NORMAL, PRINT_SIZE_SCALED, PRINT_SIZE_ZOOMED };
38 
39 /////////////////////////////////////////////////////////////////
40 
41 #define FONT_ARIAL          "Arial"
42 #define FONT_SYMBOL         "Symbol"
43 #define FONT_MS_PMINCHO     "MS PMincho"
44 #define FONT_MS_PGOTHIC     "MS PGothic"
45 #define FONT_SUN_BATANG     "SunBatang"
46 
47 
48 inline sal_Bool IsInPrivateUseArea( sal_Unicode cChar ) { return 0xE000 <= cChar  &&  cChar <= 0xF8FF; }
49 
50 // Greek char range as seen in svx/.../charmap.cxx RID_SUBSETSTR_BASIC_GREEK
51 inline sal_Bool IsGreekChar( sal_Unicode cChar ) { return 0x0370 <= cChar  &&  cChar <= 0x03FF; }
52 
53 sal_Unicode ConvertMathPrivateUseAreaToUnicode( sal_Unicode cChar );
54 
55 sal_Unicode ConvertMathToMathML( sal_Unicode cChar );
56 
57 /////////////////////////////////////////////////////////////////
58 // enum definitions for characters from the 'StarSymbol' font
59 // (some chars have more than one alias!)
60 //! Note: not listed here does not(!) mean "not used"
61 //!		(see %alpha ... %gamma for example)
62 //
63 enum MathSymbol
64 {
65     MS_FACT         = (sal_Unicode) 0x0021,
66     MS_INFINITY     = (sal_Unicode) 0x221E,
67     MS_SLASH        = (sal_Unicode) 0x002F,
68 
69     MS_NDIVIDES     = (sal_Unicode) 0x2224,
70     MS_DRARROW      = (sal_Unicode) 0x21D2,
71     MS_DLARROW      = (sal_Unicode) 0x21D0,
72     MS_DLRARROW     = (sal_Unicode) 0x21D4,
73     MS_OVERBRACE    = (sal_Unicode) 0x23DE,
74     MS_UNDERBRACE   = (sal_Unicode) 0x23DF,
75     MS_CIRC         = (sal_Unicode) 0x2218,
76     MS_ASSIGN       = (sal_Unicode) 0x003D,
77     MS_ERROR        = (sal_Unicode) 0x00BF,
78 
79     MS_NEQ          = (sal_Unicode) 0x2260,
80     MS_PLUS         = (sal_Unicode) 0x002B,
81     MS_MINUS        = (sal_Unicode) 0x2212,
82     MS_MULTIPLY     = (sal_Unicode) 0x2217,
83     MS_TIMES        = (sal_Unicode) 0x00D7,
84     MS_CDOT         = (sal_Unicode) 0x22C5,
85     MS_DIV          = (sal_Unicode) 0x00F7,
86     MS_PLUSMINUS    = (sal_Unicode) 0x00B1,
87     MS_MINUSPLUS    = (sal_Unicode) 0x2213,
88     MS_OPLUS        = (sal_Unicode) 0x2295,
89     MS_OMINUS       = (sal_Unicode) 0x2296,
90     MS_OTIMES       = (sal_Unicode) 0x2297,
91     MS_ODIVIDE      = (sal_Unicode) 0x2298,
92     MS_ODOT         = (sal_Unicode) 0x2299,
93     MS_UNION        = (sal_Unicode) 0x222A,
94     MS_INTERSECT    = (sal_Unicode) 0x2229,
95 
96     MS_LT           = (sal_Unicode) 0x003C,
97     MS_GT           = (sal_Unicode) 0x003E,
98     MS_LE           = (sal_Unicode) 0x2264,
99     MS_GE           = (sal_Unicode) 0x2265,
100     MS_LESLANT      = (sal_Unicode) 0x2A7D,
101     MS_GESLANT      = (sal_Unicode) 0x2A7E,
102     MS_LL           = (sal_Unicode) 0x226A,
103     MS_GG           = (sal_Unicode) 0x226B,
104     MS_SIM          = (sal_Unicode) 0x223C,
105     MS_SIMEQ        = (sal_Unicode) 0x2243,
106     MS_APPROX       = (sal_Unicode) 0x2248,
107     MS_DEF          = (sal_Unicode) 0x225D,
108     MS_EQUIV        = (sal_Unicode) 0x2261,
109     MS_PROP         = (sal_Unicode) 0x221D,
110     MS_PARTIAL      = (sal_Unicode) 0x2202,
111 
112     MS_SUBSET       = (sal_Unicode) 0x2282,
113     MS_SUPSET       = (sal_Unicode) 0x2283,
114     MS_SUBSETEQ     = (sal_Unicode) 0x2286,
115     MS_SUPSETEQ     = (sal_Unicode) 0x2287,
116     MS_NSUBSET      = (sal_Unicode) 0x2284,
117     MS_NSUPSET      = (sal_Unicode) 0x2285,
118     MS_NSUBSETEQ    = (sal_Unicode) 0x2288,
119     MS_NSUPSETEQ    = (sal_Unicode) 0x2289,
120     MS_IN           = (sal_Unicode) 0x2208,
121     MS_NOTIN        = (sal_Unicode) 0x2209,
122     MS_EXISTS       = (sal_Unicode) 0x2203,
123     MS_BACKEPSILON  = (sal_Unicode) 0x220D,
124     MS_ALEPH        = (sal_Unicode) 0x2135,
125     MS_IM           = (sal_Unicode) 0x2111,
126     MS_RE           = (sal_Unicode) 0x211C,
127     MS_WP           = (sal_Unicode) 0x2118,
128 
129     MS_LINE         = (sal_Unicode) 0x2223,
130     MS_DLINE        = (sal_Unicode) 0x2225,
131     MS_ORTHO        = (sal_Unicode) 0x22A5,
132     MS_DOTSLOW      = (sal_Unicode) 0x2026,
133     MS_DOTSAXIS     = (sal_Unicode) 0x22EF,
134     MS_DOTSVERT     = (sal_Unicode) 0x22EE,
135     MS_DOTSUP       = (sal_Unicode) 0x22F0,
136     MS_DOTSDOWN     = (sal_Unicode) 0x22F1,
137     MS_TRANSR       = (sal_Unicode) 0x22B6,
138     MS_TRANSL       = (sal_Unicode) 0x22B7,
139     MS_BACKSLASH    = (sal_Unicode) 0x2216,
140     MS_NEG          = (sal_Unicode) 0x00AC,
141 
142     MS_FORALL       = (sal_Unicode) 0x2200,
143     MS_NABLA        = (sal_Unicode) 0x2207,
144     MS_PROD         = (sal_Unicode) 0x220F,
145     MS_COPROD       = (sal_Unicode) 0x2210,
146     MS_SUM          = (sal_Unicode) 0x2211,
147     MS_SQRT         = (sal_Unicode) 0x221A,
148     MS_INT          = (sal_Unicode) 0x222B,
149     MS_IINT         = (sal_Unicode) 0x222C,
150     MS_IIINT        = (sal_Unicode) 0x222D,
151     MS_LINT         = (sal_Unicode) 0x222E,
152     MS_LLINT        = (sal_Unicode) 0x222F,
153     MS_LLLINT       = (sal_Unicode) 0x2230,
154 
155     MS_GRAVE        = (sal_Unicode) 0x0300,
156     MS_ACUTE        = (sal_Unicode) 0x0301,
157     MS_HAT          = (sal_Unicode) 0x0302,
158     MS_TILDE        = (sal_Unicode) 0x0303,
159     MS_BAR          = (sal_Unicode) 0x0304,
160     MS_BREVE        = (sal_Unicode) 0x0306,
161     MS_CIRCLE       = (sal_Unicode) 0x030A,
162     MS_CHECK        = (sal_Unicode) 0x030C,
163     MS_VEC          = (sal_Unicode) 0x20D7,
164     MS_DOT          = (sal_Unicode) 0x02D9,
165     MS_DDOT         = (sal_Unicode) 0x00A8,
166     MS_DDDOT        = (sal_Unicode) 0x20DB,
167     MS_AND          = (sal_Unicode) 0x2227,
168     MS_OR           = (sal_Unicode) 0x2228,
169     MS_NI           = (sal_Unicode) 0x220B,
170     MS_EMPTYSET     = (sal_Unicode) 0x2205,
171 
172     MS_LPARENT      = (sal_Unicode) 0x0028,
173     MS_RPARENT      = (sal_Unicode) 0x0029,
174     MS_LBRACKET     = (sal_Unicode) 0x005B,
175     MS_RBRACKET     = (sal_Unicode) 0x005D,
176     MS_LBRACE       = (sal_Unicode) 0x007B,
177     MS_RBRACE       = (sal_Unicode) 0x007D,
178     MS_LCEIL        = (sal_Unicode) 0x2308,
179     MS_RCEIL        = (sal_Unicode) 0x2309,
180     MS_LFLOOR       = (sal_Unicode) 0x230A,
181     MS_RFLOOR       = (sal_Unicode) 0x230B,
182     MS_LANGLE       = (sal_Unicode) 0x2329,
183     MS_RANGLE       = (sal_Unicode) 0x232A,
184     MS_LDBRACKET    = (sal_Unicode) 0x27E6,
185     MS_RDBRACKET    = (sal_Unicode) 0x27E7,
186 
187     MS_PLACE        = (sal_Unicode) 0x2751,
188 
189     MS_LAMBDABAR    = (sal_Unicode) 0x019B,
190     MS_HBAR         = (sal_Unicode) 0x210F,
191     MS_LEFTARROW    = (sal_Unicode) 0x2190,
192     MS_UPARROW      = (sal_Unicode) 0x2191,
193     MS_RIGHTARROW   = (sal_Unicode) 0x2192,
194     MS_DOWNARROW    = (sal_Unicode) 0x2193,
195     MS_SETN         = (sal_Unicode) 0x2115,
196     MS_SETZ         = (sal_Unicode) 0x2124,
197     MS_SETQ         = (sal_Unicode) 0x211A,
198     MS_SETR         = (sal_Unicode) 0x211D,
199     MS_SETC         = (sal_Unicode) 0x2102
200 };
201 
202 
203 #endif
204 
205