LibreOffice: XSpellChecker Interface Reference

LibreOffice LibreOffice 7.3 SDK API Reference

Public Member Functions | List of all members
XSpellChecker Interface Referencepublished

This interface allows for spell checking. More...

`import"XSpellChecker.idl";`

Inheritance diagram for XSpellChecker:

## Public Member Functions
boolean | isValid ([in] string aWord, [in] com::sun::star::lang::Locale aLocale, [in] com::sun::star::beans::PropertyValues aProperties) raises ( com::sun::star::lang::IllegalArgumentException )
| checks if a word is spelled correctly in a given language. More...
com::sun::star::linguistic2::XSpellAlternatives | spell ([in] string aWord, [in] com::sun::star::lang::Locale aLocale, [in] com::sun::star::beans::PropertyValues aProperties) raises ( com::sun::star::lang::IllegalArgumentException )
| This method checks if a word is spelled correctly in a given language. More...
Public Member Functions inherited from XSupportedLocales
sequence< com::sun::star::lang::Locale > | getLocales ()
boolean | hasLocale ([in] com::sun::star::lang::Locale aLocale)
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

This interface allows for spell checking.

It is possible to simply check if a word, in a specified language, is correct or additionally, if it was misspelled, some proposals how it might be correctly written.

See also
  com::sun::star::linguistic2::XSupportedLocales

## Member Function Documentation

## ◆ isValid()

boolean isValid | ( | [in] string | aWord,
|  | [in] com::sun::star::lang::Locale | aLocale,
|  | [in] com::sun::star::beans::PropertyValues | aProperties
| ) |  |
raises | ( | com::sun::star::lang::IllegalArgumentException
| ) |  |

checks if a word is spelled correctly in a given language.

Returns
  `TRUE` if the word is spelled correctly using the specified language, `FALSE` otherwise.

Parameters

  aWord | the word to be checked.
  aLocale | the Locale (language) to be used. If the Locale is empty, the word is spelled correctly by definition.

If aLocale is not supported an IllegalArgumentException exception is raised.

Parameters

  aProperties | provides property values to be used for this function call only. It is usually empty in order to use the default values supplied with the property set.

See also
  com::sun::star::lang::Locale

## ◆ spell()

com::sun::star::linguistic2::XSpellAlternatives spell | ( | [in] string | aWord,
|  | [in] com::sun::star::lang::Locale | aLocale,
|  | [in] com::sun::star::beans::PropertyValues | aProperties
| ) |  |
raises | ( | com::sun::star::lang::IllegalArgumentException
| ) |  |

This method checks if a word is spelled correctly in a given language.

Returns
  `NULL` if aWord is spelled correctly using aLocale. Otherwise, an XSpellAlternatives object with information about the reason of failure and, if available, proposals for spelling alternatives will be returned.

Parameters

  aWord | the word to be checked.
  aLocale | the language to be used.

If the language is not supported an IllegalArgumentException exception is raised.

Parameters

  aProperties | provides property values to be used for this function call only. It is usually empty in order to use the default values supplied with the property set. exception is raised.

See also
  com::sun::star::linguistic2::XSpellAlternatives
  com::sun::star::lang::Locale

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

- com/sun/star/linguistic2/XSpellChecker.idl