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*
bool bIsTblMode = IsTableMode();
GetDoc()->GetIDocumentUndoRedo().StartUndo(UNDO_INSATTR, NULL);
SwPaM* pTmpCrsr = pCrsr;
SwPaM* pStartPaM = pCrsr;
do {
if( pTmpCrsr->HasMark() && ( bIsTblMode ||
*pTmpCrsr->GetPoint() != *pTmpCrsr->GetMark() ))
for(SwPaM& rTmpCrsr : pCrsr->GetRingContainer())
{
if( rTmpCrsr.HasMark() && ( bIsTblMode ||
*rTmpCrsr.GetPoint() != *rTmpCrsr.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);
}
......
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