diff options
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; } } |