summaryrefslogtreecommitdiffstats
path: root/sc/source/ui/view/output2.cxx
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 05:03:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 05:03:13 +0000
commit26f6ae4122fcce6bafa71c064f5e645c39022082 (patch)
treeb0e0916f682785b3a983b71950c4623988ca6eef /sc/source/ui/view/output2.cxx
parentAdding upstream version 4:24.2.2. (diff)
downloadlibreoffice-e38636213bc5133dbb0d91a96e7b460368803a96.tar.xz
libreoffice-e38636213bc5133dbb0d91a96e7b460368803a96.zip
Adding upstream version 4:24.2.3.upstream/4%24.2.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sc/source/ui/view/output2.cxx')
-rw-r--r--sc/source/ui/view/output2.cxx14
1 files changed, 8 insertions, 6 deletions
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;