diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2015-11-28 02:39:28 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2015-11-28 23:59:09 +0100 |
commit | acd12971ede80aa339d09db54d9d8eeed9da06b2 (patch) | |
tree | 4cb73e80d6578c387847bc84cab81a0c667377cd | |
parent | 126119d7aa721e1b29e37a3ab903734a3ecc5640 (diff) |
clean up and reduce indent levels
Change-Id: Ifb4597daab338750de1fd6b3db9c21b28c5ce9e6
-rw-r--r-- | sw/source/core/unocore/unostyle.cxx | 18 |
1 files 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<OUString> 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 ) |