[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - svl/source
Eike Rathke (via logerrit)
logerrit at kemper.freedesktop.org
Wed Aug 4 10:38:01 UTC 2021
svl/source/numbers/zforfind.cxx | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
New commits:
commit c23422c0f320df8ef27dbe3ba0a4ac5ead47d6a8
Author: Eike Rathke <erack at redhat.com>
AuthorDate: Mon Aug 2 22:11:29 2021 +0200
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Aug 4 12:37:24 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
(cherry picked from commit 4961dbaecc9e5cac57d99d2ea9d265a90daa4a8b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119859
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx
index 87c64df62c2a..191a388581ea 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