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

use C++11 iteration

Change-Id: I78423acfe10d7972e4aad5dc90cb517a2ba72400
üst 37132921
......@@ -94,27 +94,27 @@ void SwEditShell::Insert2(const OUString &rStr, const bool bForceExpandHints )
IDocumentContentOperations::INS_EMPTYEXPAND)
: IDocumentContentOperations::INS_EMPTYEXPAND;
SwPaM *_pStartCrsr = getShellCrsr( true ), *__pStartCrsr = _pStartCrsr;
do {
for(SwPaM& rCurrentCrsr : getShellCrsr( true )->GetRingContainer())
{
//OPT: GetSystemCharSet
const bool bSuccess =
GetDoc()->getIDocumentContentOperations().InsertString(*_pStartCrsr, rStr, nInsertFlags);
GetDoc()->getIDocumentContentOperations().InsertString(rCurrentCrsr, rStr, nInsertFlags);
OSL_ENSURE( bSuccess, "Doc->Insert() failed." );
if (bSuccess)
{
GetDoc()->UpdateRsid( *_pStartCrsr, rStr.getLength() );
GetDoc()->UpdateRsid( rCurrentCrsr, rStr.getLength() );
// Set paragraph rsid if beginning of paragraph
SwTxtNode *const pTxtNode =
_pStartCrsr->GetPoint()->nNode.GetNode().GetTxtNode();
rCurrentCrsr.GetPoint()->nNode.GetNode().GetTxtNode();
if( pTxtNode && pTxtNode->Len() == 1)
GetDoc()->UpdateParRsid( pTxtNode );
}
SaveTblBoxCntnt( _pStartCrsr->GetPoint() );
SaveTblBoxCntnt( rCurrentCrsr.GetPoint() );
} while( (_pStartCrsr = static_cast<SwPaM *>(_pStartCrsr->GetNext() )) != __pStartCrsr );
}
}
// calculate cursor bidi level
......
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