summaryrefslogtreecommitdiff
path: root/vbahelper
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-04-26 15:30:35 +0100
commit3ea0652f6b3d8ee73a4ad57e48f3352e4329cfe8 (patch)
tree79bb6455ff7c02effdd92f602b6926b7f1dbcd66 /vbahelper
parent0156c82761d45631c96d6469c3a6627e86b3ca09 (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.cxx13
1 files changed, 11 insertions, 2 deletions
diff --git a/vbahelper/source/msforms/vbacombobox.cxx b/vbahelper/source/msforms/vbacombobox.cxx
index f632e1b03aa0..7d4a651e6fcc 100644
--- a/vbahelper/source/msforms/vbacombobox.cxx
+++ b/vbahelper/source/msforms/vbacombobox.cxx
@@ -122,9 +122,18 @@ ScVbaComboBox::setValue( const uno::Any& _value ) throw (uno::RuntimeException)
// booleans are converted to uppercase strings
OUString oldValue = extractStringFromAny( getValue(), ::rtl::OUString(), true );
m_xProps->setPropertyValue( sSourceName, uno::Any( extractStringFromAny( _value, ::rtl::OUString(), true ) ) );
- OUString newValue = extractStringFromAny( getValue(), ::rtl::OUString(), true );
+ OUString newValue = extractStringFromAny( _value, ::rtl::OUString(), true );
+
if ( oldValue != newValue )
- fireChangeEvent();
+ {
+ sal_Int32 index = 0;
+ uno::Any aIndex = getListIndex();
+ aIndex >>= index;
+ if ( index < 0 )
+ fireChangeEvent();
+ else
+ fireClickEvent();
+ }
}
// see Value