diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2022-04-12 13:01:13 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2022-04-12 17:06:57 +0200 |
commit | c358ed52ade8308bf504c61fda58a4733ba7b1df (patch) | |
tree | 7c546a1e2d4492755aa4e55ebeb7db7689ea66bb /sc | |
parent | 9efb19a6ad39bdd0d744adec3390ab274c90be2e (diff) |
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.lunak@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/view/viewdata.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
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; } } |