diff options
author | Noel Grandin <noel@peralex.com> | 2013-02-04 16:18:01 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-02-12 10:14:43 +0200 |
commit | 53ec703c14470cb18845fc4483ec36c13b0d744e (patch) | |
tree | 4cde768b9b70c00e34801680ac6bcc4a889c5489 /editeng/source/misc | |
parent | a6a8a8707b6ae111f94bac094d3c2909f523ca6f (diff) |
fdo#46808, Adapt linguistic2::DictionaryList UNO service to new style
Change-Id: Iaf81a38063411b8a003b78f7eb7d6aab6c9df292
Diffstat (limited to 'editeng/source/misc')
-rw-r--r-- | editeng/source/misc/splwrap.cxx | 2 | ||||
-rw-r--r-- | editeng/source/misc/unolingu.cxx | 23 |
2 files changed, 12 insertions, 13 deletions
diff --git a/editeng/source/misc/splwrap.cxx b/editeng/source/misc/splwrap.cxx index 42e83f1aecf6..3f7d3af97d60 100644 --- a/editeng/source/misc/splwrap.cxx +++ b/editeng/source/misc/splwrap.cxx @@ -506,7 +506,7 @@ Reference< XDictionary > SvxSpellWrapper::GetAllRightDic() const { Reference< XDictionary > xDic; - Reference< XDictionaryList > xDicList( SvxGetDictionaryList() ); + Reference< XSearchableDictionaryList > xDicList( SvxGetDictionaryList() ); if (xDicList.is()) { Sequence< Reference< XDictionary > > aDics( xDicList->getDictionaries() ); diff --git a/editeng/source/misc/unolingu.cxx b/editeng/source/misc/unolingu.cxx index a51f998e6a68..19febd471fac 100644 --- a/editeng/source/misc/unolingu.cxx +++ b/editeng/source/misc/unolingu.cxx @@ -29,6 +29,7 @@ #include <com/sun/star/frame/XModel.hpp> #include <com/sun/star/frame/XStorable.hpp> #include <com/sun/star/lang/XEventListener.hpp> +#include <com/sun/star/linguistic2/DictionaryList.hpp> #include <com/sun/star/linguistic2/XAvailableLocales.hpp> #include <com/sun/star/linguistic2/LinguServiceManager.hpp> #include <com/sun/star/ucb/XAnyCompareFactory.hpp> @@ -518,7 +519,7 @@ uno::Reference< XLinguServiceManager2 > LinguMgr::xLngSvcMgr = 0; uno::Reference< XSpellChecker1 > LinguMgr::xSpell = 0; uno::Reference< XHyphenator > LinguMgr::xHyph = 0; uno::Reference< XThesaurus > LinguMgr::xThes = 0; -uno::Reference< XDictionaryList > LinguMgr::xDicList = 0; +uno::Reference< XSearchableDictionaryList > LinguMgr::xDicList = 0; uno::Reference< XPropertySet > LinguMgr::xProp = 0; uno::Reference< XDictionary > LinguMgr::xIgnoreAll = 0; uno::Reference< XDictionary > LinguMgr::xChangeAll = 0; @@ -554,7 +555,7 @@ uno::Reference< XThesaurus > LinguMgr::GetThesaurus() return xThes.is() ? xThes : GetThes(); } -uno::Reference< XDictionaryList > LinguMgr::GetDictionaryList() +uno::Reference< XSearchableDictionaryList > LinguMgr::GetDictionaryList() { return xDicList.is() ? xDicList : GetDicList(); } @@ -624,7 +625,7 @@ uno::Reference< XThesaurus > LinguMgr::GetThes() return xThes; } -uno::Reference< XDictionaryList > LinguMgr::GetDicList() +uno::Reference< XSearchableDictionaryList > LinguMgr::GetDicList() { if (bExiting) return 0; @@ -632,9 +633,7 @@ uno::Reference< XDictionaryList > LinguMgr::GetDicList() if (!pExitLstnr) pExitLstnr = new LinguMgrExitLstnr; - uno::Reference< XMultiServiceFactory > xMgr( getProcessServiceFactory() ); - xDicList = uno::Reference< XDictionaryList > ( xMgr->createInstance( - "com.sun.star.linguistic2.DictionaryList" ), UNO_QUERY ); + xDicList = linguistic2::DictionaryList::create( getProcessComponentContext() ); return xDicList; } @@ -660,7 +659,7 @@ uno::Reference< XDictionary > LinguMgr::GetIgnoreAll() if (!pExitLstnr) pExitLstnr = new LinguMgrExitLstnr; - uno::Reference< XDictionaryList > xTmpDicList( GetDictionaryList() ); + uno::Reference< XSearchableDictionaryList > xTmpDicList( GetDictionaryList() ); if (xTmpDicList.is()) { xIgnoreAll = uno::Reference< XDictionary > ( xTmpDicList->getDictionaryByName( @@ -677,7 +676,7 @@ uno::Reference< XDictionary > LinguMgr::GetChangeAll() if (!pExitLstnr) pExitLstnr = new LinguMgrExitLstnr; - uno::Reference< XDictionaryList > _xDicList( GetDictionaryList() , UNO_QUERY ); + uno::Reference< XSearchableDictionaryList > _xDicList( GetDictionaryList() , UNO_QUERY ); if (_xDicList.is()) { xChangeAll = uno::Reference< XDictionary > ( @@ -697,7 +696,7 @@ uno::Reference< XDictionary > LinguMgr::GetStandard() if (bExiting) return 0; - uno::Reference< XDictionaryList > xTmpDicList( GetDictionaryList() ); + uno::Reference< XSearchableDictionaryList > xTmpDicList( GetDictionaryList() ); if (!xTmpDicList.is()) return NULL; @@ -755,7 +754,7 @@ uno::Reference< XThesaurus > SvxGetThesaurus() return LinguMgr::GetThesaurus(); } -uno::Reference< XDictionaryList > SvxGetDictionaryList() +uno::Reference< XSearchableDictionaryList > SvxGetDictionaryList() { return LinguMgr::GetDictionaryList(); } @@ -767,7 +766,7 @@ uno::Reference< XPropertySet > SvxGetLinguPropertySet() //TODO: remove argument or provide SvxGetIgnoreAllList with the same one uno::Reference< XDictionary > SvxGetOrCreatePosDic( - uno::Reference< XDictionaryList > /* xDicList */ ) + uno::Reference< XSearchableDictionaryList > /* xDicList */ ) { return LinguMgr::GetStandardDic(); } @@ -825,7 +824,7 @@ SvxAlternativeSpelling SvxGetAltSpelling( } -SvxDicListChgClamp::SvxDicListChgClamp( uno::Reference< XDictionaryList > &rxDicList ) : +SvxDicListChgClamp::SvxDicListChgClamp( uno::Reference< XSearchableDictionaryList > &rxDicList ) : xDicList ( rxDicList ) { if (xDicList.is()) |