summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2023-08-11 09:11:09 -0400
committerAron Budea <aron.budea@collabora.com>2023-08-12 00:53:20 +0200
commit48e03dfb8398fa7dc881f039f9d56b729e95ca8d (patch)
tree072f9972162c336382f8e8f5d70d0270a49def15
parentee6d3d10ae7962d7eb6562e65abe9e1524a04e99 (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> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155593 Tested-by: Aron Budea <aron.budea@collabora.com> Reviewed-by: Aron Budea <aron.budea@collabora.com>
-rw-r--r--sc/source/ui/view/tabview4.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/sc/source/ui/view/tabview4.cxx b/sc/source/ui/view/tabview4.cxx
index 3ed71a5ef931..9ff3d41ef4df 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();
}