Kaydet (Commit) 0156c827 authored tarafından Noel Power's avatar Noel Power

support api initiated change_event for combox & textbox

Change-Id: Iff51a184792e9d12accb902df1772fc07589443b
üst f67fdd37
...@@ -120,7 +120,11 @@ void SAL_CALL ...@@ -120,7 +120,11 @@ void SAL_CALL
ScVbaComboBox::setValue( const uno::Any& _value ) throw (uno::RuntimeException) 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 );
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 );
if ( oldValue != newValue )
fireChangeEvent();
} }
// see Value // see Value
......
...@@ -59,6 +59,7 @@ ScVbaTextBox::getText() throw (css::uno::RuntimeException) ...@@ -59,6 +59,7 @@ ScVbaTextBox::getText() throw (css::uno::RuntimeException)
void SAL_CALL void SAL_CALL
ScVbaTextBox::setText( const OUString& _text ) throw (css::uno::RuntimeException) ScVbaTextBox::setText( const OUString& _text ) throw (css::uno::RuntimeException)
{ {
OUString oldText( getText() );
if ( !mbDialog ) if ( !mbDialog )
{ {
uno::Reference< text::XTextRange > xTextRange( m_xProps, uno::UNO_QUERY_THROW ); uno::Reference< text::XTextRange > xTextRange( m_xProps, uno::UNO_QUERY_THROW );
...@@ -66,6 +67,8 @@ ScVbaTextBox::setText( const OUString& _text ) throw (css::uno::RuntimeException ...@@ -66,6 +67,8 @@ ScVbaTextBox::setText( const OUString& _text ) throw (css::uno::RuntimeException
} }
else else
m_xProps->setPropertyValue( "Text" , uno::makeAny( _text ) ); m_xProps->setPropertyValue( "Text" , uno::makeAny( _text ) );
if ( oldText != _text )
fireChangeEvent();
} }
sal_Int32 SAL_CALL sal_Int32 SAL_CALL
......
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