sc/source/ui/app/inputhdl.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
New commits: commit 964fe83ec0ce36dab611c7e1cf22af7c8cce5860 Author: Henry Castro <hcas...@collabora.com> AuthorDate: Thu Aug 10 15:14:18 2023 -0400 Commit: Henry Castro <hcas...@collabora.com> CommitDate: Fri Sep 1 18:10:16 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> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156417 Tested-by: Jenkins diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 1267509d4e5f..4a728f54874d 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -494,10 +494,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);