diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2015-03-28 16:37:24 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2015-03-28 22:14:32 +0100 |
commit | 99b1d7737a866a554c9746787e9e405d1719d802 (patch) | |
tree | a6f1e5e88919452e28db20df22ed4f1c469f4b99 | |
parent | 212a0bca30ebcfa312901be1370374419eb03a13 (diff) |
use ranged for
Change-Id: I0ede4ea54746fbc1d90957d540d7ed1ef35623b3
-rw-r--r-- | sw/source/core/unocore/unotbl.cxx | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 47d22ac49e9b..0c6132a32649 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -1452,28 +1452,19 @@ void SwXTextTableRow::SwClientNotify(const SwModify& rModify, const SfxHint& rHi SwTableLine* SwXTextTableRow::FindLine(SwTable* pTable, SwTableLine* pLine) { - SwTableLine* pRet = 0; - SwTableLines &rLines = pTable->GetTabLines(); - for(size_t i = 0; i < rLines.size(); ++i) - if(rLines[i] == pLine) - { - pRet = pLine; - break; - } - return pRet; + for(auto& pCurrentLine : pTable->GetTabLines()) + if(pCurrentLine == pLine) + return pCurrentLine; + return nullptr; } // SwXTextTableCursor OUString SwXTextTableCursor::getImplementationName(void) throw( uno::RuntimeException, std::exception ) -{ - return OUString("SwXTextTableCursor"); -} + { return OUString("SwXTextTableCursor"); } sal_Bool SwXTextTableCursor::supportsService(const OUString& rServiceName) throw( uno::RuntimeException, std::exception ) -{ - return cppu::supportsService(this, rServiceName); -} + { return cppu::supportsService(this, rServiceName); } IMPLEMENT_FORWARD_XINTERFACE2(SwXTextTableCursor,SwXTextTableCursor_Base,OTextCursorHelper) const SwPaM* SwXTextTableCursor::GetPaM() const { return GetCrsr(); } |