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

use C++11 iteration

Change-Id: I1a892b13d8716c9963f344bb57febbc7118561b2
üst ec47c1b8
...@@ -315,17 +315,15 @@ void SwUnoCursorHelper::SetCrsrAttr(SwPaM & rPam, ...@@ -315,17 +315,15 @@ void SwUnoCursorHelper::SetCrsrAttr(SwPaM & rPam,
{ {
pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_INSATTR, NULL); pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_INSATTR, NULL);
SwPaM *pCurrent = &rPam; for(SwPaM& rCurrent : rPam.GetRingContainer())
do
{ {
if (pCurrent->HasMark() && if (rCurrent.HasMark() &&
( (bTableMode) || ( (bTableMode) ||
(*pCurrent->GetPoint() != *pCurrent->GetMark()) )) (*rCurrent.GetPoint() != *rCurrent.GetMark()) ))
{ {
pDoc->getIDocumentContentOperations().InsertItemSet(*pCurrent, rSet, nFlags); pDoc->getIDocumentContentOperations().InsertItemSet(rCurrent, rSet, nFlags);
} }
pCurrent= static_cast<SwPaM *>(pCurrent->GetNext()); }
} while (pCurrent != &rPam);
pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSATTR, NULL); pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSATTR, NULL);
} }
......
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