diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2014-05-20 23:29:28 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2014-05-20 23:29:53 +0200 |
commit | 227af32d8c6d5e3649c83fcdb274298bc7faa294 (patch) | |
tree | 8490a6c94094d1fbf5a190a911070c3142d3cca7 /svtools | |
parent | 0f836296ea3cdc10326ad54983b634168285b8e2 (diff) |
Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part18
Change-Id: Ibf958dbfbf7cdbe6ad31d390138be8d4d468c225
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/java/javacontext.cxx | 4 | ||||
-rw-r--r-- | svtools/source/java/javainteractionhandler.cxx | 4 | ||||
-rw-r--r-- | svtools/source/uno/statusbarcontroller.cxx | 4 | ||||
-rw-r--r-- | svtools/source/uno/toolboxcontroller.cxx | 4 | ||||
-rw-r--r-- | svtools/source/uno/unoimap.cxx | 14 |
5 files changed, 15 insertions, 15 deletions
diff --git a/svtools/source/java/javacontext.cxx b/svtools/source/java/javacontext.cxx index f5be4776dcae..66c85d56edb1 100644 --- a/svtools/source/java/javacontext.cxx +++ b/svtools/source/java/javacontext.cxx @@ -43,9 +43,9 @@ JavaContext::~JavaContext() Any SAL_CALL JavaContext::queryInterface(const Type& aType ) throw (RuntimeException, std::exception) { - if (aType == getCppuType(reinterpret_cast<Reference<XInterface>*>(0))) + if (aType == cppu::UnoType<XInterface>::get()) return Any(Reference<XInterface>(static_cast<XInterface*>(this))); - else if (aType == getCppuType(reinterpret_cast<Reference<XCurrentContext>*>(0))) + else if (aType == cppu::UnoType<XCurrentContext>::get()) return Any(Reference<XCurrentContext>( static_cast<XCurrentContext*>(this))); return Any(); } diff --git a/svtools/source/java/javainteractionhandler.cxx b/svtools/source/java/javainteractionhandler.cxx index 943e4f6085f3..6d2e5494e914 100644 --- a/svtools/source/java/javainteractionhandler.cxx +++ b/svtools/source/java/javainteractionhandler.cxx @@ -64,9 +64,9 @@ JavaInteractionHandler::~JavaInteractionHandler() Any SAL_CALL JavaInteractionHandler::queryInterface(const Type& aType ) throw (RuntimeException, std::exception) { - if (aType == getCppuType(reinterpret_cast<Reference<XInterface>*>(0))) + if (aType == cppu::UnoType<XInterface>::get()) return Any( static_cast<XInterface*>(this), aType); - else if (aType == getCppuType(reinterpret_cast<Reference<XInteractionHandler>*>(0))) + else if (aType == cppu::UnoType<XInteractionHandler>::get()) return Any( static_cast<XInteractionHandler*>(this), aType); return Any(); } diff --git a/svtools/source/uno/statusbarcontroller.cxx b/svtools/source/uno/statusbarcontroller.cxx index 0573aa6b20af..a0fb056e090c 100644 --- a/svtools/source/uno/statusbarcontroller.cxx +++ b/svtools/source/uno/statusbarcontroller.cxx @@ -236,13 +236,13 @@ throw (::com::sun::star::uno::RuntimeException, std::exception) void SAL_CALL StatusbarController::addEventListener( const Reference< XEventListener >& xListener ) throw ( RuntimeException, std::exception ) { - m_aListenerContainer.addInterface( ::getCppuType( ( const Reference< XEventListener >* ) NULL ), xListener ); + m_aListenerContainer.addInterface( cppu::UnoType<XEventListener>::get(), xListener ); } void SAL_CALL StatusbarController::removeEventListener( const Reference< XEventListener >& aListener ) throw ( RuntimeException, std::exception ) { - m_aListenerContainer.removeInterface( ::getCppuType( ( const Reference< XEventListener >* ) NULL ), aListener ); + m_aListenerContainer.removeInterface( cppu::UnoType<XEventListener>::get(), aListener ); } // XEventListener diff --git a/svtools/source/uno/toolboxcontroller.cxx b/svtools/source/uno/toolboxcontroller.cxx index da94dd0439a1..81c70292140c 100644 --- a/svtools/source/uno/toolboxcontroller.cxx +++ b/svtools/source/uno/toolboxcontroller.cxx @@ -277,13 +277,13 @@ throw (::com::sun::star::uno::RuntimeException, std::exception) void SAL_CALL ToolboxController::addEventListener( const Reference< XEventListener >& xListener ) throw ( RuntimeException, std::exception ) { - m_aListenerContainer.addInterface( ::getCppuType( ( const Reference< XEventListener >* ) NULL ), xListener ); + m_aListenerContainer.addInterface( cppu::UnoType<XEventListener>::get(), xListener ); } void SAL_CALL ToolboxController::removeEventListener( const Reference< XEventListener >& aListener ) throw ( RuntimeException, std::exception ) { - m_aListenerContainer.removeInterface( ::getCppuType( ( const Reference< XEventListener >* ) NULL ), aListener ); + m_aListenerContainer.removeInterface( cppu::UnoType<XEventListener>::get(), aListener ); } // XEventListener diff --git a/svtools/source/uno/unoimap.cxx b/svtools/source/uno/unoimap.cxx index 8e55f446d6ab..dda3dcdc0949 100644 --- a/svtools/source/uno/unoimap.cxx +++ b/svtools/source/uno/unoimap.cxx @@ -316,17 +316,17 @@ Any SAL_CALL SvUnoImageMapObject::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< XEventsSupplier >*)0) ) + else if( rType == cppu::UnoType<XEventsSupplier>::get()) aAny <<= Reference< XEventsSupplier >(this); - else if( rType == ::getCppuType((const Reference< XMultiPropertySet >*)0) ) + else if( rType == cppu::UnoType<XMultiPropertySet>::get()) aAny <<= Reference< XMultiPropertySet >(this); - else if( rType == ::getCppuType((const Reference< XUnoTunnel >*)0) ) + else if( rType == cppu::UnoType<XUnoTunnel>::get()) aAny <<= Reference< XUnoTunnel >(this); else aAny <<= OWeakAggObject::queryAggregation( rType ); @@ -684,7 +684,7 @@ Any SAL_CALL SvUnoImageMap::getByIndex( sal_Int32 Index ) throw(IndexOutOfBounds // XElementAccess Type SAL_CALL SvUnoImageMap::getElementType( ) throw(RuntimeException, std::exception) { - return ::getCppuType((const Reference< XPropertySet >*)0); + return cppu::UnoType<XPropertySet>::get(); } sal_Bool SAL_CALL SvUnoImageMap::hasElements( ) throw(RuntimeException, std::exception) |