[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source
Marco Cecchetti
marco.cecchetti at collabora.com
Mon Jul 9 15:41:28 UTC 2018
sc/source/ui/view/viewfunc.cxx | 10 ++++++++++
1 file changed, 10 insertions(+)
New commits:
commit bffd1f458ac665cf1acae9490c293ab93b25cad6
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/52997
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Tested-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 6e04b4b9d2a3..c9281c60761f 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -1491,8 +1491,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() );
@@ -1541,8 +1546,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