summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2023-08-10 15:14:18 -0400
committerAron Budea <aron.budea@collabora.com>2023-08-11 16:13:00 +0200
commitc5779b506a701ff21d2d738439a8e4976e18833c (patch)
tree7dd4ee0327b0a893f975343d57d6dd984e8ca281
parent35f64398806d6361d427a38446fd3da70eff4915 (diff)
tdf#155799: lok: sc: fix extend reference mark
In the tiled rendering case, the server sends a reference coordinates to client side, so extend the range end point reference if merged cells. Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: Ie9611aea3f6645a6cf45514939ae6364afac0b1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155564 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit edbf070a6bb6aacfb277140457cf21036b5239e9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155590 Tested-by: Aron Budea <aron.budea@collabora.com> Reviewed-by: Aron Budea <aron.budea@collabora.com>
-rw-r--r--sc/source/ui/app/inputhdl.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 66eb92dd2efa..30e7c4482e1c 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -484,10 +484,15 @@ ReferenceMark ScInputHandler::GetReferenceMark( const ScViewData& rViewData, ScD
{
SCCOL nCol1 = nX1, nCol2 = nX2;
SCROW nRow1 = nY1, nRow2 = nY2;
+ ScDocument& rDoc = pDocSh->GetDocument();
+
PutInOrder(nCol1, nCol2);
PutInOrder(nRow1, nRow2);
+
if (nCol1 == nCol2 && nRow1 == nRow2)
- pDocSh->GetDocument().ExtendMerge(nCol1, nRow1, nCol2, nRow2, nTab);
+ rDoc.ExtendMerge(nCol1, nRow1, nCol2, nRow2, nTab);
+ else if (rDoc.HasAttrib(nCol2, nRow2, nTab, HasAttrFlags::Merged))
+ rDoc.ExtendMerge(nCol2, nRow2, nCol2, nRow2, nTab);
Point aTopLeft = rViewData.GetPrintTwipsPos(nCol1, nRow1);
Point aBottomRight = rViewData.GetPrintTwipsPos(nCol2 + 1, nRow2 + 1);