summaryrefslogtreecommitdiff
path: root/linguistic/source/hyphdsp.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'linguistic/source/hyphdsp.cxx')
-rw-r--r--linguistic/source/hyphdsp.cxx16
1 files changed, 10 insertions, 6 deletions
diff --git a/linguistic/source/hyphdsp.cxx b/linguistic/source/hyphdsp.cxx
index 7bc8c343af..7a0da09b39 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;