virtual public void Dispose()
        {
            if (this.Shape != null)
            {
                try
                {
                    // register for property changes
                    XPropertySet shapePropertySet = (XPropertySet)Shape;
                    if (shapePropertySet != null)
                    {
                        shapePropertySet.removePropertyChangeListener("Size", eventForwarder);
                        shapePropertySet.removePropertyChangeListener("Position", eventForwarder);
                    }
                }
                catch { }
            }

            //this.Shape = null;
            //this.AcccessibleCounterpart = null;

            // remove from the pages' shape list
            if (Page != null && Page.shapeList != null && Page.shapeList.Contains(this))
            {
                Page.shapeList.Remove(this);
            }

            Disposed = true;
            fire_DisposingEvent();
        }
        private void registerListeners()
        {
            // register for property changes
            XPropertySet shapePropertySet = (XPropertySet)Shape;

            if (shapePropertySet != null)
            {
                // init value for bounding box
                Rectangle propertyBoundRect = (Rectangle)shapePropertySet.getPropertyValue("BoundRect").Value;

                currentBoundRect = propertyBoundRect != null ?
                                   new System.Drawing.Rectangle(propertyBoundRect.X, propertyBoundRect.Y, propertyBoundRect.Width, propertyBoundRect.Height)
                    : new System.Drawing.Rectangle();

                try
                {
                    shapePropertySet.removePropertyChangeListener("Size", eventForwarder);
                    shapePropertySet.removePropertyChangeListener("Position", eventForwarder);
                    shapePropertySet.addPropertyChangeListener("Size", eventForwarder);
                    shapePropertySet.addPropertyChangeListener("Position", eventForwarder);
                }
                catch { }
            }

            if (Shape is XEventBroadcaster)
            {
                try
                {
                    ((XEventBroadcaster)Shape).addEventListener(eventForwarder as unoidl.com.sun.star.document.XEventListener);
                }
                catch { }
            }
        }