Kaydet (Commit) 3ea0652f 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 0156c827
...@@ -122,9 +122,18 @@ ScVbaComboBox::setValue( const uno::Any& _value ) throw (uno::RuntimeException) ...@@ -122,9 +122,18 @@ ScVbaComboBox::setValue( const uno::Any& _value ) throw (uno::RuntimeException)
// booleans are converted to uppercase strings // booleans are converted to uppercase strings
OUString oldValue = extractStringFromAny( getValue(), ::rtl::OUString(), true ); OUString oldValue = extractStringFromAny( getValue(), ::rtl::OUString(), true );
m_xProps->setPropertyValue( sSourceName, uno::Any( extractStringFromAny( _value, ::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 ) 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