LibreOffice LibreOffice 25.2 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
21module com { module sun { module star { module i18n {
22
23
24/*
25
26 Possible tokens to be parsed with parse...Token():
27
28 UPASCALPHA=[A-Z]
29 LOASCALPHA=[a-z]
30 ASCALPHA=1*(UPASCALPHA|LOASCALPHA)
31 ASCDIGIT=[0-9]
32 ASC_UNDERSCORE='_'
33 ASC_SPACE=' '
34 ASC_HT='\0x9'
35 ASC_VT='\0xb'
36 ASC_WS=ASC_SPACE|ASC_HT|ASC_VT
37 ASC_DBL_QUOTE=\";
38 ASC_QUOTE=\'
39 UPASC_IDENTIFIER=UPASCALPHA *(UPASCALPHA|ASCDIGIT|ASC_UNDERSCORE)
40
41 ALPHA,DIGIT are the tokens which return true for isAlpha and isDigit
42 ALNUM=ALPHA|DIGIT
43 CHAR=anycharacter
44 WS=isWhiteSpace()
45 SIGN='+'|'-'
46 DECSEP=<locale dependent decimal separator>
47 GRPSEP=<locale dependent thousand separator>
48 EXPONENT=(E|e)[SIGN]1*ASC_DIGIT
49
50 IDENTIFIER=ALPHA *ALNUM
51 UIDENTIFIER=(ALPHA | ASC_UNDERSCORE) *(ALNUM|ASC_UNDERSCORE)
52 ALPHA_NAME=ALPHA *(ALNUM|DEFCHARS)
53 ANY_NAME=1*(ALNUM|DEFCHARS)
54 SINGLE_QUOTE_NAME=ASC_QUOTE(1*CHAR)ASC_QUOTE
55 DOUBLE_QUOTE_NAME=ASC_DBL_QUOTE(*CHAR)ASC_DBL_QUOTE
56 ASC_NUMBER=[SIGN]*(1*ASC_DIGIT *(GRPSEP 1*ASC_DIGIT))[DECSEP]1*ASC_DIGIT[EXPONENT]
57 NUMBER=[SIGN]*(1*DIGIT *(GRPSEP 1*DIGIT))[DECSEP]1*DIGIT[EXPONENT]
58
59*/
60
61
67published interface XCharacterClassification : com::sun::star::uno::XInterface
68{
72 string toUpper( [in] string aText, [in] long nPos, [in] long nCount,
73 [in] com::sun::star::lang::Locale aLocale );
74
78 string toLower( [in] string aText, [in] long nPos, [in] long nCount,
79 [in] com::sun::star::lang::Locale aLocale );
80
84 string toTitle( [in] string aText, [in] long nPos, [in] long nCount,
85 [in] com::sun::star::lang::Locale aLocale );
86
88 short getType( [in] string aText, [in] long nPos );
89
93 short getCharacterDirection( [in] string aText, [in] long nPos );
94
96 short getScript( [in] string aText, [in] long nPos );
97
99 long getCharacterType( [in] string aText, [in] long nPos,
100 [in] com::sun::star::lang::Locale aLocale );
101
120 long getStringType( [in] string aText, [in] long nPos, [in] long nCount,
121 [in] com::sun::star::lang::Locale aLocale );
122
123
202 ParseResult parseAnyToken(
203 [in] string aText,
204 [in] long nPos,
205 [in] com::sun::star::lang::Locale aLocale,
206 [in] long nStartCharFlags,
207 [in] string aUserDefinedCharactersStart,
208 [in] long nContCharFlags,
209 [in] string aUserDefinedCharactersCont
210 );
211
261 ParseResult parsePredefinedToken(
262 [in] long nTokenType,
263 [in] string aText,
264 [in] long nPos,
265 [in] com::sun::star::lang::Locale aLocale,
266 [in] long nStartCharFlags,
267 [in] string aUserDefinedCharactersStart,
268 [in] long nContCharFlags,
269 [in] string aUserDefinedCharactersCont
270 );
271};
272
273}; }; }; };
274
275/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
com::sun::star::i18n::XCharacterClassification
Character classification (upper, lower, digit, letter, number, ...) and generic Unicode enabled parse...
Definition: XCharacterClassification.idl:68
com::sun::star::i18n::XCharacterClassification::getType
short getType([in] string aText, [in] long nPos)
Get UnicodeType of character at position nPos.
com::sun::star::i18n::XCharacterClassification::getCharacterDirection
short getCharacterDirection([in] string aText, [in] long nPos)
Get DirectionProperty of character at position nPos.
com::sun::star::i18n::XCharacterClassification::getStringType
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.
com::sun::star::i18n::XCharacterClassification::getCharacterType
long getCharacterType([in] string aText, [in] long nPos, [in] com::sun::star::lang::Locale aLocale)
Get KCharacterType of character at position nPos.
com::sun::star::i18n::XCharacterClassification::getScript
short getScript([in] string aText, [in] long nPos)
Get UnicodeScript of character at position nPos.
com::sun::star::i18n::XCharacterClassification::parseAnyToken
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.
com::sun::star::i18n::XCharacterClassification::toTitle
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.
com::sun::star::i18n::XCharacterClassification::toUpper
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.
com::sun::star::i18n::XCharacterClassification::parsePredefinedToken
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.
com::sun::star::i18n::XCharacterClassification::toLower
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.
com::sun::star::uno::XInterface
base interface of all UNO interfaces
Definition: XInterface.idl:46
com
Definition: Ambiguous.idl:20
com::sun::star::i18n::ParseResult
Parser results returned by XCharacterClassification::parseAnyToken() and XCharacterClassification::pa...
Definition: ParseResult.idl:31
com::sun::star::lang::Locale
object represents a specific geographical, political, or cultural region.
Definition: Locale.idl:34