path: root/svx/source/svdraw
diff options
authorDavid Tardon <>2012-12-18 15:24:28 +0100
committerDavid Tardon <>2012-12-19 08:04:16 +0100
commit75118d2f9ebdf96250d3a4c78b695085c3527e4e (patch)
tree7e34b0472a7fbcf6f5de06efb98db208e326dd86 /svx/source/svdraw
parent756159812e267b6d1a81dac9d960b9c9eedbb668 (diff)
fdo#56267, fdo#56980 propagate shape change to subclasses
It turns out (as witnessed by fdo#56267) that my fix for fdo#56980 only cured the symptom, not the cause. The real problem is caused by the following sequence of events during ODF import: 1) an SvxCustomShape object is created (XShape iface) 2) an SdrObjCustomShape object is created for the SvxCustomShape, but it is not associated with it (yet) 3) another SvxCustomShape object is created internally by the SdrObjCustomShape and they are associated 4) an EnhancedCustomShapeEngine is created for this SvxCustomShape by SdrObjCustomShape 5) the SvxCustomShape from point 1 is set to the SdrObjCustomShape At some point (I did not follow this explicitly) the SvxCustomShape cached by the EnhancedCustomShapeEngine loses its (weak) reference to the SdrObjCustomShape. This leaves it gutted and all subsequent calls to render() return an empty XShape. The solution is simple: let SdrObjCustomShape know that the associated UNO shape has changed, so it can drop the custom shape engine. Change-Id: I267838ea4857dfcd646f40c811f3ae572237a1e6 (cherry picked from commit 7fec8dfcaca4efc92516f9af51a3157f1a11ccd7) Signed-off-by: David Tardon <>
Diffstat (limited to 'svx/source/svdraw')
1 files changed, 9 insertions, 1 deletions
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index 61b9002253f9..68ca86189030 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -3211,9 +3211,17 @@ bool SdrObjCustomShape::doConstructOrthogonal(const ::rtl::OUString& rName)
void SdrObjCustomShape::InvalidateRenderGeometry()
mXRenderedCustomShape = 0L;
- mxCustomShapeEngine = 0L;
SdrObject::Free( mpLastShadowGeometry );
mpLastShadowGeometry = 0L;
+void SdrObjCustomShape::impl_setUnoShape(const uno::Reference<uno::XInterface>& rxUnoShape)
+ SdrTextObj::impl_setUnoShape(rxUnoShape);
+ // The shape engine is created with _current_ shape. This means we
+ // _must_ reset it when the shape changes.
+ mxCustomShapeEngine.set(0);
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */