LibreOffice
LibreOffice 5.3 SDK API Reference
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | List of all members
XCollator Interface Referencepublished

provides locale-sensitive collation algorithms for string comparison. More...

import "XCollator.idl";

Inheritance diagram for XCollator:
XInterface ChapterCollator Collator

Public Member Functions

long compareSubstring ([in] string aStr1, [in] long nOff1, [in] long nLen1, [in] string aStr2, [in] long nOff2, [in] long nLen2)
 Compare 2 substrings in specific locale and algorithm. More...
 
long compareString ([in] string aStr1, [in] string aStr2)
 Compare 2 strings in specific locale and algorithm. More...
 
long loadDefaultCollator ([in]::com::sun::star::lang::Locale aLocale, [in] long nCollatorOptions)
 Load the collator with default algorithm defined in locale data. More...
 
long loadCollatorAlgorithm ([in] string aAlgorithmName, [in]::com::sun::star::lang::Locale aLocale, [in] long nCollatorOptions)
 Load a particular collator algorithm for the locale. More...
 
sequence< string > listCollatorAlgorithms ([in]::com::sun::star::lang::Locale aLocale)
 List all collator algorithms for a given locale. More...
 
void loadCollatorAlgorithmWithEndUserOption ([in] string aAlgorithmName, [in]::com::sun::star::lang::Locale aLocale, [in] sequence< long > aCollatorOptions)
 Load a collator algorithm with options chosen by end user. More...
 
sequence< long > listCollatorOptions ([in] string aAlgorithmName)
 List all end user collator options for a given algorithm. More...
 
- Public Member Functions inherited from XInterface
any queryInterface ([in] type aType)
 queries for a new interface to an existing UNO object. More...
 
void acquire ()
 increases the reference counter by one. More...
 
void release ()
 decreases the reference counter by one. More...
 

Detailed Description

provides locale-sensitive collation algorithms for string comparison.

Developers Guide
OfficeDev - Implementing a New Locale - XCollator
OfficeDev - Overview and Using the API - XCollator

Member Function Documentation

long compareString ( [in] string  aStr1,
[in] string  aStr2 
)

Compare 2 strings in specific locale and algorithm.

Parameters
aStr1First string.
aStr2Second string.
Returns
1 if the first string is greater than the second string
0 if the first string is equal to the second string
-1 if the first string is less than the second string
long compareSubstring ( [in] string  aStr1,
[in] long  nOff1,
[in] long  nLen1,
[in] string  aStr2,
[in] long  nOff2,
[in] long  nLen2 
)

Compare 2 substrings in specific locale and algorithm.

Parameters
aStr1First string.
nOff1Offset (from 0) of the first string.
nLen1Length (from offset) of the first substring.
aStr2Second string
nOff2Offset (from 0) of the second string.
nLen2Length (from offset) of the second substring.
Returns
1 if the first string is greater than the second string
0 if the first string is equal to the second string
-1 if the first string is less than the second string
sequence<string> listCollatorAlgorithms ( [in] ::com::sun::star::lang::Locale  aLocale)

List all collator algorithms for a given locale.

Parameters
aLocaleThe locale for which to list algorithms.
Returns
A sequence of algorithm names.
sequence<long> listCollatorOptions ( [in] string  aAlgorithmName)

List all end user collator options for a given algorithm.

Parameters
aAlgorithmNameThe algorithm name for this collator.
Returns
An array of end user options available for the algorithm.
long loadCollatorAlgorithm ( [in] string  aAlgorithmName,
[in] ::com::sun::star::lang::Locale  aLocale,
[in] long  nCollatorOptions 
)

Load a particular collator algorithm for the locale.

Parameters
aAlgorithmNameThe algorithm to load.
aLocaleThe locale for this collator.
nCollatorOptionsA mask of CollatorOptions.
Returns
Returns 0 when loading was successful, otherwise throws runtime exception.
void loadCollatorAlgorithmWithEndUserOption ( [in] string  aAlgorithmName,
[in] ::com::sun::star::lang::Locale  aLocale,
[in] sequence< long >  aCollatorOptions 
)

Load a collator algorithm with options chosen by end user.

Parameters
aAlgorithmNameThe algorithm name to load.
aLocaleThe locale for this collator.
aCollatorOptionsA sequence of end user collator options like those returned by XCollator::listCollatorOptions().
long loadDefaultCollator ( [in] ::com::sun::star::lang::Locale  aLocale,
[in] long  nCollatorOptions 
)

Load the collator with default algorithm defined in locale data.

Parameters
aLocaleThe locale for this collator.
nCollatorOptionsA mask of CollatorOptions.
Returns
Returns 0 when loading was successful, otherwise throws runtime exception. In fact the return value should be ignored and the exception be caught instead.

The documentation for this interface was generated from the following file: