LibreOffice Module lingucomponent (master) 1
Classes | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
Thesaurus Class Reference

#include <nthesimp.hxx>

Inheritance diagram for Thesaurus:
[legend]
Collaboration diagram for Thesaurus:
[legend]

Classes

struct  ThesInfo
 

Public Member Functions

 Thesaurus ()
 
virtual ~Thesaurus () override
 
virtual Sequence< Locale > SAL_CALL getLocales () override
 
virtual sal_Bool SAL_CALL hasLocale (const Locale &rLocale) override
 
virtual Sequence< Reference< css::linguistic2::XMeaning > > SAL_CALL queryMeanings (const OUString &rTerm, const Locale &rLocale, const css::uno::Sequence< css::beans::PropertyValue > &rProperties) override
 
virtual OUString SAL_CALL getServiceDisplayName (const Locale &rLocale) override
 
virtual void SAL_CALL initialize (const Sequence< Any > &rArguments) override
 
virtual void SAL_CALL dispose () override
 
virtual void SAL_CALL addEventListener (const Reference< XEventListener > &rxListener) override
 
virtual void SAL_CALL removeEventListener (const Reference< XEventListener > &rxListener) override
 
virtual OUString SAL_CALL getImplementationName () override
 
virtual sal_Bool SAL_CALL supportsService (const OUString &rServiceName) override
 
virtual Sequence< OUString > SAL_CALL getSupportedServiceNames () override
 

Private Member Functions

 Thesaurus (const Thesaurus &)=delete
 
Thesaurusoperator= (const Thesaurus &)=delete
 
linguistic::PropertyHelper_Thesaurus & GetPropHelper_Impl ()
 
linguistic::PropertyHelper_Thesaurus & GetPropHelper ()
 

Static Private Member Functions

static OUString makeLowerCase (const OUString &, CharClass const *)
 
static OUString makeUpperCase (const OUString &, CharClass const *)
 
static OUString makeInitCap (const OUString &, CharClass const *)
 

Private Attributes

Sequence< LocaleaSuppLocales
 
::comphelper::OInterfaceContainerHelper3< XEventListener > aEvtListeners
 
linguistic::PropertyHelper_Thesaurus * pPropHelper
 
bool bDisposing
 
std::vector< ThesInfomvThesInfo
 
Sequence< Reference< css::linguistic2::XMeaning > > prevMeanings
 
OUString prevTerm
 
LanguageType prevLocale
 

Detailed Description

Definition at line 55 of file nthesimp.hxx.

Constructor & Destructor Documentation

◆ Thesaurus() [1/2]

Thesaurus::Thesaurus ( const Thesaurus )
privatedelete

◆ Thesaurus() [2/2]

Thesaurus::Thesaurus ( )

Definition at line 69 of file nthesimp.cxx.

References GetLinguMutex(), and LANGUAGE_DONTKNOW.

◆ ~Thesaurus()

Thesaurus::~Thesaurus ( )
overridevirtual

Definition at line 75 of file nthesimp.cxx.

References mvThesInfo, and pPropHelper.

Member Function Documentation

◆ addEventListener()

void SAL_CALL Thesaurus::addEventListener ( const Reference< XEventListener > &  rxListener)
overridevirtual

◆ dispose()

void SAL_CALL Thesaurus::dispose ( void  )
overridevirtual

◆ getImplementationName()

OUString SAL_CALL Thesaurus::getImplementationName ( )
overridevirtual

Definition at line 549 of file nthesimp.cxx.

◆ getLocales()

Sequence< Locale > SAL_CALL Thesaurus::getLocales ( )
overridevirtual

! for compatibility with old dictionaries (the ones not using extensions ! or new configuration entries, but still using the dictionary.lst file) ! Get the list of old style spell checking dictionaries to use...

For each dictionary and each locale we need a separate entry. If this results in more than one dictionary per locale than (for now) it is undefined which dictionary gets used. In the future the implementation should support using several dictionaries for one locale.

Definition at line 96 of file nthesimp.cxx.

References SvtLinguConfigDictionaryEntry::aLocaleNames, SvtLinguConfigDictionaryEntry::aLocations, aSuppLocales, comphelper::containerToSequence(), DBG_ASSERT, SvtLinguConfig::GetActiveDictionariesByFormat(), GetLinguMutex(), LanguageTag::getLocale(), GetOldStyleDics(), SvtLinguConfig::GetSupportedDictionaryFormatsFor(), comphelper::LibreOfficeKit::isAllowlistedLanguage(), Locale, MergeNewStyleDicsAndOldStyleDics(), mvThesInfo, and nPos.

Referenced by hasLocale().

◆ GetPropHelper()

linguistic::PropertyHelper_Thesaurus & Thesaurus::GetPropHelper ( )
inlineprivate

Definition at line 89 of file nthesimp.hxx.

References GetPropHelper_Impl(), and pPropHelper.

