LibreOffice Module linguistic (master) 1
Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
SpellCheckerDispatcher Class Reference

#include <spelldsp.hxx>

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

Public Member Functions

 SpellCheckerDispatcher (LngSvcMgr &rLngSvcMgr)
 
virtual ~SpellCheckerDispatcher () override
 
virtual css::uno::Sequence< css::lang::Locale > SAL_CALL getLocales () override
 
virtual sal_Bool SAL_CALL hasLocale (const css::lang::Locale &aLocale) override
 
virtual sal_Bool SAL_CALL isValid (const OUString &aWord, const css::lang::Locale &aLocale, const css::uno::Sequence< ::css::beans::PropertyValue > &aProperties) override
 
virtual css::uno::Reference< css::linguistic2::XSpellAlternatives > SAL_CALL spell (const OUString &aWord, const css::lang::Locale &aLocale, const css::uno::Sequence< ::css::beans::PropertyValue > &aProperties) override
 
virtual css::uno::Sequence< ::sal_Int16 > SAL_CALL getLanguages () override
 
virtual sal_Bool SAL_CALL hasLanguage (::sal_Int16 nLanguage) override
 
virtual sal_Bool SAL_CALL isValid (const OUString &aWord, ::sal_Int16 nLanguage, const css::uno::Sequence< css::beans::PropertyValue > &aProperties) override
 
virtual css::uno::Reference< css::linguistic2::XSpellAlternatives > SAL_CALL spell (const OUString &aWord, ::sal_Int16 nLanguage, const css::uno::Sequence< css::beans::PropertyValue > &aProperties) override
 
virtual void SetServiceList (const css::lang::Locale &rLocale, const css::uno::Sequence< OUString > &rSvcImplNames) override
 
virtual css::uno::Sequence< OUString > GetServiceList (const css::lang::Locale &rLocale) const override
 
void FlushSpellCache ()
 
virtual void SetServiceList (const css::lang::Locale &rLocale, const css::uno::Sequence< OUString > &rSvcImplNames)=0
 
virtual css::uno::Sequence< OUString > GetServiceList (const css::lang::Locale &rLocale) const =0
 

Private Types

typedef std::shared_ptr< LangSvcEntries_SpellLangSvcEntries_Spell_Ptr_t
 
typedef std::map< LanguageType, LangSvcEntries_Spell_Ptr_tSpellSvcByLangMap_t
 

Private Member Functions

 SpellCheckerDispatcher (const SpellCheckerDispatcher &)=delete
 
SpellCheckerDispatcheroperator= (const SpellCheckerDispatcher &)=delete
 
linguistic::SpellCacheGetCache () const
 
const css::uno::Reference< css::linguistic2::XLinguProperties > & GetPropSet ()
 
const css::uno::Reference< css::linguistic2::XSearchableDictionaryList > & GetDicList ()
 
bool isValid_Impl (const OUString &aWord, LanguageType nLanguage, const css::beans::PropertyValues &aProperties)
 
css::uno::Reference< css::linguistic2::XSpellAlternatives > spell_Impl (const OUString &aWord, LanguageType nLanguage, const css::beans::PropertyValues &aProperties)
 
void setCharClass (const LanguageTag &rLanguageTag)
 

Static Private Member Functions

static OUString makeLowerCase (const OUString &, const std::optional< CharClass > &)
 

Private Attributes

SpellSvcByLangMap_t m_aSvcMap
 
css::uno::Reference< css::linguistic2::XLinguProperties > m_xPropSet
 
css::uno::Reference< css::linguistic2::XSearchableDictionaryList > m_xDicList
 
LngSvcMgrm_rMgr
 
std::unique_ptr< linguistic::SpellCachem_pCache
 
std::optional< CharClassm_oCharClass
 

Additional Inherited Members

- Protected Member Functions inherited from LinguDispatcher
 ~LinguDispatcher ()
 

Detailed Description

Definition at line 40 of file spelldsp.hxx.

Member Typedef Documentation

◆ LangSvcEntries_Spell_Ptr_t

Definition at line 48 of file spelldsp.hxx.

◆ SpellSvcByLangMap_t

Definition at line 49 of file spelldsp.hxx.

Constructor & Destructor Documentation

◆ SpellCheckerDispatcher() [1/2]

SpellCheckerDispatcher::SpellCheckerDispatcher ( const SpellCheckerDispatcher )
privatedelete

◆ SpellCheckerDispatcher() [2/2]

SpellCheckerDispatcher::SpellCheckerDispatcher ( LngSvcMgr rLngSvcMgr)
explicit

Definition at line 164 of file spelldsp.cxx.

◆ ~SpellCheckerDispatcher()

SpellCheckerDispatcher::~SpellCheckerDispatcher ( )
overridevirtual

Definition at line 170 of file spelldsp.cxx.

Member Function Documentation

◆ FlushSpellCache()

void SpellCheckerDispatcher::FlushSpellCache ( )

Definition at line 808 of file spelldsp.cxx.

References m_pCache.

◆ GetCache()

linguistic::SpellCache & SpellCheckerDispatcher::GetCache ( ) const
inlineprivate

Definition at line 113 of file spelldsp.hxx.

References m_pCache.

Referenced by isValid_Impl(), and spell_Impl().

◆ GetDicList()

