diff options
author | obo <obo@openoffice.org> | 2010-06-15 10:58:34 +0200 |
---|---|---|
committer | obo <obo@openoffice.org> | 2010-06-15 10:58:34 +0200 |
commit | 97447082af0fd8ff4b61f2c6f80df59c3207e5de (patch) | |
tree | 5057c256f3c10bb1161bb3c7957aa01185c1860c /forms/source/component | |
parent | 09fad69b068c1afc9bcee4a74d10db0e64e30c21 (diff) | |
parent | 8846381e0e5e95221294f3db705db0cedda3a915 (diff) |
CWS-TOOLING: integrate CWS unoawt
Diffstat (limited to 'forms/source/component')
-rw-r--r-- | forms/source/component/ListBox.cxx | 20 | ||||
-rw-r--r-- | forms/source/component/ListBox.hxx | 3 |
2 files changed, 23 insertions, 0 deletions
diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx index 38ea86f2a..fe24fc24c 100644 --- a/forms/source/component/ListBox.cxx +++ b/forms/source/component/ListBox.cxx @@ -174,6 +174,8 @@ namespace frm m_eListSourceType = ListSourceType_VALUELIST; m_aBoundColumn <<= (sal_Int16)1; initValueProperty( PROPERTY_SELECT_SEQ, PROPERTY_ID_SELECT_SEQ); + + startAggregatePropertyListening( PROPERTY_STRINGITEMLIST ); } //------------------------------------------------------------------ @@ -191,6 +193,8 @@ namespace frm ,m_nBoundColumnType( DataType::SQLNULL ) { DBG_CTOR(OListBoxModel,NULL); + + startAggregatePropertyListening( PROPERTY_STRINGITEMLIST ); } //------------------------------------------------------------------ @@ -453,6 +457,22 @@ namespace frm } //------------------------------------------------------------------------------ + void OListBoxModel::_propertyChanged( const PropertyChangeEvent& i_rEvent ) throw ( RuntimeException ) + { + if ( i_rEvent.PropertyName == PROPERTY_STRINGITEMLIST ) + { + ControlModelLock aLock( *this ); + // SYNCHRONIZED -----> + // our aggregate internally changed its StringItemList property - reflect this in our "overridden" + // version of the property + setNewStringItemList( i_rEvent.NewValue, aLock ); + // <----- SYNCHRONIZED + return; + } + OBoundControlModel::_propertyChanged( i_rEvent ); + } + + //------------------------------------------------------------------------------ void OListBoxModel::describeAggregateProperties( Sequence< Property >& _rAggregateProps ) const { OBoundControlModel::describeAggregateProperties( _rAggregateProps ); diff --git a/forms/source/component/ListBox.hxx b/forms/source/component/ListBox.hxx index 28260794a..64a47697b 100644 --- a/forms/source/component/ListBox.hxx +++ b/forms/source/component/ListBox.hxx @@ -134,6 +134,9 @@ protected: // XEventListener virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw (::com::sun::star::uno::RuntimeException); + // OPropertyChangeListener + virtual void _propertyChanged( const ::com::sun::star::beans::PropertyChangeEvent& _rEvt ) throw ( ::com::sun::star::uno::RuntimeException ); + // prevent method hiding using OBoundControlModel::getFastPropertyValue; using OBoundControlModel::setPropertyValues; |