Kaydet (Commit) bcca7b95 authored tarafından Lionel Elie Mamane's avatar Lionel Elie Mamane Kaydeden (comit) Michael Stahl

tdf#92725 FormattedField: when model value is NULL, force empty display string

as opposed to implicitly keeping whatever unrelated string was there before.

Change-Id: Ifaf1b41e951e97f209ecb617b32ec4f7522b1d08
Reviewed-on: https://gerrit.libreoffice.org/17297Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
üst 4e37375b
...@@ -1578,7 +1578,7 @@ void DbFormattedField::updateFromModel( Reference< XPropertySet > _rxModel ) ...@@ -1578,7 +1578,7 @@ void DbFormattedField::updateFromModel( Reference< XPropertySet > _rxModel )
OUString sText; OUString sText;
Any aValue = _rxModel->getPropertyValue( FM_PROP_EFFECTIVE_VALUE ); Any aValue = _rxModel->getPropertyValue( FM_PROP_EFFECTIVE_VALUE );
if ( aValue >>= sText ) if ( !aValue.hasValue() || (aValue >>= sText) )
{ // our effective value is transferred as string { // our effective value is transferred as string
pFormattedWindow->SetTextFormatted( sText ); pFormattedWindow->SetTextFormatted( sText );
pFormattedWindow->SetSelection( Selection( SELECTION_MAX, SELECTION_MIN ) ); pFormattedWindow->SetSelection( Selection( SELECTION_MAX, SELECTION_MIN ) );
......
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