use C++11 iteration

Change-Id: Ib80ad5bce7c3754d250b1fbcef3fea6c4e1977f1
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 9edb221..fef577d 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -3342,16 +3342,15 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getSelectedPortionCount(  )
        sal_uLong nHere = pNode->GetIndex();

        // iterate over ring
        SwPaM* pRingStart = pCrsr;
        do
        for(SwPaM& rTmpCrsr : pCrsr->GetRingContainer())
        {
            // ignore, if no mark
            if( pCrsr->HasMark() )
            if( rTmpCrsr.HasMark() )
            {
                // check whether nHere is 'inside' pCrsr
                SwPosition* pStart = pCrsr->Start();
                SwPosition* pStart = rTmpCrsr.Start();
                sal_uLong nStartIndex = pStart->nNode.GetIndex();
                SwPosition* pEnd = pCrsr->End();
                SwPosition* pEnd = rTmpCrsr.End();
                sal_uLong nEndIndex = pEnd->nNode.GetIndex();
                if( ( nHere >= nStartIndex ) &&
                    ( nHere <= nEndIndex )      )
@@ -3361,11 +3360,7 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getSelectedPortionCount(  )
                // else: this PaM doesn't point to this paragraph
            }
            // else: this PaM is collapsed and doesn't select anything

            // next PaM in ring
            pCrsr = static_cast<SwPaM*>( pCrsr->GetNext() );
        }
        while( pCrsr != pRingStart );
    }
    return nSeleted;