svl/source/numbers/zformat.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
New commits: commit def94a6b50f02682c3f04ce3171665c703c47b2c Author: Eike Rathke <er...@redhat.com> AuthorDate: Mon May 17 15:59:00 2021 +0200 Commit: Eike Rathke <er...@redhat.com> CommitDate: Mon May 17 17:15:32 2021 +0200 Resolves: tdf#128314 Use GenitiveMonths name also if comma is following So 'D MMMM,' works the same as 'D MMMM '. Change-Id: Id910c67174260401b9c37672f189d550480793a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115708 Reviewed-by: Eike Rathke <er...@redhat.com> Tested-by: Jenkins diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index fd1776bb1cd9..648034f9352a 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -3237,9 +3237,9 @@ bool SvNumberformat::ImpGetTimeOutput(double fNumber, genitive case if the day follows the month, and partitive case if the day precedes the month. If there is no day of month the nominative case (noun) is returned. Also if the month is immediately preceded or followed by a - literal string other than space the nominative name is used, this prevents - duplicated casing for MMMM\t\a and such in documents imported from (e.g. - Finnish) Excel or older LibO/OOo releases. + literal string other than space and not followed by a comma, the nominative + name is used, this prevents duplicated casing for MMMM\t\a and such in + documents imported from (e.g. Finnish) Excel or older LibO/OOo releases. */ // IDEA: instead of eCodeType pass the index to nTypeArray and restrict @@ -3276,9 +3276,11 @@ sal_Int32 SvNumberformat::ImpUseMonthCase( int & io_nState, const ImpSvNumFor& r case NF_KEY_MMMMM: if ((i < nCount-1 && rInfo.nTypeArray[i+1] == NF_SYMBOLTYPE_STRING && - rInfo.sStrArray[i+1][0] != ' ') || + // Literal following, not space nor comma. + rInfo.sStrArray[i+1][0] != ' ' && rInfo.sStrArray[i+1][0] != ',') || (i > 0 && rInfo.nTypeArray[i-1] == NF_SYMBOLTYPE_STRING && ((nLen = rInfo.sStrArray[i-1].getLength()) > 0) && + // Literal preceding, not space. rInfo.sStrArray[i-1][nLen-1] != ' ')) { io_nState = 1; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits