sc/source/ui/view/viewdata.cxx |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit c358ed52ade8308bf504c61fda58a4733ba7b1df
Author:     Luboš Luňák <l.lu...@collabora.com>
AuthorDate: Tue Apr 12 13:01:13 2022 +0200
Commit:     Luboš Luňák <l.lu...@collabora.com>
CommitDate: Tue Apr 12 17:06:57 2022 +0200

    compress row height calculation (tdf#148492)
    
    Change-Id: I42346472485f00bd64d08d2e2d0aef0ec02423f1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132897
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <l.lu...@collabora.com>

diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 7a9df94d7678..9b8e0a22d4bf 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -2991,8 +2991,14 @@ void ScViewData::RecalcPixPos()             // after 
zoom changes
 
         tools::Long nPixPosY = 0;
         SCROW nPosY = pThisTab->nPosY[eWhich];
+        tools::Long nRowHeight = -1;
+        SCROW nLastSameHeightRow = -1;
         for (SCROW j=0; j<nPosY; j++)
-            nPixPosY -= ToPixel(mrDoc.GetRowHeight(j, nTabNo), nPPTY);
+        {
+            if(nLastSameHeightRow < j)
+                nRowHeight = ToPixel(mrDoc.GetRowHeight(j, nTabNo, nullptr, 
&nLastSameHeightRow), nPPTY);
+            nPixPosY -= nRowHeight;
+        }
         pThisTab->nPixPosY[eWhich] = nPixPosY;
     }
 }

Reply via email to