diff options
author | Armin Le Grand <Armin.Le.Grand@cib.de> | 2016-01-12 18:18:40 +0100 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2016-01-14 09:40:52 +0000 |
commit | 50f024844b1e00249e638df6db029f09465c4c10 (patch) | |
tree | 1f6f078b1095d13717b2e61787789c9f63da3b4a /sd | |
parent | 7ccffbf566c34f68dbad786f31032af97f91f08f (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>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/unoidl/unopage.cxx | 10 |
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); } } |