summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-03-28 18:44:43 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-03-28 22:14:42 +0100
commit538e8006b66edff4455bf41cafb30251355b4c7d (patch)
tree4b8fc60659e8149e60a33964fed97d066957306d
parent21ce1aed94d7a4c5acdb0ca78d12cd73c67e9f1a (diff)
simplify a bit
Change-Id: I28f9271783f38d99c452825572fbe858903c49d4
-rw-r--r--sw/source/core/unocore/unotbl.cxx13
1 files changed, 5 insertions, 8 deletions
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index ec5ef7d5cdac..32359567b40e 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -2276,22 +2276,19 @@ throw (uno::RuntimeException, std::exception)
cppu::UnoType<lang::XEventListener>::get(), xListener);
}
-uno::Reference< table::XCell > SwXTextTable::getCellByPosition(sal_Int32 nColumn, sal_Int32 nRow)
+uno::Reference<table::XCell> SwXTextTable::getCellByPosition(sal_Int32 nColumn, sal_Int32 nRow)
throw( uno::RuntimeException, lang::IndexOutOfBoundsException, std::exception )
{
SolarMutexGuard aGuard;
- uno::Reference< table::XCell > aRef;
- SwFrmFmt* pFmt = GetFrmFmt();
+ SwFrmFmt* pFmt(GetFrmFmt());
// sheet is unimportant
if(nColumn >= 0 && nRow >= 0 && nColumn < USHRT_MAX && nRow < USHRT_MAX && pFmt)
{
- SwXCell* pXCell = lcl_CreateXCell(pFmt, nColumn, nRow);
+ auto pXCell = lcl_CreateXCell(pFmt, nColumn, nRow);
if(pXCell)
- aRef = pXCell;
+ return pXCell;
}
- if(!aRef.is())
- throw lang::IndexOutOfBoundsException();
- return aRef;
+ throw lang::IndexOutOfBoundsException();
}
uno::Reference< table::XCellRange > SwXTextTable::GetRangeByName(SwFrmFmt* pFmt, SwTable* pTable,