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

do not use manual iteration

Change-Id: Iafb10e4a3cf26138a4a5d2647d115bc435ef61ba
üst 965d09eb
......@@ -1058,28 +1058,30 @@ void SwDrawContact::Changed( const SdrObject& rObj,
}
//Put on Action, but not if presently anywhere an action runs.
SwViewShell *pSh = nullptr, *pOrg;
bool bHasActions(true);
SwRootFrm *pTmpRoot = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
if ( pTmpRoot && pTmpRoot->IsCallbackActionEnabled() )
{
pOrg = pDoc->getIDocumentLayoutAccess().GetCurrentViewShell();
pSh = pOrg;
if ( pSh )
do
{ if ( pSh->Imp()->IsAction() || pSh->Imp()->IsIdleAction() )
pSh = nullptr;
else
pSh = pSh->GetNext();
} while ( pSh && pSh != pOrg );
SwViewShell* const pSh = pDoc->getIDocumentLayoutAccess().GetCurrentViewShell();
if ( pSh )
{
for(SwViewShell& rShell : pSh->GetRingContainer() )
{
if ( rShell.Imp()->IsAction() || rShell.Imp()->IsIdleAction() )
{
bHasActions = true;
break;
}
bHasActions = false;
}
}
if(!bHasActions)
pTmpRoot->StartAllAction();
}
SdrObjUserCall::Changed( rObj, eType, rOldBoundRect );
_Changed( rObj, eType, &rOldBoundRect ); //Attention, possibly suicidal!
if ( pSh )
if(!bHasActions)
pTmpRoot->EndAllAction();
}
......
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