From 48c99df39e6e66e3957b74ceedd0ed2cc6170143 Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Sat, 28 Mar 2015 16:53:37 +0100 Subject: [PATCH] flatten and simplify Change-Id: I74746e6fc9f235d48dfe24f4713404f7e9d578d7 --- sw/source/core/unocore/unotbl.cxx | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 3db2f754be82..d983f72e0403 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -1547,19 +1547,16 @@ OUString SwXTextTableCursor::getRangeName() return pEndBox->GetName(); } -sal_Bool SwXTextTableCursor::gotoCellByName(const OUString& sCellName, sal_Bool Expand) - throw( uno::RuntimeException, std::exception ) +sal_Bool SwXTextTableCursor::gotoCellByName(const OUString& sCellName, sal_Bool bExpand) + throw(uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - bool bRet = false; SwUnoCrsr* pUnoCrsr = GetCrsr(); - if(pUnoCrsr) - { - SwUnoTableCrsr& rTblCrsr = dynamic_cast(*pUnoCrsr); - lcl_CrsrSelect(rTblCrsr, Expand); - bRet = rTblCrsr.GotoTblBox(sCellName); - } - return bRet; + if(!pUnoCrsr) + return false; + auto& rTblCrsr = dynamic_cast(*pUnoCrsr); + lcl_CrsrSelect(rTblCrsr, bExpand); + return rTblCrsr.GotoTblBox(sCellName); } sal_Bool SwXTextTableCursor::goLeft(sal_Int16 Count, sal_Bool Expand) throw( uno::RuntimeException, std::exception )