summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cui/source/dialogs/SpellDialog.cxx6
-rw-r--r--cui/source/options/optdict.cxx2
-rw-r--r--cui/source/options/treeopt.cxx4
-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
-rw-r--r--linguistic/inc/iprcache.hxx6
-rw-r--r--linguistic/inc/linguistic/misc.hxx8
-rw-r--r--linguistic/inc/linguistic/spelldta.hxx5
-rw-r--r--linguistic/source/dlistimp.cxx2
-rw-r--r--linguistic/source/hyphdsp.hxx4
-rw-r--r--linguistic/source/iprcache.cxx6
-rw-r--r--linguistic/source/lngsvcmgr.cxx6
-rw-r--r--linguistic/source/misc.cxx50
-rw-r--r--linguistic/source/spelldsp.cxx6
-rw-r--r--linguistic/source/spelldsp.hxx2
-rw-r--r--linguistic/source/spelldta.cxx4
-rw-r--r--offapi/UnoApi_offapi.mk2
-rw-r--r--offapi/com/sun/star/linguistic2/DictionaryList.idl10
-rw-r--r--offapi/type_reference/types.rdbbin7440384 -> 7440384 bytes
-rw-r--r--sw/source/ui/lingu/olmenu.cxx6
22 files changed, 81 insertions, 91 deletions
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index c397738adbeb..6847e0e77f92 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -247,7 +247,7 @@ SpellDialog::SpellDialog(SpellDialogChildWindow* pChildWindow,
SpellDialog::~SpellDialog()
{
// save possibly modified user-dictionaries
- Reference< XDictionaryList > xDicList( SvxGetDictionaryList() );
+ Reference< XSearchableDictionaryList > xDicList( SvxGetDictionaryList() );
if (xDicList.is())
{
linguistic::SaveDictionaries( xDicList );
@@ -824,7 +824,7 @@ int SpellDialog::InitUserDicts()
const Reference< XDictionary > *pDic = 0;
// get list of dictionaries
- Reference< XDictionaryList > xDicList( SvxGetDictionaryList() );
+ Reference< XSearchableDictionaryList > xDicList( SvxGetDictionaryList() );
if (xDicList.is())
{
// add active, positive dictionary to dic-list (if not already done).
@@ -914,7 +914,7 @@ int SpellDialog::AddToDictionaryExecute( sal_uInt16 nItemId, PopupMenu *pMenu )
String aDicName ( pMenu->GetItemText( nItemId ) );
uno::Reference< linguistic2::XDictionary > xDic;
- uno::Reference< linguistic2::XDictionaryList > xDicList( SvxGetDictionaryList() );
+ uno::Reference< linguistic2::XSearchableDictionaryList > xDicList( SvxGetDictionaryList() );
if (xDicList.is())
xDic = xDicList->getDictionaryByName( aDicName );
diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx
index 4f67d05137bc..f87619eb3b44 100644
--- a/cui/source/options/optdict.cxx
+++ b/cui/source/options/optdict.cxx
@@ -122,7 +122,7 @@ IMPL_LINK_NOARG(SvxNewDictionaryDialog, OKHdl_Impl)
// add extension for personal dictionaries
sDict.AppendAscii(".dic");
- Reference< XDictionaryList > xDicList( SvxGetDictionaryList() );
+ Reference< XSearchableDictionaryList > xDicList( SvxGetDictionaryList() );
Sequence< Reference< XDictionary > > aDics;
if (xDicList.is())
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 4b8a3a621b26..9c2591478276 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -564,7 +564,7 @@ OfaTreeOptionsDialog::~OfaTreeOptionsDialog()
if (pPageInfo->m_nPageId == RID_SFXPAGE_LINGU)
{
// write personal dictionaries
- Reference< XDictionaryList > xDicList( SvxGetDictionaryList() );
+ Reference< XSearchableDictionaryList > xDicList( SvxGetDictionaryList() );
if (xDicList.is())
{
linguistic::SaveDictionaries( xDicList );
@@ -2275,7 +2275,7 @@ short OfaTreeOptionsDialog::Execute()
if ( !bIsFromExtensionManager )
{
// collect all DictionaryList Events while the dialog is executed
- Reference<com::sun::star::linguistic2::XDictionaryList> xDictionaryList(SvxGetDictionaryList());
+ Reference<com::sun::star::linguistic2::XSearchableDictionaryList> xDictionaryList(SvxGetDictionaryList());
pClamp = ::std::auto_ptr< SvxDicListChgClamp >( new SvxDicListChgClamp( xDictionaryList ) );
}
short nRet = SfxModalDialog::Execute();
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())
diff --git a/linguistic/inc/iprcache.hxx b/linguistic/inc/iprcache.hxx
index c31724a8aa7b..9f67ed29c0b7 100644
--- a/linguistic/inc/iprcache.hxx
+++ b/linguistic/inc/iprcache.hxx
@@ -29,7 +29,7 @@
#include <com/sun/star/beans/XPropertyChangeListener.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/linguistic2/XDictionaryListEventListener.hpp>
-#include <com/sun/star/linguistic2/XDictionaryList.hpp>
+#include <com/sun/star/linguistic2/XSearchableDictionaryList.hpp>
#include <rtl/string.hxx>
#include <i18npool/lang.h>
@@ -59,7 +59,7 @@ class FlushListener :
>
{
::com::sun::star::uno::Reference<
- ::com::sun::star::linguistic2::XDictionaryList > xDicList;
+ ::com::sun::star::linguistic2::XSearchableDictionaryList > xDicList;
::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet > xPropSet;
Flushable *pFlushObj;
@@ -74,7 +74,7 @@ public:
inline void SetFlushObj( Flushable *pFO) { pFlushObj = pFO; }
- void SetDicList( ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XDictionaryList > &rDL );
+ void SetDicList( ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSearchableDictionaryList > &rDL );
void SetPropSet( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > &rPS );
//XEventListener
diff --git a/linguistic/inc/linguistic/misc.hxx b/linguistic/inc/linguistic/misc.hxx
index df5e1eedc78c..aa6a3223918a 100644
--- a/linguistic/inc/linguistic/misc.hxx
+++ b/linguistic/inc/linguistic/misc.hxx
@@ -58,7 +58,6 @@ class LocaleDataWrapper;
#define SN_HYPHENATOR "com.sun.star.linguistic2.Hyphenator"
#define SN_THESAURUS "com.sun.star.linguistic2.Thesaurus"
#define SN_LINGU_PROPERTIES "com.sun.star.linguistic2.LinguProperties"
-#define SN_DICTIONARY_LIST "com.sun.star.linguistic2.DictionaryList"
namespace linguistic
@@ -153,8 +152,7 @@ LNG_DLLPUBLIC sal_Bool IsNumeric( const String &rText );
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > GetOneInstanceService( const char *pServiceName );
LNG_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > GetLinguProperties();
-::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSearchableDictionaryList > GetSearchableDictionaryList();
-::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XDictionaryList > GetDictionaryList();
+::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSearchableDictionaryList > GetDictionaryList();
::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XDictionary > GetIgnoreAllList();
@@ -169,7 +167,7 @@ sal_Bool IsIgnoreControlChars( const ::com::sun::star::beans::PropertyValues &rP
::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XDictionaryEntry >
SearchDicList(
- const ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XDictionaryList >& rDicList,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSearchableDictionaryList >& rDicList,
const ::rtl::OUString& rWord, sal_Int16 nLanguage,
sal_Bool bSearchPosDics, sal_Bool bSearchSpellEntry );
@@ -179,7 +177,7 @@ LNG_DLLPUBLIC sal_uInt8 AddEntryToDic(
const ::rtl::OUString &rRplcTxt, sal_Int16 nRplcLang,
sal_Bool bStripDot = sal_True );
-LNG_DLLPUBLIC sal_Bool SaveDictionaries( const ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XDictionaryList > &xDicList );
+LNG_DLLPUBLIC sal_Bool SaveDictionaries( const ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSearchableDictionaryList > &xDicList );
// AppExitLstnr:
// virtual base class that calls it AtExit function when the application
diff --git a/linguistic/inc/linguistic/spelldta.hxx b/linguistic/inc/linguistic/spelldta.hxx
index 8eec9c19f5a9..220a406e9dd9 100644
--- a/linguistic/inc/linguistic/spelldta.hxx
+++ b/linguistic/inc/linguistic/spelldta.hxx
@@ -23,6 +23,7 @@
#include <vector>
#include <com/sun/star/linguistic2/XSpellAlternatives.hpp>
#include <com/sun/star/linguistic2/XSetSpellAlternatives.hpp>
+#include <com/sun/star/linguistic2/XSearchableDictionaryList.hpp>
#include <tools/solar.h>
@@ -51,7 +52,7 @@ namespace linguistic
void SeqRemoveNegEntries(
::com::sun::star::uno::Sequence< ::rtl::OUString > &rSeq,
::com::sun::star::uno::Reference<
- ::com::sun::star::linguistic2::XDictionaryList > &rxDicList,
+ ::com::sun::star::linguistic2::XSearchableDictionaryList > &rxDicList,
sal_Int16 nLanguage );
sal_Bool SeqHasEntry(
@@ -62,7 +63,7 @@ sal_Bool SeqHasEntry(
void SearchSimilarText( const rtl::OUString &rText, sal_Int16 nLanguage,
::com::sun::star::uno::Reference<
- ::com::sun::star::linguistic2::XDictionaryList > &xDicList,
+ ::com::sun::star::linguistic2::XSearchableDictionaryList > &xDicList,
std::vector< rtl::OUString > & rDicListProps );
///////////////////////////////////////////////////////////////////////////
diff --git a/linguistic/source/dlistimp.cxx b/linguistic/source/dlistimp.cxx
index ba9c6a34a004..f447738b2167 100644
--- a/linguistic/source/dlistimp.cxx
+++ b/linguistic/source/dlistimp.cxx
@@ -772,7 +772,7 @@ uno::Sequence< rtl::OUString > DicList::getSupportedServiceNames_Static() throw(
osl::MutexGuard aGuard( GetLinguMutex() );
uno::Sequence< rtl::OUString > aSNS( 1 ); // more than 1 service possible
- aSNS.getArray()[0] = SN_DICTIONARY_LIST;
+ aSNS.getArray()[0] = "com.sun.star.linguistic2.DictionaryList";
return aSNS;
}
diff --git a/linguistic/source/hyphdsp.hxx b/linguistic/source/hyphdsp.hxx
index d6e81920603e..a770f5fe9262 100644
--- a/linguistic/source/hyphdsp.hxx
+++ b/linguistic/source/hyphdsp.hxx
@@ -57,7 +57,7 @@ class HyphenatorDispatcher :
::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet > xPropSet;
::com::sun::star::uno::Reference<
- ::com::sun::star::linguistic2::XSearchableDictionaryList > xDicList;
+ ::com::sun::star::linguistic2::XSearchableDictionaryList > xDicList;
LngSvcMgr &rMgr;
@@ -152,7 +152,7 @@ inline ::com::sun::star::uno::Reference<
HyphenatorDispatcher::GetDicList()
{
return xDicList.is() ?
- xDicList : xDicList = ::linguistic::GetSearchableDictionaryList();
+ xDicList : xDicList = ::linguistic::GetDictionaryList();
}
diff --git a/linguistic/source/iprcache.cxx b/linguistic/source/iprcache.cxx
index 436859281338..513c419f3b4c 100644
--- a/linguistic/source/iprcache.cxx
+++ b/linguistic/source/iprcache.cxx
@@ -111,7 +111,7 @@ FlushListener::~FlushListener()
}
-void FlushListener::SetDicList( Reference<XDictionaryList> &rDL )
+void FlushListener::SetDicList( Reference<XSearchableDictionaryList> &rDL )
{
MutexGuard aGuard( GetLinguMutex() );
@@ -206,7 +206,7 @@ SpellCache::SpellCache()
{
pFlushLstnr = new FlushListener( this );
xFlushLstnr = pFlushLstnr;
- Reference<XDictionaryList> aDictionaryList(GetDictionaryList());
+ Reference<XSearchableDictionaryList> aDictionaryList(GetDictionaryList());
pFlushLstnr->SetDicList( aDictionaryList ); //! after reference is established
Reference<XPropertySet> aPropertySet(GetLinguProperties());
pFlushLstnr->SetPropSet( aPropertySet ); //! after reference is established
@@ -214,7 +214,7 @@ SpellCache::SpellCache()
SpellCache::~SpellCache()
{
- Reference<XDictionaryList> aEmptyList;
+ Reference<XSearchableDictionaryList> aEmptyList;
Reference<XPropertySet> aEmptySet;
pFlushLstnr->SetDicList( aEmptyList );
pFlushLstnr->SetPropSet( aEmptySet );
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index fefef1cdc009..abce09198e26 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -185,7 +185,7 @@ class LngSvcMgrListenerHelper :
::cppu::OInterfaceContainerHelper aLngSvcMgrListeners;
::cppu::OInterfaceContainerHelper aLngSvcEvtBroadcasters;
- uno::Reference< linguistic2::XDictionaryList > xDicList;
+ uno::Reference< linguistic2::XSearchableDictionaryList > xDicList;
sal_Int16 nCombinedLngSvcEvt;
@@ -199,7 +199,7 @@ class LngSvcMgrListenerHelper :
public:
LngSvcMgrListenerHelper( LngSvcMgr &rLngSvcMgr,
- const uno::Reference< linguistic2::XDictionaryList > &rxDicList );
+ const uno::Reference< linguistic2::XSearchableDictionaryList > &rxDicList );
// lang::XEventListener
virtual void SAL_CALL
@@ -233,7 +233,7 @@ public:
LngSvcMgrListenerHelper::LngSvcMgrListenerHelper(
LngSvcMgr &rLngSvcMgr,
- const uno::Reference< linguistic2::XDictionaryList > &rxDicList ) :
+ const uno::Reference< linguistic2::XSearchableDictionaryList > &rxDicList ) :
rMyManager ( rLngSvcMgr ),
aLngSvcMgrListeners ( GetLinguMutex() ),
aLngSvcEvtBroadcasters ( GetLinguMutex() ),
diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx
index 266013188728..333a6ffb6315 100644
--- a/linguistic/source/misc.cxx
+++ b/linguistic/source/misc.cxx
@@ -37,7 +37,7 @@
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/linguistic2/DictionaryType.hpp>
-#include <com/sun/star/linguistic2/XSearchableDictionaryList.hpp>
+#include <com/sun/star/linguistic2/DictionaryList.hpp>
#include <comphelper/processfactory.hxx>
#include <unotools/localedatawrapper.hxx>
#include <unotools/syslocale.hxx>
@@ -273,7 +273,7 @@ static sal_Bool lcl_HasHyphInfo( const uno::Reference<XDictionaryEntry> &xEntry
uno::Reference< XDictionaryEntry > SearchDicList(
- const uno::Reference< XDictionaryList > &xDicList,
+ const uno::Reference< XSearchableDictionaryList > &xDicList,
const OUString &rWord, sal_Int16 nLanguage,
sal_Bool bSearchPosDics, sal_Bool bSearchSpellEntry )
{
@@ -321,7 +321,7 @@ uno::Reference< XDictionaryEntry > SearchDicList(
}
-sal_Bool SaveDictionaries( const uno::Reference< XDictionaryList > &xDicList )
+sal_Bool SaveDictionaries( const uno::Reference< XSearchableDictionaryList > &xDicList )
{
if (!xDicList.is())
return sal_True;
@@ -747,21 +747,15 @@ uno::Reference< XInterface > GetOneInstanceService( const char *pServiceName )
{
uno::Reference< XInterface > xRef;
- if (pServiceName)
+ uno::Reference< XMultiServiceFactory > xMgr(
+ comphelper::getProcessServiceFactory() );
+ try
{
- uno::Reference< XMultiServiceFactory > xMgr(
- comphelper::getProcessServiceFactory() );
- if (xMgr.is())
- {
- try
- {
- xRef = xMgr->createInstance( ::rtl::OUString::createFromAscii( pServiceName ) );
- }
- catch (uno::Exception &)
- {
- DBG_ASSERT( 0, "createInstance failed" );
- }
- }
+ xRef = xMgr->createInstance( ::rtl::OUString::createFromAscii( pServiceName ) );
+ }
+ catch (const uno::Exception &)
+ {
+ DBG_ASSERT( 0, "createInstance failed" );
}
return xRef;
@@ -773,22 +767,26 @@ uno::Reference< XPropertySet > GetLinguProperties()
GetOneInstanceService( SN_LINGU_PROPERTIES ), UNO_QUERY );
}
-uno::Reference< XSearchableDictionaryList > GetSearchableDictionaryList()
+uno::Reference< XSearchableDictionaryList > GetDictionaryList()
{
- return uno::Reference< XSearchableDictionaryList > (
- GetOneInstanceService( SN_DICTIONARY_LIST ), UNO_QUERY );
-}
+ uno::Reference< XComponentContext > xContext( comphelper::getProcessComponentContext() );
+ uno::Reference< XSearchableDictionaryList > xRef;
+ try
+ {
+ xRef = DictionaryList::create(xContext);
+ }
+ catch (const uno::Exception &)
+ {
+ DBG_ASSERT( 0, "createInstance failed" );
+ }
-uno::Reference< XDictionaryList > GetDictionaryList()
-{
- return uno::Reference< XDictionaryList > (
- GetOneInstanceService( SN_DICTIONARY_LIST ), UNO_QUERY );
+ return xRef;
}
uno::Reference< XDictionary > GetIgnoreAllList()
{
uno::Reference< XDictionary > xRes;
- uno::Reference< XDictionaryList > xDL( GetDictionaryList() );
+ uno::Reference< XSearchableDictionaryList > xDL( GetDictionaryList() );
if (xDL.is())
xRes = xDL->getDictionaryByName( "IgnoreAllList" );
return xRes;
diff --git a/linguistic/source/spelldsp.cxx b/linguistic/source/spelldsp.cxx
index 5b6727f2e9c2..d44cbdfeee20 100644
--- a/linguistic/source/spelldsp.cxx
+++ b/linguistic/source/spelldsp.cxx
@@ -261,7 +261,7 @@ static Reference< XDictionaryEntry > lcl_GetRulingDictionaryEntry(
xRes = xIgnoreAll->getEntry( rWord );
if (!xRes.is())
{
- Reference< XDictionaryList > xDList( GetDictionaryList() );
+ Reference< XSearchableDictionaryList > xDList( GetDictionaryList() );
Reference< XDictionaryEntry > xNegEntry( SearchDicList( xDList,
rWord, nLanguage, sal_False, sal_True ) );
if (xNegEntry.is())
@@ -646,9 +646,9 @@ Reference< XSpellAlternatives > SpellCheckerDispatcher::spell_Impl(
aProposalList.Append( xRes->getAlternatives() );
eFailureType = xRes->getFailureType();
}
- Reference< XDictionaryList > xDList;
+ Reference< XSearchableDictionaryList > xDList;
if (GetDicList().is() && IsUseDicList( rProperties, GetPropSet() ))
- xDList = Reference< XDictionaryList >( GetDicList(), UNO_QUERY );
+ xDList = GetDicList();
// cross-check against results from user-dictionaries which have precedence!
if (bCheckDics && xDList.is())
diff --git a/linguistic/source/spelldsp.hxx b/linguistic/source/spelldsp.hxx
index 888652ef0976..4fef68d97351 100644
--- a/linguistic/source/spelldsp.hxx
+++ b/linguistic/source/spelldsp.hxx
@@ -150,7 +150,7 @@ inline ::com::sun::star::uno::Reference<
SpellCheckerDispatcher::GetDicList()
{
return xDicList.is() ?
- xDicList : xDicList = linguistic::GetSearchableDictionaryList();
+ xDicList : xDicList = linguistic::GetDictionaryList();
}
diff --git a/linguistic/source/spelldta.cxx b/linguistic/source/spelldta.cxx
index 886af7072522..37089bff5d64 100644
--- a/linguistic/source/spelldta.cxx
+++ b/linguistic/source/spelldta.cxx
@@ -62,7 +62,7 @@ sal_Bool SeqHasEntry(
void SearchSimilarText( const OUString &rText, sal_Int16 nLanguage,
- Reference< XDictionaryList > &xDicList,
+ Reference< XSearchableDictionaryList > &xDicList,
std::vector< OUString > & rDicListProps )
{
if (!xDicList.is())
@@ -108,7 +108,7 @@ void SearchSimilarText( const OUString &rText, sal_Int16 nLanguage,
void SeqRemoveNegEntries( Sequence< OUString > &rSeq,
- Reference< XDictionaryList > &rxDicList,
+ Reference< XSearchableDictionaryList > &rxDicList,
sal_Int16 nLanguage )
{
static const OUString aEmpty;
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 257ccd07f89f..e088dd5a84b6 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -183,6 +183,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/i18n,\
))
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/linguistic2,\
ConversionDictionaryList \
+ DictionaryList \
LanguageGuessing \
LinguServiceManager \
Proofreader \
@@ -907,7 +908,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/image,\
$(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/linguistic2,\
ConversionDictionary \
Dictionary \
- DictionaryList \
HangulHanjaConversionDictionary \
Hyphenator \
LinguProperties \
diff --git a/offapi/com/sun/star/linguistic2/DictionaryList.idl b/offapi/com/sun/star/linguistic2/DictionaryList.idl
index fc8e06a1e81c..4e0c53ed8950 100644
--- a/offapi/com/sun/star/linguistic2/DictionaryList.idl
+++ b/offapi/com/sun/star/linguistic2/DictionaryList.idl
@@ -19,13 +19,11 @@
#ifndef __com_sun_star_linguistic2_DictionaryList_idl__
#define __com_sun_star_linguistic2_DictionaryList_idl__
-#include <com/sun/star/lang/XComponent.idl>
+#include <com/sun/star/linguistic2/XSearchableDictionaryList.idl>
module com { module sun { module star { module linguistic2 {
- published interface XSearchableDictionaryList;
-
/** is the list of personal dictionaries.
<P>The active dictionaries of this list will be used for
@@ -35,11 +33,7 @@ module com { module sun { module star { module linguistic2 {
@see <type scope="com::sun::star::linguistic2">XDictionaryList</type>
@see <type scope="com::sun::star::linguistic2">XSearchableDictionaryList</type>
*/
-published service DictionaryList
-{
- interface com::sun::star::linguistic2::XSearchableDictionaryList;
- interface com::sun::star::lang::XComponent;
-};
+published service DictionaryList : XSearchableDictionaryList;
}; }; }; };
diff --git a/offapi/type_reference/types.rdb b/offapi/type_reference/types.rdb
index dee150aff27e..cb5ccc0fac4b 100644
--- a/offapi/type_reference/types.rdb
+++ b/offapi/type_reference/types.rdb
Binary files differ
diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx
index b84cb21f35d8..1ade7b99056f 100644
--- a/sw/source/ui/lingu/olmenu.cxx
+++ b/sw/source/ui/lingu/olmenu.cxx
@@ -458,7 +458,7 @@ SwSpellPopup::SwSpellPopup(
pMenu = GetPopupMenu(MN_ADD_TO_DIC);
pMenu->SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS); //! necessary to retrieve the correct dictionary name in 'Execute' below
- uno::Reference< linguistic2::XDictionaryList > xDicList( SvxGetDictionaryList() );
+ uno::Reference< linguistic2::XSearchableDictionaryList > xDicList( SvxGetDictionaryList() );
sal_uInt16 nItemId = MN_DICTIONARIES_START;
if (xDicList.is())
{
@@ -801,7 +801,7 @@ void SwSpellPopup::Execute( sal_uInt16 nId )
}
pSh->Left(CRSR_SKIP_CHARS, sal_False, 1, sal_False );
{
- uno::Reference<linguistic2::XDictionaryList> xDictionaryList( SvxGetDictionaryList() );
+ uno::Reference<linguistic2::XSearchableDictionaryList> xDictionaryList( SvxGetDictionaryList() );
SvxDicListChgClamp aClamp( xDictionaryList );
pSh->GetView().GetViewFrame()->GetDispatcher()->
Execute( FN_SPELL_GRAMMAR_DIALOG, SFX_CALLMODE_ASYNCHRON );
@@ -845,7 +845,7 @@ void SwSpellPopup::Execute( sal_uInt16 nId )
aDicName = aDicNameSingle;
uno::Reference< linguistic2::XDictionary > xDic;
- uno::Reference< linguistic2::XDictionaryList > xDicList( SvxGetDictionaryList() );
+ uno::Reference< linguistic2::XSearchableDictionaryList > xDicList( SvxGetDictionaryList() );
if (xDicList.is())
xDic = xDicList->getDictionaryByName( aDicName );