summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-02-04 16:18:01 +0200
committerNoel Grandin <noel@peralex.com>2013-02-12 10:14:43 +0200
commit53ec703c14470cb18845fc4483ec36c13b0d744e (patch)
tree4cde768b9b70c00e34801680ac6bcc4a889c5489 /editeng
parenta6a8a8707b6ae111f94bac094d3c2909f523ca6f (diff)
fdo#46808, Adapt linguistic2::DictionaryList UNO service to new style
Change-Id: Iaf81a38063411b8a003b78f7eb7d6aab6c9df292
Diffstat (limited to 'editeng')
-rw-r--r--editeng/inc/editeng/unolingu.hxx16
-rw-r--r--editeng/source/editeng/editview.cxx2
-rw-r--r--editeng/source/misc/splwrap.cxx2
-rw-r--r--editeng/source/misc/unolingu.cxx23
4 files changed, 21 insertions, 22 deletions
diff --git a/editeng/inc/editeng/unolingu.hxx b/editeng/inc/editeng/unolingu.hxx
index 108510b8318f..afbaec26b85e 100644
--- a/editeng/inc/editeng/unolingu.hxx
+++ b/editeng/inc/editeng/unolingu.hxx
@@ -27,7 +27,7 @@
#include <com/sun/star/linguistic2/XSpellChecker1.hpp>
#include <com/sun/star/linguistic2/XHyphenator.hpp>
#include <com/sun/star/linguistic2/XThesaurus.hpp>
-#include <com/sun/star/linguistic2/XDictionaryList.hpp>
+#include <com/sun/star/linguistic2/XSearchableDictionaryList.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include "editeng/editengdllapi.h"
@@ -50,7 +50,7 @@ class EDITENG_DLLPUBLIC LinguMgr
static ::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XThesaurus > xThes;
static ::com::sun::star::uno::Reference<
- ::com::sun::star::linguistic2::XDictionaryList > xDicList;
+ ::com::sun::star::linguistic2::XSearchableDictionaryList > xDicList;
static ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet > xProp;
@@ -69,7 +69,7 @@ class EDITENG_DLLPUBLIC LinguMgr
static ::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XThesaurus > GetThes();
static ::com::sun::star::uno::Reference<
- ::com::sun::star::linguistic2::XDictionaryList > GetDicList();
+ ::com::sun::star::linguistic2::XSearchableDictionaryList > GetDicList();
static ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet > GetProp();
static ::com::sun::star::uno::Reference<
@@ -92,7 +92,7 @@ public:
static ::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XThesaurus > GetThesaurus();
static ::com::sun::star::uno::Reference<
- ::com::sun::star::linguistic2::XDictionaryList > GetDictionaryList();
+ ::com::sun::star::linguistic2::XSearchableDictionaryList > GetDictionaryList();
static ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet > GetLinguPropertySet();
@@ -143,7 +143,7 @@ class EDITENG_DLLPUBLIC SvxDicListChgClamp
{
private:
::com::sun::star::uno::Reference<
- ::com::sun::star::linguistic2::XDictionaryList > xDicList;
+ ::com::sun::star::linguistic2::XSearchableDictionaryList > xDicList;
// disallow access to copy-constructor and assignment-operator
EDITENG_DLLPRIVATE SvxDicListChgClamp(const SvxDicListChgClamp &);
@@ -151,7 +151,7 @@ private:
public:
SvxDicListChgClamp( ::com::sun::star::uno::Reference<
- ::com::sun::star::linguistic2::XDictionaryList > &rxDicList );
+ ::com::sun::star::linguistic2::XSearchableDictionaryList > &rxDicList );
~SvxDicListChgClamp();
};
@@ -165,14 +165,14 @@ EDITENG_DLLPUBLIC ::com::sun::star::uno::Reference<
EDITENG_DLLPUBLIC ::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XThesaurus > SvxGetThesaurus();
EDITENG_DLLPUBLIC ::com::sun::star::uno::Reference<
- ::com::sun::star::linguistic2::XDictionaryList > SvxGetDictionaryList();
+ ::com::sun::star::linguistic2::XSearchableDictionaryList > SvxGetDictionaryList();
EDITENG_DLLPUBLIC ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet > SvxGetLinguPropertySet();
//TODO: remove argument or provide SvxGetIgnoreAllList with the same one
EDITENG_DLLPUBLIC ::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XDictionary > SvxGetOrCreatePosDic(
::com::sun::star::uno::Reference<
- ::com::sun::star::linguistic2::XDictionaryList > xDicList );
+ ::com::sun::star::linguistic2::XSearchableDictionaryList > xDicList );
EDITENG_DLLPUBLIC ::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XDictionary > SvxGetIgnoreAllList();
EDITENG_DLLPUBLIC ::com::sun::star::uno::Reference<
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index 2073c2990979..14b24f41d5a0 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -996,7 +996,7 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack )
SvtLinguConfig aCfg;
- Reference< XDictionaryList > xDicList( SvxGetDictionaryList() );
+ Reference< XSearchableDictionaryList > xDicList( SvxGetDictionaryList() );
Sequence< Reference< XDictionary > > aDics;
if (xDicList.is())
{
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())