Kaydet (Commit) cd97c5ee authored tarafından Bjoern Michaelsen's avatar Bjoern Michaelsen

clean up and reduce indent levels

Change-Id: I7c39a5a93c92fe6730a544ac2db8d17ef38c5545
üst 50c3352e
...@@ -602,25 +602,20 @@ uno::Any SwXStyleFamily::getByName(const OUString& rName) ...@@ -602,25 +602,20 @@ uno::Any SwXStyleFamily::getByName(const OUString& rName)
return uno::makeAny(xStyle); 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; 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); SfxStyleSheetIteratorPtr pIt = m_pBasePool->CreateIterator(m_eFamily, SFXSTYLEBIT_ALL);
OUString aString;
for (SfxStyleSheetBase* pStyle = pIt->First(); pStyle; pStyle = pIt->Next()) for (SfxStyleSheetBase* pStyle = pIt->First(); pStyle; pStyle = pIt->Next())
{ {
SwStyleNameMapper::FillProgName(pStyle->GetName(), aString, OUString sName;
lcl_GetSwEnumFromSfxEnum ( m_eFamily ), true); SwStyleNameMapper::FillProgName(pStyle->GetName(), sName, lcl_GetSwEnumFromSfxEnum(m_eFamily), true);
aRet.push_back(aString); vRet.push_back(sName);
}
} }
else return comphelper::containerToSequence(vRet);
throw uno::RuntimeException();
return comphelper::containerToSequence(aRet);
} }
sal_Bool SwXStyleFamily::hasByName(const OUString& rName) throw( uno::RuntimeException, std::exception ) sal_Bool SwXStyleFamily::hasByName(const OUString& rName) throw( uno::RuntimeException, std::exception )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment