[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - svx/source

Michael Stahl mstahl at redhat.com
Thu Jun 27 12:12:39 PDT 2013


 svx/source/sdr/overlay/overlaymanagerbuffered.cxx |   21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)

New commits:
commit 435be554c5025f2309c016170d5225ac086c727b
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Jun 24 19:05:45 2013 +0200

    fdo#60444: Revert "fdo#58029 - substantially accelerate re-rendering..."
    
    This reverts commit 6c98ad71478cb72b51634b32d6e553ccaec30190.
    
    This breaks selection of transparent form controls (fdo#60444), because
    the Update method is not called on the children.
    
    Change-Id: Id0b6a34a15aa1ed7bd5aa0d7b5626e60bee57e30
    (cherry picked from commit f022f39638fbe970f1b839c757dcccd3baa69445)
    Reviewed-on: https://gerrit.libreoffice.org/4490
    Reviewed-by: Thorsten Behrens <tbehrens at suse.com>
    Tested-by: Thorsten Behrens <tbehrens at suse.com>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
index 6b394be..64ac99d 100644
--- a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
+++ b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
@@ -348,15 +348,28 @@ namespace sdr
                 if(bTargetIsWindow)
                 {
                     Window& rWindow = static_cast< Window& >(rmOutputDevice);
-                    if(rWindow.IsChildTransparentModeEnabled())
+
+                    if(rWindow.IsChildTransparentModeEnabled() && rWindow.GetChildCount())
                     {
-                        // Get VCL to invalidate it's children - more efficiently. fdo#58029
                         const Rectangle aRegionRectanglePixel(
                             maBufferRememberedRangePixel.getMinX(), maBufferRememberedRangePixel.getMinY(),
                             maBufferRememberedRangePixel.getMaxX(), maBufferRememberedRangePixel.getMaxY());
 
-                        rWindow.Invalidate(aRegionRectanglePixel,
-                                           INVALIDATE_NOTRANSPARENT|INVALIDATE_CHILDREN|INVALIDATE_UPDATE);
+                        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();
+                                }
+                            }
+                        }
                     }
                 }
 


More information about the Libreoffice-commits mailing list