[Libreoffice-commits] core.git: sd/source

Armin Le Grand Armin.Le.Grand at cib.de
Thu Jan 14 01:41:19 PST 2016


 sd/source/ui/unoidl/unopage.cxx |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 50f024844b1e00249e638df6db029f09465c4c10
Author: Armin Le Grand <Armin.Le.Grand at cib.de>
Date:   Tue Jan 12 18:18:40 2016 +0100

    tdf#96522 reset CustomShapeEngine at import
    
    Do not reset UNO API xShape at import time as described in tdf#93994, better
    reset the involved XCustomShapeEngine which allocates and holds the
    EditEngine and VirtualDevice. Resetting the UNO API object leads to problems
    when e.g. an animation effect is set for the shape. This happens since the
    animation effect remembers the xShape using a weak reference, thus being
    no real on-demand constructable object.
    
    Change-Id: I7b421f578ebf003af2745e449cd02ba368b455dd
    Reviewed-on: https://gerrit.libreoffice.org/21401
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index 8dbb921..f7f1ecc 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -624,7 +624,15 @@ void SAL_CALL SdGenericDrawPage::setPropertyValue( const OUString& aPropertyName
 
                 if(pCustomShape)
                 {
-                    pCustomShape->setUnoShape(nullptr);
+                    // tdf#96522 do not reset UNO API implementation since e.g. the
+                    // animation evtl. added to the object uses weak references and
+                    // will be lost when resetting it. In that sense it is *not* a
+                    // on-demand recreatable ressource.
+                    // Luckily, the object causing problems in tdf#93994 is not the
+                    // UNO API object, but the XCustomShapeEngine involved. This
+                    // object is on-demand replacable and can be reset here. This
+                    // will free the involved EditEngine and VirtualDevice.
+                    pCustomShape->mxCustomShapeEngine.set(nullptr);
                 }
             }
 


More information about the Libreoffice-commits mailing list