summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/viewfun2.cxx
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2022-01-30 00:56:48 +0100
committerEike Rathke <erack@redhat.com>2022-01-30 03:08:08 +0100
commit7055ad90927d0d2e0dc5eab3774322e386fe2b15 (patch)
tree41f129d6e2d4c686f8f904c9b711b2fd43d350f3 /sc/source/ui/view/viewfun2.cxx
parent07982093f9751e333526252982292bf56d0990d3 (diff)
Resolves: tdf#146994 InitOwnBlockMode() with current mark range or cursor pos
This sets specifically the end position to the correct value. The start position and dependent logic if meBlockMode==Own is re-initialized in MarkCursor() via InitBlockMode(). Unfortunately that (calling MarkCursor()) happens after the end position was incremented in ExpandBlock(), previous with the wrong values. This new own block mode init now also makes it possible to expand/shrink the marked range after a paste or undo/redo, as it would be expected for any existing selection. Change-Id: Id26e4aa32896ec0c714e33b99dbf6702df144995 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129158 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
Diffstat (limited to 'sc/source/ui/view/viewfun2.cxx')
-rw-r--r--sc/source/ui/view/viewfun2.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index fd19f833540d..49b8fc14f30f 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -2008,7 +2008,7 @@ bool ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem,
}
DoneBlockMode(true); // don't delete mark
- InitOwnBlockMode();
+ InitOwnBlockMode( ScRange( nCol, nRow, nStartTab, nCol, nRow, nEndTab));
// If search starts at the beginning don't ask again whether it shall start at the beginning
bool bFirst = true;
@@ -2359,7 +2359,7 @@ void ScViewFunc::UseScenario( const OUString& rName )
SCTAB nTab = GetViewData().GetTabNo();
DoneBlockMode();
- InitOwnBlockMode();
+ InitOwnBlockMode( ScRange( GetViewData().GetCurX(), GetViewData().GetCurY(), nTab));
pDocSh->UseScenario( nTab, rName );
}