sc/source/ui/view/output2.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 6fdb23cd0eb6907764666e11a6049e58c58dedbb Author: Mike Kaganski <[email protected]> AuthorDate: Tue Sep 24 16:41:21 2024 +0500 Commit: Xisco Fauli <[email protected]> CommitDate: Wed Sep 25 14:31:10 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 <[email protected]> (cherry picked from commit 8b23abac4929bbb15a52afb083259cd2d24b4995) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173802 Reviewed-by: Xisco Fauli <[email protected]> diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index cab30c900136..7bbfb988b45f 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -3124,8 +3124,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;
