Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


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@suse.com  <><, Pseudo Engineer, itinerant idiot


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.