[Libreoffice-commits] core.git: svl/source

Mike Kaganski (via logerrit) logerrit at kemper.freedesktop.org
Fri Jun 25 11:04:16 UTC 2021


 svl/source/numbers/zformat.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 9430eef53b89bce2e43258d5c4533d655fa80453
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Thu Jun 24 07:48:47 2021 +0200
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Fri Jun 25 13:03:36 2021 +0200

    tdf#143032: Check if the literal is empty
    
    Change-Id: I19a3b1abbe9cda32e012be23fc98baa20108f532
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117723
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 19ee2134df35..9395299afd16 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -3291,7 +3291,8 @@ 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 &&
-                     // Literal following, not space nor comma.
+                     // Literal following, not empty, space nor comma.
+                     !rInfo.sStrArray[i+1].isEmpty() &&
                      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) &&


More information about the Libreoffice-commits mailing list