summaryrefslogtreecommitdiff
path: root/starmath/inc/types.hxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2006-07-14 07:22:01 +0000
committerOliver Bolte <obo@openoffice.org>2006-07-14 07:22:01 +0000
commite0efe466788fdf4ce05eca1095c915678d9e439a (patch)
tree275d1ce414de9d91f278613ec44740bf1d8ce574 /starmath/inc/types.hxx
parentfc236059a4e5d3ea5aeb07bf4de67c154cff2592 (diff)
INTEGRATION: CWS tl21 (1.6.82); FILE MERGED
2006/05/08 14:59:53 tl 1.6.82.2: #i59434# converting private-use-are codepoints to regular unicode code-points when exporting to MathML 2006/05/08 14:29:43 tl 1.6.82.1: #i59434# converting private-use-are codepoints to regular unicode code-points when exporting to MathML
Diffstat (limited to 'starmath/inc/types.hxx')
-rw-r--r--starmath/inc/types.hxx307
1 files changed, 166 insertions, 141 deletions
diff --git a/starmath/inc/types.hxx b/starmath/inc/types.hxx
index 4685d64563f0..09239e96e2ce 100644
--- a/starmath/inc/types.hxx
+++ b/starmath/inc/types.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: types.hxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: rt $ $Date: 2005-09-07 15:01:03 $
+ * last change: $Author: obo $ $Date: 2006-07-14 08:22:01 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -35,6 +35,9 @@
#ifndef TYPES_HXX
#define TYPES_HXX
+#ifndef _SAL_TYPES_H_
+#include <sal/types.h>
+#endif
#define FONTNAME_MATH "StarSymbol"
#define FONTNAME_MATH2 "OpenSymbol"
@@ -44,6 +47,31 @@
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 );
+sal_Unicode ConvertUnicodeToMathPrivateUseArea( sal_Unicode cChar );
+
+sal_Unicode ConvertMathToMathType( sal_Unicode cChar );
+sal_Unicode ConvertMathTypeToMath( sal_Unicode cChar );
+
+sal_Unicode ConvertMathToMathML( sal_Unicode cChar );
+sal_Unicode ConvertMathMLToMath( sal_Unicode cChar );
+
+sal_Unicode GetTokenChar( sal_Unicode cChar, sal_Bool bConvertForExport );
+
+/////////////////////////////////////////////////////////////////
// enum definitions for characters from the 'StarSymbol' font
// (some chars have more than one alias!)
//! Note: not listed here does not(!) mean "not used"
@@ -51,145 +79,142 @@ enum SmPrintSize { PRINT_SIZE_NORMAL, PRINT_SIZE_SCALED, PRINT_SIZE_ZOOMED };
//
enum MathSymbol
{
- MS_FACT = (xub_Unicode) 0x0021,
- MS_INFINITY = (xub_Unicode) 0x221E,
- MS_SLASH = (xub_Unicode) 0x002F,
-
- MS_NDIVIDES = (xub_Unicode) 0x2224,
- MS_DRARROW = (xub_Unicode) 0x21D2,
- MS_DLARROW = (xub_Unicode) 0x21D0,
- MS_DLRARROW = (xub_Unicode) 0x21D4,
- MS_UNDERBRACE = (xub_Unicode) 0xE081,
- MS_OVERBRACE = (xub_Unicode) 0xE082,
- MS_CIRC = (xub_Unicode) 0x00B0,
- MS_ASSIGN = (xub_Unicode) 0x003D,
- MS_ERROR = (xub_Unicode) 0x00BF,
-
- MS_NEQ = (xub_Unicode) 0x2260,
- MS_PLUS = (xub_Unicode) 0xE083,
- MS_MINUS = (xub_Unicode) 0x2212,
- MS_MULTIPLY = (xub_Unicode) 0x2217,
- MS_TIMES = (xub_Unicode) 0x00D7,
- MS_CDOT = (xub_Unicode) 0x22C5,
- MS_DIV = (xub_Unicode) 0x00F7,
- MS_PLUSMINUS = (xub_Unicode) 0x00B1,
- MS_MINUSPLUS = (xub_Unicode) 0x2213,
- MS_OPLUS = (xub_Unicode) 0x2295,
- MS_OMINUS = (xub_Unicode) 0x2296,
- MS_OTIMES = (xub_Unicode) 0x2297,
- MS_ODIVIDE = (xub_Unicode) 0x2298,
- MS_ODOT = (xub_Unicode) 0x2299,
- MS_UNION = (xub_Unicode) 0x222A,
- MS_INTERSECT = (xub_Unicode) 0x2229,
-
- MS_LT = (xub_Unicode) 0xE084,
- MS_GT = (xub_Unicode) 0xE085,
- MS_LE = (xub_Unicode) 0x2264,
- MS_GE = (xub_Unicode) 0x2265,
- MS_LESLANT = (xub_Unicode) 0xE086,
- MS_GESLANT = (xub_Unicode) 0xE087,
- MS_LL = (xub_Unicode) 0x226A,
- MS_GG = (xub_Unicode) 0x226B,
- MS_SIM = (xub_Unicode) 0x007E,
- MS_SIMEQ = (xub_Unicode) 0x2243,
- MS_APPROX = (xub_Unicode) 0x2248,
- MS_DEF = (xub_Unicode) 0x225D,
- MS_EQUIV = (xub_Unicode) 0x2261,
- MS_PROP = (xub_Unicode) 0x221D,
- MS_PARTIAL = (xub_Unicode) 0x2202,
- MS_SUBSET = (xub_Unicode) 0x2282,
-
- MS_SUPSET = (xub_Unicode) 0x2283,
- MS_SUBSETEQ = (xub_Unicode) 0x2286,
- MS_SUPSETEQ = (xub_Unicode) 0x2287,
- MS_NSUBSET = (xub_Unicode) 0x2284,
- MS_NSUPSET = (xub_Unicode) 0x2285,
- MS_NSUBSETEQ = (xub_Unicode) 0x2288,
- MS_NSUPSETEQ = (xub_Unicode) 0x2289,
- MS_IN = (xub_Unicode) 0x2208,
- MS_NOTIN = (xub_Unicode) 0x2209,
- MS_EXISTS = (xub_Unicode) 0x2203,
- MS_BACKEPSILON = (xub_Unicode) 0x220D,
- MS_ALEPH = (xub_Unicode) 0x2135,
- MS_IM = (xub_Unicode) 0x2111,
- MS_RE = (xub_Unicode) 0x211C,
- MS_WP = (xub_Unicode) 0x2118,
-
- MS_LINE = (xub_Unicode) 0x2223,
- MS_DLINE = (xub_Unicode) 0x2225,
- MS_ORTHO = (xub_Unicode) 0x22A5,
- MS_DOTSLOW = (xub_Unicode) 0xE08B,
- MS_DOTSAXIS = (xub_Unicode) 0x22EF,
- MS_DOTSVERT = (xub_Unicode) 0x22EE,
- MS_DOTSUP = (xub_Unicode) 0x22F0,
- MS_DOTSDOWN = (xub_Unicode) 0x22F1,
- MS_TRANSR = (xub_Unicode) 0x22B6,
- MS_TRANSL = (xub_Unicode) 0x22B7,
- MS_RIGHTARROW = (xub_Unicode) 0xE08C,
- MS_BACKSLASH = (xub_Unicode) 0x2216,
- MS_NEG = (xub_Unicode) 0x00AC,
-
- MS_INT = (xub_Unicode) 0x222B,
- MS_IINT = (xub_Unicode) 0x222C,
- MS_IIINT = (xub_Unicode) 0x222D,
- MS_LINT = (xub_Unicode) 0x222E,
- MS_LLINT = (xub_Unicode) 0x222F,
- MS_LLLINT = (xub_Unicode) 0x2230,
- MS_SQRT = (xub_Unicode) 0xE08D,
- MS_SQRT2 = (xub_Unicode) 0xE08F,
- MS_COPROD = (xub_Unicode) 0x2210,
- MS_PROD = (xub_Unicode) 0x220F,
- MS_SUM = (xub_Unicode) 0x2211,
- MS_NABLA = (xub_Unicode) 0x2207,
- MS_FORALL = (xub_Unicode) 0x2200,
-
- MS_HAT = (xub_Unicode) 0xE091,
- MS_CHECK = (xub_Unicode) 0xE092,
- MS_BREVE = (xub_Unicode) 0xE093,
- MS_ACUTE = (xub_Unicode) 0xE094,
- MS_GRAVE = (xub_Unicode) 0xE095,
- MS_TILDE = (xub_Unicode) 0xE096,
- MS_BAR = (xub_Unicode) 0xE097,
- MS_VEC = (xub_Unicode) 0xE098,
- MS_DOT = (xub_Unicode) 0x02D9,
- MS_DDOT = (xub_Unicode) 0x00A8,
- MS_DDDOT = (xub_Unicode) 0xE09B,
- MS_CIRCLE = (xub_Unicode) 0x02DA,
- MS_AND = (xub_Unicode) 0x2227,
- MS_OR = (xub_Unicode) 0x2228,
- MS_NI = (xub_Unicode) 0x220B,
- MS_EMPTYSET = (xub_Unicode) 0x2205,
-
- MS_LBRACE = (xub_Unicode) 0x007B,
- MS_RBRACE = (xub_Unicode) 0x007D,
- MS_LPARENT = (xub_Unicode) 0xE09E,
- MS_RPARENT = (xub_Unicode) 0xE09F,
- MS_LANGLE = (xub_Unicode) 0x2329,
- MS_RANGLE = (xub_Unicode) 0x232A,
- MS_LBRACKET = (xub_Unicode) 0x005B,
- MS_RBRACKET = (xub_Unicode) 0x005D,
-
- MS_LDBRACKET = (xub_Unicode) 0x301A,
- MS_RDBRACKET = (xub_Unicode) 0x301B,
- MS_PLACE = (xub_Unicode) 0xE0AA,
-
- MS_LCEIL = (xub_Unicode) 0x2308,
- MS_LFLOOR = (xub_Unicode) 0x230A,
- MS_RCEIL = (xub_Unicode) 0x2309,
- MS_RFLOOR = (xub_Unicode) 0x230B,
- MS_SQRT2_X = (xub_Unicode) 0xE0AB,
-
- MS_TOP = (xub_Unicode) 0xE0D9,
- MS_HBAR = (xub_Unicode) 0x210F,
- MS_LAMBDABAR = (xub_Unicode) 0x019B,
- MS_LEFTARROW = (xub_Unicode) 0xE0DB,
- MS_UPARROW = (xub_Unicode) 0xE0DC,
- MS_DOWNARROW = (xub_Unicode) 0xE0DD,
- MS_SETN = (xub_Unicode) 0x2115,
- MS_SETZ = (xub_Unicode) 0x2124,
- MS_SETQ = (xub_Unicode) 0x211A,
- MS_SETR = (xub_Unicode) 0x211D,
- MS_SETC = (xub_Unicode) 0x2102
+ 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
};