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,15 +370,16 @@ void ViewShell::ImplEndAction( const sal_Bool bIdleEnd ) ...@@ -370,15 +370,16 @@ void ViewShell::ImplEndAction( const sal_Bool bIdleEnd )
if ( GetWin() ) if ( GetWin() )
{ {
Window& rWindow = *(GetWin()); Window& rWindow = *(GetWin());
if(rWindow.IsChildTransparentModeEnabled() && rWindow.GetChildCount()) if (rWindow.IsChildTransparentModeEnabled())
{
Window* pCandidate = rWindow.GetWindow( WINDOW_FIRSTCHILD );
if (pCandidate)
{ {
const Rectangle aRectanglePixel(rWindow.LogicToPixel(aRect.SVRect())); const Rectangle aRectanglePixel(rWindow.LogicToPixel(aRect.SVRect()));
for ( sal_uInt16 a(0); a < rWindow.GetChildCount(); a++ ) while (pCandidate)
{ {
Window* pCandidate = rWindow.GetChild(a); if ( pCandidate->IsPaintTransparent() )
if ( pCandidate && pCandidate->IsPaintTransparent() )
{ {
const Rectangle aCandidatePosSizePixel( const Rectangle aCandidatePosSizePixel(
pCandidate->GetPosPixel(), pCandidate->GetPosPixel(),
...@@ -390,6 +391,9 @@ void ViewShell::ImplEndAction( const sal_Bool bIdleEnd ) ...@@ -390,6 +391,9 @@ void ViewShell::ImplEndAction( const sal_Bool bIdleEnd )
pCandidate->Update(); 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