Bump for 3.6-28
[LibreOffice.git] / offapi / com / sun / star / i18n / KParseTokens.idl
blob4335828a30bea2ce557faf9af943b4a0f423e000
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
28 #ifndef __com_sun_star_i18n_KParseTokens_idl__
29 #define __com_sun_star_i18n_KParseTokens_idl__
31 //============================================================================
33 module com { module sun { module star { module i18n {
35 //============================================================================
37 /**
38 These constants specify the characters a name or identifier token to
39 be parsed can have.
41 <p> They are passed to
42 <member>XCharacterClassification::parseAnyToken()</member> and
43 <member>XCharacterClassification::parsePredefinedToken()</member>.
44 They are also set in the <member>ParseResult::StartFlags</member>
45 and <member>ParseResult::ContFlags</member>. </p>
48 published constants KParseTokens
50 /// ASCII A-Z upper alpha
51 const long ASC_UPALPHA = 0x00000001;
53 /// ASCII a-z lower alpha
54 const long ASC_LOALPHA = 0x00000002;
56 /// ASCII 0-9 digit
57 const long ASC_DIGIT = 0x00000004;
59 /// ASCII '_' underscore
60 const long ASC_UNDERSCORE = 0x00000008;
62 /// ASCII '$' dollar
63 const long ASC_DOLLAR = 0x00000010;
65 /// ASCII '.' dot/point
66 const long ASC_DOT = 0x00000020;
68 /// ASCII ':' colon
69 const long ASC_COLON = 0x00000040;
71 /// Special value to allow control characters (0x00 &lt; char &lt; 0x20)
72 const long ASC_CONTROL = 0x00000200;
74 /** Special value to allow anything below 128 except control
75 characters. <strong>Not</strong> set in
76 <type>ParseResult</type>. */
77 const long ASC_ANY_BUT_CONTROL = 0x00000400;
79 /** Additional flag set in <member>ParseResult::StartFlags</member>
80 or <member>ParseResult::ContFlags</member>. Set if none of the
81 above ASC_... (except ASC_ANY_...) single values match an ASCII
82 character parsed. */
83 const long ASC_OTHER = 0x00000800;
85 /// Unicode (above 127) upper case letter
86 const long UNI_UPALPHA = 0x00001000;
88 /// Unicode (above 127) lower case letter
89 const long UNI_LOALPHA = 0x00002000;
91 /// Unicode (above 127) decimal digit number
92 const long UNI_DIGIT = 0x00004000;
94 /// Unicode (above 127) title case letter
95 const long UNI_TITLE_ALPHA = 0x00008000;
97 /// Unicode (above 127) modifier letter
98 const long UNI_MODIFIER_LETTER = 0x00010000;
100 /// Unicode (above 127) other letter
101 const long UNI_OTHER_LETTER = 0x00020000;
103 /// Unicode (above 127) letter number
104 const long UNI_LETTER_NUMBER = 0x00040000;
106 /// Unicode (above 127) other number
107 const long UNI_OTHER_NUMBER = 0x00080000;
109 /** If this bit is set in <em>nContCharFlags</em> parameters and a
110 string enclosed in double quotes is parsed and two consecutive
111 double quotes are encountered, the string is ended. If this bit
112 is not set, the two double quotes are parsed as one escaped
113 double quote and string parsing continues. The bit is ignored in
114 <em>nStartCharFlags</em> parameters.
116 <p> Example: <br/>
117 "abc""def" --> bit not set => abc"def <br/>
118 "abc""def" --> bit set => abc </p>
120 const long TWO_DOUBLE_QUOTES_BREAK_STRING = 0x10000000;
122 /** Additional flag set in <member>ParseResult::StartFlags</member>
123 or <member>ParseResult::ContFlags</member>. Set if none of the
124 above UNI_... single values match a Unicode character parsed. */
125 const long UNI_OTHER = 0x20000000;
127 /** Only valid for <em>nStartCharFlags</em> parameter to
128 <method>ChararacterClassification::parseAnyToken</method> and
129 <method>ChararacterClassification::parsePredefinedToken</method>,
130 ignored on <em>nContCharFlags</em> parameter.
131 <strong>Not</strong> set in <type>ParseResult</type>. */
132 const long IGNORE_LEADING_WS = 0x40000000;
135 // useful combinations
137 /// ASCII a-zA-Z lower or upper alpha
138 const long ASC_ALPHA = ASC_UPALPHA | ASC_LOALPHA;
140 /// ASCII a-zA-Z0-9 alphanumeric
141 const long ASC_ALNUM = ASC_ALPHA | ASC_DIGIT;
143 /// Unicode (above 127) lower or upper or title case alpha
144 const long UNI_ALPHA = UNI_UPALPHA | UNI_LOALPHA | UNI_TITLE_ALPHA;
146 /// Unicode (above 127) alphanumeric
147 const long UNI_ALNUM = UNI_ALPHA | UNI_DIGIT;
149 /// Unicode (above 127) alpha or letter
150 const long UNI_LETTER = UNI_ALPHA | UNI_MODIFIER_LETTER |
151 UNI_OTHER_LETTER;
153 /// Unicode (above 127) number
154 const long UNI_NUMBER = UNI_DIGIT | UNI_LETTER_NUMBER |
155 UNI_OTHER_NUMBER;
157 /// any (ASCII or Unicode) alpha
158 const long ANY_ALPHA = ASC_ALPHA | UNI_ALPHA;
160 /// any (ASCII or Unicode) digit
161 const long ANY_DIGIT = ASC_DIGIT | UNI_DIGIT;
163 /// any (ASCII or Unicode) alphanumeric
164 const long ANY_ALNUM = ASC_ALNUM | UNI_ALNUM;
166 /// any (ASCII or Unicode) letter
167 const long ANY_LETTER = ASC_ALPHA | UNI_LETTER;
169 /// any (ASCII or Unicode) number
170 const long ANY_NUMBER = ASC_DIGIT | UNI_NUMBER;
172 /// any (ASCII or Unicode) letter or number
173 const long ANY_LETTER_OR_NUMBER = ANY_LETTER | ANY_NUMBER;
176 //============================================================================
177 }; }; }; };
179 #endif
181 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */