LibreOffice
LibreOffice 24.2 SDK API Reference
Variables
com::sun::star::i18n::KParseTokens Constant Group Referencepublished

These constants specify the characters a name or identifier token to be parsed can have. More...

Variables

const long ASC_UPALPHA = 0x00000001
 ASCII A-Z upper alpha. More...
 
const long ASC_LOALPHA = 0x00000002
 ASCII a-z lower alpha. More...
 
const long ASC_DIGIT = 0x00000004
 ASCII 0-9 digit. More...
 
const long ASC_UNDERSCORE = 0x00000008
 ASCII '_' underscore. More...
 
const long ASC_DOLLAR = 0x00000010
 ASCII '$' dollar. More...
 
const long ASC_DOT = 0x00000020
 ASCII '.' dot/point. More...
 
const long ASC_COLON = 0x00000040
 ASCII ':' colon. More...
 
const long ASC_CONTROL = 0x00000200
 Special value to allow control characters (0x00 < char < 0x20) More...
 
const long ASC_ANY_BUT_CONTROL = 0x00000400
 Special value to allow anything below 128 except control characters. More...
 
const long ASC_OTHER = 0x00000800
 Additional flag set in ParseResult::StartFlags or ParseResult::ContFlags. More...
 
const long UNI_UPALPHA = 0x00001000
 Unicode (above 127) upper case letter. More...
 
const long UNI_LOALPHA = 0x00002000
 Unicode (above 127) lower case letter. More...
 
const long UNI_DIGIT = 0x00004000
 Unicode (above 127) decimal digit number. More...
 
const long UNI_TITLE_ALPHA = 0x00008000
 Unicode (above 127) title case letter. More...
 
const long UNI_MODIFIER_LETTER = 0x00010000
 Unicode (above 127) modifier letter. More...
 
const long UNI_OTHER_LETTER = 0x00020000
 Unicode (above 127) other letter. More...
 
const long UNI_LETTER_NUMBER = 0x00040000
 Unicode (above 127) letter number. More...
 
const long UNI_OTHER_NUMBER = 0x00080000
 Unicode (above 127) other number. More...
 
const long GROUP_SEPARATOR_IN_NUMBER = 0x08000000
 If this bit is set in nContCharFlags parameters, the locale's group separator characters in numbers are accepted and ignored/skipped. More...
 
const long TWO_DOUBLE_QUOTES_BREAK_STRING = 0x10000000
 If this bit is set in nContCharFlags parameters and a string enclosed in double quotes is parsed and two consecutive double quotes are encountered, the string is ended. More...
 
const long UNI_OTHER = 0x20000000
 Additional flag set in ParseResult::StartFlags or ParseResult::ContFlags. More...
 
const long IGNORE_LEADING_WS = 0x40000000
 Only valid for nStartCharFlags parameter to CharacterClassification::parseAnyToken() and CharacterClassification::parsePredefinedToken(), ignored on nContCharFlags parameter. More...
 
const long ASC_ALPHA = ASC_UPALPHA | ASC_LOALPHA
 ASCII a-zA-Z lower or upper alpha. More...
 
const long ASC_ALNUM = ASC_ALPHA | ASC_DIGIT
 ASCII a-zA-Z0-9 alphanumeric. More...
 
const long UNI_ALPHA = UNI_UPALPHA | UNI_LOALPHA | UNI_TITLE_ALPHA
 Unicode (above 127) lower or upper or title case alpha. More...
 
const long UNI_ALNUM = UNI_ALPHA | UNI_DIGIT
 Unicode (above 127) alphanumeric. More...
 
const long UNI_LETTER
 Unicode (above 127) alpha or letter. More...
 
const long UNI_NUMBER
 Unicode (above 127) number. More...
 
const long ANY_ALPHA = ASC_ALPHA | UNI_ALPHA
 any (ASCII or Unicode) alpha More...
 
const long ANY_DIGIT = ASC_DIGIT | UNI_DIGIT
 any (ASCII or Unicode) digit More...
 
