Kaydet (Commit) cb444c17 authored tarafından Justin Luth's avatar Justin Luth Kaydeden (comit) Markus Mohrhard

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/38124Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarJustin Luth <justin_luth@sil.org>
Reviewed-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
üst f1454b47
......@@ -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 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment