sc/source/ui/view/viewdata.cxx | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-)
New commits: commit 88f5b8b924ef38e7ff20316e7ddc3cfe66b378d0 Author: Dennis Francis <dennis.fran...@collabora.com> AuthorDate: Wed Apr 14 13:26:26 2021 +0530 Commit: Dennis Francis <dennis.fran...@collabora.com> CommitDate: Thu Apr 22 08:05:39 2021 +0200 lok: fix incomplete/wrong tiles after zoom change and sheet switch Fix: Reset position cache for all sheets on zoom change. Change-Id: I58264d4674d2cb736c702096ffd52faffb603ec6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114227 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Michael Meeks <michael.me...@collabora.com> (cherry picked from commit fe52c79323f9ac4b5ea61e7d7e5f038552e9a247) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114362 Reviewed-by: Dennis Francis <dennis.fran...@collabora.com> diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx index 0ad17c2ace93..91f5fc6062af 100644 --- a/sc/source/ui/view/viewdata.cxx +++ b/sc/source/ui/view/viewdata.cxx @@ -3143,10 +3143,25 @@ void ScViewData::CalcPPT() } } - if (nPPTX != nOldPPTX) - GetLOKWidthHelper().invalidateByPosition(0L); - if (nPPTY != nOldPPTY) - GetLOKHeightHelper().invalidateByPosition(0L); + if (comphelper::LibreOfficeKit::isActive()) + { + SCTAB nTabCount = maTabData.size(); + bool bResetWidths = (nPPTX != nOldPPTX); + bool bResetHeights = (nPPTY != nOldPPTY); + for (SCTAB nTabIdx = 0; nTabIdx < nTabCount; ++nTabIdx) + { + if (!maTabData[nTabIdx]) + continue; + + if (bResetWidths) + if (auto* pWHelper = GetLOKWidthHelper(nTabIdx)) + pWHelper->invalidateByPosition(0L); + + if (bResetHeights) + if (auto* pHHelper = GetLOKHeightHelper(nTabIdx)) + pHHelper->invalidateByPosition(0L); + } + } } #define SC_OLD_TABSEP '/' _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits