diff options
author | Noel Power <noel.power@suse.com> | 2013-04-23 19:50:13 +0100 |
---|---|---|
committer | Noel Power <noel.power@suse.com> | 2013-05-09 14:11:18 +0100 |
commit | 13ee25626529ff9d3cca5a7039ca6519cb6b7e20 (patch) | |
tree | d4dbead6f92ea4f6198e838dae0f41dc3e017f11 /vbahelper | |
parent | b3a635e203616d624170af2c78c99b50640b6cec (diff) |
tweak combox to selectively fire change or click event
we need to fire a click event if just the item in the dropdown changed and
a change event if the item we changed is really part of the list
Change-Id: I19f950fca0857761d8f59a07513803f1f3ef135b
Diffstat (limited to 'vbahelper')
-rw-r--r-- | vbahelper/source/msforms/vbacombobox.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/vbahelper/source/msforms/vbacombobox.cxx b/vbahelper/source/msforms/vbacombobox.cxx index 6933884baf55..8c5401a4e36c 100644 --- a/vbahelper/source/msforms/vbacombobox.cxx +++ b/vbahelper/source/msforms/vbacombobox.cxx @@ -124,7 +124,15 @@ ScVbaComboBox::setValue( const uno::Any& _value ) throw (uno::RuntimeException) m_xProps->setPropertyValue( sSourceName, uno::Any( extractStringFromAny( _value, OUString(), true ) ) ); OUString newValue = extractStringFromAny( getValue(), OUString(), true ); if ( oldValue != newValue ) - fireChangeEvent(); + { + sal_Int32 index = 0; + uno::Any aIndex = getListIndex(); + aIndex >>= index; + if ( index < 0 ) + fireChangeEvent(); + else + fireClickEvent(); + } } // see Value |