info/CWS dba32b : SdrObject/SvxShape property notification infrastructure

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

info/CWS dba32b : SdrObject/SvxShape property notification infrastructure

frank.schoenheit


          Type: info
         Title: SdrObject/SvxShape property notification infrastructure
     Posted by: [hidden email]
      Affected: -
Effective from: CWS dba32b
           CWS:
<http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=DEV300/dba32b>
    CWS status: new


*Summary*
--------
+ <svx/shapeproperty.hxx>
+ ::svx::ShapeProperty
+ <svx/shapepropertynotifier.hxx>
+ ::svx::IPropertyValueProvider
+ ::svx::PropertyChangeNotifier
+ ::svx::PropertyChangeNotifier&
  SdrObject::getShapePropertyChangeNotifier();
+ SdrObject::notifyShapePropertyChange( const ShapeProperty );

*Description*
-------------
The pairing of SdrObject and SvxShape now has an infrastructure for
notifying changes in the properties of the UNO shape.

That is, components registering as PropertyChangeListener at the UNO
shape now in fact have a chance of being notified of changes in the
property they're interested in.

For this, a SvxShape owns a PropertyChangeNotifier instance, which
manages the property change listeners, and their notification. This
listener instance can be accessed and controlled either via the
SvxShape, or via the SdrObject.

Whenever a facet of the SdrObject changes, where this results in a
change of a property at the UNO shape,
PropertyChangeNotifier::notifyPropertyChange can be used. Effectively,
broadcasting such a change boils down to calling
SdrObject::notifyShapePropertyChange.

For every property which supports this notification mechanism (the
ShapeProperty enum lists them all), the SvxShape's
PropertyChangeNotifier instance needs a component implementing the
IPropertyValueProvider interface, which is able to obtain the current
property value from the SvxShape. This indirection is necessary to
also support attribute changes: Attributes such as a shapes geometry
(XShape::getPosition and XShape::getSize) are not accessible via
XPropertySet, so obtaining them is done by a dedicated
IPropertyValueProvider provider implementation.

Using this mechanism, UNO shapes now broadcast changes in their
Position and Size. Also, UNO shapes in text documents broadcast
changes in the AnchorType property, and UNO shapes in spreadsheets
broadcast changes in the Anchor property.


Send feedback to [hidden email]



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]