const long ANY_ALNUM = ASC_ALNUM | UNI_ALNUM
 any (ASCII or Unicode) alphanumeric More...
 
const long ANY_LETTER = ASC_ALPHA | UNI_LETTER
 any (ASCII or Unicode) letter More...
 
const long ANY_NUMBER = ASC_DIGIT | UNI_NUMBER
 any (ASCII or Unicode) number More...
 
const long ANY_LETTER_OR_NUMBER = ANY_LETTER | ANY_NUMBER
 any (ASCII or Unicode) letter or number More...
 

Detailed Description

These constants specify the characters a name or identifier token to be parsed can have.

They are passed to XCharacterClassification::parseAnyToken() and XCharacterClassification::parsePredefinedToken(). They are also set in the ParseResult::StartFlags and ParseResult::ContFlags.

Variable Documentation

◆ ANY_ALNUM

const long ANY_ALNUM = ASC_ALNUM | UNI_ALNUM

any (ASCII or Unicode) alphanumeric

◆ ANY_ALPHA

const long ANY_ALPHA = ASC_ALPHA | UNI_ALPHA

any (ASCII or Unicode) alpha

◆ ANY_DIGIT

const long ANY_DIGIT = ASC_DIGIT | UNI_DIGIT

any (ASCII or Unicode) digit

◆ ANY_LETTER

const long ANY_LETTER = ASC_ALPHA | UNI_LETTER

any (ASCII or Unicode) letter

◆ ANY_LETTER_OR_NUMBER

const long ANY_LETTER_OR_NUMBER = ANY_LETTER | ANY_NUMBER

any (ASCII or Unicode) letter or number

◆ ANY_NUMBER

const long ANY_NUMBER = ASC_DIGIT | UNI_NUMBER

any (ASCII or Unicode) number

◆ ASC_ALNUM

const long ASC_ALNUM = ASC_ALPHA | ASC_DIGIT

ASCII a-zA-Z0-9 alphanumeric.

◆ ASC_ALPHA

const long ASC_ALPHA = ASC_UPALPHA | ASC_LOALPHA

ASCII a-zA-Z lower or upper alpha.

◆ ASC_ANY_BUT_CONTROL

const long ASC_ANY_BUT_CONTROL = 0x00000400

Special value to allow anything below 128 except control characters.

Not set in ParseResult.

◆ ASC_COLON

const long ASC_COLON = 0x00000040

ASCII ':' colon.

◆ ASC_CONTROL

const long ASC_CONTROL = 0x00000200

Special value to allow control characters (0x00 < char < 0x20)

◆ ASC_DIGIT

const long ASC_DIGIT = 0x00000004

ASCII 0-9 digit.

◆ ASC_DOLLAR

const long ASC_DOLLAR = 0x00000010

ASCII '$' dollar.

◆ ASC_DOT

const long ASC_DOT = 0x00000020

ASCII '.' dot/point.

◆ ASC_LOALPHA

const long ASC_LOALPHA = 0x00000002

ASCII a-z lower alpha.

◆ ASC_OTHER

const long ASC_OTHER = 0x00000800

Additional flag set in ParseResult::StartFlags or ParseResult::ContFlags.

Set if none of the above ASC_... (except ASC_ANY_...) single values match an ASCII character parsed.

◆ ASC_UNDERSCORE

const long ASC_UNDERSCORE = 0x00000008

ASCII '_' underscore.

◆ ASC_UPALPHA

const long ASC_UPALPHA = 0x00000001

ASCII A-Z upper alpha.

◆ GROUP_SEPARATOR_IN_NUMBER

const long GROUP_SEPARATOR_IN_NUMBER = 0x08000000

If this bit is set in nContCharFlags parameters, the locale's group separator characters in numbers are accepted and ignored/skipped.

