Kaydet (Commit) 13ee2562 authored tarafından Noel Power's avatar Noel Power

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
üst b3a635e2
...@@ -124,7 +124,15 @@ ScVbaComboBox::setValue( const uno::Any& _value ) throw (uno::RuntimeException) ...@@ -124,7 +124,15 @@ ScVbaComboBox::setValue( const uno::Any& _value ) throw (uno::RuntimeException)
m_xProps->setPropertyValue( sSourceName, uno::Any( extractStringFromAny( _value, OUString(), true ) ) ); m_xProps->setPropertyValue( sSourceName, uno::Any( extractStringFromAny( _value, OUString(), true ) ) );
OUString newValue = extractStringFromAny( getValue(), OUString(), true ); OUString newValue = extractStringFromAny( getValue(), OUString(), true );
if ( oldValue != newValue ) if ( oldValue != newValue )
fireChangeEvent(); {
sal_Int32 index = 0;
uno::Any aIndex = getListIndex();
aIndex >>= index;
if ( index < 0 )
fireChangeEvent();
else
fireClickEvent();
}
} }
// see Value // see Value
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment