update dev300-m58
[ooovba.git] / offapi / com / sun / star / i18n / KParseTokens.idl
blob38322a6369545891d698412a4c6e9360078750bb
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: KParseTokens.idl,v $
10 * $Revision: 1.8 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __com_sun_star_i18n_KParseTokens_idl__
31 #define __com_sun_star_i18n_KParseTokens_idl__
33 //============================================================================
35 module com { module sun { module star { module i18n {
37 //============================================================================
39 /**
40 These constants specify the characters a name or identifier token to
41 be parsed can have.
43 <p> They are passed to
44 <member>XCharacterClassification::parseAnyToken()</member> and
45 <member>XCharacterClassification::parsePredefinedToken()</member>.
46 They are also set in the <member>ParseResult::StartFlags</member>
47 and <member>ParseResult::ContFlags</member>. </p>
50 published constants KParseTokens
52 /// ASCII A-Z upper alpha
53 const long ASC_UPALPHA = 0x00000001;
55 /// ASCII a-z lower alpha
56 const long ASC_LOALPHA = 0x00000002;
58 /// ASCII 0-9 digit
59 const long ASC_DIGIT = 0x00000004;
61 /// ASCII '_' underscore
62 const long ASC_UNDERSCORE = 0x00000008;
64 /// ASCII '$' dollar
65 const long ASC_DOLLAR = 0x00000010;
67 /// ASCII '.' dot/point
68 const long ASC_DOT = 0x00000020;
70 /// ASCII ':' colon
71 const long ASC_COLON = 0x00000040;
73 /// Special value to allow control characters (0x00 &lt; char &lt; 0x20)
74 const long ASC_CONTROL = 0x00000200;
76 /** Special value to allow anything below 128 except control
77 characters. <strong>Not</strong> set in
78 <type>ParseResult</type>. */
79 const long ASC_ANY_BUT_CONTROL = 0x00000400;
81 /** Additional flag set in <member>ParseResult::StartFlags</member>
82 or <member>ParseResult::ContFlags</member>. Set if none of the
83 above ASC_... (except ASC_ANY_...) single values match an ASCII
84 character parsed. */
85 const long ASC_OTHER = 0x00000800;
87 /// Unicode (above 127) upper case letter
88 const long UNI_UPALPHA = 0x00001000;
90 /// Unicode (above 127) lower case letter
91 const long UNI_LOALPHA = 0x00002000;
93 /// Unicode (above 127) decimal digit number
94 const long UNI_DIGIT = 0x00004000;
96 /// Unicode (above 127) title case letter
97 const long UNI_TITLE_ALPHA = 0x00008000;
99 /// Unicode (above 127) modifier letter
100 const long UNI_MODIFIER_LETTER = 0x00010000;
102 /// Unicode (above 127) other letter
103 const long UNI_OTHER_LETTER = 0x00020000;
105 /// Unicode (above 127) letter number
106 const long UNI_LETTER_NUMBER = 0x00040000;
108 /// Unicode (above 127) other number
109 const long UNI_OTHER_NUMBER = 0x00080000;
111 /** If this bit is set in <em>nContCharFlags</em> parameters and a
112 string enclosed in double quotes is parsed and two consecutive
113 double quotes are encountered, the string is ended. If this bit
114 is not set, the two double quotes are parsed as one escaped
115 double quote and string parsing continues. The bit is ignored in
116 <em>nStartCharFlags</em> parameters.
118 <p> Example: <br/>
119 "abc""def" --> bit not set => abc"def <br/>
120 "abc""def" --> bit set => abc </p>
122 const long TWO_DOUBLE_QUOTES_BREAK_STRING = 0x10000000;
124 /** Additional flag set in <member>ParseResult::StartFlags</member>
125 or <member>ParseResult::ContFlags</member>. Set if none of the
126 above UNI_... single values match a Unicode character parsed. */
127 const long UNI_OTHER = 0x20000000;
129 /** Only valid for <em>nStartCharFlags</em> parameter to
130 <method>ChararacterClassification::parseAnyToken</method> and
131 <method>ChararacterClassification::parsePredefinedToken</method>,
132 ignored on <em>nContCharFlags</em> parameter.
133 <strong>Not</strong> set in <type>ParseResult</type>. */
134 const long IGNORE_LEADING_WS = 0x40000000;
137 // useful combinations
139 /// ASCII a-zA-Z lower or upper alpha
140 const long ASC_ALPHA = ASC_UPALPHA | ASC_LOALPHA;
142 /// ASCII a-zA-Z0-9 alphanumeric
143 const long ASC_ALNUM = ASC_ALPHA | ASC_DIGIT;
145 /// Unicode (above 127) lower or upper or title case alpha
146 const long UNI_ALPHA = UNI_UPALPHA | UNI_LOALPHA | UNI_TITLE_ALPHA;
148 /// Unicode (above 127) alphanumeric
149 const long UNI_ALNUM = UNI_ALPHA | UNI_DIGIT;
151 /// Unicode (above 127) alpha or letter
152 const long UNI_LETTER = UNI_ALPHA | UNI_MODIFIER_LETTER |
153 UNI_OTHER_LETTER;
155 /// Unicode (above 127) number
156 const long UNI_NUMBER = UNI_DIGIT | UNI_LETTER_NUMBER |
157 UNI_OTHER_NUMBER;
159 /// any (ASCII or Unicode) alpha
160 const long ANY_ALPHA = ASC_ALPHA | UNI_ALPHA;
162 /// any (ASCII or Unicode) digit
163 const long ANY_DIGIT = ASC_DIGIT | UNI_DIGIT;
165 /// any (ASCII or Unicode) alphanumeric
166 const long ANY_ALNUM = ASC_ALNUM | UNI_ALNUM;
168 /// any (ASCII or Unicode) letter
169 const long ANY_LETTER = ASC_ALPHA | UNI_LETTER;
171 /// any (ASCII or Unicode) number
172 const long ANY_NUMBER = ASC_DIGIT | UNI_NUMBER;
174 /// any (ASCII or Unicode) letter or number
175 const long ANY_LETTER_OR_NUMBER = ANY_LETTER | ANY_NUMBER;
178 //============================================================================
179 }; }; }; };
181 #endif