[Libreoffice-commits] core.git: svl/source
Eike Rathke (via logerrit)
logerrit at kemper.freedesktop.org
Mon Mar 15 16:45:46 UTC 2021
svl/source/numbers/zformat.cxx | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
New commits:
commit 3e73d3475711b790cc80b9a286c5d454f3929384
Author: Eike Rathke <erack at redhat.com>
AuthorDate: Mon Mar 15 15:49:55 2021 +0100
Commit: Eike Rathke <erack at redhat.com>
CommitDate: Mon Mar 15 17:45:00 2021 +0100
xls save: fix writing inline calendar modifiers as format code, don't
E.g. ja-JP
GGGE [~gregorian]YYYY
saved as OOXML ended up as
[$-411]ggge\ gregorianyyyy
which when reloaded became
GGGE GREGoRianYYYY
displaying
令和3 R033Ro03ian2021
(whatever Xcl might have done with that).
Change-Id: If8a7d5b837b69c32afacc7a8d7646fedc84ab87a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112510
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Jenkins
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index b0dcad070dd2..8787f0977984 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -5309,6 +5309,8 @@ OUString SvNumberformat::GetMappedFormatstring( const NfKeywordTable& rKeywords,
}
break;
case NF_SYMBOLTYPE_CALDEL :
+ if (j + 1 >= nCnt)
+ break;
if ( rStrArray[j+1] == "gengou" )
{
nCalendarID = 0x0030000;
@@ -5325,9 +5327,10 @@ OUString SvNumberformat::GetMappedFormatstring( const NfKeywordTable& rKeywords,
{
nCalendarID = 0x0080000;
}
- // other calendars (see tdf#36038) not corresponding between LibO and XL
- if ( nCalendarID > 0 )
- j = j+2;
+ // Other calendars (see tdf#36038) not corresponding between LibO and XL.
+ // However, skip any calendar modifier and don't write
+ // as format code (if not as literal string).
+ j += 2;
break;
case NF_SYMBOLTYPE_CURREXT :
nPosHaveLCID = aStr.getLength();
More information about the Libreoffice-commits
mailing list