LibreOffice
LibreOffice 7.4 SDK API Reference
XCharacterClassification.idl
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #ifndef __com_sun_star_i18n_XCharacterClassification_idl__
21 #define __com_sun_star_i18n_XCharacterClassification_idl__
22 
26 
27 
28 module com { module sun { module star { module i18n {
29 
30 
31 /*
32 
33 Possible tokens to be parsed with parse...Token():
34 
35 UPASCALPHA=[A-Z]
36 LOASCALPHA=[a-z]
37 ASCALPHA=1*(UPASCALPHA|LOASCALPHA)
38 ASCDIGIT=[0-9]
39 ASC_UNDERSCORE='_'
40 ASC_SPACE=' '
41 ASC_HT='\0x9'
42 ASC_VT='\0xb'
43 ASC_WS=ASC_SPACE|ASC_HT|ASC_VT
44 ASC_DBL_QUOTE=\";
45 ASC_QUOTE=\'
46 UPASC_IDENTIFIER=UPASCALPHA *(UPASCALPHA|ASCDIGIT|ASC_UNDERSCORE)
47 
48 ALPHA,DIGIT are the tokens which return true for isAlpha and isDigit
49 ALNUM=ALPHA|DIGIT
50 CHAR=anycharacter
51 WS=isWhiteSpace()
52 SIGN='+'|'-'
53 DECSEP=<locale dependent decimal separator>
54 GRPSEP=<locale dependent thousand separator>
55 EXPONENT=(E|e)[SIGN]1*ASC_DIGIT
56 
57 IDENTIFIER=ALPHA *ALNUM
58 UIDENTIFIER=(ALPHA | ASC_UNDERSCORE) *(ALNUM|ASC_UNDERSCORE)
59 ALPHA_NAME=ALPHA *(ALNUM|DEFCHARS)
60 ANY_NAME=1*(ALNUM|DEFCHARS)
61 SINGLE_QUOTE_NAME=ASC_QUOTE(1*CHAR)ASC_QUOTE
62 DOUBLE_QUOTE_NAME=ASC_DBL_QUOTE(*CHAR)ASC_DBL_QUOTE
63 ASC_NUMBER=[SIGN]*(1*ASC_DIGIT *(GRPSEP 1*ASC_DIGIT))[DECSEP]1*ASC_DIGIT[EXPONENT]
64 NUMBER=[SIGN]*(1*DIGIT *(GRPSEP 1*DIGIT))[DECSEP]1*DIGIT[EXPONENT]
65 
66 */
67 
68 
75 {
79  string toUpper( [in] string aText, [in] long nPos, [in] long nCount,
80  [in] com::sun::star::lang::Locale aLocale );
81 
85  string toLower( [in] string aText, [in] long nPos, [in] long nCount,
86  [in] com::sun::star::lang::Locale aLocale );
87 
91  string toTitle( [in] string aText, [in] long nPos, [in] long nCount,
92  [in] com::sun::star::lang::Locale aLocale );
93 
95  short getType( [in] string aText, [in] long nPos );
96 
100  short getCharacterDirection( [in] string aText, [in] long nPos );
101 
103  short getScript( [in] string aText, [in] long nPos );
104 
106  long getCharacterType( [in] string aText, [in] long nPos,
107  [in] com::sun::star::lang::Locale aLocale );
108 
117  long getStringType( [in] string aText, [in] long nPos, [in] long nCount,
118  [in] com::sun::star::lang::Locale aLocale );
119 
120 
200  [in] string aText,
201  [in] long nPos,
202  [in] com::sun::star::lang::Locale aLocale,
203  [in] long nStartCharFlags,
204  [in] string aUserDefinedCharactersStart,
205  [in] long nContCharFlags,
206  [in] string aUserDefinedCharactersCont
207  );
208 
259  [in] long nTokenType,
260  [in] string aText,
261  [in] long nPos,
262  [in] com::sun::star::lang::Locale aLocale,
263  [in] long nStartCharFlags,
264  [in] string aUserDefinedCharactersStart,
265  [in] long nContCharFlags,
266  [in] string aUserDefinedCharactersCont
267  );
268 };
269 
270 }; }; }; };
271 
272 #endif
273 
274 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Character classification (upper, lower, digit, letter, number, ...) and generic Unicode enabled parse...
Definition: XCharacterClassification.idl:75
short getType([in] string aText, [in] long nPos)
Get UnicodeType of character at position nPos.
short getCharacterDirection([in] string aText, [in] long nPos)
Get DirectionProperty of character at position nPos.
long getStringType([in] string aText, [in] long nPos, [in] long nCount, [in] com::sun::star::lang::Locale aLocale)
Get accumulated KCharacterTypes of string starting at position nPos of length nCount code points.
long getCharacterType([in] string aText, [in] long nPos, [in] com::sun::star::lang::Locale aLocale)
Get KCharacterType of character at position nPos.
short getScript([in] string aText, [in] long nPos)
Get UnicodeScript of character at position nPos.
ParseResult parseAnyToken([in] string aText, [in] long nPos, [in] com::sun::star::lang::Locale aLocale, [in] long nStartCharFlags, [in] string aUserDefinedCharactersStart, [in] long nContCharFlags, [in] string aUserDefinedCharactersCont)
Parse a string for a token starting at position nPos.
string toTitle([in] string aText, [in] long nPos, [in] long nCount, [in] com::sun::star::lang::Locale aLocale)
Convert to title case, starting at position nPos for nCount code points.
string toUpper([in] string aText, [in] long nPos, [in] long nCount, [in] com::sun::star::lang::Locale aLocale)
Convert lower case alpha to upper case alpha, starting at position nPos for nCount code points.
ParseResult parsePredefinedToken([in] long nTokenType, [in] string aText, [in] long nPos, [in] com::sun::star::lang::Locale aLocale, [in] long nStartCharFlags, [in] string aUserDefinedCharactersStart, [in] long nContCharFlags, [in] string aUserDefinedCharactersCont)
Parse a string for a token of type nTokenType starting at position nPos.
string toLower([in] string aText, [in] long nPos, [in] long nCount, [in] com::sun::star::lang::Locale aLocale)
Convert upper case alpha to lower case alpha, starting at position nPos for nCount code points.
base interface of all UNO interfaces
Definition: XInterface.idl:48
Definition: Ambiguous.idl:22
Parser results returned by XCharacterClassification::parseAnyToken() and XCharacterClassification::pa...
Definition: ParseResult.idl:33
object represents a specific geographical, political, or cultural region.
Definition: Locale.idl:38