summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/viewfunc.cxx
diff options
context:
space:
mode:
authorMarco Cecchetti <marco.cecchetti@collabora.com>2018-04-16 17:57:21 +0200
committerJan Holesovsky <kendy@collabora.com>2018-07-09 17:40:43 +0200
commit2f45ddefb9060940a6939fa1384733176f03d6b4 (patch)
tree5ab3941aacaaef50d3a8952ac3d7c24dbc59ee78 /sc/source/ui/view/viewfunc.cxx
parent9a7a419baf9a6aa9fc70d9e2a00dec3fbdeee565 (diff)
lok: sc: user input is lost when another user moves the related cell
- Start/open a spreadsheet with two users. - Type a number in a cell, eg. 10 in F10. - With user A, change that number, but don't finish editing, eg. change F10 to 5. - With user B, add rows or columns before F10. The cells will slide right/down accordingly, including F10. - With user A, finalize editing in its new place (still showing the updated value (5)), eg. press Enter. => The value reverts back to its former entry (10). Change-Id: I938763bf3b8bc5b4b78c7c753ecfad929ec80e79 Reviewed-on: https://gerrit.libreoffice.org/52998 Tested-by: Jenkins Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'sc/source/ui/view/viewfunc.cxx')
-rw-r--r--sc/source/ui/view/viewfunc.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 6d306164cb82..441364a8f971 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -1495,8 +1495,13 @@ void ScViewFunc::OnLOKInsertDeleteColumn(SCCOL nStartCol, long nOffset)
SCCOL nX = pTabViewShell->GetViewData().GetCurX();
if (nX > nStartCol || (nX == nStartCol && nOffset > 0))
{
+ ScInputHandler* pInputHdl = pTabViewShell->GetInputHandler();
SCROW nY = pTabViewShell->GetViewData().GetCurY();
pTabViewShell->SetCursor(nX + nOffset, nY);
+ if (pInputHdl && pInputHdl->IsInputMode())
+ {
+ pInputHdl->SetModified();
+ }
}
ScMarkData aMultiMark( pTabViewShell->GetViewData().GetMarkData() );
@@ -1545,8 +1550,13 @@ void ScViewFunc::OnLOKInsertDeleteRow(SCROW nStartRow, long nOffset)
SCROW nY = pTabViewShell->GetViewData().GetCurY();
if (nY > nStartRow || (nY == nStartRow && nOffset > 0))
{
+ ScInputHandler* pInputHdl = pTabViewShell->GetInputHandler();
SCCOL nX = pTabViewShell->GetViewData().GetCurX();
pTabViewShell->SetCursor(nX, nY + nOffset);
+ if (pInputHdl && pInputHdl->IsInputMode())
+ {
+ pInputHdl->SetModified();
+ }
}
ScMarkData aMultiMark( pTabViewShell->GetViewData().GetMarkData() );