summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-11-28 03:03:44 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-11-28 23:59:13 +0100
commitce970eea853d9e39862a3e510d6d85c110307e67 (patch)
treec1cab15dd8873ba5c2a37f747d20bd852daed384
parentclean up and reduce indent levels (diff)
downloadcore-ce970eea853d9e39862a3e510d6d85c110307e67.tar.gz
core-ce970eea853d9e39862a3e510d6d85c110307e67.zip
clean up and reduce indent levels
Change-Id: Iccc1b3f2499025b8dad920f4b0f4b674b5d394ce
-rw-r--r--sw/source/core/unocore/unostyle.cxx21
1 files changed, 8 insertions, 13 deletions
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index cebbdeeceb84..b5b2c29d41e6 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -717,20 +717,15 @@ void SwXStyleFamily::replaceByName(const OUString& rName, const uno::Any& rEleme
void SwXStyleFamily::removeByName(const OUString& rName) throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- if(m_pBasePool)
- {
- m_pBasePool->SetSearchMask(m_eFamily);
- OUString aString;
- SwStyleNameMapper::FillUIName(rName, aString, lcl_GetSwEnumFromSfxEnum ( m_eFamily ), true );
-
- SfxStyleSheetBase* pBase = m_pBasePool->Find( aString );
- if(pBase)
- m_pBasePool->Remove(pBase);
- else
- throw container::NoSuchElementException();
- }
- else
+ if(!m_pBasePool)
throw uno::RuntimeException();
+ m_pBasePool->SetSearchMask(m_eFamily);
+ OUString sName;
+ SwStyleNameMapper::FillUIName(rName, sName, lcl_GetSwEnumFromSfxEnum(m_eFamily), true);
+ SfxStyleSheetBase* pBase = m_pBasePool->Find( sName );
+ if(!pBase)
+ throw container::NoSuchElementException();
+ m_pBasePool->Remove(pBase);
}
uno::Reference< beans::XPropertySetInfo > SAL_CALL SwXStyleFamily::getPropertySetInfo( ) throw (uno::RuntimeException, std::exception)