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

Justin Luth justin_luth at sil.org
Thu Jun 8 00:47:06 UTC 2017


 sc/source/ui/view/gridwin.cxx |   15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

New commits:
commit cb444c17ca2834e53a9c5c797bae765f08e40101
Author: Justin Luth <justin_luth at sil.org>
Date:   Mon May 29 08:38:24 2017 +0300

    tdf#79571 sc FilterSelect: accept empty strings
    
    If a drop-down list has a valid entry that is an empty string,
    it should be acceptable as a data entry value, instead of just
    ignoring it and leaving the old value in the cell.
    
    Yes, the other simpler option is to just hit delete, but anyone using
    the UI will get confused, and if not paying attention will have
    incorrect data entry since it doesn't work as expected.
    
    In the bug tested here, the selection dropdown was created with
    data validation. Unsure of other times that create the grid...
    
    Change-Id: I3b49c34d01079d4c1ec9e140e2c51123408b10a6
    Reviewed-on: https://gerrit.libreoffice.org/38124
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Justin Luth <justin_luth at sil.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 65d7b0132c46..79ef36164c89 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -1189,16 +1189,13 @@ void ScGridWindow::FilterSelect( sal_uLong nSel )
 
 void ScGridWindow::ExecDataSelect( SCCOL nCol, SCROW nRow, const OUString& rStr )
 {
-    if ( !rStr.isEmpty() )
-    {
-        SCTAB nTab = pViewData->GetTabNo();
-        ScViewFunc* pView = pViewData->GetView();
-        pView->EnterData( nCol, nRow, nTab, rStr );
+    SCTAB nTab = pViewData->GetTabNo();
+    ScViewFunc* pView = pViewData->GetView();
+    pView->EnterData( nCol, nRow, nTab, rStr );
 
-        // #i52307# CellContentChanged is not in EnterData so it isn't called twice
-        // if the cursor is moved afterwards.
-        pView->CellContentChanged();
-    }
+    // #i52307# CellContentChanged is not in EnterData so it isn't called twice
+    // if the cursor is moved afterwards.
+    pView->CellContentChanged();
 }
 
 void ScGridWindow::MoveMouseStatus( ScGridWindow& rDestWin )


More information about the Libreoffice-commits mailing list