xmloff/source/style/xmlnumfi.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit e6d41f285617e4b867042afac5d3d92aa54e8e4c
Author:     Eike Rathke <er...@redhat.com>
AuthorDate: Sat Mar 13 00:07:48 2021 +0100
Commit:     Eike Rathke <er...@redhat.com>
CommitDate: Sat Mar 13 15:41:42 2021 +0100

    ODF load: replace YY/YYYY with E/EE only for secondary calendar
    
    In the context of Gengou calendar with Era a [~gregorian]YYYY
    should not be [~gregorian]EE (although it works and displays the
    same Gregorian year).
    
    Related to https://gerrit.libreoffice.org/c/core/+/108532
    
    Change-Id: Iaec55c997089cbaea424220d858bffdf20ff3706
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112406
    Reviewed-by: Eike Rathke <er...@redhat.com>
    Tested-by: Jenkins

diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx
index b33715726b92..734f572608b1 100644
--- a/xmloff/source/style/xmlnumfi.cxx
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -931,7 +931,8 @@ void SvXMLNumFmtElementContext::endFastElement(sal_Int32 )
                 // calendar of a locale if it is known to implicitly use E.
                 bool bImplicitEC = (!sCalendar.isEmpty() &&
                         rParent.GetLocaleData().doesSecondaryCalendarUseEC( 
sCalendar));
-                if (bImplicitEC || (!sCalendar.isEmpty() && rParent.HasEra()))
+                if (bImplicitEC || (!sCalendar.isEmpty() && rParent.HasEra()
+                            && sCalendar != 
rParent.GetLocaleData().getDefaultCalendar()->Name))
                 {
                     // If E or EE is the first format keyword, passing
                     // bImplicitEC=true suppresses the superfluous calendar
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to