summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2014-05-06 21:31:29 +0200
committerJulien Nabet <serval2412@yahoo.fr>2014-05-06 21:33:28 +0200
commitf69e74d1a0fcd5ec6c38dc8a33e9562486aef1b6 (patch)
tree5b22522d60b2442652c946a8c0993320ed6c39b7 /forms
parent7aa32a759fb7b440f870739f7bb680f405f338ce (diff)
Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part2 + fix some errors
Change-Id: I9c889d718a9c91eb4c2bde2389a21dd754cbef36
Diffstat (limited to 'forms')
-rw-r--r--forms/source/component/FormattedField.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx
index bf7ef15b7b56..b9767ebb5027 100644
--- a/forms/source/component/FormattedField.cxx
+++ b/forms/source/component/FormattedField.cxx
@@ -897,19 +897,19 @@ Any OFormattedModel::translateExternalValueToControlValue( const Any& _rExternal
break;
default:
{
- if ( _rExternalValue.getValueType().equals( ::getCppuType( static_cast< UNODate* >( NULL ) ) ) )
+ if ( _rExternalValue.getValueType().equals( cppu::UnoType< UNODate >::get() ) )
{
UNODate aDate;
_rExternalValue >>= aDate;
aControlValue <<= DBTypeConversion::toDouble( aDate, m_aNullDate );
}
- else if ( _rExternalValue.getValueType().equals( ::getCppuType( static_cast< UNOTime* >( NULL ) ) ) )
+ else if ( _rExternalValue.getValueType().equals( cppu::UnoType< UNOTime >::get() ) )
{
UNOTime aTime;
_rExternalValue >>= aTime;
aControlValue <<= DBTypeConversion::toDouble( aTime );
}
- else if ( _rExternalValue.getValueType().equals( ::getCppuType( static_cast< UNODateTime* >( NULL ) ) ) )
+ else if ( _rExternalValue.getValueType().equals( cppu::UnoType< UNODateTime >::get() ) )
{
UNODateTime aDateTime;
_rExternalValue >>= aDateTime;
@@ -967,21 +967,21 @@ Any OFormattedModel::translateControlValueToExternalValue( ) const
// if this asserts ... well, the somebody set the TreatAsNumeric property to false,
// and the control value is a string. This implies some weird misconfiguration
// of the FormattedModel, so we won't care for it for the moment.
- if ( aExternalValueType.equals( ::getCppuType( static_cast< UNODate* >( NULL ) ) ) )
+ if ( aExternalValueType.equals( cppu::UnoType< UNODate >::get() ) )
{
aExternalValue <<= DBTypeConversion::toDate( fValue, m_aNullDate );
}
- else if ( aExternalValueType.equals( ::getCppuType( static_cast< UNOTime* >( NULL ) ) ) )
+ else if ( aExternalValueType.equals( cppu::UnoType< UNOTime >::get() ) )
{
aExternalValue <<= DBTypeConversion::toTime( fValue );
}
- else if ( aExternalValueType.equals( ::getCppuType( static_cast< UNODateTime* >( NULL ) ) ) )
+ else if ( aExternalValueType.equals( cppu::UnoType< UNODateTime >::get() ) )
{
aExternalValue <<= DBTypeConversion::toDateTime( fValue, m_aNullDate );
}
else
{
- OSL_ENSURE( aExternalValueType.equals( ::getCppuType( static_cast< double* >( NULL ) ) ),
+ OSL_ENSURE( aExternalValueType.equals( cppu::UnoType< double >::get() ),
"OFormattedModel::translateControlValueToExternalValue: don't know how to translate this type!" );
aExternalValue <<= fValue;
}