diff options
-rw-r--r-- | sc/source/ui/view/viewdata.cxx | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx index b1470ad68b44..6b735e21130c 100644 --- a/sc/source/ui/view/viewdata.cxx +++ b/sc/source/ui/view/viewdata.cxx @@ -3148,10 +3148,25 @@ void ScViewData::CalcPPT() } } - if (nPPTX != nOldPPTX) - GetLOKWidthHelper().invalidateByPosition(0L); - if (nPPTY != nOldPPTY) - GetLOKHeightHelper().invalidateByPosition(0L); + if (pDoc && 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 '/' |