From acd12971ede80aa339d09db54d9d8eeed9da06b2 Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Sat, 28 Nov 2015 02:39:28 +0100 Subject: clean up and reduce indent levels Change-Id: Ifb4597daab338750de1fd6b3db9c21b28c5ce9e6 --- sw/source/core/unocore/unostyle.cxx | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 640b5c14bf52..891cb9f45bd6 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -621,19 +621,13 @@ uno::Sequence SwXStyleFamily::getElementNames() throw( uno::RuntimeExc sal_Bool SwXStyleFamily::hasByName(const OUString& rName) throw( uno::RuntimeException, std::exception ) { SolarMutexGuard aGuard; - bool bRet = false; - if(m_pBasePool) - { - OUString sStyleName; - SwStyleNameMapper::FillUIName(rName, sStyleName, lcl_GetSwEnumFromSfxEnum ( m_eFamily ), true ); - m_pBasePool->SetSearchMask(m_eFamily); - SfxStyleSheetBase* pBase = m_pBasePool->Find(sStyleName); - bRet = nullptr != pBase; - } - else + if(!m_pBasePool) throw uno::RuntimeException(); - return bRet; - + OUString sStyleName; + SwStyleNameMapper::FillUIName(rName, sStyleName, lcl_GetSwEnumFromSfxEnum(m_eFamily), true); + m_pBasePool->SetSearchMask(m_eFamily); + SfxStyleSheetBase* pBase = m_pBasePool->Find(sStyleName); + return nullptr != pBase; } uno::Type SwXStyleFamily::getElementType() throw( uno::RuntimeException, std::exception ) -- cgit