Referenced by queryMeanings().

◆ GetPropHelper_Impl()

PropertyHelper_Thesaurus & Thesaurus::GetPropHelper_Impl ( )
private

after a reference is established

Definition at line 84 of file nthesimp.cxx.

References GetLinguProperties(), and pPropHelper.

Referenced by GetPropHelper().

◆ getServiceDisplayName()

OUString SAL_CALL Thesaurus::getServiceDisplayName ( const Locale rLocale)
overridevirtual

Definition at line 450 of file nthesimp.cxx.

References Translate::Create(), and Translate::get().

◆ getSupportedServiceNames()

Sequence< OUString > SAL_CALL Thesaurus::getSupportedServiceNames ( )
overridevirtual

Definition at line 559 of file nthesimp.cxx.

References SN_THESAURUS.

◆ hasLocale()

sal_Bool SAL_CALL Thesaurus::hasLocale ( const Locale rLocale)
overridevirtual

Definition at line 204 of file nthesimp.cxx.

References aSuppLocales, comphelper::findValue(), GetLinguMutex(), and getLocales().

Referenced by queryMeanings().

◆ initialize()

void SAL_CALL Thesaurus::initialize ( const Sequence< Any > &  rArguments)
overridevirtual

Pointer allows for access of the non-UNO functions. And the reference to the UNO-functions while increasing the ref-count and will implicitly free the memory when the object is no longer used.

after a reference is established

Definition at line 456 of file nthesimp.cxx.

References GetLinguMutex(), and pPropHelper.

◆ makeInitCap()

OUString Thesaurus::makeInitCap ( const OUString &  aTerm,
CharClass const *  pCC 
)
staticprivate

Definition at line 497 of file nthesimp.cxx.

References CharClass::lowercase(), and CharClass::uppercase().

Referenced by queryMeanings().

◆ makeLowerCase()

OUString Thesaurus::makeLowerCase ( const OUString &  aTerm,
CharClass const *  pCC 
)
staticprivate

Definition at line 483 of file nthesimp.cxx.

References CharClass::lowercase().

Referenced by queryMeanings().

◆ makeUpperCase()

OUString Thesaurus::makeUpperCase ( const OUString &  aTerm,
CharClass const *  pCC 
)
staticprivate

Definition at line 490 of file nthesimp.cxx.

References CharClass::uppercase().

Referenced by queryMeanings().

◆ operator=()

Thesaurus & Thesaurus::operator= ( const Thesaurus )
privatedelete

◆ queryMeanings()

Sequence< Reference< css::linguistic2::XMeaning > > SAL_CALL Thesaurus::queryMeanings ( const OUString &  rTerm,
const Locale rLocale,
const css::uno::Sequence< css::beans::PropertyValue > &  rProperties 
)
overridevirtual

◆ removeEventListener()

void SAL_CALL Thesaurus::removeEventListener ( const Reference< XEventListener > &  rxListener)
overridevirtual

◆ supportsService()

sal_Bool SAL_CALL Thesaurus::supportsService ( const OUString &  rServiceName)
overridevirtual

Definition at line 554 of file nthesimp.cxx.

References ServiceName, and cppu::supportsService().

Member Data Documentation

◆ aEvtListeners

::comphelper::OInterfaceContainerHelper3<XEventListener> Thesaurus::aEvtListeners
private

Definition at line 67 of file nthesimp.hxx.

Referenced by addEventListener(), dispose(), and removeEventListener().

◆ aSuppLocales

Sequence< Locale > Thesaurus::aSuppLocales
private

Definition at line 65 of file nthesimp.hxx.

Referenced by getLocales(), and hasLocale().

◆ bDisposing

bool Thesaurus::bDisposing
private

Definition at line 69 of file nthesimp.hxx.

Referenced by addEventListener(), dispose(), and removeEventListener().

◆ mvThesInfo

std::vector<ThesInfo> Thesaurus::mvThesInfo
private

Definition at line 78 of file nthesimp.hxx.

Referenced by getLocales(), queryMeanings(), and ~Thesaurus().

◆ pPropHelper

linguistic::PropertyHelper_Thesaurus* Thesaurus::pPropHelper
private

Definition at line 68 of file nthesimp.hxx.

Referenced by dispose(), GetPropHelper(), GetPropHelper_Impl(), initialize(), and ~Thesaurus().

◆ prevLocale

LanguageType Thesaurus::prevLocale
private

Definition at line 83 of file nthesimp.hxx.

Referenced by queryMeanings().

◆ prevMeanings

Sequence< Reference < css::linguistic2::XMeaning > > Thesaurus::prevMeanings
private

Definition at line 81 of file nthesimp.hxx.

Referenced by queryMeanings().

◆ prevTerm

OUString Thesaurus::prevTerm
private

Definition at line 82 of file nthesimp.hxx.

Referenced by queryMeanings().


The documentation for this class was generated from the following files: