diff options
author | sb <sb@openoffice.org> | 2009-12-10 17:46:18 +0100 |
---|---|---|
committer | sb <sb@openoffice.org> | 2009-12-10 17:46:18 +0100 |
commit | d9164f354a8951ad220d5ae937517228296d1922 (patch) | |
tree | 17bcc6282d3708c3331a59513fb40ccefeaaad4b /linguistic | |
parent | b069d0fabfa30848596bdc106380f75a725b686e (diff) | |
parent | 875ac20478f16e5107acb222c0b851b99d2e0f27 (diff) |
sb111: merged in DEV300_m67
Diffstat (limited to 'linguistic')
-rw-r--r-- | linguistic/source/hyphdsp.cxx | 14 | ||||
-rw-r--r-- | linguistic/source/spelldsp.cxx | 11 | ||||
-rw-r--r-- | linguistic/source/thesdsp.cxx | 8 |
3 files changed, 21 insertions, 12 deletions
diff --git a/linguistic/source/hyphdsp.cxx b/linguistic/source/hyphdsp.cxx index a04d01c0d1a7..e1ebe970a44f 100644 --- a/linguistic/source/hyphdsp.cxx +++ b/linguistic/source/hyphdsp.cxx @@ -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/spelldsp.cxx b/linguistic/source/spelldsp.cxx index 48e64163dbe4..6009461c7e7c 100644 --- a/linguistic/source/spelldsp.cxx +++ b/linguistic/source/spelldsp.cxx @@ -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..b944e3a44d1b 100644 --- a/linguistic/source/thesdsp.cxx +++ b/linguistic/source/thesdsp.cxx @@ -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; |