Kaydet (Commit) f2c29539 authored tarafından Dennis Francis's avatar Dennis Francis

tdf#107952: Move cursor to changed cell after undo/redo in ScUndoSetCell

Change-Id: Id9f2ba2ed2d77f03c9bd56c41b958aa23921da0d
Reviewed-on: https://gerrit.libreoffice.org/42014Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarDennis Francis <dennis.francis@collabora.co.uk>
üst 115bed94
......@@ -158,6 +158,7 @@ public:
private:
void SetChangeTrack();
void SetValue( const ScCellValue& rVal );
void MoveCursorToCell();
private:
ScAddress maPos;
......
......@@ -387,6 +387,7 @@ void ScUndoSetCell::Undo()
{
BeginUndo();
SetValue(maOldValue);
MoveCursorToCell();
pDocShell->PostPaintCell(maPos);
ScDocument& rDoc = pDocShell->GetDocument();
......@@ -401,6 +402,7 @@ void ScUndoSetCell::Redo()
{
BeginRedo();
SetValue(maNewValue);
MoveCursorToCell();
pDocShell->PostPaintCell(maPos);
SetChangeTrack();
EndRedo();
......@@ -469,6 +471,16 @@ void ScUndoSetCell::SetValue( const ScCellValue& rVal )
}
}
void ScUndoSetCell::MoveCursorToCell()
{
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if ( pViewShell )
{
pViewShell->SetTabNo( maPos.Tab() );
pViewShell->MoveCursorAbs( maPos.Col(), maPos.Row(), SC_FOLLOW_JUMP, false, false );
}
}
ScUndoPageBreak::ScUndoPageBreak( ScDocShell* pNewDocShell,
SCCOL nNewCol, SCROW nNewRow, SCTAB nNewTab,
bool bNewColumn, bool bNewInsert ) :
......
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