From 38dcfadda85058a0ee87292c8943aec82e34b81e Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 24 Jun 2013 19:50:30 +0200 Subject: 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 --- svx/source/sdr/overlay/overlaymanagerbuffered.cxx | 29 ++++++----------------- 1 file changed, 7 insertions(+), 22 deletions(-) (limited to 'svx/source/sdr') diff --git a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx index ecc2c6880dfe..1ff7cb927937 100644 --- a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx +++ b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx @@ -18,6 +18,7 @@ */ #include +#include #include #include #include @@ -392,28 +393,12 @@ namespace sdr { Window& rWindow = static_cast< Window& >(rmOutputDevice); - if(rWindow.IsChildTransparentModeEnabled() && rWindow.GetChildCount()) - { - const Rectangle aRegionRectanglePixel( - maBufferRememberedRangePixel.getMinX(), maBufferRememberedRangePixel.getMinY(), - maBufferRememberedRangePixel.getMaxX(), maBufferRememberedRangePixel.getMaxY()); - - for(sal_uInt16 a(0); a < rWindow.GetChildCount(); a++) - { - Window* pCandidate = rWindow.GetChild(a); - - if(pCandidate && pCandidate->IsPaintTransparent()) - { - const Rectangle aCandidatePosSizePixel(pCandidate->GetPosPixel(), pCandidate->GetSizePixel()); - - if(aCandidatePosSizePixel.IsOver(aRegionRectanglePixel)) - { - pCandidate->Invalidate(INVALIDATE_NOTRANSPARENT|INVALIDATE_CHILDREN); - pCandidate->Update(); - } - } - } - } + const Rectangle aRegionRectanglePixel( + maBufferRememberedRangePixel.getMinX(), + maBufferRememberedRangePixel.getMinY(), + maBufferRememberedRangePixel.getMaxX(), + maBufferRememberedRangePixel.getMaxY()); + PaintTransparentChildren(rWindow, aRegionRectanglePixel); } // #i80730# restore visibility of VCL cursor -- cgit v1.2.3