diff options
author | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-06-10 11:09:24 +0200 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2010-06-10 11:09:24 +0200 |
commit | 2434dc6682de98a23cc4393e8ceb3100e2788f64 (patch) | |
tree | 6742744647e212e028334bdc85a4af87cb7958e0 /toolkit | |
parent | 92d45780abf4816e88b639f2e5cddef26069034d (diff) |
unoawt: ListBoxControl::updateFromModel: also set the SelectedItems property, after we just set a new item list via itemListChanged
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/source/controls/unocontrols.cxx | 6 | ||||
-rw-r--r-- | toolkit/source/helper/property.cxx | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx index 3b037e3ca0d3..cfb71111e3dc 100644 --- a/toolkit/source/controls/unocontrols.cxx +++ b/toolkit/source/controls/unocontrols.cxx @@ -2427,6 +2427,12 @@ void UnoListBoxControl::updateFromModel() EventObject aEvent( getModel() ); xItemListListener->itemListChanged( aEvent ); + + // notify the change of the SelectedItems property, again. While our base class, in updateFromModel, + // already did this, our peer(s) can only legitimately set the selection after they have the string + // item list, which we just notified with the itemListChanged call. + const ::rtl::OUString sSelectedItemsPropName( GetPropertyName( BASEPROPERTY_SELECTEDITEMS ) ); + ImplSetPeerProperty( sSelectedItemsPropName, ImplGetPropertyValue( sSelectedItemsPropName ) ); } void UnoListBoxControl::ImplSetPeerProperty( const ::rtl::OUString& rPropName, const uno::Any& rVal ) diff --git a/toolkit/source/helper/property.cxx b/toolkit/source/helper/property.cxx index b878112eed69..9369faf6a0b9 100644 --- a/toolkit/source/helper/property.cxx +++ b/toolkit/source/helper/property.cxx @@ -223,7 +223,7 @@ ImplPropertyInfo* ImplGetPropertyInfos( sal_uInt16& rElementCount ) DECL_DEP_PROP_3 ( "ScrollValue", SCROLLVALUE, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ), DECL_PROP_2 ( "ScrollValueMax", SCROLLVALUE_MAX, sal_Int32, BOUND, MAYBEDEFAULT ), DECL_PROP_2 ( "ScrollValueMin", SCROLLVALUE_MIN, sal_Int32, BOUND, MAYBEDEFAULT ), - DECL_PROP_2 ( "SelectedItems", SELECTEDITEMS, Sequence<sal_Int16>, BOUND, MAYBEDEFAULT ), + DECL_DEP_PROP_2 ( "SelectedItems", SELECTEDITEMS, Sequence<sal_Int16>, BOUND, MAYBEDEFAULT ), DECL_PROP_2 ( "ShowThousandsSeparator", NUMSHOWTHOUSANDSEP, bool, BOUND, MAYBEDEFAULT ), DECL_PROP_2 ( "Sizeable", SIZEABLE, bool, BOUND, MAYBEDEFAULT ), DECL_PROP_2 ( "Spin", SPIN, bool, BOUND, MAYBEDEFAULT ), |