summaryrefslogtreecommitdiff
path: root/sw/source/core/unocore
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-29 10:36:50 +0100
commit55cd728d376ac9a5787a73fe1ae51263aa0403d1 (patch)
treee4a769718afdd06dd304a8d0d32bdd251f9770ba /sw/source/core/unocore
parent6afc83865f77e572e9a04cc298ca5b0eab85af62 (diff)
clean up and reduce indent levels
Change-Id: Iccc1b3f2499025b8dad920f4b0f4b674b5d394ce
Diffstat (limited to 'sw/source/core/unocore')
-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)