summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2014-05-22 23:19:05 +0200
committerJulien Nabet <serval2412@yahoo.fr>2014-05-22 23:21:18 +0200
commitb09b5f8f7cfd2d7f3125dab93ebe996c160e1e0c (patch)
treedacb87512726af1941d0c6b072d0b3626335cc4c /comphelper
parent87c1aa16a95dcff9247ae12a4bb5ea2d866b1772 (diff)
Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part19
Change-Id: Iab50c52a132c90389992ef68c2d31df95a193ab9
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/misc/accessiblewrapper.cxx2
-rw-r--r--comphelper/source/misc/proxyaggregation.cxx2
-rw-r--r--comphelper/source/property/genericpropertyset.cxx18
-rw-r--r--comphelper/source/property/propertycontainer.cxx6
-rw-r--r--comphelper/source/property/propstate.cxx8
5 files changed, 18 insertions, 18 deletions
diff --git a/comphelper/source/misc/accessiblewrapper.cxx b/comphelper/source/misc/accessiblewrapper.cxx
index e8beaeb1e283..646145d8df33 100644
--- a/comphelper/source/misc/accessiblewrapper.cxx
+++ b/comphelper/source/misc/accessiblewrapper.cxx
@@ -477,7 +477,7 @@ namespace comphelper
::osl::MutexGuard aGuard( m_rBHelper.rMutex );
// translate the event
- queryInterface( ::getCppuType( static_cast< Reference< XInterface >* >( NULL ) ) ) >>= aTranslatedEvent.Source;
+ queryInterface( cppu::UnoType<XInterface>::get() ) >>= aTranslatedEvent.Source;
m_pChildMapper->translateAccessibleEvent( _rEvent, aTranslatedEvent );
// see if any of these notifications affect our child manager
diff --git a/comphelper/source/misc/proxyaggregation.cxx b/comphelper/source/misc/proxyaggregation.cxx
index 3a29ba08e7a6..b6deaedbcb45 100644
--- a/comphelper/source/misc/proxyaggregation.cxx
+++ b/comphelper/source/misc/proxyaggregation.cxx
@@ -219,7 +219,7 @@ namespace comphelper
// append XComponent, coming from WeakComponentImplHelperBase
sal_Int32 nLen = aTypes.getLength();
aTypes.realloc( nLen + 1 );
- aTypes[ nLen ] = ::getCppuType( static_cast< Reference< XComponent >* >( NULL ) );
+ aTypes[ nLen ] = cppu::UnoType<XComponent>::get();
return aTypes;
}
diff --git a/comphelper/source/property/genericpropertyset.cxx b/comphelper/source/property/genericpropertyset.cxx
index c44208c72631..5ce4ab16bade 100644
--- a/comphelper/source/property/genericpropertyset.cxx
+++ b/comphelper/source/property/genericpropertyset.cxx
@@ -199,13 +199,13 @@ Any SAL_CALL GenericPropertySet::queryAggregation( const Type & rType )
{
Any aAny;
- if( rType == ::getCppuType((const Reference< XServiceInfo >*)0) )
+ if( rType == cppu::UnoType<XServiceInfo>::get())
aAny <<= Reference< XServiceInfo >(this);
- else if( rType == ::getCppuType((const Reference< XTypeProvider >*)0) )
+ else if( rType == cppu::UnoType<XTypeProvider>::get())
aAny <<= Reference< XTypeProvider >(this);
- else if( rType == ::getCppuType((const Reference< XPropertySet >*)0) )
+ else if( rType == cppu::UnoType<XPropertySet>::get())
aAny <<= Reference< XPropertySet >(this);
- else if( rType == ::getCppuType((const Reference< XMultiPropertySet >*)0) )
+ else if( rType == cppu::UnoType<XMultiPropertySet>::get())
aAny <<= Reference< XMultiPropertySet >(this);
else
aAny <<= OWeakAggObject::queryAggregation( rType );
@@ -229,11 +229,11 @@ uno::Sequence< uno::Type > SAL_CALL GenericPropertySet::getTypes()
uno::Sequence< uno::Type > aTypes( 5 );
uno::Type* pTypes = aTypes.getArray();
- *pTypes++ = ::getCppuType((const uno::Reference< XAggregation>*)0);
- *pTypes++ = ::getCppuType((const uno::Reference< XServiceInfo>*)0);
- *pTypes++ = ::getCppuType((const uno::Reference< XTypeProvider>*)0);
- *pTypes++ = ::getCppuType((const uno::Reference< XPropertySet>*)0);
- *pTypes++ = ::getCppuType((const uno::Reference< XMultiPropertySet>*)0);
+ *pTypes++ = cppu::UnoType<XAggregation>::get();
+ *pTypes++ = cppu::UnoType<XServiceInfo>::get();
+ *pTypes++ = cppu::UnoType<XTypeProvider>::get();
+ *pTypes++ = cppu::UnoType<XPropertySet>::get();
+ *pTypes++ = cppu::UnoType<XMultiPropertySet>::get();
return aTypes;
}
diff --git a/comphelper/source/property/propertycontainer.cxx b/comphelper/source/property/propertycontainer.cxx
index 83a6eae1c5e2..1cd3fcd9e68c 100644
--- a/comphelper/source/property/propertycontainer.cxx
+++ b/comphelper/source/property/propertycontainer.cxx
@@ -56,9 +56,9 @@ Sequence< Type > OPropertyContainer::getBaseTypes() throw (RuntimeException, std
{
// just the types from our one and only base class
::cppu::OTypeCollection aTypes(
- ::getCppuType( static_cast< Reference< XPropertySet >* >(NULL)),
- ::getCppuType( static_cast< Reference< XFastPropertySet >* >(NULL)),
- ::getCppuType( static_cast< Reference< XMultiPropertySet >* >(NULL))
+ cppu::UnoType<XPropertySet>::get(),
+ cppu::UnoType<XFastPropertySet>::get(),
+ cppu::UnoType<XMultiPropertySet>::get()
);
return aTypes.getTypes();
}
diff --git a/comphelper/source/property/propstate.cxx b/comphelper/source/property/propstate.cxx
index 90d8e370e730..d8f53b5e4570 100644
--- a/comphelper/source/property/propstate.cxx
+++ b/comphelper/source/property/propstate.cxx
@@ -58,11 +58,11 @@ namespace comphelper
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> aTypes(4);
::com::sun::star::uno::Type* pTypes = aTypes.getArray();
// base class types
- pTypes[0] = getCppuType(( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>*)NULL);
- pTypes[1] = getCppuType(( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XMultiPropertySet>*)NULL);
- pTypes[2] = getCppuType(( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XFastPropertySet>*)NULL);
+ pTypes[0] = cppu::UnoType<com::sun::star::beans::XPropertySet>::get();
+ pTypes[1] = cppu::UnoType<com::sun::star::beans::XMultiPropertySet>::get();
+ pTypes[2] = cppu::UnoType<com::sun::star::beans::XFastPropertySet>::get();
// my own type
- pTypes[3] = getCppuType(( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyState>*)NULL);
+ pTypes[3] = cppu::UnoType<com::sun::star::beans::XPropertyState>::get();
return aTypes;
}