summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@cib.de>2016-01-12 18:18:40 +0100
committerMichael Stahl <mstahl@redhat.com>2016-05-11 12:54:05 +0000
commit27db0b033235bb5379b5af4f530413750bee9f29 (patch)
tree5d9036e68c04adc19ee4994722daab01fcfa1a94
parent67755e4a3b0634d123ad68b107381bf90b6d6487 (diff)
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@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 50f024844b1e00249e638df6db029f09465c4c10) Reviewed-on: https://gerrit.libreoffice.org/24842 Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--sd/source/ui/unoidl/unopage.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index 8dbb921d1549..f7f1ecca7402 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);
}
}