From 26f6ae4122fcce6bafa71c064f5e645c39022082 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 07:03:13 +0200 Subject: Adding upstream version 4:24.2.3. Signed-off-by: Daniel Baumann --- sc/source/ui/view/output2.cxx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'sc/source/ui/view/output2.cxx') diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index d419981d8e..877675c0ac 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -1877,8 +1877,7 @@ void ScOutputData::LayoutStrings(bool bPixelToLogic) // Cells to the left are marked directly, cells to the // right are handled by the flag for nX2 SCCOL nMarkX = ( nCellX <= nX2 ) ? nCellX : nX2; - RowInfo* pMarkRowInfo = ( nCellY == nY ) ? pThisRowInfo : &pRowInfo[0]; - pMarkRowInfo->basicCellInfo(nMarkX).bEditEngine = true; + pThisRowInfo->basicCellInfo(nMarkX).bEditEngine = true; bDoCell = false; // don't draw here } if ( bDoCell ) @@ -4429,14 +4428,17 @@ void ScOutputData::DrawEdit(bool bPixelToLogic) SCROW nCellY = nY; bool bDoCell = false; + // if merged cell contains hidden row or column or both + const ScMergeFlagAttr* pMergeFlag = mpDoc->GetAttr(nX, nY, nTab, ATTR_MERGE_FLAG); + bool bOverlapped = (pMergeFlag->IsHorOverlapped() || pMergeFlag->IsVerOverlapped()); + tools::Long nPosY = nRowPosY; - if ( nArrY == 0 ) + if (bOverlapped) { - nPosY = nScrY; - nY = pRowInfo[1].nRowNo; + nY = pRowInfo[nArrY].nRowNo; SCCOL nOverX; // start of the merged cells SCROW nOverY; - if (GetMergeOrigin( nX,nY, 1, nOverX,nOverY, true )) + if (GetMergeOrigin( nX,nY, nArrY, nOverX,nOverY, true )) { nCellX = nOverX; nCellY = nOverY; -- cgit v1.2.3