summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2013-04-23 19:50:13 +0100
committerNoel Power <noel.power@suse.com>2013-05-07 09:56:25 +0100
commited9c4cf1d9a8d6a63e814daf9fd291f791d7ccc3 (patch)
tree05624a6e89c19e04151c4c83fefe338546096dce
parent53403370de97b1a35730164f7075e842b79c38fd (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
-rw-r--r--vbahelper/source/msforms/vbacombobox.cxx10
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