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

use C++11 iteration

Change-Id: I8f12726aee31dd123861340a85f247ba546bf8a8
üst 1de19df9
...@@ -1536,22 +1536,19 @@ void SwXTextRanges::Impl::Modify( const SfxPoolItem *pOld, const SfxPoolItem *pN ...@@ -1536,22 +1536,19 @@ void SwXTextRanges::Impl::Modify( const SfxPoolItem *pOld, const SfxPoolItem *pN
void SwXTextRanges::Impl::MakeRanges() void SwXTextRanges::Impl::MakeRanges()
{ {
SwUnoCrsr *const pCursor = GetCursor(); if (GetCursor())
if (pCursor)
{ {
SwPaM *pTmpCursor = pCursor; for(SwPaM& rTmpCursor : GetCursor()->GetRingContainer())
do { {
const uno::Reference< text::XTextRange > xRange( const uno::Reference< text::XTextRange > xRange(
SwXTextRange::CreateXTextRange( SwXTextRange::CreateXTextRange(
*pTmpCursor->GetDoc(), *rTmpCursor.GetDoc(),
*pTmpCursor->GetPoint(), pTmpCursor->GetMark())); *rTmpCursor.GetPoint(), rTmpCursor.GetMark()));
if (xRange.is()) if (xRange.is())
{ {
m_Ranges.push_back(xRange); m_Ranges.push_back(xRange);
} }
pTmpCursor = static_cast<SwPaM*>(pTmpCursor->GetNext());
} }
while (pTmpCursor != pCursor);
} }
} }
......
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