diff options
Diffstat (limited to 'forms/source/component/ListBox.cxx')
-rw-r--r-- | forms/source/component/ListBox.cxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx index f2ad20613a22..d2de4882dead 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 ); |