diff --git a/sd/source/ui/func/fuprlout.cxx b/sd/source/ui/func/fuprlout.cxx index 16665d1c6f64..ab74fae5d2ac 100644 --- a/sd/source/ui/func/fuprlout.cxx +++ b/sd/source/ui/func/fuprlout.cxx @@ -93,10 +93,9 @@ void FuPresentationLayout::DoExecute( SfxRequest& rReq ) /* if we are on a master page, the changes apply for all pages and notes- pages who are using the relevant layout */ bool bOnMaster = false; - if( mpViewShell && dynamic_cast< const DrawViewShell *>( mpViewShell ) != nullptr) + if (DrawViewShell *pShell = dynamic_cast(mpViewShell)) { - EditMode eEditMode = - static_cast(mpViewShell)->GetEditMode(); + EditMode eEditMode = pShell->GetEditMode(); if (eEditMode == EM_MASTERPAGE) bOnMaster = true; }