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

Tamás Zolnai tamas.zolnai at collabora.com
Sun Sep 3 21:12:36 UTC 2017


 vcl/source/control/field2.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b3b2c4f1b140b68155891cfbfda9cd2b209f3d7c
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
Date:   Sun Sep 3 21:49:03 2017 +0200

    Assertion when editing pattern field
    
    Change-Id: Ia515382556329feeec359254d3be3f90d2fd17ad
    Reviewed-on: https://gerrit.libreoffice.org/41870
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>

diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx
index dfcf63126fe1..3712fc004d24 100644
--- a/vcl/source/control/field2.cxx
+++ b/vcl/source/control/field2.cxx
@@ -368,7 +368,7 @@ static void ImplPatternProcessStrictModify( Edit* pEdit,
     OUString aText = pEdit->GetText();
 
     // remove leading blanks
-    if ( bSameMask && !(nFormatFlags & PATTERN_FORMAT_EMPTYLITERALS) )
+    if ( bSameMask && !(nFormatFlags & PATTERN_FORMAT_EMPTYLITERALS) && !rEditMask.isEmpty() )
     {
         sal_Int32 i = 0;
         sal_Int32 nMaxLen = aText.getLength();


More information about the Libreoffice-commits mailing list