sc/source/ui/app/inputhdl.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
New commits: commit c5779b506a701ff21d2d738439a8e4976e18833c Author: Henry Castro <hcas...@collabora.com> AuthorDate: Thu Aug 10 15:14:18 2023 -0400 Commit: Aron Budea <aron.bu...@collabora.com> CommitDate: Fri Aug 11 16:13:00 2023 +0200 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 <hcas...@collabora.com> Change-Id: Ie9611aea3f6645a6cf45514939ae6364afac0b1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155564 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Tomaž Vajngerl <qui...@gmail.com> (cherry picked from commit edbf070a6bb6aacfb277140457cf21036b5239e9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155590 Tested-by: Aron Budea <aron.bu...@collabora.com> Reviewed-by: Aron Budea <aron.bu...@collabora.com> 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);