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

use C++11 iteration

Change-Id: Iec8b1f86e4fb243127fcf12bd258465bd8a5b4fe
üst 21bfc10b
...@@ -136,15 +136,14 @@ void SwEditShell::SetAttrSet( const SfxItemSet& rSet, sal_uInt16 nFlags, SwPaM* ...@@ -136,15 +136,14 @@ void SwEditShell::SetAttrSet( const SfxItemSet& rSet, sal_uInt16 nFlags, SwPaM*
bool bIsTblMode = IsTableMode(); bool bIsTblMode = IsTableMode();
GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_INSATTR, NULL); GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_INSATTR, NULL);
SwPaM* pTmpCrsr = pCrsr; for(SwPaM& rTmpCrsr : pCrsr->GetRingContainer())
SwPaM* pStartPaM = pCrsr; {
do { if( rTmpCrsr.HasMark() && ( bIsTblMode ||
if( pTmpCrsr->HasMark() && ( bIsTblMode || *rTmpCrsr.GetPoint() != *rTmpCrsr.GetMark() ))
*pTmpCrsr->GetPoint() != *pTmpCrsr->GetMark() ))
{ {
GetDoc()->getIDocumentContentOperations().InsertItemSet(*pTmpCrsr, rSet, nFlags ); GetDoc()->getIDocumentContentOperations().InsertItemSet(rTmpCrsr, rSet, nFlags );
} }
} while ( ( pTmpCrsr = static_cast<SwPaM*>(pTmpCrsr->GetNext()) ) != pStartPaM ); }
GetDoc()->GetIDocumentUndoRedo().EndUndo(UNDO_INSATTR, NULL); GetDoc()->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