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 | 7bce502de1cbb7b22e725b1a85b17aa431f75405 (patch) | |
tree | c0081d69ef1eddbf0083eaec4a2dcec5432161f1 /forms | |
parent | 1871d11fbeb3305c0a0e65eefb31946e7a73a610 (diff) | |
parent | 0d92dd2bb0bf1d17c558d04cbfd5d745b1dfd461 (diff) |
CWS-TOOLING: integrate CWS unoawt
Diffstat (limited to 'forms')
-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 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 ); diff --git a/forms/source/component/ListBox.hxx b/forms/source/component/ListBox.hxx index 04db6069d89e..46ab6b872fb8 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; |