summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-03-28 15:54:49 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-03-28 22:14:29 +0100
commite66a55267464d7c5cd996af9b48ebed923eb16d2 (patch)
tree175cbf5c273d8a022cc294ff4fee72d37e179575
parent91a42a99b70bfb6c14a7f344aa7d38f1307e8286 (diff)
flatten and simplify
Change-Id: I3ee1c48cf324c33515500d5e0bf73934ae994b94
-rw-r--r--sw/source/core/unocore/unotbl.cxx31
1 files changed, 11 insertions, 20 deletions
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index 78215daf2df2..9aa1cdbb4dda 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -1167,28 +1167,19 @@ void SwXCell::addVetoableChangeListener(const OUString& /*rPropertyName*/, const
void SwXCell::removeVetoableChangeListener(const OUString& /*rPropertyName*/, const uno::Reference< beans::XVetoableChangeListener > & /*xListener*/) throw( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException, std::exception )
{ throw uno::RuntimeException("not implemented", static_cast<cppu::OWeakObject*>(this)); };
-uno::Reference< container::XEnumeration > SwXCell::createEnumeration(void) throw( uno::RuntimeException, std::exception )
+uno::Reference<container::XEnumeration> SwXCell::createEnumeration(void) throw( uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- uno::Reference< container::XEnumeration > aRef;
- if(IsValid())
- {
- const SwStartNode* pSttNd = pBox->GetSttNd();
- SwPosition aPos(*pSttNd);
- ::std::unique_ptr<SwUnoCrsr> pUnoCursor(
- GetDoc()->CreateUnoCrsr(aPos, false));
- pUnoCursor->Move(fnMoveForward, fnGoNode);
-
- // remember table and start node for later travelling
- // (used in export of tables in tables)
- SwTable const*const pTable( & pSttNd->FindTableNode()->GetTable() );
- SwXParagraphEnumeration *const pEnum =
- new SwXParagraphEnumeration(this, std::move(pUnoCursor), CURSOR_TBLTEXT,
- pSttNd, pTable);
-
- aRef = pEnum;
- }
- return aRef;
+ if(!IsValid())
+ return uno::Reference<container::XEnumeration>();
+ const SwStartNode* pSttNd = pBox->GetSttNd();
+ SwPosition aPos(*pSttNd);
+ ::std::unique_ptr<SwUnoCrsr> pUnoCursor(GetDoc()->CreateUnoCrsr(aPos, false));
+ pUnoCursor->Move(fnMoveForward, fnGoNode);
+ // remember table and start node for later travelling
+ // (used in export of tables in tables)
+ SwTable const*const pTable(&pSttNd->FindTableNode()->GetTable());
+ return new SwXParagraphEnumeration(this, std::move(pUnoCursor), CURSOR_TBLTEXT, pSttNd, pTable);
}
uno::Type SAL_CALL SwXCell::getElementType(void) throw( uno::RuntimeException, std::exception )