From 4e63c00f4dd5f8ac6496481e687c59209f9aee07 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 9 Aug 2018 16:30:29 +0200 Subject: unnecessary null check before dynamic_cast, in sd Change-Id: I91579ece17b85b1ae9926b7a05eb641672e8ecbd Reviewed-on: https://gerrit.libreoffice.org/58772 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sd/source/ui/func/fuscale.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sd/source/ui/func/fuscale.cxx') diff --git a/sd/source/ui/func/fuscale.cxx b/sd/source/ui/func/fuscale.cxx index 49b0cff83f8f..9a486d488d39 100644 --- a/sd/source/ui/func/fuscale.cxx +++ b/sd/source/ui/func/fuscale.cxx @@ -75,7 +75,7 @@ void FuScale::DoExecute( SfxRequest& rReq ) nValue = static_cast(mpWindow->GetZoom()); // zoom on page size? - if( mpViewShell && dynamic_cast< DrawViewShell *>( mpViewShell ) != nullptr && + if( dynamic_cast< DrawViewShell *>( mpViewShell ) && static_cast(mpViewShell)->IsZoomOnPage() ) { pZoomItem.reset(new SvxZoomItem( SvxZoomType::WHOLEPAGE, nValue )); -- cgit