diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-06-24 19:50:30 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-06-24 20:17:43 +0200 |
commit | 38dcfadda85058a0ee87292c8943aec82e34b81e (patch) | |
tree | 1157a8d80f7f8927f0010d850d6bd7ac5275fbbb /sw | |
parent | f022f39638fbe970f1b839c757dcccd3baa69445 (diff) |
fdo#58029: replace quadratic child window loop with linear
... which should speed things up without introducing problems.
(Window::GetChild(n) is inefficient because the children are a linked
list)
Change-Id: I343d51a6866c5014cbca4c256b0c15f938958c39
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/view/viewsh.cxx | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index dd9aa939765e..2bae71197f76 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -107,32 +107,8 @@ lcl_PaintTransparentFormControls(ViewShell & rShell, SwRect const& rRect) if (rShell.GetWin()) { Window& rWindow = *(rShell.GetWin()); - if (rWindow.IsChildTransparentModeEnabled()) - { - Window * pCandidate = rWindow.GetWindow( WINDOW_FIRSTCHILD ); - if (pCandidate) - { - const Rectangle aRectanglePixel( - rWindow.LogicToPixel(rRect.SVRect())); - while (pCandidate) - { - if (pCandidate->IsPaintTransparent()) - { - const Rectangle aCandidatePosSizePixel( - pCandidate->GetPosPixel(), - pCandidate->GetSizePixel()); - - if (aCandidatePosSizePixel.IsOver(aRectanglePixel)) - { - pCandidate->Invalidate( - INVALIDATE_NOTRANSPARENT|INVALIDATE_CHILDREN ); - pCandidate->Update(); - } - } - pCandidate = pCandidate->GetWindow( WINDOW_NEXT ); - } - } - } + const Rectangle aRectanglePixel(rWindow.LogicToPixel(rRect.SVRect())); + PaintTransparentChildren(rWindow, aRectanglePixel); } } |