diff options
-rw-r--r-- | sc/qa/unit/data/xls/pass/ooo56295-1.xls | bin | 0 -> 17408 bytes | |||
-rw-r--r-- | sc/source/ui/view/output.cxx | 5 |
2 files changed, 4 insertions, 1 deletions
diff --git a/sc/qa/unit/data/xls/pass/ooo56295-1.xls b/sc/qa/unit/data/xls/pass/ooo56295-1.xls Binary files differnew file mode 100644 index 000000000000..bd727c9bcfa0 --- /dev/null +++ b/sc/qa/unit/data/xls/pass/ooo56295-1.xls diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx index 468953af8272..83c879875e21 100644 --- a/sc/source/ui/view/output.cxx +++ b/sc/source/ui/view/output.cxx @@ -1100,7 +1100,10 @@ void ScOutputData::DrawBackground(vcl::RenderContext& rRenderContext) for (SCCOL nMerged = 0; nMerged < nMergedCells; ++nMerged) { - nPosX += pRowInfo[0].pCellInfo[nX+nOldMerged+nMerged].nWidth * nLayoutSign; + SCCOL nCol = nX+nOldMerged+nMerged; + if (nCol > nX2+2) + break; + nPosX += pRowInfo[0].pCellInfo[nCol].nWidth * nLayoutSign; } } |