Kaydet (Commit) 18561869 authored tarafından Caolán McNamara's avatar Caolán McNamara

optimize: traverse children with WINDOW_FIRSTCHILD/WINDOW_NEXT

üst 2a20f946
......@@ -370,25 +370,29 @@ void ViewShell::ImplEndAction( const sal_Bool bIdleEnd )
if ( GetWin() )
{
Window& rWindow = *(GetWin());
if(rWindow.IsChildTransparentModeEnabled() && rWindow.GetChildCount())
if (rWindow.IsChildTransparentModeEnabled())
{
const Rectangle aRectanglePixel(rWindow.LogicToPixel(aRect.SVRect()));
for ( sal_uInt16 a(0); a < rWindow.GetChildCount(); a++ )
Window* pCandidate = rWindow.GetWindow( WINDOW_FIRSTCHILD );
if (pCandidate)
{
Window* pCandidate = rWindow.GetChild(a);
const Rectangle aRectanglePixel(rWindow.LogicToPixel(aRect.SVRect()));
if ( pCandidate && pCandidate->IsPaintTransparent() )
while (pCandidate)
{
const Rectangle aCandidatePosSizePixel(
pCandidate->GetPosPixel(),
pCandidate->GetSizePixel());
if ( aCandidatePosSizePixel.IsOver(aRectanglePixel) )
if ( pCandidate->IsPaintTransparent() )
{
pCandidate->Invalidate( INVALIDATE_NOTRANSPARENT|INVALIDATE_CHILDREN );
pCandidate->Update();
}
const Rectangle aCandidatePosSizePixel(
pCandidate->GetPosPixel(),
pCandidate->GetSizePixel());
if ( aCandidatePosSizePixel.IsOver(aRectanglePixel) )
{
pCandidate->Invalidate( INVALIDATE_NOTRANSPARENT|INVALIDATE_CHILDREN );
pCandidate->Update();
}
}
pCandidate = pCandidate->GetWindow( WINDOW_NEXT );
}
}
}
......
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