diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-06-24 19:50:30 +0200 |
---|---|---|
committer | Thorsten Behrens <tbehrens@suse.com> | 2013-06-25 17:09:53 +0000 |
commit | 576cc750e38108ada5ea40870f1fe8cf2054e7b6 (patch) | |
tree | 10ed2617a670dfd1f707bd4c17e7e8a9c81f5322 /sw | |
parent | d7e10cc71cd40ad84294f992f5d7e3c7c915e305 (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
(cherry picked from commit 38dcfadda85058a0ee87292c8943aec82e34b81e)
Reviewed-on: https://gerrit.libreoffice.org/4488
Tested-by: Thorsten Behrens <tbehrens@suse.com>
Reviewed-by: Thorsten Behrens <tbehrens@suse.com>
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 993a03718b0c..19add81ac524 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -109,32 +109,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); } } |