Related: tdf#147817 prevent date acceptance pattern with numeric ambiguity

i.e. matching input with numeric decinmal separator, like M.D

Change-Id: Ice977b3e92373829cd2f5df7c065d55bc49fc23e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141686
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
(cherry picked from commit cdded98b23698e5e2a5cfffd5638e395098fcc4a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141707
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index f1e3fcf4..b9402df 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -1719,6 +1719,18 @@ IMPL_LINK( OfaLanguagesTabPage, DatePatternsHdl, weld::Entry&, rEd, void )
                bool bY, bM, bD;
                bY = bM = bD = false;
                bool bSep = true;
                if (aPat.getLength() == 3)
                {
                    // Disallow a pattern that would match a numeric input with
                    // decimal separator, like M.D
                    const LanguageType eLang = m_xLocaleSettingLB->get_active_id();
                    const LocaleDataWrapper aLocaleWrapper(( LanguageTag(eLang)));
                    if (    aPat[1] == aLocaleWrapper.getNumDecimalSep().toChar()
                         || aPat[1] == aLocaleWrapper.getNumDecimalSepAlt().toChar())
                    {
                        bValid = false;
                    }
                }
                for (sal_Int32 i = 0; i < aPat.getLength() && bValid; /*nop*/)
                {
                    const sal_Int32 j = i;