summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2014-03-28 17:46:19 +0100
committerEike Rathke <erack@redhat.com>2014-03-28 17:46:19 +0100
commitb4bc7aabce9bc5057b39f71cc7624c9345193caf (patch)
tree4ca6d43db237009fb3e24611031327270617f44d /sc
parent49836e6f672fdde87bed7921ace5eed6039f5135 (diff)
Revert "coverity#1038286 Logically dead code"
This reverts commit f5adf08aa3a9a176bd2ed5acd638148eb8da7c85.
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/cellkeytranslator.cxx16
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.