summaryrefslogtreecommitdiff
path: root/linguistic
diff options
context:
space:
mode:
authorThomas Lange [tl] <tl@openoffice.org>2010-01-06 12:22:41 +0100
committerThomas Lange [tl] <tl@openoffice.org>2010-01-06 12:22:41 +0100
commitd1bb71fa133c82868cba447e1a736db5292db39b (patch)
treedef9642c61b4d7585250eacb357e062ee3594368 /linguistic
parent28687b22eef200c32a37f6901cd40c0328b8766d (diff)
parent0de34b05f3c1a0409d23b63b9e69d4d7abbe1090 (diff)
cws tl74: merge with DEV300_m68; AND Unix LF conversion for some files!
Diffstat (limited to 'linguistic')
-rw-r--r--linguistic/inc/lngprops.hxx2
-rw-r--r--linguistic/inc/misc.hxx3
-rw-r--r--linguistic/prj/build.lst2
-rw-r--r--linguistic/source/convdic.cxx5
-rw-r--r--linguistic/source/convdiclist.cxx8
-rw-r--r--linguistic/source/convdiclist.hxx2
-rw-r--r--linguistic/source/dicimp.cxx1
-rw-r--r--linguistic/source/dlistimp.cxx18
-rw-r--r--linguistic/source/gciterator.cxx6
-rw-r--r--linguistic/source/grammarchecker.cxx1
-rw-r--r--linguistic/source/hyphdsp.cxx16
-rw-r--r--linguistic/source/hyphdta.cxx2
-rw-r--r--linguistic/source/lngopt.cxx3
-rw-r--r--linguistic/source/lngopt.hxx8
-rw-r--r--linguistic/source/lngsvcmgr.cxx19
-rw-r--r--linguistic/source/lngsvcmgr.hxx2
-rw-r--r--linguistic/source/makefile.mk7
-rw-r--r--linguistic/source/misc.cxx9
-rw-r--r--linguistic/source/misc2.cxx2
-rw-r--r--linguistic/source/spelldsp.cxx13
-rw-r--r--linguistic/source/thesdsp.cxx10
21 files changed, 76 insertions, 63 deletions
diff --git a/linguistic/inc/lngprops.hxx b/linguistic/inc/lngprops.hxx
index 2714c439d18e..6903d3f1d897 100644
--- a/linguistic/inc/lngprops.hxx
+++ b/linguistic/inc/lngprops.hxx
@@ -31,7 +31,7 @@
#ifndef _LINGUISTIC_LNGPROPS_HHX_
#define _LINGUISTIC_LNGPROPS_HHX_
-#include <svtools/linguprops.hxx>
+#include <unotools/linguprops.hxx>
// maximal number of suggestions to be returned in spelling context-menu
// (may not include results added by looking up user dictionaries)
diff --git a/linguistic/inc/misc.hxx b/linguistic/inc/misc.hxx
index 6f06948db4af..683641f045a5 100644
--- a/linguistic/inc/misc.hxx
+++ b/linguistic/inc/misc.hxx
@@ -44,13 +44,12 @@
#include <uno/lbnames.h> // CPPU_CURRENT_LANGUAGE_BINDING_NAME macro, which specify the environment type
#include <cppuhelper/implbase1.hxx> // helper for implementations
-#include <svtools/pathoptions.hxx>
+#include <unotools/pathoptions.hxx>
#include <i18npool/lang.h>
#include <tools/string.hxx>
#include <unotools/charclass.hxx>
#include <osl/thread.h>
#include <osl/mutex.hxx>
-#include <vcl/svapp.hxx>
namespace com { namespace sun { namespace star { namespace beans {
class XPropertySet;
diff --git a/linguistic/prj/build.lst b/linguistic/prj/build.lst
index 344453253054..8e09e3fd4226 100644
--- a/linguistic/prj/build.lst
+++ b/linguistic/prj/build.lst
@@ -1,4 +1,4 @@
-lg linguistic : xmloff NULL
+lg linguistic : svl xmloff ucbhelper vos comphelper ICU:icu NULL
lg linguistic usr1 - all lg_mkout NULL
lg linguistic\prj get - all lg_prj NULL
lg linguistic\inc nmake - all lg_inc NULL
diff --git a/linguistic/source/convdic.cxx b/linguistic/source/convdic.cxx
index c55e4ef30f4c..068f9147f426 100644
--- a/linguistic/source/convdic.cxx
+++ b/linguistic/source/convdic.cxx
@@ -87,7 +87,6 @@ using namespace linguistic;
///////////////////////////////////////////////////////////////////////////
-
void ReadThroughDic( const String &rMainURL, ConvDicXMLImport &rImport )
{
if (rMainURL.Len() == 0)
@@ -166,7 +165,6 @@ void ReadThroughDic( const String &rMainURL, ConvDicXMLImport &rImport )
}
}
-
BOOL IsConvDic( const String &rFileURL, INT16 &nLang, sal_Int16 &nConvType )
{
BOOL bRes = FALSE;
@@ -266,12 +264,10 @@ void ConvDic::Load()
//!! prevent function from being called recursively via HasEntry, AddEntry
bNeedEntries = FALSE;
-
ConvDicXMLImport *pImport = new ConvDicXMLImport( this, aMainURL );
//!! keep a first reference to ensure the lifetime of the object !!
uno::Reference< XInterface > xRef( (document::XFilter *) pImport, UNO_QUERY );
ReadThroughDic( aMainURL, *pImport ); // will implicitly add the entries
-
bIsModified = FALSE;
}
@@ -326,7 +322,6 @@ void ConvDic::Save()
// prepare arguments (prepend doc handler to given arguments)
uno::Reference< xml::sax::XDocumentHandler > xDocHandler( xSaxWriter, UNO_QUERY );
-
ConvDicXMLExport *pExport = new ConvDicXMLExport( *this, aMainURL, xDocHandler );
//!! keep a first(!) reference until everything is done to
//!! ensure the proper lifetime of the object
diff --git a/linguistic/source/convdiclist.cxx b/linguistic/source/convdiclist.cxx
index 2d8a058974f7..fcbf3dbef8ae 100644
--- a/linguistic/source/convdiclist.cxx
+++ b/linguistic/source/convdiclist.cxx
@@ -30,13 +30,13 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_linguistic.hxx"
+
#include <tools/fsys.hxx>
#include <tools/stream.hxx>
#include <tools/urlobj.hxx>
-#include <svtools/pathoptions.hxx>
-#include <svtools/useroptions.hxx>
-#include <svtools/lingucfg.hxx>
-#include <vcl/svapp.hxx>
+#include <unotools/pathoptions.hxx>
+#include <unotools/useroptions.hxx>
+#include <unotools/lingucfg.hxx>
#include <rtl/instance.hxx>
#include <cppuhelper/factory.hxx> // helper for factories
#include <unotools/localfilehelper.hxx>
diff --git a/linguistic/source/convdiclist.hxx b/linguistic/source/convdiclist.hxx
index 7a7f866a69a1..8467955b4d87 100644
--- a/linguistic/source/convdiclist.hxx
+++ b/linguistic/source/convdiclist.hxx
@@ -36,7 +36,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <cppuhelper/implbase3.hxx>
#include <cppuhelper/interfacecontainer.h>
-#include <svtools/svarray.hxx>
+#include <svl/svarray.hxx>
#include <tools/debug.hxx>
#include "misc.hxx"
diff --git a/linguistic/source/dicimp.cxx b/linguistic/source/dicimp.cxx
index 019c6ffa1cd4..fa7dd0be3948 100644
--- a/linguistic/source/dicimp.cxx
+++ b/linguistic/source/dicimp.cxx
@@ -271,7 +271,6 @@ ULONG DictionaryNeo::loadEntries(const OUString &rMainURL)
if (rMainURL.getLength() == 0)
return 0;
- DBG_ASSERT(!INetURLObject( rURL ).HasError(), "lng : invalid URL");
uno::Reference< lang::XMultiServiceFactory > xServiceFactory( utl::getProcessServiceFactory() );
diff --git a/linguistic/source/dlistimp.cxx b/linguistic/source/dlistimp.cxx
index 6d247a16b605..17fd29b05923 100644
--- a/linguistic/source/dlistimp.cxx
+++ b/linguistic/source/dlistimp.cxx
@@ -39,18 +39,25 @@
#include <tools/fsys.hxx>
#include <tools/stream.hxx>
#include <tools/urlobj.hxx>
+#include <i18npool/mslangid.hxx>
+#include <unotools/pathoptions.hxx>
+#include <unotools/useroptions.hxx>
+#include <cppuhelper/factory.hxx> // helper for factories
#include <unotools/localfilehelper.hxx>
-#include <unotools/processfactory.hxx>
+#include <comphelper/processfactory.hxx>
#include <unotools/ucbstreamhelper.hxx>
-#include <vcl/svapp.hxx>
-
-#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
#include <com/sun/star/frame/XStorable.hpp>
#include <com/sun/star/lang/Locale.hpp>
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/linguistic2/DictionaryEventFlags.hpp>
#include <com/sun/star/linguistic2/DictionaryListEventFlags.hpp>
#include <com/sun/star/registry/XRegistryKey.hpp>
+#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
+
+#include "defs.hxx"
+#include "dlistimp.hxx"
+#include "dicimp.hxx"
+#include "lngopt.hxx"
#include "defs.hxx"
#include "dlistimp.hxx"
@@ -934,7 +941,8 @@ static BOOL IsVers2OrNewer( const String& rFileURL, USHORT& nLng, BOOL& bNeg )
if(aExt != aDIC)
return FALSE;
- uno::Reference< lang::XMultiServiceFactory > xServiceFactory( utl::getProcessServiceFactory() );
+ // get stream to be used
+ uno::Reference< lang::XMultiServiceFactory > xServiceFactory( comphelper::getProcessServiceFactory() );
// get XInputStream stream
uno::Reference< io::XInputStream > xStream;
diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx
index bb63e9bb8c8b..2697d5880b80 100644
--- a/linguistic/source/gciterator.cxx
+++ b/linguistic/source/gciterator.cxx
@@ -63,7 +63,6 @@
#include <cppuhelper/interfacecontainer.h>
#include <cppuhelper/extract.hxx>
#include <cppuhelper/factory.hxx>
-#include <vcl/unohelp.hxx>
#include <i18npool/mslangid.hxx>
#include <unotools/processfactory.hxx>
@@ -790,7 +789,10 @@ sal_Int32 GrammarCheckingIterator::GetSuggestedEndOfSentence(
uno::Reference< i18n::XBreakIterator > xBreakIterator;
if (!m_xBreakIterator.is())
{
- m_xBreakIterator = vcl::unohelper::CreateBreakIterator();
+ uno::Reference< lang::XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
+ if ( xMSF.is() )
+ xBreakIterator = uno::Reference < i18n::XBreakIterator >( xMSF->createInstance(
+ ::rtl::OUString::createFromAscii("com.sun.star.i18n.BreakIterator") ), uno::UNO_QUERY );
}
sal_Int32 nTextLen = rText.getLength();
sal_Int32 nEndPosition = nTextLen;
diff --git a/linguistic/source/grammarchecker.cxx b/linguistic/source/grammarchecker.cxx
index 3d4953b8e17a..5985ffe7d27b 100644
--- a/linguistic/source/grammarchecker.cxx
+++ b/linguistic/source/grammarchecker.cxx
@@ -34,7 +34,6 @@
#include <cppuhelper/implbase1.hxx>
#include <com/sun/star/linguistic2/XGrammarChecker.hpp>
#include <com/sun/star/i18n/XBreakIterator.hpp>
-#include <vcl/unohelp.hxx>
#include <cppuhelper/implbase4.hxx>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
diff --git a/linguistic/source/hyphdsp.cxx b/linguistic/source/hyphdsp.cxx
index a04d01c0d1a7..64907ab04f24 100644
--- a/linguistic/source/hyphdsp.cxx
+++ b/linguistic/source/hyphdsp.cxx
@@ -41,7 +41,7 @@
#include <i18npool/lang.h>
#include <unotools/localedatawrapper.hxx>
#include <tools/debug.hxx>
-#include <svtools/lngmisc.hxx>
+#include <svl/lngmisc.hxx>
#include <unotools/processfactory.hxx>
#include <osl/mutex.hxx>
@@ -275,7 +275,8 @@ Reference< XHyphenatedWord > SAL_CALL
return xRes;
// search for entry with that language
- LangSvcEntries_Hyph *pEntry = aSvcMap[ nLanguage ].get();
+ HyphSvcByLangMap_t::iterator aIt( aSvcMap.find( nLanguage ) );
+ LangSvcEntries_Hyph *pEntry = aIt != aSvcMap.end() ? aIt->second.get() : NULL;
BOOL bWordModified = FALSE;
if (!pEntry || (nMaxLeading < 0 || nMaxLeading > nWordLen))
@@ -418,7 +419,8 @@ Reference< XHyphenatedWord > SAL_CALL
return xRes;
// search for entry with that language
- LangSvcEntries_Hyph *pEntry = aSvcMap[ nLanguage ].get();
+ HyphSvcByLangMap_t::iterator aIt( aSvcMap.find( nLanguage ) );
+ LangSvcEntries_Hyph *pEntry = aIt != aSvcMap.end() ? aIt->second.get() : NULL;
BOOL bWordModified = FALSE;
if (!pEntry || !(0 <= nIndex && nIndex <= nWordLen - 2))
@@ -555,7 +557,8 @@ Reference< XPossibleHyphens > SAL_CALL
return xRes;
// search for entry with that language
- LangSvcEntries_Hyph *pEntry = aSvcMap[ nLanguage ].get();
+ HyphSvcByLangMap_t::iterator aIt( aSvcMap.find( nLanguage ) );
+ LangSvcEntries_Hyph *pEntry = aIt != aSvcMap.end() ? aIt->second.get() : NULL;
if (!pEntry)
{
@@ -713,8 +716,9 @@ Sequence< OUString >
// search for entry with that language and use data from that
INT16 nLanguage = LocaleToLanguage( rLocale );
- HyphenatorDispatcher *pThis = (HyphenatorDispatcher *) this;
- const LangSvcEntries_Hyph *pEntry = pThis->aSvcMap[ nLanguage ].get();
+ HyphenatorDispatcher *pThis = (HyphenatorDispatcher *) this;
+ const HyphSvcByLangMap_t::iterator aIt( pThis->aSvcMap.find( nLanguage ) );
+ const LangSvcEntries_Hyph *pEntry = aIt != aSvcMap.end() ? aIt->second.get() : NULL;
if (pEntry)
{
aRes = pEntry->aSvcImplNames;
diff --git a/linguistic/source/hyphdta.cxx b/linguistic/source/hyphdta.cxx
index 5286a6aada22..ea7d8e7c8233 100644
--- a/linguistic/source/hyphdta.cxx
+++ b/linguistic/source/hyphdta.cxx
@@ -39,7 +39,7 @@
#include <rtl/ustrbuf.hxx>
#include <tools/debug.hxx>
-#include <svtools/lngmisc.hxx>
+#include <svl/lngmisc.hxx>
#include <unotools/localedatawrapper.hxx>
//using namespace utl;
diff --git a/linguistic/source/lngopt.cxx b/linguistic/source/lngopt.cxx
index 995b0686e2f8..6eb59fa09ef4 100644
--- a/linguistic/source/lngopt.cxx
+++ b/linguistic/source/lngopt.cxx
@@ -35,8 +35,7 @@
#include "lngprops.hxx"
#include "misc.hxx"
#include <tools/debug.hxx>
-#include <svtools/lingucfg.hxx>
-#include <vcl/svapp.hxx>
+#include <unotools/lingucfg.hxx>
#include <uno/lbnames.h> // CPPU_CURRENT_LANGUAGE_BINDING_NAME macro, which specify the environment type
#include <cppuhelper/implbase1.hxx> // helper for implementations
diff --git a/linguistic/source/lngopt.hxx b/linguistic/source/lngopt.hxx
index b424970a929b..f690fc1112c8 100644
--- a/linguistic/source/lngopt.hxx
+++ b/linguistic/source/lngopt.hxx
@@ -41,16 +41,16 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/beans/XPropertyAccess.hpp>
#include <com/sun/star/lang/XComponent.hpp>
-#include <svtools/lingucfg.hxx>
-#include <svtools/itemprop.hxx>
+#include <unotools/lingucfg.hxx>
+#include <svl/itemprop.hxx>
#include <unotools/configitem.hxx>
#include <com/sun/star/uno/Any.h>
#include <tools/solar.h>
-#include <vcl/timer.hxx>
-#include <svtools/itemprop.hxx>
+#include <svl/itemprop.hxx>
#include "misc.hxx"
#include "defs.hxx"
+#include <vos/refernce.hxx>
namespace com { namespace sun { namespace star {
namespace beans {
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index 41d805fe9212..3a8e3e017fae 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -40,7 +40,7 @@
#include <com/sun/star/linguistic2/LinguServiceEventFlags.hpp>
#include <tools/solar.h>
-#include <svtools/lingucfg.hxx>
+#include <unotools/lingucfg.hxx>
#include <unotools/processfactory.hxx>
#include <i18npool/lang.h>
#include <i18npool/mslangid.hxx>
@@ -288,7 +288,7 @@ class LngSvcMgrListenerHelper :
>
{
LngSvcMgr &rMyManager;
- Timer aLaunchTimer;
+// Timer aLaunchTimer;
//cppu::OMultiTypeInterfaceContainerHelper aListeners;
::cppu::OInterfaceContainerHelper aLngSvcMgrListeners;
@@ -304,7 +304,8 @@ class LngSvcMgrListenerHelper :
void LaunchEvent( INT16 nLngSvcEvtFlags );
- DECL_LINK( TimeOut, Timer* );
+// DECL_LINK( TimeOut, Timer* );
+ long Timeout();
public:
LngSvcMgrListenerHelper( LngSvcMgr &rLngSvcMgr,
@@ -363,8 +364,8 @@ LngSvcMgrListenerHelper::LngSvcMgrListenerHelper(
//! listeners, and each of them is launching an event of it's own!)
//! Thus this behaviour is necessary to avoid unecessary actions of
//! this objects listeners!
- aLaunchTimer.SetTimeout( 2000 );
- aLaunchTimer.SetTimeoutHdl( LINK( this, LngSvcMgrListenerHelper, TimeOut ) );
+// aLaunchTimer.SetTimeout( 2000 );
+// aLaunchTimer.SetTimeoutHdl( LINK( this, LngSvcMgrListenerHelper, TimeOut ) );
nCombinedLngSvcEvt = 0;
}
@@ -385,11 +386,12 @@ void SAL_CALL LngSvcMgrListenerHelper::disposing( const lang::EventObject& rSour
}
-IMPL_LINK( LngSvcMgrListenerHelper, TimeOut, Timer*, pTimer )
+//IMPL_LINK( LngSvcMgrListenerHelper, TimeOut, Timer*, pTimer )
+long LngSvcMgrListenerHelper::Timeout()
{
osl::MutexGuard aGuard( GetLinguMutex() );
- if (&aLaunchTimer == pTimer)
+// if (&aLaunchTimer == pTimer)
{
// change event source to LinguServiceManager since the listeners
// probably do not know (and need not to know) about the specific
@@ -416,7 +418,8 @@ IMPL_LINK( LngSvcMgrListenerHelper, TimeOut, Timer*, pTimer )
void LngSvcMgrListenerHelper::AddLngSvcEvt( INT16 nLngSvcEvt )
{
nCombinedLngSvcEvt |= nLngSvcEvt;
- aLaunchTimer.Start();
+// aLaunchTimer.Start();
+ Timeout();
}
diff --git a/linguistic/source/lngsvcmgr.hxx b/linguistic/source/lngsvcmgr.hxx
index aa7587527587..9716b082ddd5 100644
--- a/linguistic/source/lngsvcmgr.hxx
+++ b/linguistic/source/lngsvcmgr.hxx
@@ -43,7 +43,7 @@
#include <com/sun/star/linguistic2/XAvailableLocales.hpp>
#include <unotools/configitem.hxx>
-#include <vcl/timer.hxx>
+//#include <vcl/timer.hxx>
#include "misc.hxx"
#include "defs.hxx"
diff --git a/linguistic/source/makefile.mk b/linguistic/source/makefile.mk
index a6f9d266d095..bdf0b297d2f2 100644
--- a/linguistic/source/makefile.mk
+++ b/linguistic/source/makefile.mk
@@ -68,16 +68,15 @@ SHL1TARGET= $(TARGET)$(DLLPOSTFIX)
SHL1STDLIBS= \
$(CPPULIB) \
$(CPPUHELPERLIB) \
+ $(COMPHELPERLIB) \
$(VOSLIB) \
$(TOOLSLIB) \
$(I18NISOLANGLIB) \
- $(SVTOOLLIB) \
- $(SVLLIB) \
- $(VCLLIB) \
+ $(SVLLIB) \
$(SALLIB) \
+ $(XMLOFFLIB) \
$(UCBHELPERLIB) \
$(UNOTOOLSLIB) \
- $(XMLOFFLIB) \
$(ICUUCLIB)
# build DLL
diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx
index 91beaa2e2c9f..1067a9c369c9 100644
--- a/linguistic/source/misc.cxx
+++ b/linguistic/source/misc.cxx
@@ -33,8 +33,8 @@
#include <tools/string.hxx>
#include <tools/fsys.hxx>
#include <tools/debug.hxx>
-#include <svtools/pathoptions.hxx>
-#include <svtools/lngmisc.hxx>
+#include <unotools/pathoptions.hxx>
+#include <svl/lngmisc.hxx>
#include <ucbhelper/content.hxx>
#include <i18npool/mslangid.hxx>
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
@@ -52,6 +52,7 @@
#include <com/sun/star/linguistic2/XSearchableDictionaryList.hpp>
#include <unotools/processfactory.hxx>
#include <unotools/localedatawrapper.hxx>
+#include <unotools/syslocale.hxx>
#include <rtl/instance.hxx>
@@ -59,7 +60,7 @@
#include "defs.hxx"
#include "lngprops.hxx"
#include "hyphdta.hxx"
-
+#include <i18npool/mslangid.hxx>
using namespace utl;
using namespace osl;
@@ -92,7 +93,7 @@ LocaleDataWrapper & GetLocaleDataWrapper( INT16 nLang )
{
static LocaleDataWrapper aLclDtaWrp(
getProcessServiceFactory(),
- CreateLocale( Application::GetSettings().GetUILanguage() ) );
+ CreateLocale( SvtSysLocale().GetUILanguage() ) );
const Locale &rLcl = aLclDtaWrp.getLoadedLocale();
Locale aLcl( CreateLocale( nLang ) );
diff --git a/linguistic/source/misc2.cxx b/linguistic/source/misc2.cxx
index f89ebc1bc661..ffd54b78f860 100644
--- a/linguistic/source/misc2.cxx
+++ b/linguistic/source/misc2.cxx
@@ -35,7 +35,7 @@
#include <tools/urlobj.hxx>
#include <ucbhelper/content.hxx>
#include <tools/debug.hxx>
-#include <svtools/pathoptions.hxx>
+#include <unotools/pathoptions.hxx>
#include <unotools/processfactory.hxx>
#include <unotools/localfilehelper.hxx>
#include <unotools/localedatawrapper.hxx>
diff --git a/linguistic/source/spelldsp.cxx b/linguistic/source/spelldsp.cxx
index 48e64163dbe4..a89e6368781d 100644
--- a/linguistic/source/spelldsp.cxx
+++ b/linguistic/source/spelldsp.cxx
@@ -40,7 +40,7 @@
#include <unotools/localedatawrapper.hxx>
#include <unotools/processfactory.hxx>
#include <tools/debug.hxx>
-#include <svtools/lngmisc.hxx>
+#include <svl/lngmisc.hxx>
#include <osl/mutex.hxx>
#include <vector>
@@ -330,7 +330,8 @@ BOOL SpellCheckerDispatcher::isValid_Impl(
return bRes;
// search for entry with that language
- LangSvcEntries_Spell *pEntry = aSvcMap[ nLanguage ].get();
+ SpellSvcByLangMap_t::iterator aIt( aSvcMap.find( nLanguage ) );
+ LangSvcEntries_Spell *pEntry = aIt != aSvcMap.end() ? aIt->second.get() : NULL;
if (!pEntry)
{
@@ -497,7 +498,8 @@ Reference< XSpellAlternatives > SpellCheckerDispatcher::spell_Impl(
return xRes;
// search for entry with that language
- LangSvcEntries_Spell *pEntry = aSvcMap[ nLanguage ].get();
+ SpellSvcByLangMap_t::iterator aIt( aSvcMap.find( nLanguage ) );
+ LangSvcEntries_Spell *pEntry = aIt != aSvcMap.end() ? aIt->second.get() : NULL;
if (!pEntry)
{
@@ -847,8 +849,9 @@ Sequence< OUString >
// search for entry with that language and use data from that
INT16 nLanguage = LocaleToLanguage( rLocale );
- SpellCheckerDispatcher *pThis = (SpellCheckerDispatcher *) this;
- const LangSvcEntries_Spell *pEntry = pThis->aSvcMap[ nLanguage ].get();
+ SpellCheckerDispatcher *pThis = (SpellCheckerDispatcher *) this;
+ const SpellSvcByLangMap_t::iterator aIt( pThis->aSvcMap.find( nLanguage ) );
+ const LangSvcEntries_Spell *pEntry = aIt != aSvcMap.end() ? aIt->second.get() : NULL;
if (pEntry)
aRes = pEntry->aSvcImplNames;
diff --git a/linguistic/source/thesdsp.cxx b/linguistic/source/thesdsp.cxx
index cc0623d1dd82..ed537cc20043 100644
--- a/linguistic/source/thesdsp.cxx
+++ b/linguistic/source/thesdsp.cxx
@@ -32,7 +32,7 @@
#include "precompiled_linguistic.hxx"
#include <i18npool/lang.h>
#include <tools/debug.hxx>
-#include <svtools/lngmisc.hxx>
+#include <svl/lngmisc.hxx>
#include <cppuhelper/factory.hxx> // helper for factories
#include <com/sun/star/registry/XRegistryKey.hpp>
@@ -136,7 +136,8 @@ Sequence< Reference< XMeaning > > SAL_CALL
return aMeanings;
// search for entry with that language
- LangSvcEntries_Thes *pEntry = aSvcMap[ nLanguage ].get();
+ ThesSvcByLangMap_t::iterator aIt( aSvcMap.find( nLanguage ) );
+ LangSvcEntries_Thes *pEntry = aIt != aSvcMap.end() ? aIt->second.get() : NULL;
if (!pEntry)
{
@@ -264,8 +265,9 @@ Sequence< OUString >
// search for entry with that language and use data from that
INT16 nLanguage = LocaleToLanguage( rLocale );
- ThesaurusDispatcher *pThis = (ThesaurusDispatcher *) this;
- const LangSvcEntries_Thes *pEntry = pThis->aSvcMap[ nLanguage ].get();
+ ThesaurusDispatcher *pThis = (ThesaurusDispatcher *) this;
+ const ThesSvcByLangMap_t::iterator aIt( pThis->aSvcMap.find( nLanguage ) );
+ const LangSvcEntries_Thes *pEntry = aIt != aSvcMap.end() ? aIt->second.get() : NULL;
if (pEntry)
aRes = pEntry->aSvcImplNames;