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

do not use manual iteration

Change-Id: I036bc37c6af1a387c0f05f8fe56375d32ab048bc
üst 07c7c88b
......@@ -710,18 +710,20 @@ extern std::vector<SvGlobalName*> *pGlobalOLEExcludeList;
void SwDoc::PrtOLENotify( bool bAll )
{
SwFEShell *pShell = 0;
if ( getIDocumentLayoutAccess().GetCurrentViewShell() )
SwFEShell *pShell = nullptr;
{
SwViewShell *pSh = getIDocumentLayoutAccess().GetCurrentViewShell();
if ( !pSh->ISA(SwFEShell) )
do
{ pSh = static_cast<SwViewShell*>(pSh->GetNext());
} while ( !pSh->ISA(SwFEShell) &&
pSh != getIDocumentLayoutAccess().GetCurrentViewShell() );
if ( pSh->ISA(SwFEShell) )
pShell = static_cast<SwFEShell*>(pSh);
if ( pSh )
{
for(SwViewShell& rShell : pSh->GetRingContainer())
{
if(rShell.ISA(SwFEShell))
{
pShell = static_cast<SwFEShell*>(&rShell);
break;
}
}
}
}
if ( !pShell )
{
......
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