From bfc298d02ca6275588d5897d97ced9498a3e91aa Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 6 Aug 2020 12:47:09 +0200 Subject: loplugin:flatten in svx/svdraw Change-Id: I8379e5ebaee2090d2b4dbd05d55b55000915cd7c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100233 Tested-by: Jenkins Reviewed-by: Noel Grandin --- svx/source/svdraw/svdview.cxx | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'svx/source/svdraw/svdview.cxx') diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx index 33cf89ab82c8..95869b217b07 100644 --- a/svx/source/svdraw/svdview.cxx +++ b/svx/source/svdraw/svdview.cxx @@ -1424,29 +1424,29 @@ void SdrView::onAccessibilityOptionsChanged() void SdrView::SetMasterPagePaintCaching(bool bOn) { - if(mbMasterPagePaintCaching != bOn) - { - mbMasterPagePaintCaching = bOn; + if(mbMasterPagePaintCaching == bOn) + return; - // reset at all SdrPageWindows - SdrPageView* pPageView = GetSdrPageView(); + mbMasterPagePaintCaching = bOn; - if(pPageView) - { - for(sal_uInt32 b(0); b < pPageView->PageWindowCount(); b++) - { - SdrPageWindow* pPageWindow = pPageView->GetPageWindow(b); - assert(pPageWindow && "SdrView::SetMasterPagePaintCaching: Corrupt SdrPageWindow list (!)"); + // reset at all SdrPageWindows + SdrPageView* pPageView = GetSdrPageView(); - // force deletion of ObjectContact, so at re-display all VOCs - // will be re-created with updated flag setting - pPageWindow->ResetObjectContact(); - } + if(!pPageView) + return; - // force redraw of this view - pPageView->InvalidateAllWin(); - } + for(sal_uInt32 b(0); b < pPageView->PageWindowCount(); b++) + { + SdrPageWindow* pPageWindow = pPageView->GetPageWindow(b); + assert(pPageWindow && "SdrView::SetMasterPagePaintCaching: Corrupt SdrPageWindow list (!)"); + + // force deletion of ObjectContact, so at re-display all VOCs + // will be re-created with updated flag setting + pPageWindow->ResetObjectContact(); } + + // force redraw of this view + pPageView->InvalidateAllWin(); } // Default ObjectContact is ObjectContactOfPageView -- cgit