[PATCH] localedata fallbacks ...

Michael Meeks michael.meeks at suse.com
Fri Dec 21 09:07:18 PST 2012


Hi there,

	Was just reading this code for one reason and another, and stumbled
across the gem the appended tries to fix; since I'm not 100% certain
what it's supposed to be doing, I thought I'd ask a man that knows
things :-) presumably a loop-invariant condition that will evaluate to
true for the first item - is great for en_US but ... of course, I'm
suspicious that the code / fallback fundamentally doesn't work in more
interesting ways ;-) 

diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx
index 300c5e1..2e23035 100644
--- a/i18npool/source/localedata/localedata.cxx
+++ b/i18npool/source/localedata/localedata.cxx
@@ -441,7 +441,7 @@ oslGenericFunction SAL_CALL lcl_LookupTableHelper::getFunctionSymbolByName(
     for ( sal_Int16 i = 0; i < nbOfLocales; i++)
     {
         if (localeName.equalsAscii(aLibTable[i].pLocale) ||
-                (bFallback && localeName == aFallback))
+            (bFallback && aFallback.equalsAscii(aLibTable[i].pLocale)))
         {
 #ifndef DISABLE_DYNLOADING
             LocaleDataLookupTableItem* pCurrent = 0;

	Thoughts ?

		Michael.

-- 
michael.meeks at suse.com  <><, Pseudo Engineer, itinerant idiot



More information about the LibreOffice mailing list