Else a group separator in a number ends the current token. A leading group separator is never accepted. If an accepted group separator was encountered in a number (ParseResult::TokenType is KParseType::ASC_NUMBER or KParseType::UNI_NUMBER) this bit is also set in ParseResult::ContFlags.

NOTE: absence of this bit in nContCharFlags changes the default behaviour that in prior releases accepted numbers with group separators but lead to unexpected results when parsing formula expressions where the user entered a (wrong) separator that happened to be the group separator instead of an intended decimal separator. Usually inline numbers in a formula expression do not contain group separators.

Since
LibreOffice 6.2

◆ IGNORE_LEADING_WS

const long IGNORE_LEADING_WS = 0x40000000

Only valid for nStartCharFlags parameter to CharacterClassification::parseAnyToken() and CharacterClassification::parsePredefinedToken(), ignored on nContCharFlags parameter.

Not set in ParseResult.

◆ TWO_DOUBLE_QUOTES_BREAK_STRING

const long TWO_DOUBLE_QUOTES_BREAK_STRING = 0x10000000

If this bit is set in nContCharFlags parameters and a string enclosed in double quotes is parsed and two consecutive double quotes are encountered, the string is ended.

If this bit is not set, the two double quotes are parsed as one escaped double quote and string parsing continues. The bit is ignored in nStartCharFlags parameters.

Example:
"abc""def" –> bit not set => abc"def <br/> "abc""def" –> bit set => abc

◆ UNI_ALNUM

const long UNI_ALNUM = UNI_ALPHA | UNI_DIGIT

Unicode (above 127) alphanumeric.

◆ UNI_ALPHA

const long UNI_ALPHA = UNI_UPALPHA | UNI_LOALPHA | UNI_TITLE_ALPHA

Unicode (above 127) lower or upper or title case alpha.

◆ UNI_DIGIT

const long UNI_DIGIT = 0x00004000

Unicode (above 127) decimal digit number.

◆ UNI_LETTER

const long UNI_LETTER
Initial value:
const long UNI_ALPHA
Unicode (above 127) lower or upper or title case alpha.
Definition: KParseTokens.idl:153
const long UNI_MODIFIER_LETTER
Unicode (above 127) modifier letter.
Definition: KParseTokens.idl:85
const long UNI_OTHER_LETTER
Unicode (above 127) other letter.
Definition: KParseTokens.idl:88

Unicode (above 127) alpha or letter.

◆ UNI_LETTER_NUMBER

const long UNI_LETTER_NUMBER = 0x00040000

Unicode (above 127) letter number.

◆ UNI_LOALPHA

const long UNI_LOALPHA = 0x00002000

Unicode (above 127) lower case letter.

◆ UNI_MODIFIER_LETTER

const long UNI_MODIFIER_LETTER = 0x00010000

Unicode (above 127) modifier letter.

◆ UNI_NUMBER

const long UNI_NUMBER
Initial value:
const long UNI_DIGIT
Unicode (above 127) decimal digit number.
Definition: KParseTokens.idl:79
const long UNI_LETTER_NUMBER
Unicode (above 127) letter number.
Definition: KParseTokens.idl:91
const long UNI_OTHER_NUMBER
Unicode (above 127) other number.
Definition: KParseTokens.idl:94

Unicode (above 127) number.

◆ UNI_OTHER

const long UNI_OTHER = 0x20000000

Additional flag set in ParseResult::StartFlags or ParseResult::ContFlags.

Set if none of the above UNI_... single values match a Unicode character parsed.

◆ UNI_OTHER_LETTER

const long UNI_OTHER_LETTER = 0x00020000

Unicode (above 127) other letter.

◆ UNI_OTHER_NUMBER

const long UNI_OTHER_NUMBER = 0x00080000

Unicode (above 127) other number.

◆ UNI_TITLE_ALPHA

const long UNI_TITLE_ALPHA = 0x00008000

Unicode (above 127) title case letter.

◆ UNI_UPALPHA

const long UNI_UPALPHA = 0x00001000

Unicode (above 127) upper case letter.