diff options
author | Eike Rathke <erack@redhat.com> | 2022-01-30 00:56:48 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2022-01-30 03:08:08 +0100 |
commit | 7055ad90927d0d2e0dc5eab3774322e386fe2b15 (patch) | |
tree | 41f129d6e2d4c686f8f904c9b711b2fd43d350f3 /sc/source/ui/view/dbfunc3.cxx | |
parent | 07982093f9751e333526252982292bf56d0990d3 (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/dbfunc3.cxx')
-rw-r--r-- | sc/source/ui/view/dbfunc3.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx index 29479c7ef78f..517734290d16 100644 --- a/sc/source/ui/view/dbfunc3.cxx +++ b/sc/source/ui/view/dbfunc3.cxx @@ -587,10 +587,10 @@ void ScDBFunc::DoSubTotals( const ScSubTotalParam& rParam, bool bRecord, pDBData->SetArea( nTab, aNewParam.nCol1,aNewParam.nRow1, aNewParam.nCol2,aNewParam.nRow2 ); rDoc.CompileDBFormula(); + const ScRange aMarkRange( aNewParam.nCol1, aNewParam.nRow1, nTab, aNewParam.nCol2, aNewParam.nRow2, nTab); DoneBlockMode(); - InitOwnBlockMode(); - rMark.SetMarkArea( ScRange( aNewParam.nCol1,aNewParam.nRow1,nTab, - aNewParam.nCol2,aNewParam.nRow2,nTab ) ); + InitOwnBlockMode( aMarkRange ); + rMark.SetMarkArea( aMarkRange ); MarkDataChanged(); pDocSh->PostPaint(ScRange(0, 0, nTab, rDoc.MaxCol(), rDoc.MaxRow(), nTab), |