[Libreoffice-commits] core.git: svl/source
Eike Rathke (via logerrit)
logerrit at kemper.freedesktop.org
Mon Aug 2 23:11:47 UTC 2021
svl/source/numbers/zforfind.cxx | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
New commits:
commit 4961dbaecc9e5cac57d99d2ea9d265a90daa4a8b
Author: Eike Rathke <erack at redhat.com>
AuthorDate: Mon Aug 2 22:11:29 2021 +0200
Commit: Eike Rathke <erack at redhat.com>
CommitDate: Tue Aug 3 01:11:11 2021 +0200
Resolves: tdf#143664 {de-*} accept "Mär" and "Mrz" for March
Change-Id: I82c094687137995a634450cb4f617909859d1688
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119916
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Jenkins
diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx
index 8b01debbb1d4..121b9bd406f6 100644
--- a/svl/source/numbers/zforfind.cxx
+++ b/svl/source/numbers/zforfind.cxx
@@ -649,9 +649,25 @@ short ImpSvNumberInputScan::GetMonth( const OUString& rString, sal_Int32& nPos )
res = sal::static_int_cast< short >(-(i+1)); // negative
break; // for
}
+ else if (i == 2 && pFormatter->GetLanguageTag().getLanguage() == "de")
+ {
+ if (pUpperAbbrevMonthText[i] == u"M\u00C4R" && StringContainsWord( "MRZ", rString, nPos))
+ { // Accept MRZ for MÄR
+ nPos = nPos + 3;
+ res = sal::static_int_cast< short >(-(i+1)); // negative
+ break; // for
+ }
+ else if (pUpperAbbrevMonthText[i] == "MRZ" && StringContainsWord( u"M\u00C4R", rString, nPos))
+ { // And vice versa, accept MÄR for MRZ
+ 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.
+ // It is the case for at least en-* and de-* 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.
More information about the Libreoffice-commits
mailing list