sc/source/ui/docshell/impex.cxx |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 96175a4bc6687c3adc31b9e0246fe49db2b7675e
Author: Tamás Gulácsi <tgulacs...@gmail.com>
Date:   Fri Nov 11 21:11:01 2016 +0100

    tdf#69981 - sc: blank empty cells in TextToColumns
    
    If the string is empty, we must delete the destination cell.
    This is done, iff we don't return early (rStr.isEmpty() check).
    Instead, add a fast path for the empty string.
    
    Change-Id: I950db5012e7e9337f2efd576e58198b1b49eaa0c
    Reviewed-on: https://gerrit.libreoffice.org/30778
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Eike Rathke <er...@redhat.com>
    Tested-by: Eike Rathke <er...@redhat.com>

diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 9cfe424..35527ff 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -957,8 +957,15 @@ static bool lcl_PutString(
 {
     ScDocument* pDoc = &rDocImport.getDoc();
     bool bMultiLine = false;
-    if ( nColFormat == SC_COL_SKIP || rStr.isEmpty() || !ValidCol(nCol) || 
!ValidRow(nRow) )
+    if ( nColFormat == SC_COL_SKIP || !ValidCol(nCol) || !ValidRow(nRow) )
         return bMultiLine;
+    if ( rStr.isEmpty() ) {
+        if ( bUseDocImport )
+            rDocImport.setAutoInput(ScAddress(nCol, nRow, nTab), rStr );
+        else
+            pDoc->SetString( nCol, nRow, nTab, rStr );
+        return false;
+    }
 
     if ( nColFormat == SC_COL_TEXT )
     {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to