diff options
author | Mathias Bauer <mba@openoffice.org> | 2009-12-05 19:29:07 +0100 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2009-12-05 19:29:07 +0100 |
commit | 8d669bc21b9d1976842ba8252d2f0fb953160bdd (patch) | |
tree | 63e5a53c8ff9c4cdff33070e177eda653922f28a /linguistic | |
parent | f232b25c1eceb8e1c32cfd917d666b3a16b14405 (diff) | |
parent | 875ac20478f16e5107acb222c0b851b99d2e0f27 (diff) |
merge to 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 419f1a3cf4a9..64907ab04f24 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 35cf6304f105..a89e6368781d 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 e9a8617cf698..ed537cc20043 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; |