From 8f453c674f19188360ba5895c2bd9bd80273a83b Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sun, 10 Jan 2021 13:58:50 +0200 Subject: static_cast after dynamic_cast Change-Id: I3792ddadad9582a7e6f4740829c081d9571ddaff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109049 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sc/source/ui/app/scmod.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sc/source/ui/app') diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index b268e9d6d47e..84b620fa2c19 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -1264,9 +1264,8 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet ) SfxObjectShell* pObjSh = SfxObjectShell::GetFirst(); while ( pObjSh ) { - if ( dynamic_cast(pObjSh) != nullptr ) + if ( auto pOneDocSh = dynamic_cast(pObjSh) ) { - ScDocShell* pOneDocSh = static_cast(pObjSh); pOneDocSh->CalcOutputFactor(); SCTAB nTabCount = pOneDocSh->GetDocument().GetTableCount(); for (SCTAB nTab=0; nTab