summaryrefslogtreecommitdiff
path: root/sc/source/ui/undo/undoutil.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-08-09 11:59:30 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-08-09 19:05:34 +0200
commit8c505204f25b509daa586c2d308fb870325c59b9 (patch)
tree3c5840215f37f8f37c39703de767a4fe7b3b6d87 /sc/source/ui/undo/undoutil.cxx
parent966b156cbd8b786c88ade5d322177e16fd408732 (diff)
loplugin:flatten in sc
Change-Id: Iedb6ca37d1b006131d1fc77eca3303a12ccb60c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100401 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/undo/undoutil.cxx')
-rw-r--r--sc/source/ui/undo/undoutil.cxx24
1 files changed, 12 insertions, 12 deletions
diff --git a/sc/source/ui/undo/undoutil.cxx b/sc/source/ui/undo/undoutil.cxx
index d89905cbd685..76789b8b7857 100644
--- a/sc/source/ui/undo/undoutil.cxx
+++ b/sc/source/ui/undo/undoutil.cxx
@@ -35,19 +35,19 @@ void ScUndoUtil::MarkSimpleBlock( const ScDocShell* pDocShell,
return;
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- if (pViewShell)
- {
- SCTAB nViewTab = pViewShell->GetViewData().GetTabNo();
- if ( nViewTab < nStartZ || nViewTab > nEndZ )
- pViewShell->SetTabNo( nStartZ );
+ if (!pViewShell)
+ return;
- pViewShell->DoneBlockMode();
- pViewShell->MoveCursorAbs( nStartX, nStartY, SC_FOLLOW_JUMP, false, false );
- pViewShell->InitOwnBlockMode();
- pViewShell->GetViewData().GetMarkData().
- SetMarkArea( ScRange( nStartX, nStartY, nStartZ, nEndX, nEndY, nEndZ ) );
- pViewShell->MarkDataChanged();
- }
+ SCTAB nViewTab = pViewShell->GetViewData().GetTabNo();
+ if ( nViewTab < nStartZ || nViewTab > nEndZ )
+ pViewShell->SetTabNo( nStartZ );
+
+ pViewShell->DoneBlockMode();
+ pViewShell->MoveCursorAbs( nStartX, nStartY, SC_FOLLOW_JUMP, false, false );
+ pViewShell->InitOwnBlockMode();
+ pViewShell->GetViewData().GetMarkData().
+ SetMarkArea( ScRange( nStartX, nStartY, nStartZ, nEndX, nEndY, nEndZ ) );
+ pViewShell->MarkDataChanged();
}
void ScUndoUtil::MarkSimpleBlock( const ScDocShell* pDocShell,