diff options
author | Henry Castro <hcastro@collabora.com> | 2023-08-11 09:11:09 -0400 |
---|---|---|
committer | Henry Castro <hcastro@collabora.com> | 2023-08-13 16:38:38 +0200 |
commit | f2febdd756723a5835f98ca8cd749d51875f8bcc (patch) | |
tree | 75bee9744f2a34555cebd489e529588cff144bde /sc/source | |
parent | 631964a2ce1da3fbbeb53a5550c0e6728ba644aa (diff) |
tdf#155799: sc: fix input formula reference
If the start point reference mark is selected
with mouse direction up, it should extend to show
the correct input formula reference.
Signed-off-by: Henry Castro <hcastro@collabora.com>
Change-Id: I41f2ea52bf7de341eccadfba80e91fd76a6fd2de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155618
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
(cherry picked from commit f4f171506dc64a288344cb3c1eacc2c2d53283e8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155591
Tested-by: Jenkins
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/ui/view/tabview4.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sc/source/ui/view/tabview4.cxx b/sc/source/ui/view/tabview4.cxx index 442ef9a79654..a7de6bdf67d2 100644 --- a/sc/source/ui/view/tabview4.cxx +++ b/sc/source/ui/view/tabview4.cxx @@ -229,9 +229,13 @@ void ScTabView::UpdateRef( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ ) ScRefType eType = aViewData.GetRefType(); if ( eType == SC_REFTYPE_REF ) { + if ((nStartX > nEndX || nStartY > nEndY) && + rDoc.HasAttrib(nStartX, nStartY, nTab, HasAttrFlags::Merged)) + rDoc.ExtendMerge( nStartX, nStartY, nStartX, nStartY, nTab ); + ScRange aRef( - aViewData.GetRefStartX(), aViewData.GetRefStartY(), aViewData.GetRefStartZ(), - aViewData.GetRefEndX(), aViewData.GetRefEndY(), aViewData.GetRefEndZ() ); + nStartX, nStartY, aViewData.GetRefStartZ(), + nEndX, nEndY, aViewData.GetRefEndZ() ); SC_MOD()->SetReference( aRef, rDoc, &rMark ); ShowRefTip(); } |