sc/source/ui/inc/tabview.hxx | 2 +- sc/source/ui/view/tabview3.cxx | 2 +- sc/source/ui/view/tabview5.cxx | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
New commits: commit 4a555d35d92f72c8f3247abb1d3212bc06547c71 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Tue Mar 25 13:48:15 2025 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue Mar 25 15:39:24 2025 +0100 tdf#150623 speed up tab switch in calc no need to calculate row heights twice on tab switch Change-Id: I0ac93640d41344a711197bcfd67874b700be23b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183297 Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Tested-by: Jenkins diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx index 22fe2655f71a..b876fd25d60f 100644 --- a/sc/source/ui/inc/tabview.hxx +++ b/sc/source/ui/inc/tabview.hxx @@ -370,7 +370,7 @@ public: */ void TabChanged( bool bSameTabButMoved = false ); void SetZoom( const Fraction& rNewX, const Fraction& rNewY, bool bAll ); - SC_DLLPUBLIC void RefreshZoom(); + SC_DLLPUBLIC void RefreshZoom(bool bRecalcScale = true); void SetPagebreakMode( bool bSet ); void UpdateLayerLocks(); diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx index e7159559ecf0..6cc15283d272 100644 --- a/sc/source/ui/view/tabview3.cxx +++ b/sc/source/ui/view/tabview3.cxx @@ -2014,7 +2014,7 @@ void ScTabView::SetTabNo( SCTAB nTab, bool bNew, bool bExtendSelection, bool bSa bool bUnoRefDialog = pScMod->IsRefDialogOpen() && pScMod->GetCurRefDlgId() == WID_SIMPLE_REF; // recalc zoom-dependent values (before TabChanged, before UpdateEditViewPos) - RefreshZoom(); + RefreshZoom(/*bRecalcScale*/false); // no need to call RecalcScale() here, because we will do it in TabChanged() UpdateVarZoom(); if ( bRefMode ) // hide EditView if necessary (after aViewData.SetTabNo !) diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx index 7bf17f688cd0..2fd37f316df3 100644 --- a/sc/source/ui/view/tabview5.cxx +++ b/sc/source/ui/view/tabview5.cxx @@ -441,10 +441,10 @@ void ScTabView::SetZoom( const Fraction& rNewX, const Fraction& rNewY, bool bAll ZoomChanged(); } -void ScTabView::RefreshZoom() +void ScTabView::RefreshZoom(bool bRecalcScale) { aViewData.RefreshZoom(); - if (pDrawView) + if (bRecalcScale && pDrawView) pDrawView->RecalcScale(); ZoomChanged(); }