Resolves: tdf#127363 accept SEPT as SEP for September
Change-Id: Idc0fb30308ca32428125656dc8b2ce68e35c4770
Reviewed-on: https://gerrit.libreoffice.org/79655
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx
index 0872ea5..cdf4d1e255 100644
--- a/svl/source/numbers/zforfind.cxx
+++ b/svl/source/numbers/zforfind.cxx
@@ -640,13 +640,22 @@
res = sal::static_int_cast< short >(-(i+1)); // negative
break; // for
}
else if ( i == 8 && pUpperAbbrevMonthText[i] == "SEPT" &&
StringContainsWord( "SEP", rString, nPos ) )
{ // #102136# The correct English form of month September abbreviated is
// SEPT, but almost every data contains SEP instead.
nPos = nPos + 3;
res = sal::static_int_cast< short >(-(i+1)); // negative
break; // for
else if (i == 8)
{
// This assumes the weirdness is applicable to all locales.
if (pUpperAbbrevMonthText[i] == "SEPT" && StringContainsWord( "SEP", rString, nPos))
{ // #102136# The correct English form of month September abbreviated is
// SEPT, but almost every data contains SEP instead.
nPos = nPos + 3;
res = sal::static_int_cast< short >(-(i+1)); // negative
break; // for
}
else if (pUpperAbbrevMonthText[i] == "SEP" && StringContainsWord( "SEPT", rString, nPos))
{ // And vice versa, accept SEPT for SEP
nPos = nPos + 4;
res = sal::static_int_cast< short >(-(i+1)); // negative
break; // for
}
}
}
if (!res)