From 3e57aad962c9d24c535daff893db203314709cfc Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 17 Apr 2020 14:48:19 +0200 Subject: loplugin:flatten in cui Change-Id: I0ea0784ab8c4542747da1e15fa7c60c60bccb602 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92423 Tested-by: Jenkins Reviewed-by: Noel Grandin --- cui/source/customize/macropg.cxx | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'cui/source/customize/macropg.cxx') diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx index cdf07498f83e..7b45afa8652e 100644 --- a/cui/source/customize/macropg.cxx +++ b/cui/source/customize/macropg.cxx @@ -534,19 +534,19 @@ void SvxMacroTabPage_::InitAndSetHandler( const Reference< container::XNameRepla { } } - if(m_xDocEvents.is()) + if(!m_xDocEvents.is()) + return; + + eventNames = m_xDocEvents->getElementNames(); + nEventCount = eventNames.getLength(); + for(sal_Int32 nEvent = 0; nEvent < nEventCount; ++nEvent ) { - eventNames = m_xDocEvents->getElementNames(); - nEventCount = eventNames.getLength(); - for(sal_Int32 nEvent = 0; nEvent < nEventCount; ++nEvent ) + try + { + m_docEventsHash[ eventNames[nEvent] ] = GetPairFromAny( m_xDocEvents->getByName( eventNames[nEvent] ) ); + } + catch (const Exception&) { - try - { - m_docEventsHash[ eventNames[nEvent] ] = GetPairFromAny( m_xDocEvents->getByName( eventNames[nEvent] ) ); - } - catch (const Exception&) - { - } } } } -- cgit