sc/source/ui/view/output2.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 8ab524e39df026418ae3f2d8d8b37d4848344a05
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Tue Sep 24 16:41:21 2024 +0500
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Wed Sep 25 11:20:46 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>
    (cherry picked from commit 8b23abac4929bbb15a52afb083259cd2d24b4995)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173803
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 877675c0ac48..a47bc47906fc 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -3069,8 +3069,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, "###", nNeededPixel, ( nLeftM + 
nRightM ) );
             tools::Long nLayoutSign = bLayoutRTL ? -1 : 1;

Reply via email to