summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2014-05-06 23:25:13 +0200
committerJulien Nabet <serval2412@yahoo.fr>2014-05-06 23:25:42 +0200
commit21010f3ea76a98ba8349b7ab3ffd7dcadd6a2d1c (patch)
tree64e7158943ed6f77e828f0ec5cd11c083496f883 /extensions
parent127a5f5e12d33203f871ee810e4b7ef557b7764b (diff)
Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part4
Change-Id: I8e52c2fd66f8f3291434ee82a745431e11b12caf
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/propctrlr/stringrepresentation.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/extensions/source/propctrlr/stringrepresentation.cxx b/extensions/source/propctrlr/stringrepresentation.cxx
index 10d20fd34165..25fe129fb214 100644
--- a/extensions/source/propctrlr/stringrepresentation.cxx
+++ b/extensions/source/propctrlr/stringrepresentation.cxx
@@ -441,7 +441,7 @@ bool StringRepresentation::convertGenericValueToString( const uno::Any& _rValue,
// some structs
case uno::TypeClass_STRUCT:
OSL_FAIL( "StringRepresentation::convertGenericValueToString(STRUCT): this is dead code - isn't it?" );
- if ( _rValue.getValueType().equals( ::getCppuType( static_cast< util::Date* >( NULL ) ) ) )
+ if ( _rValue.getValueType().equals( cppu::UnoType< util::Date >::get() ))
{
// weird enough, the string representation of dates, as used
// by the control displaying dates, and thus as passed through the layers,
@@ -450,14 +450,14 @@ bool StringRepresentation::convertGenericValueToString( const uno::Any& _rValue,
_rValue >>= aUnoDate;
_rStringRep = ::dbtools::DBTypeConversion::toDateString(aUnoDate);
}
- else if ( _rValue.getValueType().equals( ::getCppuType( static_cast< util::Time* >( NULL ) ) ) )
+ else if ( _rValue.getValueType().equals( cppu::UnoType< util::Time >::get() ))
{
// similar for time (HHMMSSHH)
util::Time aUnoTime;
_rValue >>= aUnoTime;
_rStringRep = ::dbtools::DBTypeConversion::toTimeString(aUnoTime);
}
- else if ( _rValue.getValueType().equals( ::getCppuType( static_cast< util::DateTime* >( NULL ) ) ) )
+ else if ( _rValue.getValueType().equals( cppu::UnoType< util::DateTime >::get() ))
{
util::DateTime aUnoDateTime;
_rValue >>= aUnoDateTime;
@@ -582,7 +582,7 @@ bool StringRepresentation::convertStringToGenericValue( const OUString& _rString
case uno::TypeClass_STRUCT:
OSL_FAIL( "StringRepresentation::convertStringToGenericValue(STRUCT): this is dead code - isn't it?" );
- if ( _rTargetType.equals( ::getCppuType( static_cast< util::Date* >( NULL ) ) ) )
+ if ( _rTargetType.equals( cppu::UnoType< util::Date >::get() ))
{
// weird enough, the string representation of dates, as used
// by the control displaying dates, and thus as passed through the layers,
@@ -590,12 +590,12 @@ bool StringRepresentation::convertStringToGenericValue( const OUString& _rString
_rValue <<= ::dbtools::DBTypeConversion::toDate(_rStringRep);
}
- else if ( _rTargetType.equals( ::getCppuType( static_cast< util::Time* >( NULL ) ) ) )
+ else if ( _rTargetType.equals( cppu::UnoType< util::Time >::get() ))
{
// similar for time (HHMMSSHH)
_rValue <<= ::dbtools::DBTypeConversion::toTime(_rStringRep);
}
- else if ( _rTargetType.equals( ::getCppuType( static_cast< util::DateTime* >( NULL ) ) ) )
+ else if ( _rTargetType.equals( cppu::UnoType< util::DateTime >::get() ))
{
_rValue <<= ::dbtools::DBTypeConversion::toDateTime(_rStringRep);
}