summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--svx/inc/svx/svdoashp.hxx1
-rw-r--r--svx/inc/svx/svdobj.hxx21
-rw-r--r--svx/source/svdraw/svdoashp.cxx10
3 files changed, 29 insertions, 3 deletions
diff --git a/svx/inc/svx/svdoashp.hxx b/svx/inc/svx/svdoashp.hxx
index 987132f9b7a5..aae1f51df7f2 100644
--- a/svx/inc/svx/svdoashp.hxx
+++ b/svx/inc/svx/svdoashp.hxx
@@ -83,6 +83,7 @@ private:
protected:
virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact();
+ virtual void impl_setUnoShape(const com::sun::star::uno::Reference<com::sun::star::uno::XInterface>& rxUnoShape);
public:
virtual sdr::properties::BaseProperties* CreateObjectSpecificProperties();
diff --git a/svx/inc/svx/svdobj.hxx b/svx/inc/svx/svdobj.hxx
index 656a218237fe..8241ed461e52 100644
--- a/svx/inc/svx/svdobj.hxx
+++ b/svx/inc/svx/svdobj.hxx
@@ -989,7 +989,14 @@ public:
static SdrObject* getSdrObjectFromXShape( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xInt );
- // setting the UNO representation is allowed for the UNO representation itself only!
+ /** Sets a new UNO representation of the shape
+ *
+ * This is only a public interface function. The actual work is
+ * done by impl_setUnoShape().
+ *
+ * Calling this function is only allowed for the UNO representation
+ * itself!
+ */
void setUnoShape(
const com::sun::star::uno::Reference<
com::sun::star::uno::XInterface>& _rxUnoShape);
@@ -1045,7 +1052,17 @@ public:
void SetBLIPSizeRectangle( const Rectangle& aRect );
protected:
- void impl_setUnoShape( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxUnoShape );
+ /** Sets a new UNO shape
+ *
+ * The default implementation of this function sets the new UNO
+ * shape. Derived classes should override the function to handle
+ * any other actions that are needed when the shape is being
+ * changed.
+ *
+ * The implementation _must_ call the same method of its parent
+ * class (preferably as the first step)!
+ */
+ virtual void impl_setUnoShape( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxUnoShape );
/**
Helper function for reimplementing Clone().
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: */