sc/source/ui/view/output2.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 8b23abac4929bbb15a52afb083259cd2d24b4995 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Tue Sep 24 16:41:21 2024 +0500 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Wed Sep 25 07:15:49 2024 +0200 tdf#163091: check rParam.mnX before passing it to RowInfo::cellInfo When moving to the left, the RowInfo may have e.g. cells 21 to 41, and rParam.mnX may be 15, which is outside of the RowInfo data. It seems that in this case, when we handle the data outside of the visible area, setting clip marks may be safely skipped anyway. Change-Id: I2f507dc166468c44e34645bc34c827456f1ab1ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173857 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index db376c5db514..ee0709594caf 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -3133,8 +3133,8 @@ void ScOutputData::DrawEditStandard(DrawEditParam& rParam) } } - - if ( rParam.mbCellIsValue && ( aAreaParam.mbLeftClip || aAreaParam.mbRightClip ) ) + if (rParam.mnX >= nX1 && rParam.mbCellIsValue + && (aAreaParam.mbLeftClip || aAreaParam.mbRightClip)) { SetEngineTextAndGetWidth( rParam, u"###"_ustr, nNeededPixel, ( nLeftM + nRightM ) ); tools::Long nLayoutSign = bLayoutRTL ? -1 : 1;