const css::uno::Reference< css::linguistic2::XSearchableDictionaryList > & SpellCheckerDispatcher::GetDicList ( )
inlineprivate

Definition at line 131 of file spelldsp.hxx.

References linguistic::GetDictionaryList(), and m_xDicList.

Referenced by isValid_Impl(), and spell_Impl().

◆ getLanguages()

uno::Sequence< sal_Int16 > SAL_CALL SpellCheckerDispatcher::getLanguages ( )
overridevirtual

◆ getLocales()

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

Definition at line 175 of file spelldsp.cxx.

References comphelper::containerToSequence(), linguistic::GetLinguMutex(), and m_aSvcMap.

Referenced by getLanguages().

◆ GetPropSet()

const css::uno::Reference< css::linguistic2::XLinguProperties > & SpellCheckerDispatcher::GetPropSet ( )
inlineprivate

Definition at line 122 of file spelldsp.hxx.

References linguistic::GetLinguProperties(), and m_xPropSet.

Referenced by isValid_Impl(), and spell_Impl().

◆ GetServiceList()

Sequence< OUString > SpellCheckerDispatcher::GetServiceList ( const css::lang::Locale &  rLocale) const
overridevirtual

◆ hasLanguage()

sal_Bool SAL_CALL SpellCheckerDispatcher::hasLanguage ( ::sal_Int16  nLanguage)
overridevirtual

◆ hasLocale()

sal_Bool SAL_CALL SpellCheckerDispatcher::hasLocale ( const css::lang::Locale &  aLocale)
overridevirtual

◆ isValid() [1/2]

virtual sal_Bool SAL_CALL SpellCheckerDispatcher::isValid ( const OUString &  aWord,
::sal_Int16  nLanguage,
const css::uno::Sequence< css::beans::PropertyValue > &  aProperties 
)
overridevirtual

◆ isValid() [2/2]

virtual sal_Bool SAL_CALL SpellCheckerDispatcher::isValid ( const OUString &  aWord,
const css::lang::Locale &  aLocale,
const css::uno::Sequence< ::css::beans::PropertyValue > &  aProperties 
)
overridevirtual

◆ isValid_Impl()

bool SpellCheckerDispatcher::isValid_Impl ( const OUString &  aWord,
LanguageType  nLanguage,
const css::beans::PropertyValues aProperties 
)
private

◆ makeLowerCase()

OUString SpellCheckerDispatcher::makeLowerCase ( const OUString &  aTerm,
const std::optional< CharClass > &  pCC 
)
staticprivate

Definition at line 822 of file spelldsp.cxx.

Referenced by isValid_Impl(), and spell_Impl().

◆ operator=()

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

◆ setCharClass()

void SpellCheckerDispatcher::setCharClass ( const LanguageTag rLanguageTag)
private

Definition at line 814 of file spelldsp.cxx.

References m_oCharClass.

Referenced by isValid_Impl(), and spell_Impl().

◆ SetServiceList()

void SpellCheckerDispatcher::SetServiceList ( const css::lang::Locale &  rLocale,
const css::uno::Sequence< OUString > &  rSvcImplNames 
)
overridevirtual

◆ spell() [1/2]

virtual css::uno::Reference< css::linguistic2::XSpellAlternatives > SAL_CALL SpellCheckerDispatcher::spell ( const OUString &  aWord,
::sal_Int16  nLanguage,
const css::uno::Sequence< css::beans::PropertyValue > &  aProperties 
)
overridevirtual

◆ spell() [2/2]

virtual css::uno::Reference< css::linguistic2::XSpellAlternatives > SAL_CALL SpellCheckerDispatcher::spell ( const OUString &  aWord,
const css::lang::Locale &  aLocale,
const css::uno::Sequence< ::css::beans::PropertyValue > &  aProperties 
)
overridevirtual

◆ spell_Impl()

Reference< XSpellAlternatives > SpellCheckerDispatcher::spell_Impl ( const OUString &  aWord,
LanguageType  nLanguage,
const css::beans::PropertyValues aProperties 
)
private

Member Data Documentation

◆ m_aSvcMap

SpellSvcByLangMap_t SpellCheckerDispatcher::m_aSvcMap
private

◆ m_oCharClass

std::optional<CharClass> SpellCheckerDispatcher::m_oCharClass
private

Definition at line 57 of file spelldsp.hxx.

Referenced by isValid_Impl(), setCharClass(), and spell_Impl().

◆ m_pCache

std::unique_ptr<linguistic::SpellCache> SpellCheckerDispatcher::m_pCache
mutableprivate

Definition at line 56 of file spelldsp.hxx.

Referenced by FlushSpellCache(), GetCache(), and SetServiceList().

◆ m_rMgr

LngSvcMgr& SpellCheckerDispatcher::m_rMgr
private

Definition at line 55 of file spelldsp.hxx.

Referenced by isValid_Impl(), and spell_Impl().

◆ m_xDicList

css::uno::Reference< css::linguistic2::XSearchableDictionaryList > SpellCheckerDispatcher::m_xDicList
private

Definition at line 53 of file spelldsp.hxx.

Referenced by GetDicList().

◆ m_xPropSet

css::uno::Reference< css::linguistic2::XLinguProperties > SpellCheckerDispatcher::m_xPropSet
private

Definition at line 52 of file spelldsp.hxx.

Referenced by GetPropSet().


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