[Libreoffice-commits] core.git: sc/source
Marco Cecchetti
marco.cecchetti at collabora.com
Mon Jul 9 15:41:06 UTC 2018
sc/source/ui/view/viewfunc.cxx | 10 ++++++++++
1 file changed, 10 insertions(+)
New commits:
commit 2f45ddefb9060940a6939fa1384733176f03d6b4
Author: Marco Cecchetti <marco.cecchetti at collabora.com>
Date: Mon Apr 16 17:57:21 2018 +0200
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 at collabora.com>
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() );
More information about the Libreoffice-commits
mailing list