LibreOffice Module linguistic (master) 1
|
#include <lngsvcmgr.hxx>
Public Member Functions | |
LngSvcMgr () | |
virtual | ~LngSvcMgr () override |
virtual css::uno::Reference< css::linguistic2::XSpellChecker > SAL_CALL | getSpellChecker () override |
virtual css::uno::Reference< css::linguistic2::XHyphenator > SAL_CALL | getHyphenator () override |
virtual css::uno::Reference< css::linguistic2::XThesaurus > SAL_CALL | getThesaurus () override |
virtual sal_Bool SAL_CALL | addLinguServiceManagerListener (const css::uno::Reference< css::lang::XEventListener > &xListener) override |
virtual sal_Bool SAL_CALL | removeLinguServiceManagerListener (const css::uno::Reference< css::lang::XEventListener > &xListener) override |
virtual css::uno::Sequence< OUString > SAL_CALL | getAvailableServices (const OUString &aServiceName, const css::lang::Locale &aLocale) override |
virtual void SAL_CALL | setConfiguredServices (const OUString &aServiceName, const css::lang::Locale &aLocale, const css::uno::Sequence< OUString > &aServiceImplNames) override |
virtual css::uno::Sequence< OUString > SAL_CALL | getConfiguredServices (const OUString &aServiceName, const css::lang::Locale &aLocale) override |
virtual css::uno::Sequence< css::lang::Locale > SAL_CALL | getAvailableLocales (const OUString &aServiceName) override |
virtual void SAL_CALL | dispose () override |
virtual void SAL_CALL | addEventListener (const css::uno::Reference< css::lang::XEventListener > &xListener) override |
virtual void SAL_CALL | removeEventListener (const css::uno::Reference< css::lang::XEventListener > &aListener) override |
virtual OUString SAL_CALL | getImplementationName () override |
virtual sal_Bool SAL_CALL | supportsService (const OUString &ServiceName) override |
virtual css::uno::Sequence< OUString > SAL_CALL | getSupportedServiceNames () override |
virtual void SAL_CALL | disposing (const css::lang::EventObject &rSource) override |
virtual void SAL_CALL | modified (const css::lang::EventObject &rEvent) override |
bool | AddLngSvcEvtBroadcaster (const css::uno::Reference< css::linguistic2::XLinguServiceEventBroadcaster > &rxBroadcaster) |
Private Types | |
typedef std::vector< SvcInfo > | SvcInfoArray |
Private Member Functions | |
LngSvcMgr (const LngSvcMgr &)=delete | |
LngSvcMgr & | operator= (const LngSvcMgr &)=delete |
void | GetAvailableSpellSvcs_Impl () |
void | GetAvailableGrammarSvcs_Impl () |
void | GetAvailableHyphSvcs_Impl () |
void | GetAvailableThesSvcs_Impl () |
void | GetListenerHelper_Impl () |
void | GetSpellCheckerDsp_Impl (bool bSetSvcList=true) |
void | GetGrammarCheckerDsp_Impl (bool bSetSvcList=true) |
void | GetHyphenatorDsp_Impl (bool bSetSvcList=true) |
void | GetThesaurusDsp_Impl (bool bSetSvcList=true) |
void | SetCfgServiceLists (SpellCheckerDispatcher &rSpellDsp) |
void | SetCfgServiceLists (GrammarCheckingIterator &rGrammarDsp) |
void | SetCfgServiceLists (HyphenatorDispatcher &rHyphDsp) |
void | SetCfgServiceLists (ThesaurusDispatcher &rThesDsp) |
bool | SaveCfgSvcs (std::u16string_view rServiceName) |
virtual void | Notify (const css::uno::Sequence< OUString > &rPropertyNames) override |
virtual void | ImplCommit () override |
void | UpdateAll () |
void | stopListening () |
DECL_LINK (updateAndBroadcast, Timer *, void) | |
Private Member Functions inherited from utl::ConfigItem | |
virtual | ~ConfigItem () override |
ConfigItem (ConfigItem const &)=default | |
ConfigItem (ConfigItem &&)=default | |
ConfigItem & | operator= (ConfigItem const &)=delete |
ConfigItem & | operator= (ConfigItem &&)=delete |
virtual void | Notify (const css::uno::Sequence< OUString > &aPropertyNames)=0 |
const OUString & | GetSubTreeName () const |
bool | IsModified () const |
void | Commit () |
ConfigItemMode | GetMode () const |
ConfigItem (OUString aSubTree, ConfigItemMode nMode=ConfigItemMode::NONE) | |
void | SetModified () |
void | ClearModified () |
css::uno::Sequence< css::uno::Any > | GetProperties (const css::uno::Sequence< OUString > &rNames) |
css::uno::Sequence< sal_Bool > | GetReadOnlyStates (const css::uno::Sequence< OUString > &rNames) |
bool | PutProperties (const css::uno::Sequence< OUString > &rNames, const css::uno::Sequence< css::uno::Any > &rValues) |
bool | EnableNotification (const css::uno::Sequence< OUString > &rNames, bool bEnableInternalNotification=false) |
void | DisableNotification () |
css::uno::Sequence< OUString > | GetNodeNames (const OUString &rNode) |
css::uno::Sequence< OUString > | GetNodeNames (const OUString &rNode, ConfigNameFormat eFormat) |
bool | ClearNodeSet (const OUString &rNode) |
bool | ClearNodeElements (const OUString &rNode, css::uno::Sequence< OUString > const &rElements) |
bool | SetSetProperties (const OUString &rNode, const css::uno::Sequence< css::beans::PropertyValue > &rValues) |
bool | ReplaceSetProperties (const OUString &rNode, const css::uno::Sequence< css::beans::PropertyValue > &rValues) |
bool | AddNode (const OUString &rNode, const OUString &rNewNode) |
Private Member Functions inherited from utl::ConfigurationBroadcaster | |
void | AddListener (utl::ConfigurationListener *pListener) |
void | RemoveListener (utl::ConfigurationListener const *pListener) |
void | NotifyListeners (ConfigurationHints nHint) |
ConfigurationBroadcaster () | |
ConfigurationBroadcaster (ConfigurationBroadcaster const &) | |
virtual | ~ConfigurationBroadcaster () |
ConfigurationBroadcaster & | operator= (ConfigurationBroadcaster const &other) |
virtual void | BlockBroadcasts (bool bBlock) |
Private Attributes | |
::comphelper::OInterfaceContainerHelper3< css::lang::XEventListener > | aEvtListeners |
css::uno::Reference< css::util::XModifyBroadcaster > | xMB |
Idle | aUpdateIdle |
css::uno::Sequence< css::lang::Locale > | aAvailSpellLocales |
css::uno::Sequence< css::lang::Locale > | aAvailGrammarLocales |
css::uno::Sequence< css::lang::Locale > | aAvailHyphLocales |
css::uno::Sequence< css::lang::Locale > | aAvailThesLocales |
rtl::Reference< SpellCheckerDispatcher > | mxSpellDsp |
rtl::Reference< GrammarCheckingIterator > | mxGrammarDsp |
rtl::Reference< HyphenatorDispatcher > | mxHyphDsp |
rtl::Reference< ThesaurusDispatcher > | mxThesDsp |
rtl::Reference< LngSvcMgrListenerHelper > | mxListenerHelper |
std::optional< SvcInfoArray > | pAvailSpellSvcs |
std::optional< SvcInfoArray > | pAvailGrammarSvcs |
std::optional< SvcInfoArray > | pAvailHyphSvcs |
std::optional< SvcInfoArray > | pAvailThesSvcs |
bool | bDisposing |
Friends | |
class | LngSvcMgrListenerHelper |
Additional Inherited Members | |
Static Private Member Functions inherited from utl::ConfigItem | |
static css::uno::Sequence< OUString > | GetNodeNames (css::uno::Reference< css::container::XHierarchicalNameAccess > const &xHierarchyAccess, const OUString &rNode, ConfigNameFormat eFormat) |
static css::uno::Sequence< css::uno::Any > | GetProperties (css::uno::Reference< css::container::XHierarchicalNameAccess > const &xHierarchyAccess, const css::uno::Sequence< OUString > &rNames, bool bAllLocales) |
static bool | PutProperties (css::uno::Reference< css::container::XHierarchicalNameAccess > const &xHierarchyAccess, const css::uno::Sequence< OUString > &rNames, const css::uno::Sequence< css::uno::Any > &rValues, bool bAllLocales) |
static bool | ClearNodeSet (css::uno::Reference< css::container::XHierarchicalNameAccess > const &xHierarchyAccess, const OUString &rNode) |
static bool | ReplaceSetProperties (css::uno::Reference< css::container::XHierarchicalNameAccess > const &xHierarchyAccess, const OUString &rNode, const css::uno::Sequence< css::beans::PropertyValue > &rValues, bool bAllLocales) |
static bool | SetSetProperties (css::uno::Reference< css::container::XHierarchicalNameAccess > const &xHierarchyAccess, const OUString &rNode, const css::uno::Sequence< css::beans::PropertyValue > &rValues) |
Definition at line 54 of file lngsvcmgr.hxx.
|
private |
Definition at line 89 of file lngsvcmgr.hxx.
|
privatedelete |
LngSvcMgr::LngSvcMgr | ( | ) |
Definition at line 398 of file lngsvcmgr.cxx.
References aUpdateIdle, bDisposing, utl::ConfigItem::EnableNotification(), comphelper::getProcessComponentContext(), LINK, SAL_WARN, Timer::SetInvokeHandler(), Task::SetPriority(), UpdateAll(), and xMB.
|
overridevirtual |
Definition at line 499 of file lngsvcmgr.cxx.
References pAvailGrammarSvcs, pAvailHyphSvcs, pAvailSpellSvcs, pAvailThesSvcs, and stopListening().
|
overridevirtual |
Definition at line 1762 of file lngsvcmgr.cxx.
References comphelper::OInterfaceContainerHelper3< class ListenerT >::addInterface(), aEvtListeners, bDisposing, and linguistic::GetLinguMutex().
|
overridevirtual |
Definition at line 1332 of file lngsvcmgr.cxx.
References bDisposing, linguistic::GetLinguMutex(), GetListenerHelper_Impl(), and mxListenerHelper.
bool LngSvcMgr::AddLngSvcEvtBroadcaster | ( | const css::uno::Reference< css::linguistic2::XLinguServiceEventBroadcaster > & | rxBroadcaster | ) |
Definition at line 1787 of file lngsvcmgr.cxx.
References GetListenerHelper_Impl(), and mxListenerHelper.
Referenced by HyphenatorDispatcher::createPossibleHyphens(), HyphenatorDispatcher::hyphenate(), SpellCheckerDispatcher::isValid_Impl(), HyphenatorDispatcher::queryAlternativeSpelling(), and SpellCheckerDispatcher::spell_Impl().
|
private |
|
overridevirtual |
Definition at line 1743 of file lngsvcmgr.cxx.
References aEvtListeners, bDisposing, comphelper::OInterfaceContainerHelper3< class ListenerT >::disposeAndClear(), linguistic::GetLinguMutex(), and mxListenerHelper.
|
overridevirtual |
Definition at line 494 of file lngsvcmgr.cxx.
References stopListening().
|
private |
Definition at line 972 of file lngsvcmgr.cxx.
References comphelper::getProcessComponentContext(), linguistic::LocaleSeqToLangVec(), pAvailGrammarSvcs, SAL_WARN, SAL_WARN_IF, SN_GRAMMARCHECKER, and xFactory.
Referenced by getAvailableServices().
|
private |
Definition at line 1031 of file lngsvcmgr.cxx.
References comphelper::getProcessComponentContext(), linguistic::LocaleSeqToLangVec(), pAvailHyphSvcs, SAL_WARN, SAL_WARN_IF, SN_HYPHENATOR, and xFactory.
Referenced by getAvailableServices().
|
overridevirtual |
Definition at line 1418 of file lngsvcmgr.cxx.
References aAvailGrammarLocales, aAvailHyphLocales, aAvailSpellLocales, aAvailThesLocales, getAvailableServices(), GetAvailLocales(), linguistic::GetLinguMutex(), SN_GRAMMARCHECKER, SN_HYPHENATOR, SN_SPELLCHECKER, and SN_THESAURUS.
Referenced by getHyphenator(), getSpellChecker(), getThesaurus(), SaveCfgSvcs(), and UpdateAll().
|
overridevirtual |
Definition at line 1365 of file lngsvcmgr.cxx.
References comphelper::containerToSequence(), GetAvailableGrammarSvcs_Impl(), GetAvailableHyphSvcs_Impl(), GetAvailableSpellSvcs_Impl(), GetAvailableThesSvcs_Impl(), linguistic::GetLinguMutex(), linguistic::LinguIsUnspecified(), linguistic::LinguLocaleToLanguage(), pAvailGrammarSvcs, pAvailHyphSvcs, pAvailSpellSvcs, pAvailThesSvcs, SN_GRAMMARCHECKER, SN_HYPHENATOR, SN_SPELLCHECKER, and SN_THESAURUS.
Referenced by getAvailableLocales(), and UpdateAll().
|
private |
Definition at line 918 of file lngsvcmgr.cxx.
References comphelper::getProcessComponentContext(), linguistic::LocaleSeqToLangVec(), pAvailSpellSvcs, SAL_WARN, SAL_WARN_IF, SN_SPELLCHECKER, and xFactory.
Referenced by getAvailableServices().
|
private |
Definition at line 1082 of file lngsvcmgr.cxx.
References comphelper::getProcessComponentContext(), linguistic::LocaleSeqToLangVec(), pAvailThesSvcs, SAL_WARN, SAL_WARN_IF, SN_THESAURUS, and xFactory.
Referenced by getAvailableServices().
|
overridevirtual |
Definition at line 1676 of file lngsvcmgr.cxx.
References LanguageTag::convertToBcp47(), GetLangSvc(), GetLangSvcList(), linguistic::GetLinguMutex(), utl::ConfigItem::GetNodeNames(), utl::ConfigItem::GetProperties(), lcl_SeqHasString(), SN_GRAMMARCHECKER, SN_HYPHENATOR, SN_SPELLCHECKER, and SN_THESAURUS.
Referenced by UpdateAll().
|
private |
since the grammar checking iterator needs to be a one instance service we need to create it the correct way!
Definition at line 869 of file lngsvcmgr.cxx.
References comphelper::getProcessComponentContext(), mxGrammarDsp, SAL_WARN_IF, and SetCfgServiceLists().
Referenced by Notify(), SaveCfgSvcs(), and setConfiguredServices().
|
overridevirtual |
Definition at line 1296 of file lngsvcmgr.cxx.
References bDisposing, getAvailableLocales(), GetHyphenatorDsp_Impl(), linguistic::GetLinguMutex(), mxHyphDsp, and SN_HYPHENATOR.
|
private |
Definition at line 896 of file lngsvcmgr.cxx.
References mxHyphDsp, and SetCfgServiceLists().
Referenced by getHyphenator(), Notify(), SaveCfgSvcs(), and setConfiguredServices().
|
overridevirtual |
Definition at line 1800 of file lngsvcmgr.cxx.
|
private |
Definition at line 849 of file lngsvcmgr.cxx.
References linguistic::GetDictionaryList(), LngSvcMgrListenerHelper, and mxListenerHelper.
Referenced by addLinguServiceManagerListener(), AddLngSvcEvtBroadcaster(), and removeLinguServiceManagerListener().
|
overridevirtual |
Definition at line 1277 of file lngsvcmgr.cxx.
References bDisposing, getAvailableLocales(), linguistic::GetLinguMutex(), GetSpellCheckerDsp_Impl(), mxSpellDsp, and SN_SPELLCHECKER.
|
private |
Definition at line 858 of file lngsvcmgr.cxx.
References mxSpellDsp, and SetCfgServiceLists().
Referenced by getSpellChecker(), Notify(), SaveCfgSvcs(), and setConfiguredServices().
|
overridevirtual |
Definition at line 1814 of file lngsvcmgr.cxx.
|
overridevirtual |
Definition at line 1314 of file lngsvcmgr.cxx.
References bDisposing, getAvailableLocales(), linguistic::GetLinguMutex(), GetThesaurusDsp_Impl(), mxThesDsp, and SN_THESAURUS.
|
private |
Definition at line 907 of file lngsvcmgr.cxx.
References mxThesDsp, and SetCfgServiceLists().
Referenced by getThesaurus(), Notify(), SaveCfgSvcs(), and setConfiguredServices().
|
overrideprivatevirtual |
Implements utl::ConfigItem.
Definition at line 841 of file lngsvcmgr.cxx.
|
overridevirtual |
Definition at line 440 of file lngsvcmgr.cxx.
References aUpdateIdle, linguistic::GetLinguMutex(), pAvailGrammarSvcs, pAvailHyphSvcs, pAvailSpellSvcs, pAvailThesSvcs, and Idle::Start().
|
overrideprivatevirtual |
Implements utl::ConfigItem.
Definition at line 711 of file lngsvcmgr.cxx.
References LanguageTag::convertToLanguageType(), LanguageTag::convertToLocale(), GetGrammarCheckerDsp_Impl(), GetHyphenatorDsp_Impl(), GetLangSvc(), GetLangSvcList(), linguistic::GetLinguMutex(), utl::ConfigItem::GetNodeNames(), utl::ConfigItem::GetProperties(), GetSpellCheckerDsp_Impl(), GetThesaurusDsp_Impl(), LANGUAGE_NONE, lcl_SeqHasString(), mxGrammarDsp, mxHyphDsp, mxSpellDsp, mxThesDsp, pAvailGrammarSvcs, pAvailHyphSvcs, pAvailSpellSvcs, pAvailThesSvcs, SAL_WARN, SAL_WARN_IF, and u.
|
overridevirtual |
Definition at line 1775 of file lngsvcmgr.cxx.
References aEvtListeners, linguistic::GetLinguMutex(), and comphelper::OInterfaceContainerHelper3< class ListenerT >::removeInterface().
|
overridevirtual |
Definition at line 1348 of file lngsvcmgr.cxx.
References bDisposing, DBG_ASSERT, linguistic::GetLinguMutex(), GetListenerHelper_Impl(), and mxListenerHelper.
|
private |
Definition at line 1536 of file lngsvcmgr.cxx.
References LanguageTag::convertToBcp47(), DBG_ASSERT, getAvailableLocales(), GetGrammarCheckerDsp_Impl(), GetHyphenatorDsp_Impl(), LinguDispatcher::GetServiceList(), GetSpellCheckerDsp_Impl(), GetThesaurusDsp_Impl(), uno::Any::hasValue(), mxGrammarDsp, mxHyphDsp, mxSpellDsp, mxThesDsp, utl::ConfigItem::ReplaceSetProperties(), SAL_INFO, SAL_WARN, SN_GRAMMARCHECKER, SN_HYPHENATOR, SN_SPELLCHECKER, and SN_THESAURUS.
Referenced by setConfiguredServices().
|
private |
Definition at line 1169 of file lngsvcmgr.cxx.
References LanguageTag::convertToLocale(), utl::ConfigItem::GetNodeNames(), utl::ConfigItem::GetProperties(), name, SAL_INFO, and GrammarCheckingIterator::SetServiceList().
|
private |
Definition at line 1206 of file lngsvcmgr.cxx.
References LanguageTag::convertToLocale(), utl::ConfigItem::GetNodeNames(), utl::ConfigItem::GetProperties(), name, SAL_INFO, and HyphenatorDispatcher::SetServiceList().
|
private |
Definition at line 1136 of file lngsvcmgr.cxx.
References LanguageTag::convertToLocale(), utl::ConfigItem::GetNodeNames(), utl::ConfigItem::GetProperties(), name, SAL_INFO, and SpellCheckerDispatcher::SetServiceList().
Referenced by GetGrammarCheckerDsp_Impl(), GetHyphenatorDsp_Impl(), GetSpellCheckerDsp_Impl(), and GetThesaurusDsp_Impl().
|
private |
Definition at line 1243 of file lngsvcmgr.cxx.
References LanguageTag::convertToLocale(), utl::ConfigItem::GetNodeNames(), utl::ConfigItem::GetProperties(), name, SAL_INFO, and ThesaurusDispatcher::SetServiceList().
|
overridevirtual |
Definition at line 1457 of file lngsvcmgr.cxx.
References GetGrammarCheckerDsp_Impl(), GetHyphenatorDsp_Impl(), linguistic::GetLinguMutex(), GetSpellCheckerDsp_Impl(), GetThesaurusDsp_Impl(), IsEqSvcList(), linguistic::LinguIsUnspecified(), linguistic::LinguLocaleToLanguage(), mxGrammarDsp, mxHyphDsp, mxListenerHelper, mxSpellDsp, mxThesDsp, SAL_INFO, SaveCfgSvcs(), SN_GRAMMARCHECKER, SN_HYPHENATOR, SN_SPELLCHECKER, and SN_THESAURUS.
|
private |
Definition at line 475 of file lngsvcmgr.cxx.
References linguistic::GetLinguMutex(), and xMB.
Referenced by disposing(), and ~LngSvcMgr().
|
overridevirtual |
Definition at line 1807 of file lngsvcmgr.cxx.
References ServiceName, and cppu::supportsService().
|
private |
Definition at line 607 of file lngsvcmgr.cxx.
References LanguageTag::convertToBcp47(), LanguageTag::convertToLocale(), getAvailableLocales(), getAvailableServices(), getConfiguredServices(), SvtLinguConfig::GetNodeNames(), i, Locale, SvtLinguConfig::ReplaceSetProperties(), SAL_WARN_IF, SN_GRAMMARCHECKER, SN_HYPHENATOR, SN_SPELLCHECKER, and SN_THESAURUS.
Referenced by LngSvcMgr().
|
friend |
Definition at line 63 of file lngsvcmgr.hxx.
Referenced by GetListenerHelper_Impl().
|
private |
Definition at line 76 of file lngsvcmgr.hxx.
Referenced by getAvailableLocales().
|
private |
Definition at line 78 of file lngsvcmgr.hxx.
Referenced by getAvailableLocales().
|
private |
Definition at line 74 of file lngsvcmgr.hxx.
Referenced by getAvailableLocales().
|
private |
Definition at line 80 of file lngsvcmgr.hxx.
Referenced by getAvailableLocales().
|
private |
Definition at line 65 of file lngsvcmgr.hxx.
Referenced by addEventListener(), dispose(), and removeEventListener().
|
private |
Definition at line 70 of file lngsvcmgr.hxx.
Referenced by LngSvcMgr(), and modified().
|
private |
Definition at line 95 of file lngsvcmgr.hxx.
Referenced by addEventListener(), addLinguServiceManagerListener(), dispose(), getHyphenator(), getSpellChecker(), getThesaurus(), LngSvcMgr(), and removeLinguServiceManagerListener().
|
private |
Definition at line 83 of file lngsvcmgr.hxx.
Referenced by GetGrammarCheckerDsp_Impl(), Notify(), SaveCfgSvcs(), and setConfiguredServices().
|
private |
Definition at line 84 of file lngsvcmgr.hxx.
Referenced by getHyphenator(), GetHyphenatorDsp_Impl(), Notify(), SaveCfgSvcs(), and setConfiguredServices().
|
private |
Definition at line 87 of file lngsvcmgr.hxx.
Referenced by addLinguServiceManagerListener(), AddLngSvcEvtBroadcaster(), dispose(), GetListenerHelper_Impl(), removeLinguServiceManagerListener(), and setConfiguredServices().
|
private |
Definition at line 82 of file lngsvcmgr.hxx.
Referenced by getSpellChecker(), GetSpellCheckerDsp_Impl(), Notify(), LngSvcMgrListenerHelper::processDictionaryListEvent(), SaveCfgSvcs(), setConfiguredServices(), and LngSvcMgrListenerHelper::Timeout().
|
private |
Definition at line 85 of file lngsvcmgr.hxx.
Referenced by getThesaurus(), GetThesaurusDsp_Impl(), Notify(), SaveCfgSvcs(), and setConfiguredServices().
|
private |
Definition at line 91 of file lngsvcmgr.hxx.
Referenced by GetAvailableGrammarSvcs_Impl(), getAvailableServices(), modified(), Notify(), and ~LngSvcMgr().
|
private |
Definition at line 92 of file lngsvcmgr.hxx.
Referenced by GetAvailableHyphSvcs_Impl(), getAvailableServices(), modified(), Notify(), and ~LngSvcMgr().
|
private |
Definition at line 90 of file lngsvcmgr.hxx.
Referenced by getAvailableServices(), GetAvailableSpellSvcs_Impl(), modified(), Notify(), and ~LngSvcMgr().
|
private |
Definition at line 93 of file lngsvcmgr.hxx.
Referenced by getAvailableServices(), GetAvailableThesSvcs_Impl(), modified(), Notify(), and ~LngSvcMgr().
|
private |
Definition at line 68 of file lngsvcmgr.hxx.
Referenced by LngSvcMgr(), and stopListening().