summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2015-07-22 16:25:28 +0200
committerLionel Elie Mamane <lionel@mamane.lu>2015-07-22 16:35:28 +0200
commit3b9e66fdcade5a222a9dc99ad74627473b1fd4e7 (patch)
treeeab498a533bdbbbadb798f3ef6916b114f7f12fa
parenta37df351c447373bb893ba154bd124d33e43c040 (diff)
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
-rw-r--r--svx/source/fmcomp/gridcell.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index 9a5a28d1010a..fe7627114de8 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -1576,7 +1576,7 @@ void DbFormattedField::updateFromModel( Reference< XPropertySet > _rxModel )
OUString sText;
Any aValue = _rxModel->getPropertyValue( FM_PROP_EFFECTIVE_VALUE );
- if ( aValue >>= sText )
+ if ( !aValue.hasValue() || (aValue >>= sText) )
{ // our effective value is transferred as string
pFormattedWindow->SetTextFormatted( sText );
pFormattedWindow->SetSelection( Selection( SELECTION_MAX, SELECTION_MIN ) );