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

use C++11 iteration

Change-Id: I0a220d6cec1f50e3bfb5ae3c4eb7fd43836236f8
üst b4f8a3dd
...@@ -243,12 +243,12 @@ SwTxtFmtColl* SwEditShell::GetPaMTxtFmtColl( SwPaM* pPaM ) const ...@@ -243,12 +243,12 @@ SwTxtFmtColl* SwEditShell::GetPaMTxtFmtColl( SwPaM* pPaM ) const
// number of nodes the function have explored so far // number of nodes the function have explored so far
sal_uInt16 numberOfLookup = 0; sal_uInt16 numberOfLookup = 0;
SwPaM* pStartPaM = pPaM; for(SwPaM& rCurrentPaM : pPaM->GetRingContainer())
do { // for all the point and mark (selections) { // for all the point and mark (selections)
// get the start and the end node of the current selection // get the start and the end node of the current selection
sal_uLong nSttNd = pPaM->GetMark()->nNode.GetIndex(), sal_uLong nSttNd = rCurrentPaM.GetMark()->nNode.GetIndex(),
nEndNd = pPaM->GetPoint()->nNode.GetIndex(); nEndNd = rCurrentPaM.GetPoint()->nNode.GetIndex();
// reverse start and end if they aren't sorted correctly // reverse start and end if they aren't sorted correctly
if( nSttNd > nEndNd ) if( nSttNd > nEndNd )
...@@ -276,7 +276,7 @@ SwTxtFmtColl* SwEditShell::GetPaMTxtFmtColl( SwPaM* pPaM ) const ...@@ -276,7 +276,7 @@ SwTxtFmtColl* SwEditShell::GetPaMTxtFmtColl( SwPaM* pPaM ) const
return pFmt; return pFmt;
} }
} }
} while ( ( pPaM = static_cast<SwPaM*>(pPaM->GetNext()) ) != pStartPaM ); }
// if none of the selected node contain a named paragraph format // if none of the selected node contain a named paragraph format
return NULL; return 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