diff options
author | Eike Rathke <erack@redhat.com> | 2014-03-28 17:46:19 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2014-03-28 17:46:19 +0100 |
commit | b4bc7aabce9bc5057b39f71cc7624c9345193caf (patch) | |
tree | 4ca6d43db237009fb3e24611031327270617f44d /sc | |
parent | 49836e6f672fdde87bed7921ace5eed6039f5135 (diff) |
Revert "coverity#1038286 Logically dead code"
This reverts commit f5adf08aa3a9a176bd2ed5acd638148eb8da7c85.
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/tool/cellkeytranslator.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sc/source/core/tool/cellkeytranslator.cxx b/sc/source/core/tool/cellkeytranslator.cxx index e2f3dfb079c7..af13cbeab1f7 100644 --- a/sc/source/core/tool/cellkeytranslator.cxx +++ b/sc/source/core/tool/cellkeytranslator.cxx @@ -137,6 +137,22 @@ static void lclMatchKeyword(OUString& rName, const ScCellKeywordHashMap& aMap, return; } } + else if ( !eOpCode && pLocale ) + { + LocaleMatch eLevel = lclLocaleCompare(itrList->mrLocale, aLanguageTag); + if ( eLevel == LOCALE_MATCH_ALL ) + { + // Name with matching locale preferred. + rName = OUString::createFromAscii( itrList->mpName ); + return; + } + else if ( eLevel > eLocaleMatchLevel ) + { + // Name with a better matching locale. + eLocaleMatchLevel = eLevel; + aBestMatchName = itrList->mpName; + } + } } // No preferred strings found. Return the best matching name. |