summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-11-28 02:36:28 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-11-29 10:36:48 +0100
commitcd97c5ee6be5820585e63d0fff2c9722836f6035 (patch)
tree2c4b44cd6b6676e9f2f4793633114144377b641a /sw/source
parent50c3352ef26bc08bf6df84d1d57e37098c4f5923 (diff)
clean up and reduce indent levels
Change-Id: I7c39a5a93c92fe6730a544ac2db8d17ef38c5545
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/unocore/unostyle.cxx25
1 files changed, 10 insertions, 15 deletions
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index e3f14289c160..640b5c14bf52 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -602,25 +602,20 @@ uno::Any SwXStyleFamily::getByName(const OUString& rName)
return uno::makeAny(xStyle);
}
-uno::Sequence< OUString > SwXStyleFamily::getElementNames() throw( uno::RuntimeException, std::exception )
+uno::Sequence<OUString> SwXStyleFamily::getElementNames() throw( uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- std::vector< OUString > aRet;
- if(m_pBasePool)
+ if(!m_pBasePool)
+ throw uno::RuntimeException();
+ std::vector<OUString> vRet;
+ SfxStyleSheetIteratorPtr pIt = m_pBasePool->CreateIterator(m_eFamily, SFXSTYLEBIT_ALL);
+ for (SfxStyleSheetBase* pStyle = pIt->First(); pStyle; pStyle = pIt->Next())
{
- SfxStyleSheetIteratorPtr pIt = m_pBasePool->CreateIterator(m_eFamily, SFXSTYLEBIT_ALL);
- OUString aString;
- for (SfxStyleSheetBase* pStyle = pIt->First(); pStyle; pStyle = pIt->Next())
- {
- SwStyleNameMapper::FillProgName(pStyle->GetName(), aString,
- lcl_GetSwEnumFromSfxEnum ( m_eFamily ), true);
- aRet.push_back(aString);
- }
+ OUString sName;
+ SwStyleNameMapper::FillProgName(pStyle->GetName(), sName, lcl_GetSwEnumFromSfxEnum(m_eFamily), true);
+ vRet.push_back(sName);
}
- else
- throw uno::RuntimeException();
-
- return comphelper::containerToSequence(aRet);
+ return comphelper::containerToSequence(vRet);
}
sal_Bool SwXStyleFamily::hasByName(const OUString& rName) throw( uno::RuntimeException, std::exception )