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::OInterfaceContainerHelper2 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 54 of file nthesimp.hxx.

Constructor & Destructor Documentation

Thesaurus::Thesaurus ( const Thesaurus )
privatedelete
Thesaurus::Thesaurus ( )

Definition at line 74 of file nthesimp.cxx.

References GetLinguMutex(), and LANGUAGE_DONTKNOW.

Thesaurus::~Thesaurus ( )
overridevirtual

Definition at line 80 of file nthesimp.cxx.

References mvThesInfo, and pPropHelper.

Member Function Documentation

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

Definition at line 554 of file nthesimp.cxx.

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 101 of file nthesimp.cxx.

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

Referenced by hasLocale().

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

Definition at line 88 of file nthesimp.hxx.

References GetPropHelper_Impl().

Referenced by queryMeanings().

PropertyHelper_Thesaurus & Thesaurus::GetPropHelper_Impl ( )
private

after a reference is established

Definition at line 89 of file nthesimp.cxx.

References GetLinguProperties(), and pPropHelper.

Referenced by GetPropHelper().

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

Definition at line 455 of file nthesimp.cxx.

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

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

Definition at line 564 of file nthesimp.cxx.

References SN_THESAURUS.

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

Definition at line 209 of file nthesimp.cxx.

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

Referenced by queryMeanings().

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 461 of file nthesimp.cxx.

References assert(), GetLinguMutex(), and pPropHelper.

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

Definition at line 502 of file nthesimp.cxx.

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

Referenced by queryMeanings().

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

Definition at line 488 of file nthesimp.cxx.

References CharClass::lowercase().

Referenced by queryMeanings().

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

Definition at line 495 of file nthesimp.cxx.

References CharClass::uppercase().

Referenced by queryMeanings().

Thesaurus& Thesaurus::operator= ( const Thesaurus )
privatedelete
Sequence< Reference< css::linguistic2::XMeaning > > SAL_CALL Thesaurus::queryMeanings ( const OUString &  rTerm,
const Locale rLocale,
const css::uno::Sequence< css::beans::PropertyValue > &  rProperties 
)
overridevirtual
void SAL_CALL Thesaurus::removeEventListener ( const Reference< XEventListener > &  rxListener)
overridevirtual
sal_Bool SAL_CALL Thesaurus::supportsService ( const OUString &  rServiceName)
overridevirtual

Definition at line 559 of file nthesimp.cxx.

References cppu::supportsService().

Member Data Documentation

::comphelper::OInterfaceContainerHelper2 Thesaurus::aEvtListeners
private

Definition at line 66 of file nthesimp.hxx.

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

Sequence< Locale > Thesaurus::aSuppLocales
private

Definition at line 64 of file nthesimp.hxx.

Referenced by getLocales(), and hasLocale().

bool Thesaurus::bDisposing
private

Definition at line 68 of file nthesimp.hxx.

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

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

Definition at line 77 of file nthesimp.hxx.

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

linguistic::PropertyHelper_Thesaurus* Thesaurus::pPropHelper
private

Definition at line 67 of file nthesimp.hxx.

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

LanguageType Thesaurus::prevLocale
private

Definition at line 82 of file nthesimp.hxx.

Referenced by queryMeanings().

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

Definition at line 80 of file nthesimp.hxx.

Referenced by queryMeanings().

OUString Thesaurus::prevTerm
private

Definition at line 81 of file nthesimp.hxx.

Referenced by queryMeanings().


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