diff options
114 files changed, 490 insertions, 505 deletions
diff --git a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx index ff903d166c02..5f08a4f2c9c0 100644 --- a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx +++ b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx @@ -265,7 +265,7 @@ IMPLEMENT_FORWARD_REFCOUNT( VCLXAccessibleToolBoxItem, AccessibleTextHelper_BASE Any SAL_CALL VCLXAccessibleToolBoxItem::queryInterface( const Type& _rType ) throw (RuntimeException, std::exception) { // #i33611# - toolbox buttons without text don't support XAccessibleText - if ( _rType == ::getCppuType( ( const Reference< XAccessibleText >* ) 0 ) + if ( _rType == cppu::UnoType<XAccessibleText>::get() && ( !m_pToolBox || m_pToolBox->GetButtonType() == BUTTON_SYMBOL ) ) return Any(); diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index 6210f775c73c..b77675d22fbc 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -663,48 +663,48 @@ void AnimationNode::initTypeProvider( sal_Int16 nNodeType ) throw() Type * pTypeAr = types->getArray(); sal_Int32 nPos = 0; - pTypeAr[nPos++] = ::getCppuType( (const Reference< XWeak > *)0 ); - pTypeAr[nPos++] = ::getCppuType( (const Reference< XChild > *)0 ); - pTypeAr[nPos++] = ::getCppuType( (const Reference< XCloneable > *)0 ); - pTypeAr[nPos++] = ::getCppuType( (const Reference< XTypeProvider > *)0 ); - pTypeAr[nPos++] = ::getCppuType( (const Reference< XServiceInfo > *)0 ); - pTypeAr[nPos++] = ::getCppuType( (const Reference< XUnoTunnel > *)0 ); - pTypeAr[nPos++] = ::getCppuType( (const Reference< XChangesNotifier> *)0 ); + pTypeAr[nPos++] = cppu::UnoType<XWeak>::get(); + pTypeAr[nPos++] = cppu::UnoType<XChild>::get(); + pTypeAr[nPos++] = cppu::UnoType<XCloneable>::get(); + pTypeAr[nPos++] = cppu::UnoType<XTypeProvider>::get(); + pTypeAr[nPos++] = cppu::UnoType<XServiceInfo>::get(); + pTypeAr[nPos++] = cppu::UnoType<XUnoTunnel>::get(); + pTypeAr[nPos++] = cppu::UnoType<XChangesNotifier>::get(); switch( nNodeType ) { case AnimationNodeType::PAR: case AnimationNodeType::SEQ: - pTypeAr[nPos++] = ::getCppuType( (const Reference< XTimeContainer > *)0 ); - pTypeAr[nPos++] = ::getCppuType( (const Reference< XEnumerationAccess > *)0 ); + pTypeAr[nPos++] = cppu::UnoType<XTimeContainer>::get(); + pTypeAr[nPos++] = cppu::UnoType<XEnumerationAccess>::get(); break; case AnimationNodeType::ITERATE: - pTypeAr[nPos++] = ::getCppuType( (const Reference< XIterateContainer > *)0 ); - pTypeAr[nPos++] = ::getCppuType( (const Reference< XEnumerationAccess > *)0 ); + pTypeAr[nPos++] = cppu::UnoType<XIterateContainer>::get(); + pTypeAr[nPos++] = cppu::UnoType<XEnumerationAccess>::get(); break; case AnimationNodeType::ANIMATE: - pTypeAr[nPos++] = ::getCppuType( (const Reference< XAnimate > *)0 ); + pTypeAr[nPos++] = cppu::UnoType<XAnimate>::get(); break; case AnimationNodeType::ANIMATEMOTION: - pTypeAr[nPos++] = ::getCppuType( (const Reference< XAnimateMotion > *)0 ); + pTypeAr[nPos++] = cppu::UnoType<XAnimateMotion>::get(); break; case AnimationNodeType::ANIMATECOLOR: - pTypeAr[nPos++] = ::getCppuType( (const Reference< XAnimateColor > *)0 ); + pTypeAr[nPos++] = cppu::UnoType<XAnimateColor>::get(); break; case AnimationNodeType::ANIMATETRANSFORM: - pTypeAr[nPos++] = ::getCppuType( (const Reference< XAnimateTransform > *)0 ); + pTypeAr[nPos++] = cppu::UnoType<XAnimateTransform>::get(); break; case AnimationNodeType::SET: - pTypeAr[nPos++] = ::getCppuType( (const Reference< XAnimateSet > *)0 ); + pTypeAr[nPos++] = cppu::UnoType<XAnimateSet>::get(); break; case AnimationNodeType::TRANSITIONFILTER: - pTypeAr[nPos++] = ::getCppuType( (const Reference< XTransitionFilter > *)0 ); + pTypeAr[nPos++] = cppu::UnoType<XTransitionFilter>::get(); break; case AnimationNodeType::AUDIO: - pTypeAr[nPos++] = ::getCppuType( (const Reference< XAudio > *)0 ); + pTypeAr[nPos++] = cppu::UnoType<XAudio>::get(); break; case AnimationNodeType::COMMAND: - pTypeAr[nPos++] = ::getCppuType( ( const Reference< XCommand > *)0 ); + pTypeAr[nPos++] = cppu::UnoType<XCommand>::get(); break; } mpTypes[nNodeType] = types; @@ -1788,7 +1788,7 @@ void SAL_CALL AnimationNode::setParameter( const Any& _parameter ) throw (Runtim // XElementAccess Type SAL_CALL AnimationNode::getElementType() throw (RuntimeException, std::exception) { - return ::getCppuType((const Reference< XAnimationNode >*)0); + return cppu::UnoType<XAnimationNode>::get(); } diff --git a/avmedia/source/framework/soundhandler.cxx b/avmedia/source/framework/soundhandler.cxx index 2201b7a367de..d80d29ba46d4 100644 --- a/avmedia/source/framework/soundhandler.cxx +++ b/avmedia/source/framework/soundhandler.cxx @@ -92,11 +92,11 @@ css::uno::Sequence< css::uno::Type > SAL_CALL SoundHandler::getTypes() throw( cs /* Create a static typecollection ... */ static ::cppu::OTypeCollection aTypeCollection ( - ::getCppuType(( const ::com::sun::star::uno::Reference< css::lang::XTypeProvider >*)NULL ), - ::getCppuType(( const ::com::sun::star::uno::Reference< css::lang::XServiceInfo >*)NULL ), - ::getCppuType(( const ::com::sun::star::uno::Reference< css::frame::XNotifyingDispatch >*)NULL ), - ::getCppuType(( const ::com::sun::star::uno::Reference< css::frame::XDispatch >*)NULL ), - ::getCppuType(( const ::com::sun::star::uno::Reference< css::document::XExtendedFilterDetection >*)NULL ) + cppu::UnoType<css::lang::XTypeProvider>::get(), + cppu::UnoType<css::lang::XServiceInfo>::get(), + cppu::UnoType<css::frame::XNotifyingDispatch>::get(), + cppu::UnoType<css::frame::XDispatch>::get(), + cppu::UnoType<css::document::XExtendedFilterDetection>::get() ); /* ... and set his address to static pointer! */ pTypeCollection = &aTypeCollection ; diff --git a/avmedia/source/win/window.cxx b/avmedia/source/win/window.cxx index 029ad40cfec0..7ba550ac36d5 100644 --- a/avmedia/source/win/window.cxx +++ b/avmedia/source/win/window.cxx @@ -532,7 +532,7 @@ void SAL_CALL Window::removeEventListener( const uno::Reference< lang::XEventLis void Window::fireMousePressedEvent( const ::com::sun::star::awt::MouseEvent& rEvt ) { - ::cppu::OInterfaceContainerHelper* pContainer = maListeners.getContainer( getCppuType( (uno::Reference< awt::XMouseListener >*) 0 ) ); + ::cppu::OInterfaceContainerHelper* pContainer = maListeners.getContainer( cppu::UnoType<awt::XMouseListener>::get()); if( pContainer ) { @@ -545,7 +545,7 @@ void Window::fireMousePressedEvent( const ::com::sun::star::awt::MouseEvent& rEv void Window::fireMouseReleasedEvent( const ::com::sun::star::awt::MouseEvent& rEvt ) { - ::cppu::OInterfaceContainerHelper* pContainer = maListeners.getContainer( getCppuType( (uno::Reference< awt::XMouseListener >*) 0 ) ); + ::cppu::OInterfaceContainerHelper* pContainer = maListeners.getContainer( cppu::UnoType<awt::XMouseListener>::get()); if( pContainer ) { @@ -558,7 +558,7 @@ void Window::fireMouseReleasedEvent( const ::com::sun::star::awt::MouseEvent& rE void Window::fireMouseMovedEvent( const ::com::sun::star::awt::MouseEvent& rEvt ) { - ::cppu::OInterfaceContainerHelper* pContainer = maListeners.getContainer( getCppuType( (uno::Reference< awt::XMouseMotionListener >*) 0 ) ); + ::cppu::OInterfaceContainerHelper* pContainer = maListeners.getContainer( cppu::UnoType<awt::XMouseMotionListener>::get()); if( pContainer ) { @@ -571,7 +571,7 @@ void Window::fireMouseMovedEvent( const ::com::sun::star::awt::MouseEvent& rEvt void Window::fireSetFocusEvent( const ::com::sun::star::awt::FocusEvent& rEvt ) { - ::cppu::OInterfaceContainerHelper* pContainer = maListeners.getContainer( getCppuType( (uno::Reference< awt::XFocusListener >*) 0 ) ); + ::cppu::OInterfaceContainerHelper* pContainer = maListeners.getContainer( cppu::UnoType<awt::XFocusListener>::get()); if( pContainer ) { diff --git a/basctl/source/basicide/unomodel.cxx b/basctl/source/basicide/unomodel.cxx index ddd684f7151b..16d58e27d6b7 100644 --- a/basctl/source/basicide/unomodel.cxx +++ b/basctl/source/basicide/unomodel.cxx @@ -76,7 +76,7 @@ uno::Sequence< uno::Type > SAL_CALL SIDEModel::getTypes( ) throw(uno::RuntimeEx sal_Int32 nLen = aTypes.getLength(); aTypes.realloc(nLen + 1); uno::Type* pTypes = aTypes.getArray(); - pTypes[nLen++] = ::getCppuType((Reference<XServiceInfo>*)0); + pTypes[nLen++] = cppu::UnoType<XServiceInfo>::get(); return aTypes; } diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 85343b2dc4ae..86881eeca526 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -847,7 +847,7 @@ Type getUnoTypeForSbxBaseType( SbxDataType eType ) Type aRetType = getCppuVoidType(); switch( eType ) { - case SbxNULL: aRetType = ::getCppuType( (const Reference< XInterface > *)0 ); break; + case SbxNULL: aRetType = cppu::UnoType<XInterface>::get(); break; case SbxINTEGER: aRetType = cppu::UnoType<sal_Int16>::get(); break; case SbxLONG: aRetType = cppu::UnoType<sal_Int32>::get(); break; case SbxSINGLE: aRetType = cppu::UnoType<float>::get(); break; @@ -891,7 +891,7 @@ Type getUnoTypeForSbxValue( const SbxValue* pVal ) SbxBaseRef xObj = (SbxBase*)pVal->GetObject(); if( !xObj ) { - aRetType = getCppuType( static_cast<Reference<XInterface> *>(0) ); + aRetType = cppu::UnoType<XInterface>::get(); return aRetType; } @@ -1592,7 +1592,7 @@ Any invokeAutomationMethod( const OUString& Name, Sequence< Any >& args, SbxArra // Debugging help method to readout the imlemented interfaces of an object OUString Impl_GetInterfaceInfo( const Reference< XInterface >& x, const Reference< XIdlClass >& xClass, sal_uInt16 nRekLevel ) { - Type aIfaceType = ::getCppuType( (const Reference< XInterface > *)0 ); + Type aIfaceType = cppu::UnoType<XInterface>::get(); static Reference< XIdlClass > xIfaceClass = TypeToIdlClass( aIfaceType ); OUStringBuffer aRetStr; @@ -2117,7 +2117,7 @@ void SbUnoObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, } } // get the value - Reference< XPropertySet > xPropSet( mxUnoAccess->queryAdapter( ::getCppuType( (const Reference< XPropertySet > *)0 ) ), UNO_QUERY ); + Reference< XPropertySet > xPropSet( mxUnoAccess->queryAdapter( cppu::UnoType<XPropertySet>::get()), UNO_QUERY ); Any aRetAny = xPropSet->getPropertyValue( pProp->GetName() ); // The use of getPropertyValue (instead of using the index) is // suboptimal, but the refactoring to XInvocation is already pending @@ -2188,7 +2188,7 @@ void SbUnoObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, try { // set the value - Reference< XPropertySet > xPropSet( mxUnoAccess->queryAdapter( ::getCppuType( (const Reference< XPropertySet > *)0 ) ), UNO_QUERY ); + Reference< XPropertySet > xPropSet( mxUnoAccess->queryAdapter( cppu::UnoType<XPropertySet>::get()), UNO_QUERY ); xPropSet->setPropertyValue( pProp->GetName(), aAnyValue ); // The use of getPropertyValue (instead of using the index) is // suboptimal, but the refactoring to XInvocation is already pending @@ -2701,7 +2701,7 @@ SbxVariable* SbUnoObject::Find( const OUString& rName, SbxClassType t ) { try { - Reference< XNameAccess > xNameAccess( mxUnoAccess->queryAdapter( ::getCppuType( (const Reference< XPropertySet > *)0 ) ), UNO_QUERY ); + Reference< XNameAccess > xNameAccess( mxUnoAccess->queryAdapter( cppu::UnoType<XPropertySet>::get()), UNO_QUERY ); OUString aUName2( rName ); if( xNameAccess.is() && xNameAccess->hasByName( aUName2 ) ) diff --git a/basic/source/uno/dlgcont.cxx b/basic/source/uno/dlgcont.cxx index a759eea503da..bc4223a0e2b9 100644 --- a/basic/source/uno/dlgcont.cxx +++ b/basic/source/uno/dlgcont.cxx @@ -496,7 +496,7 @@ SfxDialogLibrary::SfxDialogLibrary( ModifiableHelper& _rModifiable, const Reference< XComponentContext >& xContext, const Reference< XSimpleFileAccess3 >& xSFI, SfxDialogLibraryContainer* pParent ) - : SfxLibrary( _rModifiable, getCppuType( (const Reference< XInputStreamProvider > *)0 ), xContext, xSFI ) + : SfxLibrary( _rModifiable, cppu::UnoType<XInputStreamProvider>::get(), xContext, xSFI ) , m_pParent( pParent ) , m_aName( aName ) { @@ -510,7 +510,7 @@ SfxDialogLibrary::SfxDialogLibrary( ModifiableHelper& _rModifiable, const OUString& aStorageURL, bool ReadOnly, SfxDialogLibraryContainer* pParent ) - : SfxLibrary( _rModifiable, getCppuType( (const Reference< XInputStreamProvider > *)0 ), + : SfxLibrary( _rModifiable, cppu::UnoType<XInputStreamProvider>::get(), xContext, xSFI, aLibInfoFileURL, aStorageURL, ReadOnly) , m_pParent( pParent ) , m_aName( aName ) diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx index 52d3494f23ef..6bbe98854f61 100644 --- a/basic/source/uno/namecont.cxx +++ b/basic/source/uno/namecont.cxx @@ -372,7 +372,7 @@ SfxLibraryContainer::SfxLibraryContainer( void ) , mnRunningVBAScripts( 0 ) , mbVBACompat( false ) , maModifiable( *this, maMutex ) - , maNameContainer( getCppuType( (Reference< XNameAccess >*) NULL ) ) + , maNameContainer( cppu::UnoType<XNameAccess>::get()) , mbOldInfoFormat( false ) , mbOasis2OOoFormat( false ) , mpBasMgr( NULL ) @@ -3222,9 +3222,9 @@ Sequence< Type > SfxLibrary::getTypes() if( !s_pTypes_NameContainer ) { static OTypeCollection s_aTypes_NameContainer( - ::getCppuType( (const Reference< XNameContainer > *)0 ), - ::getCppuType( (const Reference< XContainer > *)0 ), - ::getCppuType( (const Reference< XChangesNotifier > *)0 ), + cppu::UnoType<XNameContainer>::get(), + cppu::UnoType<XContainer>::get(), + cppu::UnoType<XChangesNotifier>::get(), OComponentHelper::getTypes() ); s_pTypes_NameContainer = &s_aTypes_NameContainer; } diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx index d312b58e4c1b..8bc46fd193bd 100644 --- a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx +++ b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx @@ -113,8 +113,6 @@ uno::Any SAL_CALL CreationWizardUnoDlg::queryAggregation( uno::Type const & rTyp return OComponentHelper::queryAggregation( rType ); } -#define LCL_CPPUTYPE(t) (::getCppuType( reinterpret_cast< const uno::Reference<t> *>(0))) - uno::Sequence< uno::Type > CreationWizardUnoDlg::getTypes() throw(uno::RuntimeException, std::exception) { static uno::Sequence< uno::Type > aTypeList; @@ -123,15 +121,15 @@ uno::Sequence< uno::Type > CreationWizardUnoDlg::getTypes() throw(uno::RuntimeEx if( !aTypeList.getLength() ) { ::std::vector< uno::Type > aTypes; - aTypes.push_back( LCL_CPPUTYPE( lang::XComponent )); - aTypes.push_back( LCL_CPPUTYPE( lang::XTypeProvider )); - aTypes.push_back( LCL_CPPUTYPE( uno::XAggregation )); - aTypes.push_back( LCL_CPPUTYPE( uno::XWeak )); - aTypes.push_back( LCL_CPPUTYPE( lang::XServiceInfo )); - aTypes.push_back( LCL_CPPUTYPE( lang::XInitialization )); - aTypes.push_back( LCL_CPPUTYPE( frame::XTerminateListener )); - aTypes.push_back( LCL_CPPUTYPE( ui::dialogs::XExecutableDialog )); - aTypes.push_back( LCL_CPPUTYPE( beans::XPropertySet )); + aTypes.push_back( cppu::UnoType<lang::XComponent>::get() ); + aTypes.push_back( cppu::UnoType<lang::XTypeProvider>::get() ); + aTypes.push_back( cppu::UnoType<uno::XAggregation>::get() ); + aTypes.push_back( cppu::UnoType<uno::XWeak>::get() ); + aTypes.push_back( cppu::UnoType<lang::XServiceInfo>::get() ); + aTypes.push_back( cppu::UnoType<lang::XInitialization>::get() ); + aTypes.push_back( cppu::UnoType<frame::XTerminateListener>::get() ); + aTypes.push_back( cppu::UnoType<ui::dialogs::XExecutableDialog>::get() ); + aTypes.push_back( cppu::UnoType<beans::XPropertySet>::get() ); aTypeList = ::chart::ContainerHelper::ContainerToSequence( aTypes ); } 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; } diff --git a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx index 87bd7d331356..646d57865128 100644 --- a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx +++ b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx @@ -149,9 +149,9 @@ Any SAL_CALL ODatabaseMetaDataResultSet::queryInterface( const Type & rType ) th Sequence< Type > SAL_CALL ODatabaseMetaDataResultSet::getTypes( ) throw(RuntimeException, std::exception) { - ::cppu::OTypeCollection aTypes( ::getCppuType( (const Reference< ::com::sun::star::beans::XMultiPropertySet > *)0 ), - ::getCppuType( (const Reference< ::com::sun::star::beans::XFastPropertySet > *)0 ), - ::getCppuType( (const Reference< ::com::sun::star::beans::XPropertySet > *)0 )); + ::cppu::OTypeCollection aTypes( cppu::UnoType<com::sun::star::beans::XMultiPropertySet>::get(), + cppu::UnoType<com::sun::star::beans::XFastPropertySet>::get(), + cppu::UnoType<com::sun::star::beans::XPropertySet>::get()); return ::comphelper::concatSequences(aTypes.getTypes(),ODatabaseMetaDataResultSet_BASE::getTypes()); } diff --git a/connectivity/source/commontools/dbexception.cxx b/connectivity/source/commontools/dbexception.cxx index 3b68dde5b8c8..33ea7a8eac72 100644 --- a/connectivity/source/commontools/dbexception.cxx +++ b/connectivity/source/commontools/dbexception.cxx @@ -231,7 +231,7 @@ void SQLExceptionInfo::append( TYPE _eType, const OUString& _rErrorMessage, cons // find the end of the current chain Any* pChainIterator = &m_aContent; SQLException* pLastException = NULL; - const Type& aSQLExceptionType( ::getCppuType< SQLException >() ); + const Type& aSQLExceptionType( cppu::UnoType<SQLException>::get() ); while ( pChainIterator ) { if ( !pChainIterator->hasValue() ) diff --git a/connectivity/source/commontools/paramwrapper.cxx b/connectivity/source/commontools/paramwrapper.cxx index 60c3ef8ef0e5..70c9564e2811 100644 --- a/connectivity/source/commontools/paramwrapper.cxx +++ b/connectivity/source/commontools/paramwrapper.cxx @@ -119,11 +119,11 @@ namespace param Sequence< Type > SAL_CALL ParameterWrapper::getTypes( ) throw(RuntimeException, std::exception) { Sequence< Type > aTypes( 5 ); - aTypes[ 0 ] = ::getCppuType( static_cast< Reference< XWeak >* >( NULL ) ); - aTypes[ 1 ] = ::getCppuType( static_cast< Reference< XTypeProvider >* >( NULL ) ); - aTypes[ 2 ] = ::getCppuType( static_cast< Reference< XPropertySet >* >( NULL ) ); - aTypes[ 3 ] = ::getCppuType( static_cast< Reference< XFastPropertySet >* >( NULL ) ); - aTypes[ 4 ] = ::getCppuType( static_cast< Reference< XMultiPropertySet >* >( NULL ) ); + aTypes[ 0 ] = cppu::UnoType<XWeak>::get(); + aTypes[ 1 ] = cppu::UnoType<XTypeProvider>::get(); + aTypes[ 2 ] = cppu::UnoType<XPropertySet>::get(); + aTypes[ 3 ] = cppu::UnoType<XFastPropertySet>::get(); + aTypes[ 4 ] = cppu::UnoType<XMultiPropertySet>::get(); return aTypes; } @@ -295,7 +295,7 @@ namespace param { ::osl::MutexGuard aGuard( m_aMutex ); impl_checkDisposed_throw(); - return ::getCppuType( static_cast< Reference< XPropertySet >* >( NULL ) ); + return cppu::UnoType<XPropertySet>::get(); } diff --git a/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx index d7113048ece9..266000b5db58 100644 --- a/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx +++ b/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx @@ -101,9 +101,9 @@ Any SAL_CALL ODatabaseMetaDataResultSet::queryInterface( const Type & rType ) th ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL ODatabaseMetaDataResultSet::getTypes( ) throw(::com::sun::star::uno::RuntimeException) { - ::cppu::OTypeCollection aTypes( ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XMultiPropertySet > *)0 ), - ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XFastPropertySet > *)0 ), - ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > *)0 )); + ::cppu::OTypeCollection aTypes( cppu::UnoType<com::sun::star::beans::XMultiPropertySet>::get(), + cppu::UnoType<com::sun::star::beans::XFastPropertySet>::get(), + cppu::UnoType<com::sun::star::beans::XPropertySet>::get()); return ::comphelper::concatSequences(aTypes.getTypes(),ODatabaseMetaDataResultSet_BASE::getTypes()); } diff --git a/connectivity/source/drivers/ado/APreparedStatement.cxx b/connectivity/source/drivers/ado/APreparedStatement.cxx index 31ed7ac31cc4..03f49802f326 100644 --- a/connectivity/source/drivers/ado/APreparedStatement.cxx +++ b/connectivity/source/drivers/ado/APreparedStatement.cxx @@ -104,10 +104,10 @@ Any SAL_CALL OPreparedStatement::queryInterface( const Type & rType ) throw(Runt ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL OPreparedStatement::getTypes( ) throw(::com::sun::star::uno::RuntimeException) { - ::cppu::OTypeCollection aTypes( ::getCppuType( (const ::com::sun::star::uno::Reference< XPreparedStatement > *)0 ), - ::getCppuType( (const ::com::sun::star::uno::Reference< XParameters > *)0 ), - ::getCppuType( (const ::com::sun::star::uno::Reference< XResultSetMetaDataSupplier > *)0 ), - ::getCppuType( (const ::com::sun::star::uno::Reference< XPreparedBatchExecution > *)0 )); + ::cppu::OTypeCollection aTypes( cppu::UnoType<XPreparedStatement>::get(), + cppu::UnoType<XParameters>::get(), + cppu::UnoType<XResultSetMetaDataSupplier>::get(), + cppu::UnoType<XPreparedBatchExecution>::get()); return ::comphelper::concatSequences(aTypes.getTypes(),OStatement_Base::getTypes()); } diff --git a/connectivity/source/drivers/ado/AResultSet.cxx b/connectivity/source/drivers/ado/AResultSet.cxx index f5db7bf2f307..4a5dd491dfe6 100644 --- a/connectivity/source/drivers/ado/AResultSet.cxx +++ b/connectivity/source/drivers/ado/AResultSet.cxx @@ -139,9 +139,9 @@ Any SAL_CALL OResultSet::queryInterface( const Type & rType ) throw(RuntimeExcep ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL OResultSet::getTypes( ) throw(::com::sun::star::uno::RuntimeException) { - ::cppu::OTypeCollection aTypes( ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XMultiPropertySet > *)0 ), - ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XFastPropertySet > *)0 ), - ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > *)0 )); + ::cppu::OTypeCollection aTypes( cppu::UnoType<com::sun::star::beans::XMultiPropertySet>::get(), + cppu::UnoType<com::sun::star::beans::XFastPropertySet>::get(), + cppu::UnoType<com::sun::star::beans::XPropertySet>::get()); return ::comphelper::concatSequences(aTypes.getTypes(),OResultSet_BASE::getTypes()); } diff --git a/connectivity/source/drivers/ado/AStatement.cxx b/connectivity/source/drivers/ado/AStatement.cxx index 03e06a0a0b93..9351a2f4fa32 100644 --- a/connectivity/source/drivers/ado/AStatement.cxx +++ b/connectivity/source/drivers/ado/AStatement.cxx @@ -122,9 +122,9 @@ Any SAL_CALL OStatement_Base::queryInterface( const Type & rType ) throw(Runtime ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL OStatement_Base::getTypes( ) throw(::com::sun::star::uno::RuntimeException) { - ::cppu::OTypeCollection aTypes( ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XMultiPropertySet > *)0 ), - ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XFastPropertySet > *)0 ), - ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > *)0 )); + ::cppu::OTypeCollection aTypes( cppu::UnoType<com::sun::star::beans::XMultiPropertySet>::get(), + cppu::UnoType<com::sun::star::beans::XFastPropertySet>::get(), + cppu::UnoType<com::sun::star::beans::XPropertySet>::get()); return ::comphelper::concatSequences(aTypes.getTypes(),OStatement_BASE::getTypes()); } diff --git a/connectivity/source/drivers/ado/Aolevariant.cxx b/connectivity/source/drivers/ado/Aolevariant.cxx index 02e6fa268a59..78ad0d07ae95 100644 --- a/connectivity/source/drivers/ado/Aolevariant.cxx +++ b/connectivity/source/drivers/ado/Aolevariant.cxx @@ -734,22 +734,22 @@ SAFEARRAY* OLEVariant::getUI1SAFEARRAYPtr() const break; } case VT_I1: - aValue.setValue( & cVal, getCppuType((sal_Int8*)0)); + aValue.setValue( & cVal, cppu::UnoType<sal_Int8>::get()); break; case VT_UI1: // there is no unsigned char in UNO - aValue.setValue( & bVal, getCppuType( (sal_Int8*)0)); + aValue.setValue( & bVal, cppu::UnoType<sal_Int8>::get()); break; case VT_UI2: - aValue.setValue( & uiVal, getCppuType( (sal_uInt16*)0)); + aValue.setValue( & uiVal, cppu::UnoType<cppu::UnoUnsignedShortType>::get()); break; case VT_UI4: - aValue.setValue( & ulVal, getCppuType( (sal_uInt32*)0)); + aValue.setValue( & ulVal, cppu::UnoType<sal_uInt32>::get()); break; case VT_INT: aValue.setValue( & intVal, cppu::UnoType<sal_Int32>::get()); break; case VT_UINT: - aValue.setValue( & uintVal, getCppuType( (sal_uInt32*)0)); + aValue.setValue( & uintVal, cppu::UnoType<sal_uInt32>::get()); break; case VT_VOID: aValue.setValue( NULL, Type()); diff --git a/connectivity/source/drivers/calc/CTable.cxx b/connectivity/source/drivers/calc/CTable.cxx index 7910c1031ed4..87ee744f52f9 100644 --- a/connectivity/source/drivers/calc/CTable.cxx +++ b/connectivity/source/drivers/calc/CTable.cxx @@ -659,14 +659,14 @@ Sequence< Type > SAL_CALL OCalcTable::getTypes( ) throw(RuntimeException, std:: const Type* pEnd = pBegin + aTypes.getLength(); for(;pBegin != pEnd;++pBegin) { - if(!( *pBegin == ::getCppuType((const Reference<XKeysSupplier>*)0) || - *pBegin == ::getCppuType((const Reference<XIndexesSupplier>*)0) || - *pBegin == ::getCppuType((const Reference<XRename>*)0) || - *pBegin == ::getCppuType((const Reference<XAlterTable>*)0) || - *pBegin == ::getCppuType((const Reference<XDataDescriptorFactory>*)0))) + if(!( *pBegin == cppu::UnoType<XKeysSupplier>::get()|| + *pBegin == cppu::UnoType<XIndexesSupplier>::get()|| + *pBegin == cppu::UnoType<XRename>::get()|| + *pBegin == cppu::UnoType<XAlterTable>::get()|| + *pBegin == cppu::UnoType<XDataDescriptorFactory>::get())) aOwnTypes.push_back(*pBegin); } - aOwnTypes.push_back(::getCppuType( (const Reference< ::com::sun::star::lang::XUnoTunnel > *)0 )); + aOwnTypes.push_back(cppu::UnoType<com::sun::star::lang::XUnoTunnel>::get()); const Type* pAttrs = aOwnTypes.empty() ? 0 : &aOwnTypes[0]; return Sequence< Type >(pAttrs, aOwnTypes.size()); @@ -675,11 +675,11 @@ Sequence< Type > SAL_CALL OCalcTable::getTypes( ) throw(RuntimeException, std:: Any SAL_CALL OCalcTable::queryInterface( const Type & rType ) throw(RuntimeException, std::exception) { - if( rType == ::getCppuType((const Reference<XKeysSupplier>*)0) || - rType == ::getCppuType((const Reference<XIndexesSupplier>*)0) || - rType == ::getCppuType((const Reference<XRename>*)0) || - rType == ::getCppuType((const Reference<XAlterTable>*)0) || - rType == ::getCppuType((const Reference<XDataDescriptorFactory>*)0)) + if( rType == cppu::UnoType<XKeysSupplier>::get()|| + rType == cppu::UnoType<XIndexesSupplier>::get()|| + rType == cppu::UnoType<XRename>::get()|| + rType == cppu::UnoType<XAlterTable>::get()|| + rType == cppu::UnoType<XDataDescriptorFactory>::get()) return Any(); const Any aRet = ::cppu::queryInterface(rType,static_cast< ::com::sun::star::lang::XUnoTunnel*> (this)); diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx index 9dd02ba42865..ef07b2689dc1 100644 --- a/connectivity/source/drivers/dbase/DTable.cxx +++ b/connectivity/source/drivers/dbase/DTable.cxx @@ -718,13 +718,13 @@ Sequence< Type > SAL_CALL ODbaseTable::getTypes( ) throw(RuntimeException, std: const Type* pEnd = pBegin + aTypes.getLength(); for(;pBegin != pEnd;++pBegin) { - if(!(*pBegin == ::getCppuType((const Reference<XKeysSupplier>*)0) || - *pBegin == ::getCppuType((const Reference<XDataDescriptorFactory>*)0))) + if(!(*pBegin == cppu::UnoType<XKeysSupplier>::get()|| + *pBegin == cppu::UnoType<XDataDescriptorFactory>::get())) { aOwnTypes.push_back(*pBegin); } } - aOwnTypes.push_back(::getCppuType( (const Reference< ::com::sun::star::lang::XUnoTunnel > *)0 )); + aOwnTypes.push_back(cppu::UnoType<com::sun::star::lang::XUnoTunnel>::get()); Type *pTypes = aOwnTypes.empty() ? 0 : &aOwnTypes[0]; return Sequence< Type >(pTypes, aOwnTypes.size()); } @@ -732,8 +732,8 @@ Sequence< Type > SAL_CALL ODbaseTable::getTypes( ) throw(RuntimeException, std: Any SAL_CALL ODbaseTable::queryInterface( const Type & rType ) throw(RuntimeException, std::exception) { - if( rType == ::getCppuType((const Reference<XKeysSupplier>*)0) || - rType == ::getCppuType((const Reference<XDataDescriptorFactory>*)0)) + if( rType == cppu::UnoType<XKeysSupplier>::get()|| + rType == cppu::UnoType<XDataDescriptorFactory>::get()) return Any(); Any aRet = OTable_TYPEDEF::queryInterface(rType); diff --git a/connectivity/source/drivers/evoab2/NStatement.cxx b/connectivity/source/drivers/evoab2/NStatement.cxx index 7c3458b3d2c2..a0b2ccf48795 100644 --- a/connectivity/source/drivers/evoab2/NStatement.cxx +++ b/connectivity/source/drivers/evoab2/NStatement.cxx @@ -125,9 +125,9 @@ Any SAL_CALL OCommonStatement::queryInterface( const Type & rType ) throw(Runtim Sequence< Type > SAL_CALL OCommonStatement::getTypes( ) throw(RuntimeException, std::exception) { - ::cppu::OTypeCollection aTypes( ::getCppuType( (const Reference< XMultiPropertySet > *)0 ), - ::getCppuType( (const Reference< XFastPropertySet > *)0 ), - ::getCppuType( (const Reference< XPropertySet > *)0 )); + ::cppu::OTypeCollection aTypes( cppu::UnoType<XMultiPropertySet>::get(), + cppu::UnoType<XFastPropertySet>::get(), + cppu::UnoType<XPropertySet>::get()); return ::comphelper::concatSequences(aTypes.getTypes(),OCommonStatement_IBase::getTypes()); } diff --git a/connectivity/source/drivers/file/FCatalog.cxx b/connectivity/source/drivers/file/FCatalog.cxx index 2026f4244d78..079f53b84fc6 100644 --- a/connectivity/source/drivers/file/FCatalog.cxx +++ b/connectivity/source/drivers/file/FCatalog.cxx @@ -68,9 +68,9 @@ void OFileCatalog::refreshTables() Any SAL_CALL OFileCatalog::queryInterface( const Type & rType ) throw(RuntimeException, std::exception) { - if( rType == ::getCppuType((const Reference<XGroupsSupplier>*)0) || - rType == ::getCppuType((const Reference<XUsersSupplier>*)0) || - rType == ::getCppuType((const Reference<XViewsSupplier>*)0)) + if( rType == cppu::UnoType<XGroupsSupplier>::get()|| + rType == cppu::UnoType<XUsersSupplier>::get()|| + rType == cppu::UnoType<XViewsSupplier>::get()) return Any(); @@ -89,9 +89,9 @@ Sequence< Type > SAL_CALL OFileCatalog::getTypes( ) throw(RuntimeException, std const Type* pEnd = pBegin + aTypes.getLength(); for(;pBegin != pEnd;++pBegin) { - if(!(*pBegin == ::getCppuType((const Reference<XGroupsSupplier>*)0) || - *pBegin == ::getCppuType((const Reference<XUsersSupplier>*)0) || - *pBegin == ::getCppuType((const Reference<XViewsSupplier>*)0))) + if(!(*pBegin == cppu::UnoType<XGroupsSupplier>::get()|| + *pBegin == cppu::UnoType<XUsersSupplier>::get()|| + *pBegin == cppu::UnoType<XViewsSupplier>::get())) { aOwnTypes.push_back(*pBegin); } diff --git a/connectivity/source/drivers/file/FPreparedStatement.cxx b/connectivity/source/drivers/file/FPreparedStatement.cxx index 6fb706bde90a..89bab271c50c 100644 --- a/connectivity/source/drivers/file/FPreparedStatement.cxx +++ b/connectivity/source/drivers/file/FPreparedStatement.cxx @@ -121,9 +121,9 @@ Any SAL_CALL OPreparedStatement::queryInterface( const Type & rType ) throw(Runt ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL OPreparedStatement::getTypes( ) throw(::com::sun::star::uno::RuntimeException, std::exception) { - ::cppu::OTypeCollection aTypes( ::getCppuType( (const ::com::sun::star::uno::Reference< XPreparedStatement > *)0 ), - ::getCppuType( (const ::com::sun::star::uno::Reference< XParameters > *)0 ), - ::getCppuType( (const ::com::sun::star::uno::Reference< XResultSetMetaDataSupplier > *)0 )); + ::cppu::OTypeCollection aTypes( cppu::UnoType<XPreparedStatement>::get(), + cppu::UnoType<XParameters>::get(), + cppu::UnoType<XResultSetMetaDataSupplier>::get()); return ::comphelper::concatSequences(aTypes.getTypes(),OStatement_BASE2::getTypes()); } diff --git a/connectivity/source/drivers/file/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx index aece696e95b8..4f454e3fd6aa 100644 --- a/connectivity/source/drivers/file/FResultSet.cxx +++ b/connectivity/source/drivers/file/FResultSet.cxx @@ -179,9 +179,9 @@ Sequence< Type > SAL_CALL OResultSet::getTypes( ) throw(RuntimeException, std:: { ::osl::MutexGuard aGuard( m_aMutex ); - OTypeCollection aTypes( ::getCppuType( (const Reference< ::com::sun::star::beans::XMultiPropertySet > *)0 ), - ::getCppuType( (const Reference< ::com::sun::star::beans::XPropertySet > *)0 ), - ::getCppuType( (const Reference< ::com::sun::star::beans::XPropertySet > *)0 )); + OTypeCollection aTypes( cppu::UnoType<com::sun::star::beans::XMultiPropertySet>::get(), + cppu::UnoType<com::sun::star::beans::XPropertySet>::get(), + cppu::UnoType<com::sun::star::beans::XPropertySet>::get()); return ::comphelper::concatSequences(aTypes.getTypes(),OResultSet_BASE::getTypes()); } @@ -1154,7 +1154,7 @@ void OResultSet::sortRows() // is just one field given for sorting // and this field is indexed, then the Index will be used Reference<XIndexesSupplier> xIndexSup; - m_pTable->queryInterface(::getCppuType((const Reference<XIndexesSupplier>*)0)) >>= xIndexSup; + m_pTable->queryInterface(cppu::UnoType<XIndexesSupplier>::get()) >>= xIndexSup; Reference<XIndexAccess> xIndexes; if(xIndexSup.is()) diff --git a/connectivity/source/drivers/file/FStatement.cxx b/connectivity/source/drivers/file/FStatement.cxx index a95af1c609f4..031b81f4c7ae 100644 --- a/connectivity/source/drivers/file/FStatement.cxx +++ b/connectivity/source/drivers/file/FStatement.cxx @@ -151,9 +151,9 @@ Any SAL_CALL OStatement_Base::queryInterface( const Type & rType ) throw(Runtime Sequence< Type > SAL_CALL OStatement_Base::getTypes( ) throw(RuntimeException, std::exception) { - ::cppu::OTypeCollection aTypes( ::getCppuType( (const Reference< ::com::sun::star::beans::XMultiPropertySet > *)0 ), - ::getCppuType( (const Reference< ::com::sun::star::beans::XFastPropertySet > *)0 ), - ::getCppuType( (const Reference< ::com::sun::star::beans::XPropertySet > *)0 )); + ::cppu::OTypeCollection aTypes( cppu::UnoType<com::sun::star::beans::XMultiPropertySet>::get(), + cppu::UnoType<com::sun::star::beans::XFastPropertySet>::get(), + cppu::UnoType<com::sun::star::beans::XPropertySet>::get()); return ::comphelper::concatSequences(aTypes.getTypes(),OStatement_BASE::getTypes()); } diff --git a/connectivity/source/drivers/file/FTable.cxx b/connectivity/source/drivers/file/FTable.cxx index 70e7c2d2dd64..4abbcbdf4dca 100644 --- a/connectivity/source/drivers/file/FTable.cxx +++ b/connectivity/source/drivers/file/FTable.cxx @@ -107,11 +107,11 @@ void OFileTable::refreshIndexes() Any SAL_CALL OFileTable::queryInterface( const Type & rType ) throw(RuntimeException, std::exception) { - if( rType == ::getCppuType((const Reference<XKeysSupplier>*)0) || - rType == ::getCppuType((const Reference<XRename>*)0) || - rType == ::getCppuType((const Reference<XAlterTable>*)0) || - rType == ::getCppuType((const Reference<XIndexesSupplier>*)0) || - rType == ::getCppuType((const Reference<XDataDescriptorFactory>*)0)) + if( rType == cppu::UnoType<XKeysSupplier>::get()|| + rType == cppu::UnoType<XRename>::get()|| + rType == cppu::UnoType<XAlterTable>::get()|| + rType == cppu::UnoType<XIndexesSupplier>::get()|| + rType == cppu::UnoType<XDataDescriptorFactory>::get()) return Any(); return OTable_TYPEDEF::queryInterface(rType); diff --git a/connectivity/source/drivers/file/FTables.cxx b/connectivity/source/drivers/file/FTables.cxx index acff3d59142b..ae5f2cb7cf87 100644 --- a/connectivity/source/drivers/file/FTables.cxx +++ b/connectivity/source/drivers/file/FTables.cxx @@ -53,10 +53,10 @@ m_xMetaData.clear(); Any SAL_CALL OTables::queryInterface( const Type & rType ) throw(RuntimeException, std::exception) { - if( rType == ::getCppuType((const Reference<XColumnLocate>*)0) || - rType == ::getCppuType((const Reference<XDataDescriptorFactory>*)0) || - rType == ::getCppuType((const Reference<XAppend>*)0) || - rType == ::getCppuType((const Reference<XDrop>*)0)) + if( rType == cppu::UnoType<XColumnLocate>::get()|| + rType == cppu::UnoType<XDataDescriptorFactory>::get()|| + rType == cppu::UnoType<XAppend>::get()|| + rType == cppu::UnoType<XDrop>::get()) return Any(); typedef sdbcx::OCollection OTables_BASE; diff --git a/connectivity/source/drivers/flat/EResultSet.cxx b/connectivity/source/drivers/flat/EResultSet.cxx index 3d743a93af92..a9a8bc54130e 100644 --- a/connectivity/source/drivers/flat/EResultSet.cxx +++ b/connectivity/source/drivers/flat/EResultSet.cxx @@ -64,8 +64,8 @@ sal_Bool SAL_CALL OFlatResultSet::supportsService( const OUString& _rServiceName Any SAL_CALL OFlatResultSet::queryInterface( const Type & rType ) throw(RuntimeException, std::exception) { - if(rType == ::getCppuType((const Reference<XDeleteRows>*)0) || rType == ::getCppuType((const Reference<XResultSetUpdate>*)0) - || rType == ::getCppuType((const Reference<XRowUpdate>*)0)) + if(rType == cppu::UnoType<XDeleteRows>::get()|| rType == cppu::UnoType<XResultSetUpdate>::get() + || rType == cppu::UnoType<XRowUpdate>::get()) return Any(); const Any aRet = OResultSet::queryInterface(rType); @@ -81,9 +81,9 @@ Sequence< Type > SAL_CALL OFlatResultSet::getTypes( ) throw( RuntimeException, const Type* pEnd = pBegin + aTypes.getLength(); for(;pBegin != pEnd;++pBegin) { - if(!(*pBegin == ::getCppuType((const Reference<XDeleteRows>*)0) || - *pBegin == ::getCppuType((const Reference<XResultSetUpdate>*)0) || - *pBegin == ::getCppuType((const Reference<XRowUpdate>*)0))) + if(!(*pBegin == cppu::UnoType<XDeleteRows>::get()|| + *pBegin == cppu::UnoType<XResultSetUpdate>::get()|| + *pBegin == cppu::UnoType<XRowUpdate>::get())) { aOwnTypes.push_back(*pBegin); } diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx index 2b4a75f47365..7059cb2d18a8 100644 --- a/connectivity/source/drivers/flat/ETable.cxx +++ b/connectivity/source/drivers/flat/ETable.cxx @@ -543,11 +543,11 @@ Sequence< Type > SAL_CALL OFlatTable::getTypes( ) throw(RuntimeException, std:: const Type* pEnd = pBegin + aTypes.getLength(); for(;pBegin != pEnd;++pBegin) { - if(!(*pBegin == ::getCppuType((const Reference<XKeysSupplier>*)0) || - *pBegin == ::getCppuType((const Reference<XRename>*)0) || - *pBegin == ::getCppuType((const Reference<XIndexesSupplier>*)0) || - *pBegin == ::getCppuType((const Reference<XAlterTable>*)0) || - *pBegin == ::getCppuType((const Reference<XDataDescriptorFactory>*)0))) + if(!(*pBegin == cppu::UnoType<XKeysSupplier>::get()|| + *pBegin == cppu::UnoType<XRename>::get()|| + *pBegin == cppu::UnoType<XIndexesSupplier>::get()|| + *pBegin == cppu::UnoType<XAlterTable>::get()|| + *pBegin == cppu::UnoType<XDataDescriptorFactory>::get())) { aOwnTypes.push_back(*pBegin); } @@ -559,11 +559,11 @@ Sequence< Type > SAL_CALL OFlatTable::getTypes( ) throw(RuntimeException, std:: Any SAL_CALL OFlatTable::queryInterface( const Type & rType ) throw(RuntimeException, std::exception) { - if( rType == ::getCppuType((const Reference<XKeysSupplier>*)0) || - rType == ::getCppuType((const Reference<XIndexesSupplier>*)0) || - rType == ::getCppuType((const Reference<XRename>*)0) || - rType == ::getCppuType((const Reference<XAlterTable>*)0) || - rType == ::getCppuType((const Reference<XDataDescriptorFactory>*)0)) + if( rType == cppu::UnoType<XKeysSupplier>::get()|| + rType == cppu::UnoType<XIndexesSupplier>::get()|| + rType == cppu::UnoType<XRename>::get()|| + rType == cppu::UnoType<XAlterTable>::get()|| + rType == cppu::UnoType<XDataDescriptorFactory>::get()) return Any(); Any aRet = OTable_TYPEDEF::queryInterface(rType); diff --git a/connectivity/source/drivers/hsqldb/HCatalog.cxx b/connectivity/source/drivers/hsqldb/HCatalog.cxx index 25529f81c36b..9a87f6e0bdae 100644 --- a/connectivity/source/drivers/hsqldb/HCatalog.cxx +++ b/connectivity/source/drivers/hsqldb/HCatalog.cxx @@ -127,7 +127,7 @@ void OHCatalog::refreshUsers() Any SAL_CALL OHCatalog::queryInterface( const Type & rType ) throw(RuntimeException, std::exception) { - if ( rType == ::getCppuType((const Reference<XGroupsSupplier>*)0) ) + if ( rType == cppu::UnoType<XGroupsSupplier>::get()) return Any(); return OCatalog::queryInterface(rType); @@ -142,7 +142,7 @@ Sequence< Type > SAL_CALL OHCatalog::getTypes( ) throw(RuntimeException, std::e const Type* pEnd = pBegin + aTypes.getLength(); for(;pBegin != pEnd;++pBegin) { - if ( !(*pBegin == ::getCppuType((const Reference<XGroupsSupplier>*)0))) + if ( !(*pBegin == cppu::UnoType<XGroupsSupplier>::get())) { aOwnTypes.push_back(*pBegin); } diff --git a/connectivity/source/drivers/hsqldb/HTable.cxx b/connectivity/source/drivers/hsqldb/HTable.cxx index 6ee8f5bf77a4..4e7b9654a84d 100644 --- a/connectivity/source/drivers/hsqldb/HTable.cxx +++ b/connectivity/source/drivers/hsqldb/HTable.cxx @@ -351,7 +351,7 @@ Sequence< Type > SAL_CALL OHSQLTable::getTypes( ) throw(RuntimeException, std:: const Type* pEnd = pIter + aTypes.getLength(); for(;pIter != pEnd;++pIter) { - if( *pIter != ::getCppuType((const Reference<XRename>*)0) ) + if( *pIter != cppu::UnoType<XRename>::get()) { aOwnTypes.push_back(*pIter); } @@ -401,7 +401,7 @@ void SAL_CALL OHSQLTable::rename( const OUString& newName ) throw(SQLException, Any SAL_CALL OHSQLTable::queryInterface( const Type & rType ) throw(RuntimeException, std::exception) { - if( m_Type.equalsAscii("VIEW") && rType == ::getCppuType((const Reference<XRename>*)0) ) + if( m_Type.equalsAscii("VIEW") && rType == cppu::UnoType<XRename>::get()) return Any(); return OTableHelper::queryInterface(rType); diff --git a/connectivity/source/drivers/jdbc/CallableStatement.cxx b/connectivity/source/drivers/jdbc/CallableStatement.cxx index a39bab042593..bb16548c2e70 100644 --- a/connectivity/source/drivers/jdbc/CallableStatement.cxx +++ b/connectivity/source/drivers/jdbc/CallableStatement.cxx @@ -61,8 +61,8 @@ Any SAL_CALL java_sql_CallableStatement::queryInterface( const Type & rType ) th ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL java_sql_CallableStatement::getTypes( ) throw(::com::sun::star::uno::RuntimeException, std::exception) { - ::cppu::OTypeCollection aTypes( ::getCppuType( (const ::com::sun::star::uno::Reference< starsdbc::XRow > *)0 ), - ::getCppuType( (const ::com::sun::star::uno::Reference< starsdbc::XOutParameters > *)0 )); + ::cppu::OTypeCollection aTypes( cppu::UnoType<starsdbc::XRow>::get(), + cppu::UnoType<starsdbc::XOutParameters>::get()); return ::comphelper::concatSequences(aTypes.getTypes(),java_sql_PreparedStatement::getTypes()); } diff --git a/connectivity/source/drivers/jdbc/JStatement.cxx b/connectivity/source/drivers/jdbc/JStatement.cxx index 060ae0f251e3..7154cd9b0252 100644 --- a/connectivity/source/drivers/jdbc/JStatement.cxx +++ b/connectivity/source/drivers/jdbc/JStatement.cxx @@ -121,7 +121,7 @@ void SAL_CALL OStatement_BASE2::release() throw() Any SAL_CALL java_sql_Statement_Base::queryInterface( const Type & rType ) throw(RuntimeException, std::exception) { - if ( m_pConnection && !m_pConnection->isAutoRetrievingEnabled() && rType == ::getCppuType( (const Reference< XGeneratedResultSet > *)0 ) ) + if ( m_pConnection && !m_pConnection->isAutoRetrievingEnabled() && rType == cppu::UnoType<XGeneratedResultSet>::get()) return Any(); Any aRet( java_sql_Statement_BASE::queryInterface(rType) ); return aRet.hasValue() ? aRet : OPropertySetHelper::queryInterface(rType); @@ -129,15 +129,15 @@ Any SAL_CALL java_sql_Statement_Base::queryInterface( const Type & rType ) throw Sequence< Type > SAL_CALL java_sql_Statement_Base::getTypes( ) throw(RuntimeException, std::exception) { - ::cppu::OTypeCollection aTypes( ::getCppuType( (const Reference< ::com::sun::star::beans::XMultiPropertySet > *)0 ), - ::getCppuType( (const Reference< ::com::sun::star::beans::XFastPropertySet > *)0 ), - ::getCppuType( (const Reference< ::com::sun::star::beans::XPropertySet > *)0 )); + ::cppu::OTypeCollection aTypes( cppu::UnoType<com::sun::star::beans::XMultiPropertySet>::get(), + cppu::UnoType<com::sun::star::beans::XFastPropertySet>::get(), + cppu::UnoType<com::sun::star::beans::XPropertySet>::get()); Sequence< Type > aOldTypes = java_sql_Statement_BASE::getTypes(); if ( m_pConnection && !m_pConnection->isAutoRetrievingEnabled() ) { ::std::remove(aOldTypes.getArray(),aOldTypes.getArray() + aOldTypes.getLength(), - ::getCppuType( (const Reference< XGeneratedResultSet > *)0 )); + cppu::UnoType<XGeneratedResultSet>::get()); aOldTypes.realloc(aOldTypes.getLength() - 1); } diff --git a/connectivity/source/drivers/jdbc/PreparedStatement.cxx b/connectivity/source/drivers/jdbc/PreparedStatement.cxx index d9e97d52a003..2ebd437c2752 100644 --- a/connectivity/source/drivers/jdbc/PreparedStatement.cxx +++ b/connectivity/source/drivers/jdbc/PreparedStatement.cxx @@ -82,10 +82,10 @@ jclass java_sql_PreparedStatement::getMyClass() const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL java_sql_PreparedStatement::getTypes( ) throw(::com::sun::star::uno::RuntimeException, std::exception) { - ::cppu::OTypeCollection aTypes( ::getCppuType( (const ::com::sun::star::uno::Reference< XPreparedStatement > *)0 ), - ::getCppuType( (const ::com::sun::star::uno::Reference< XParameters > *)0 ), - ::getCppuType( (const ::com::sun::star::uno::Reference< XResultSetMetaDataSupplier > *)0 ), - ::getCppuType( (const ::com::sun::star::uno::Reference< XPreparedBatchExecution > *)0 )); + ::cppu::OTypeCollection aTypes( cppu::UnoType<XPreparedStatement>::get(), + cppu::UnoType<XParameters>::get(), + cppu::UnoType<XResultSetMetaDataSupplier>::get(), + cppu::UnoType<XPreparedBatchExecution>::get()); return ::comphelper::concatSequences(aTypes.getTypes(),OStatement_BASE2::getTypes()); } diff --git a/connectivity/source/drivers/jdbc/ResultSet.cxx b/connectivity/source/drivers/jdbc/ResultSet.cxx index b247671fe587..6d327c1db7ec 100644 --- a/connectivity/source/drivers/jdbc/ResultSet.cxx +++ b/connectivity/source/drivers/jdbc/ResultSet.cxx @@ -122,9 +122,9 @@ m_xMetaData.clear(); ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL java_sql_ResultSet::getTypes( ) throw(::com::sun::star::uno::RuntimeException, std::exception) { - ::cppu::OTypeCollection aTypes( ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XMultiPropertySet > *)0 ), - ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XFastPropertySet > *)0 ), - ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > *)0 )); + ::cppu::OTypeCollection aTypes( cppu::UnoType<com::sun::star::beans::XMultiPropertySet>::get(), + cppu::UnoType<com::sun::star::beans::XFastPropertySet>::get(), + cppu::UnoType<com::sun::star::beans::XPropertySet>::get()); return ::comphelper::concatSequences(aTypes.getTypes(),java_sql_ResultSet_BASE::getTypes()); } diff --git a/connectivity/source/drivers/kab/KResultSet.cxx b/connectivity/source/drivers/kab/KResultSet.cxx index d13e3dcddd06..ad7f98cb93e2 100644 --- a/connectivity/source/drivers/kab/KResultSet.cxx +++ b/connectivity/source/drivers/kab/KResultSet.cxx @@ -137,9 +137,9 @@ void SAL_CALL KabResultSet::release() throw() Sequence< Type > SAL_CALL KabResultSet::getTypes() throw(RuntimeException, std::exception) { OTypeCollection aTypes( - ::getCppuType( (const Reference< ::com::sun::star::beans::XMultiPropertySet >*) 0), - ::getCppuType( (const Reference< ::com::sun::star::beans::XFastPropertySet >*) 0), - ::getCppuType( (const Reference< ::com::sun::star::beans::XPropertySet >*) 0)); + cppu::UnoType<com::sun::star::beans::XMultiPropertySet>::get(), + cppu::UnoType<com::sun::star::beans::XFastPropertySet>::get(), + cppu::UnoType<com::sun::star::beans::XPropertySet>::get()); return comphelper::concatSequences(aTypes.getTypes(), KabResultSet_BASE::getTypes()); } diff --git a/connectivity/source/drivers/kab/KStatement.cxx b/connectivity/source/drivers/kab/KStatement.cxx index 5bf7d8e6a427..65dcb06d1b45 100644 --- a/connectivity/source/drivers/kab/KStatement.cxx +++ b/connectivity/source/drivers/kab/KStatement.cxx @@ -362,9 +362,9 @@ Any SAL_CALL KabCommonStatement::queryInterface( const Type & rType ) throw(Runt Sequence< Type > SAL_CALL KabCommonStatement::getTypes( ) throw(RuntimeException, std::exception) { - ::cppu::OTypeCollection aTypes( ::getCppuType( (const Reference< XMultiPropertySet > *)0 ), - ::getCppuType( (const Reference< XFastPropertySet > *)0 ), - ::getCppuType( (const Reference< XPropertySet > *)0 )); + ::cppu::OTypeCollection aTypes( cppu::UnoType<XMultiPropertySet>::get(), + cppu::UnoType<XFastPropertySet>::get(), + cppu::UnoType<XPropertySet>::get()); return comphelper::concatSequences(aTypes.getTypes(),KabCommonStatement_BASE::getTypes()); } diff --git a/connectivity/source/drivers/macab/MacabResultSet.cxx b/connectivity/source/drivers/macab/MacabResultSet.cxx index d0206dfcbe23..0e3aee4c47cc 100644 --- a/connectivity/source/drivers/macab/MacabResultSet.cxx +++ b/connectivity/source/drivers/macab/MacabResultSet.cxx @@ -163,9 +163,9 @@ void SAL_CALL MacabResultSet::release() throw() Sequence< Type > SAL_CALL MacabResultSet::getTypes() throw(RuntimeException) { OTypeCollection aTypes( - ::getCppuType( (const Reference< ::com::sun::star::beans::XMultiPropertySet >*) 0), - ::getCppuType( (const Reference< ::com::sun::star::beans::XFastPropertySet >*) 0), - ::getCppuType( (const Reference< ::com::sun::star::beans::XPropertySet >*) 0)); + cppu::UnoType<com::sun::star::beans::XMultiPropertySet>::get(), + cppu::UnoType<com::sun::star::beans::XFastPropertySet>::get(), + cppu::UnoType<com::sun::star::beans::XPropertySet>::get()); return comphelper::concatSequences(aTypes.getTypes(), MacabResultSet_BASE::getTypes()); } diff --git a/connectivity/source/drivers/macab/MacabStatement.cxx b/connectivity/source/drivers/macab/MacabStatement.cxx index 87b279933323..0fb2105a69c9 100644 --- a/connectivity/source/drivers/macab/MacabStatement.cxx +++ b/connectivity/source/drivers/macab/MacabStatement.cxx @@ -372,9 +372,9 @@ Any SAL_CALL MacabCommonStatement::queryInterface( const Type & rType ) throw(Ru Sequence< Type > SAL_CALL MacabCommonStatement::getTypes( ) throw(RuntimeException, std::exception) { - ::cppu::OTypeCollection aTypes( ::getCppuType( (const Reference< XMultiPropertySet > *)0 ), - ::getCppuType( (const Reference< XFastPropertySet > *)0 ), - ::getCppuType( (const Reference< XPropertySet > *)0 )); + ::cppu::OTypeCollection aTypes( cppu::UnoType<XMultiPropertySet>::get(), + cppu::UnoType<XFastPropertySet>::get(), + cppu::UnoType<XPropertySet>::get()); return comphelper::concatSequences(aTypes.getTypes(),MacabCommonStatement_BASE::getTypes()); } diff --git a/connectivity/source/drivers/mork/MResultSet.cxx b/connectivity/source/drivers/mork/MResultSet.cxx index c85e8426b41c..0473655469a0 100644 --- a/connectivity/source/drivers/mork/MResultSet.cxx +++ b/connectivity/source/drivers/mork/MResultSet.cxx @@ -146,9 +146,9 @@ Any SAL_CALL OResultSet::queryInterface( const Type & rType ) throw(RuntimeExcep Sequence< Type > SAL_CALL OResultSet::getTypes( ) throw( RuntimeException, std::exception) { - OTypeCollection aTypes( ::getCppuType( (const Reference< ::com::sun::star::beans::XMultiPropertySet > *)0 ), - ::getCppuType( (const Reference< ::com::sun::star::beans::XFastPropertySet > *)0 ), - ::getCppuType( (const Reference< ::com::sun::star::beans::XPropertySet > *)0 )); + OTypeCollection aTypes( cppu::UnoType<com::sun::star::beans::XMultiPropertySet>::get(), + cppu::UnoType<com::sun::star::beans::XFastPropertySet>::get(), + cppu::UnoType<com::sun::star::beans::XPropertySet>::get()); return ::comphelper::concatSequences(aTypes.getTypes(),OResultSet_BASE::getTypes()); } diff --git a/connectivity/source/drivers/mork/MStatement.cxx b/connectivity/source/drivers/mork/MStatement.cxx index c9a06ffe70ac..20a30112998e 100644 --- a/connectivity/source/drivers/mork/MStatement.cxx +++ b/connectivity/source/drivers/mork/MStatement.cxx @@ -121,9 +121,9 @@ Any SAL_CALL OCommonStatement::queryInterface( const Type & rType ) throw(Runtim Sequence< Type > SAL_CALL OCommonStatement::getTypes( ) throw(RuntimeException, std::exception) { - ::cppu::OTypeCollection aTypes( ::getCppuType( (const Reference< XMultiPropertySet > *)0 ), - ::getCppuType( (const Reference< XFastPropertySet > *)0 ), - ::getCppuType( (const Reference< XPropertySet > *)0 )); + ::cppu::OTypeCollection aTypes( cppu::UnoType<XMultiPropertySet>::get(), + cppu::UnoType<XFastPropertySet>::get(), + cppu::UnoType<XPropertySet>::get()); return ::comphelper::concatSequences(aTypes.getTypes(),OCommonStatement_IBASE::getTypes()); } diff --git a/connectivity/source/drivers/mozab/MResultSet.cxx b/connectivity/source/drivers/mozab/MResultSet.cxx index a0d78de6bb11..519a1b1d69e3 100644 --- a/connectivity/source/drivers/mozab/MResultSet.cxx +++ b/connectivity/source/drivers/mozab/MResultSet.cxx @@ -144,9 +144,9 @@ Any SAL_CALL OResultSet::queryInterface( const Type & rType ) throw(RuntimeExcep Sequence< Type > SAL_CALL OResultSet::getTypes( ) throw( RuntimeException) { - OTypeCollection aTypes( ::getCppuType( (const Reference< ::com::sun::star::beans::XMultiPropertySet > *)0 ), - ::getCppuType( (const Reference< ::com::sun::star::beans::XFastPropertySet > *)0 ), - ::getCppuType( (const Reference< ::com::sun::star::beans::XPropertySet > *)0 )); + OTypeCollection aTypes( cppu::UnoType<com::sun::star::beans::XMultiPropertySet>::get(), + cppu::UnoType<com::sun::star::beans::XFastPropertySet>::get(), + cppu::UnoType<com::sun::star::beans::XPropertySet>::get()); return ::comphelper::concatSequences(aTypes.getTypes(),OResultSet_BASE::getTypes()); } diff --git a/connectivity/source/drivers/mozab/MStatement.cxx b/connectivity/source/drivers/mozab/MStatement.cxx index 56637f141c7a..84068200f777 100644 --- a/connectivity/source/drivers/mozab/MStatement.cxx +++ b/connectivity/source/drivers/mozab/MStatement.cxx @@ -116,9 +116,9 @@ Any SAL_CALL OCommonStatement::queryInterface( const Type & rType ) throw(Runtim Sequence< Type > SAL_CALL OCommonStatement::getTypes( ) throw(RuntimeException) { - ::cppu::OTypeCollection aTypes( ::getCppuType( (const Reference< XMultiPropertySet > *)0 ), - ::getCppuType( (const Reference< XFastPropertySet > *)0 ), - ::getCppuType( (const Reference< XPropertySet > *)0 )); + ::cppu::OTypeCollection aTypes( cppu::UnoType<XMultiPropertySet>::get(), + cppu::UnoType<XFastPropertySet>::get(), + cppu::UnoType<XPropertySet>::get()); return ::comphelper::concatSequences(aTypes.getTypes(),OCommonStatement_IBASE::getTypes()); } diff --git a/connectivity/source/drivers/mysql/YCatalog.cxx b/connectivity/source/drivers/mysql/YCatalog.cxx index 5510faec0050..85adabef944c 100644 --- a/connectivity/source/drivers/mysql/YCatalog.cxx +++ b/connectivity/source/drivers/mysql/YCatalog.cxx @@ -119,7 +119,7 @@ void OMySQLCatalog::refreshUsers() Any SAL_CALL OMySQLCatalog::queryInterface( const Type & rType ) throw(RuntimeException, std::exception) { - if ( rType == ::getCppuType((const Reference<XGroupsSupplier>*)0) ) + if ( rType == cppu::UnoType<XGroupsSupplier>::get()) return Any(); @@ -135,7 +135,7 @@ Sequence< Type > SAL_CALL OMySQLCatalog::getTypes( ) throw(RuntimeException, st const Type* pEnd = pBegin + aTypes.getLength(); for(;pBegin != pEnd;++pBegin) { - if ( !(*pBegin == ::getCppuType((const Reference<XGroupsSupplier>*)0))) + if ( !(*pBegin == cppu::UnoType<XGroupsSupplier>::get())) { aOwnTypes.push_back(*pBegin); } diff --git a/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx index 46ef1809b87a..7a2d3dc947d4 100644 --- a/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx +++ b/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx @@ -125,9 +125,9 @@ void SAL_CALL ODatabaseMetaDataResultSet::release() throw() Sequence< Type > SAL_CALL ODatabaseMetaDataResultSet::getTypes( ) throw(RuntimeException, std::exception) { - ::cppu::OTypeCollection aTypes( ::getCppuType( (const Reference< XMultiPropertySet > *)0 ), - ::getCppuType( (const Reference< XFastPropertySet > *)0 ), - ::getCppuType( (const Reference< XPropertySet > *)0 )); + ::cppu::OTypeCollection aTypes( cppu::UnoType<XMultiPropertySet>::get(), + cppu::UnoType<XFastPropertySet>::get(), + cppu::UnoType<XPropertySet>::get()); return ::comphelper::concatSequences(aTypes.getTypes(),ODatabaseMetaDataResultSet_BASE::getTypes()); } diff --git a/connectivity/source/drivers/odbc/OResultSet.cxx b/connectivity/source/drivers/odbc/OResultSet.cxx index 76e53b9d8f26..f5a79b0d283f 100644 --- a/connectivity/source/drivers/odbc/OResultSet.cxx +++ b/connectivity/source/drivers/odbc/OResultSet.cxx @@ -362,9 +362,9 @@ Any SAL_CALL OResultSet::queryInterface( const Type & rType ) throw(RuntimeExcep Sequence< Type > SAL_CALL OResultSet::getTypes( ) throw( RuntimeException, std::exception) { - OTypeCollection aTypes( ::getCppuType( (const Reference< ::com::sun::star::beans::XMultiPropertySet > *)0 ), - ::getCppuType( (const Reference< ::com::sun::star::beans::XFastPropertySet > *)0 ), - ::getCppuType( (const Reference< ::com::sun::star::beans::XPropertySet > *)0 )); + OTypeCollection aTypes( cppu::UnoType<com::sun::star::beans::XMultiPropertySet>::get(), + cppu::UnoType<com::sun::star::beans::XFastPropertySet>::get(), + cppu::UnoType<com::sun::star::beans::XPropertySet>::get()); return ::comphelper::concatSequences(aTypes.getTypes(),OResultSet_BASE::getTypes()); } diff --git a/connectivity/source/drivers/odbc/OStatement.cxx b/connectivity/source/drivers/odbc/OStatement.cxx index 40466b8301c8..c9391e84ecfb 100644 --- a/connectivity/source/drivers/odbc/OStatement.cxx +++ b/connectivity/source/drivers/odbc/OStatement.cxx @@ -131,7 +131,7 @@ void SAL_CALL OStatement_BASE2::release() throw() Any SAL_CALL OStatement_Base::queryInterface( const Type & rType ) throw(RuntimeException, std::exception) { - if ( m_pConnection && !m_pConnection->isAutoRetrievingEnabled() && rType == ::getCppuType( (const Reference< XGeneratedResultSet > *)0 ) ) + if ( m_pConnection && !m_pConnection->isAutoRetrievingEnabled() && rType == cppu::UnoType<XGeneratedResultSet>::get()) return Any(); Any aRet = OStatement_BASE::queryInterface(rType); return aRet.hasValue() ? aRet : OPropertySetHelper::queryInterface(rType); @@ -139,14 +139,14 @@ Any SAL_CALL OStatement_Base::queryInterface( const Type & rType ) throw(Runtime Sequence< Type > SAL_CALL OStatement_Base::getTypes( ) throw(RuntimeException, std::exception) { - ::cppu::OTypeCollection aTypes( ::getCppuType( (const Reference< XMultiPropertySet > *)0 ), - ::getCppuType( (const Reference< XFastPropertySet > *)0 ), - ::getCppuType( (const Reference< XPropertySet > *)0 )); + ::cppu::OTypeCollection aTypes( cppu::UnoType<XMultiPropertySet>::get(), + cppu::UnoType<XFastPropertySet>::get(), + cppu::UnoType<XPropertySet>::get()); Sequence< Type > aOldTypes = OStatement_BASE::getTypes(); if ( m_pConnection && !m_pConnection->isAutoRetrievingEnabled() ) { ::std::remove(aOldTypes.getArray(),aOldTypes.getArray() + aOldTypes.getLength(), - ::getCppuType( (const Reference< XGeneratedResultSet > *)0 )); + cppu::UnoType<XGeneratedResultSet>::get()); aOldTypes.realloc(aOldTypes.getLength() - 1); } diff --git a/connectivity/source/drivers/postgresql/pq_baseresultset.cxx b/connectivity/source/drivers/postgresql/pq_baseresultset.cxx index a8af6d40eb74..55a670291f77 100644 --- a/connectivity/source/drivers/postgresql/pq_baseresultset.cxx +++ b/connectivity/source/drivers/postgresql/pq_baseresultset.cxx @@ -202,14 +202,14 @@ Sequence<Type > BaseResultSet::getTypes() throw( RuntimeException, std::exceptio if( !pCollection ) { static cppu::OTypeCollection collection( - getCppuType( (Reference< XResultSet> *) 0 ), - getCppuType( (Reference< XResultSetMetaDataSupplier> *) 0 ), - getCppuType( (Reference< XRow> *) 0 ), - getCppuType( (Reference< XColumnLocate> *) 0 ), - getCppuType( (Reference< XCloseable> *) 0 ), - getCppuType( (Reference< XPropertySet >*) 0 ), - getCppuType( (Reference< XFastPropertySet > *) 0 ), - getCppuType( (Reference< XMultiPropertySet > *) 0 ), + cppu::UnoType<XResultSet>::get(), + cppu::UnoType<XResultSetMetaDataSupplier>::get(), + cppu::UnoType<XRow>::get(), + cppu::UnoType<XColumnLocate>::get(), + cppu::UnoType<XCloseable>::get(), + cppu::UnoType<XPropertySet>::get(), + cppu::UnoType<XFastPropertySet>::get(), + cppu::UnoType<XMultiPropertySet>::get(), OComponentHelper::getTypes()); pCollection = &collection; } diff --git a/connectivity/source/drivers/postgresql/pq_fakedupdateableresultset.cxx b/connectivity/source/drivers/postgresql/pq_fakedupdateableresultset.cxx index b37c3b2e03fd..78a67428baf9 100644 --- a/connectivity/source/drivers/postgresql/pq_fakedupdateableresultset.cxx +++ b/connectivity/source/drivers/postgresql/pq_fakedupdateableresultset.cxx @@ -96,8 +96,8 @@ com::sun::star::uno::Sequence< com::sun::star::uno::Type > FakedUpdateableResult if( !pCollection ) { static cppu::OTypeCollection collection( - getCppuType( (Reference< XResultSetUpdate> *) 0 ), - getCppuType( (Reference< XRowUpdate> *) 0 ), + cppu::UnoType<XResultSetUpdate>::get(), + cppu::UnoType<XRowUpdate>::get(), ResultSet::getTypes()); pCollection = &collection; } diff --git a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx index 55c0175e48fa..dcaa620eaa8f 100644 --- a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx +++ b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx @@ -269,15 +269,15 @@ Sequence< Type > PreparedStatement::getTypes() throw ( RuntimeException, std::ex if( !pCollection ) { static cppu::OTypeCollection collection( - getCppuType( (Reference< XWarningsSupplier> *) 0 ), - getCppuType( (Reference< XPreparedStatement> *) 0 ), - getCppuType( (Reference< com::sun::star::sdbc::XResultSetMetaDataSupplier> *) 0 ), - getCppuType( (Reference< XParameters> *) 0 ), - getCppuType( (Reference< XCloseable> *) 0 ), - getCppuType( (Reference< XGeneratedResultSet> *) 0 ), - getCppuType( (Reference< XPropertySet >*) 0 ), - getCppuType( (Reference< XFastPropertySet > *) 0 ), - getCppuType( (Reference< XMultiPropertySet > *) 0 ), + cppu::UnoType<XWarningsSupplier>::get(), + cppu::UnoType<XPreparedStatement>::get(), + cppu::UnoType<com::sun::star::sdbc::XResultSetMetaDataSupplier>::get(), + cppu::UnoType<XParameters>::get(), + cppu::UnoType<XCloseable>::get(), + cppu::UnoType<XGeneratedResultSet>::get(), + cppu::UnoType<XPropertySet>::get(), + cppu::UnoType<XFastPropertySet>::get(), + cppu::UnoType<XMultiPropertySet>::get(), OComponentHelper::getTypes()); pCollection = &collection; } diff --git a/connectivity/source/drivers/postgresql/pq_statement.cxx b/connectivity/source/drivers/postgresql/pq_statement.cxx index 23727dbf126a..629d362866b9 100644 --- a/connectivity/source/drivers/postgresql/pq_statement.cxx +++ b/connectivity/source/drivers/postgresql/pq_statement.cxx @@ -215,14 +215,14 @@ Sequence< Type > Statement::getTypes() throw ( RuntimeException, std::exception if( !pCollection ) { static cppu::OTypeCollection collection( - getCppuType( (Reference< XWarningsSupplier> *) 0 ), - getCppuType( (Reference< XStatement> *) 0 ), - getCppuType( (Reference< com::sun::star::sdbc::XResultSetMetaDataSupplier> *) 0 ), - getCppuType( (Reference< XCloseable> *) 0 ), - getCppuType( (Reference< XPropertySet >*) 0 ), - getCppuType( (Reference< XFastPropertySet > *) 0 ), - getCppuType( (Reference< XMultiPropertySet > *) 0 ), - getCppuType( (Reference< XGeneratedResultSet > *) 0 ), + cppu::UnoType<XWarningsSupplier>::get(), + cppu::UnoType<XStatement>::get(), + cppu::UnoType<com::sun::star::sdbc::XResultSetMetaDataSupplier>::get(), + cppu::UnoType<XCloseable>::get(), + cppu::UnoType<XPropertySet>::get(), + cppu::UnoType<XFastPropertySet>::get(), + cppu::UnoType<XMultiPropertySet>::get(), + cppu::UnoType<XGeneratedResultSet>::get(), OComponentHelper::getTypes()); pCollection = &collection; } diff --git a/connectivity/source/drivers/postgresql/pq_tools.cxx b/connectivity/source/drivers/postgresql/pq_tools.cxx index ff89568e214e..17428fd96fe2 100644 --- a/connectivity/source/drivers/postgresql/pq_tools.cxx +++ b/connectivity/source/drivers/postgresql/pq_tools.cxx @@ -1209,11 +1209,11 @@ bool implSetObject( const Reference< XParameters >& _rxParameters, bSuccessfullyReRouted = false; break; case typelib_TypeClass_STRUCT: - if (_rValue.getValueType() == ::getCppuType((const com::sun::star::util::DateTime*)0)) + if (_rValue.getValueType() == cppu::UnoType<com::sun::star::util::DateTime>::get()) _rxParameters->setTimestamp(_nColumnIndex, *(com::sun::star::util::DateTime*)_rValue.getValue()); - else if (_rValue.getValueType() == ::getCppuType((const com::sun::star::util::Date*)0)) + else if (_rValue.getValueType() == cppu::UnoType<com::sun::star::util::Date>::get()) _rxParameters->setDate(_nColumnIndex, *(com::sun::star::util::Date*)_rValue.getValue()); - else if (_rValue.getValueType() == ::getCppuType((const com::sun::star::util::Time*)0)) + else if (_rValue.getValueType() == cppu::UnoType<com::sun::star::util::Time>::get()) _rxParameters->setTime(_nColumnIndex, *(com::sun::star::util::Time*)_rValue.getValue()); else bSuccessfullyReRouted = false; diff --git a/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx b/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx index ac7b755faf90..dfe3f42c0e9b 100644 --- a/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx +++ b/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx @@ -157,8 +157,8 @@ com::sun::star::uno::Sequence< com::sun::star::uno::Type > UpdateableResultSet:: if( !pCollection ) { static cppu::OTypeCollection collection( - getCppuType( (Reference< XResultSetUpdate> *) 0 ), - getCppuType( (Reference< XRowUpdate> *) 0 ), + cppu::UnoType<XResultSetUpdate>::get(), + cppu::UnoType<XRowUpdate>::get(), SequenceResultSet::getTypes()); pCollection = &collection; } @@ -549,27 +549,27 @@ Sequence< Type > UpdateableResultSet::getStaticTypes( bool updateable ) if( updateable ) { cppu::OTypeCollection collection( - getCppuType( (Reference< XResultSetUpdate> *) 0 ), - getCppuType( (Reference< XRowUpdate> *) 0 ), -// getCppuType( (Reference< com::sun::star::sdbcx::XRowLocate > *) 0 ), + cppu::UnoType<XResultSetUpdate>::get(), + cppu::UnoType<XRowUpdate>::get(), +// cppu::UnoType<com::sun::star::sdbcx::XRowLocate>::get(), getStaticTypes( false /* updateable */ ) ); return collection.getTypes(); } else { cppu::OTypeCollection collection( - getCppuType( (Reference< XResultSet> *) 0 ), - getCppuType( (Reference< XResultSetMetaDataSupplier> *) 0 ), - getCppuType( (Reference< XRow> *) 0 ), - getCppuType( (Reference< XColumnLocate> *) 0 ), - getCppuType( (Reference< XCloseable> *) 0 ), - getCppuType( (Reference< XPropertySet >*) 0 ), - getCppuType( (Reference< XFastPropertySet > *) 0 ), - getCppuType( (Reference< XMultiPropertySet > *) 0 ), - getCppuType( (const Reference< com::sun::star::lang::XComponent > *)0 ), // OComponentHelper - getCppuType( (const Reference< com::sun::star::lang::XTypeProvider > *)0 ), - getCppuType( (const Reference< com::sun::star::uno::XAggregation > *)0 ), - getCppuType( (const Reference< com::sun::star::uno::XWeak > *)0 ) ); + cppu::UnoType<XResultSet>::get(), + cppu::UnoType<XResultSetMetaDataSupplier>::get(), + cppu::UnoType<XRow>::get(), + cppu::UnoType<XColumnLocate>::get(), + cppu::UnoType<XCloseable>::get(), + cppu::UnoType<XPropertySet>::get(), + cppu::UnoType<XFastPropertySet>::get(), + cppu::UnoType<XMultiPropertySet>::get(), + cppu::UnoType<com::sun::star::lang::XComponent>::get(), // OComponentHelper + cppu::UnoType<com::sun::star::lang::XTypeProvider>::get(), + cppu::UnoType<com::sun::star::uno::XAggregation>::get(), + cppu::UnoType<com::sun::star::uno::XWeak>::get()); return collection.getTypes(); } } diff --git a/connectivity/source/drivers/postgresql/pq_xbase.cxx b/connectivity/source/drivers/postgresql/pq_xbase.cxx index 02cd0fc97dfd..3539abe8abf3 100644 --- a/connectivity/source/drivers/postgresql/pq_xbase.cxx +++ b/connectivity/source/drivers/postgresql/pq_xbase.cxx @@ -164,12 +164,12 @@ Sequence< com::sun::star::uno::Type > ReflectionBase::getTypes() { osl::MutexGuard guard( m_refMutex->mutex ); static cppu::OTypeCollection collection( - getCppuType( (Reference< XPropertySet >*) 0 ), - getCppuType( (Reference< XFastPropertySet > *) 0 ), - getCppuType( (Reference< XMultiPropertySet > *) 0 ), - getCppuType( (Reference< com::sun::star::lang::XServiceInfo > *) 0 ), - getCppuType( (Reference< com::sun::star::sdbcx::XDataDescriptorFactory > *) 0 ), - getCppuType( (Reference< com::sun::star::container::XNamed > *) 0 ), + cppu::UnoType<XPropertySet>::get(), + cppu::UnoType<XFastPropertySet>::get(), + cppu::UnoType<XMultiPropertySet>::get(), + cppu::UnoType<com::sun::star::lang::XServiceInfo>::get(), + cppu::UnoType<com::sun::star::sdbcx::XDataDescriptorFactory>::get(), + cppu::UnoType<com::sun::star::container::XNamed>::get(), OComponentHelper::getTypes()); return collection.getTypes(); } diff --git a/connectivity/source/drivers/postgresql/pq_xcontainer.cxx b/connectivity/source/drivers/postgresql/pq_xcontainer.cxx index b4ae905bab0f..2af77d5004a2 100644 --- a/connectivity/source/drivers/postgresql/pq_xcontainer.cxx +++ b/connectivity/source/drivers/postgresql/pq_xcontainer.cxx @@ -98,7 +98,7 @@ public: } virtual Type getType() const SAL_OVERRIDE { - return getCppuType( (Reference< XContainerListener > *)0 ); + return cppu::UnoType<XContainerListener>::get(); } }; @@ -120,7 +120,7 @@ public: virtual Type getType() const SAL_OVERRIDE { - return getCppuType( (Reference< XContainerListener > *)0 ); + return cppu::UnoType<XContainerListener>::get(); } }; @@ -141,7 +141,7 @@ public: virtual Type getType() const SAL_OVERRIDE { - return getCppuType( (Reference< XContainerListener > *)0 ); + return cppu::UnoType<XContainerListener>::get(); } }; diff --git a/connectivity/source/drivers/postgresql/pq_xindex.cxx b/connectivity/source/drivers/postgresql/pq_xindex.cxx index 9c81b6ce47f5..6ce1c9c2099a 100644 --- a/connectivity/source/drivers/postgresql/pq_xindex.cxx +++ b/connectivity/source/drivers/postgresql/pq_xindex.cxx @@ -134,7 +134,7 @@ Sequence<Type > Index::getTypes() throw( RuntimeException, std::exception ) if( !pCollection ) { static cppu::OTypeCollection collection( - getCppuType( (Reference< com::sun::star::sdbcx::XColumnsSupplier> *) 0 ), + cppu::UnoType<com::sun::star::sdbcx::XColumnsSupplier>::get(), ReflectionBase::getTypes()); pCollection = &collection; } @@ -207,7 +207,7 @@ Sequence<Type > IndexDescriptor::getTypes() throw( RuntimeException, std::except if( !pCollection ) { static cppu::OTypeCollection collection( - getCppuType( (Reference< com::sun::star::sdbcx::XColumnsSupplier> *) 0 ), + cppu::UnoType<com::sun::star::sdbcx::XColumnsSupplier>::get(), ReflectionBase::getTypes()); pCollection = &collection; } diff --git a/connectivity/source/drivers/postgresql/pq_xkey.cxx b/connectivity/source/drivers/postgresql/pq_xkey.cxx index 7aacf2a72fcd..e47a0434706e 100644 --- a/connectivity/source/drivers/postgresql/pq_xkey.cxx +++ b/connectivity/source/drivers/postgresql/pq_xkey.cxx @@ -136,7 +136,7 @@ Sequence<Type > Key::getTypes() throw( RuntimeException, std::exception ) if( !pCollection ) { static cppu::OTypeCollection collection( - getCppuType( (Reference< com::sun::star::sdbcx::XColumnsSupplier> *) 0 ), + cppu::UnoType<com::sun::star::sdbcx::XColumnsSupplier>::get(), ReflectionBase::getTypes()); pCollection = &collection; } @@ -204,7 +204,7 @@ Sequence<Type > KeyDescriptor::getTypes() throw( RuntimeException, std::exceptio if( !pCollection ) { static cppu::OTypeCollection collection( - getCppuType( (Reference< com::sun::star::sdbcx::XColumnsSupplier> *) 0 ), + cppu::UnoType<com::sun::star::sdbcx::XColumnsSupplier>::get(), ReflectionBase::getTypes()); pCollection = &collection; } diff --git a/connectivity/source/drivers/postgresql/pq_xtable.cxx b/connectivity/source/drivers/postgresql/pq_xtable.cxx index e6e1363c8117..f907597c12c4 100644 --- a/connectivity/source/drivers/postgresql/pq_xtable.cxx +++ b/connectivity/source/drivers/postgresql/pq_xtable.cxx @@ -291,11 +291,11 @@ Sequence<Type > Table::getTypes() throw( RuntimeException, std::exception ) if( !pCollection ) { static cppu::OTypeCollection collection( - getCppuType( (Reference< com::sun::star::sdbcx::XIndexesSupplier> *) 0 ), - getCppuType( (Reference< com::sun::star::sdbcx::XKeysSupplier> *) 0 ), - getCppuType( (Reference< com::sun::star::sdbcx::XColumnsSupplier> *) 0 ), - getCppuType( (Reference< com::sun::star::sdbcx::XRename> *) 0 ), - getCppuType( (Reference< com::sun::star::sdbcx::XAlterTable> *) 0 ), + cppu::UnoType<com::sun::star::sdbcx::XIndexesSupplier>::get(), + cppu::UnoType<com::sun::star::sdbcx::XKeysSupplier>::get(), + cppu::UnoType<com::sun::star::sdbcx::XColumnsSupplier>::get(), + cppu::UnoType<com::sun::star::sdbcx::XRename>::get(), + cppu::UnoType<com::sun::star::sdbcx::XAlterTable>::get(), ReflectionBase::getTypes()); pCollection = &collection; } @@ -405,9 +405,9 @@ Sequence<Type > TableDescriptor::getTypes() throw( RuntimeException, std::except if( !pCollection ) { static cppu::OTypeCollection collection( - getCppuType( (Reference< com::sun::star::sdbcx::XIndexesSupplier> *) 0 ), - getCppuType( (Reference< com::sun::star::sdbcx::XKeysSupplier> *) 0 ), - getCppuType( (Reference< com::sun::star::sdbcx::XColumnsSupplier> *) 0 ), + cppu::UnoType<com::sun::star::sdbcx::XIndexesSupplier>::get(), + cppu::UnoType<com::sun::star::sdbcx::XKeysSupplier>::get(), + cppu::UnoType<com::sun::star::sdbcx::XColumnsSupplier>::get(), ReflectionBase::getTypes()); pCollection = &collection; } diff --git a/connectivity/source/drivers/postgresql/pq_xuser.cxx b/connectivity/source/drivers/postgresql/pq_xuser.cxx index 1ebf29df7d05..63875eb9c2c9 100644 --- a/connectivity/source/drivers/postgresql/pq_xuser.cxx +++ b/connectivity/source/drivers/postgresql/pq_xuser.cxx @@ -115,7 +115,7 @@ Sequence<Type > User::getTypes() throw( RuntimeException, std::exception ) if( !pCollection ) { static cppu::OTypeCollection collection( - getCppuType( (Reference< com::sun::star::sdbcx::XUser> *) 0 ), + cppu::UnoType<com::sun::star::sdbcx::XUser>::get(), ReflectionBase::getTypes()); pCollection = &collection; } diff --git a/connectivity/source/drivers/postgresql/pq_xview.cxx b/connectivity/source/drivers/postgresql/pq_xview.cxx index ca2202f6e8f0..e2e0aaf10845 100644 --- a/connectivity/source/drivers/postgresql/pq_xview.cxx +++ b/connectivity/source/drivers/postgresql/pq_xview.cxx @@ -187,7 +187,7 @@ Sequence<Type > View::getTypes() throw( RuntimeException, std::exception ) if( !pCollection ) { static cppu::OTypeCollection collection( - getCppuType( (Reference< com::sun::star::sdbcx::XRename> *) 0 ), + cppu::UnoType<com::sun::star::sdbcx::XRename>::get(), ReflectionBase::getTypes()); pCollection = &collection; } diff --git a/connectivity/source/manager/mdrivermanager.cxx b/connectivity/source/manager/mdrivermanager.cxx index 4e5514725176..202a83500b65 100644 --- a/connectivity/source/manager/mdrivermanager.cxx +++ b/connectivity/source/manager/mdrivermanager.cxx @@ -505,7 +505,7 @@ Reference< XEnumeration > SAL_CALL OSDBCDriverManager::createEnumeration( ) thr ::com::sun::star::uno::Type SAL_CALL OSDBCDriverManager::getElementType( ) throw(::com::sun::star::uno::RuntimeException, std::exception) { - return ::getCppuType(static_cast< Reference< XDriver >* >(NULL)); + return cppu::UnoType<XDriver>::get(); } diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx index 1e003cb68d46..be2c75da4e13 100644 --- a/connectivity/source/parse/sqlnode.cxx +++ b/connectivity/source/parse/sqlnode.cxx @@ -1205,9 +1205,9 @@ OSQLParseNode* OSQLParser::predicateTree(OUString& rErrorMessage, const OUString if (m_nFormatKey && m_xFormatter.is()) { Any aValue = getNumberFormatProperty( m_xFormatter, m_nFormatKey, OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_LOCALE) ); - OSL_ENSURE(aValue.getValueType() == ::getCppuType((const ::com::sun::star::lang::Locale*)0), "OSQLParser::PredicateTree : invalid language property !"); + OSL_ENSURE(aValue.getValueType() == cppu::UnoType<com::sun::star::lang::Locale>::get(), "OSQLParser::PredicateTree : invalid language property !"); - if (aValue.getValueType() == ::getCppuType((const ::com::sun::star::lang::Locale*)0)) + if (aValue.getValueType() == cppu::UnoType<com::sun::star::lang::Locale>::get()) aValue >>= m_pData->aLocale; } else diff --git a/connectivity/source/sdbcx/VCollection.cxx b/connectivity/source/sdbcx/VCollection.cxx index 76d0692b8dc4..8081d15f42d3 100644 --- a/connectivity/source/sdbcx/VCollection.cxx +++ b/connectivity/source/sdbcx/VCollection.cxx @@ -256,7 +256,7 @@ OCollection::~OCollection() Any SAL_CALL OCollection::queryInterface( const Type & rType ) throw (RuntimeException, std::exception) { - if ( m_bUseIndexOnly && rType == ::getCppuType(static_cast< Reference< XNameAccess > *> (NULL)) ) + if ( m_bUseIndexOnly && rType == cppu::UnoType<XNameAccess>::get() ) { return Any(); } @@ -273,7 +273,7 @@ Sequence< Type > SAL_CALL OCollection::getTypes() throw (RuntimeException, std:: ::std::vector<Type> aOwnTypes; aOwnTypes.reserve(aTypes.getLength()); - Type aType = ::getCppuType(static_cast< Reference<XNameAccess> *>(NULL)); + Type aType = cppu::UnoType<XNameAccess>::get(); for(;pBegin != pEnd; ++pBegin) { if ( *pBegin != aType ) @@ -480,7 +480,7 @@ void SAL_CALL OCollection::release() throw() Type SAL_CALL OCollection::getElementType( ) throw(RuntimeException, std::exception) { - return::getCppuType(static_cast< Reference< XPropertySet>*>(NULL)); + returncppu::UnoType<XPropertySet>::get(); } sal_Bool SAL_CALL OCollection::hasElements( ) throw(RuntimeException, std::exception) diff --git a/connectivity/source/sdbcx/VDescriptor.cxx b/connectivity/source/sdbcx/VDescriptor.cxx index a911b0b6f33c..8a1ff43cdfc7 100644 --- a/connectivity/source/sdbcx/VDescriptor.cxx +++ b/connectivity/source/sdbcx/VDescriptor.cxx @@ -133,10 +133,10 @@ namespace connectivity Sequence< Type > SAL_CALL ODescriptor::getTypes( ) throw(RuntimeException, std::exception) { - ::cppu::OTypeCollection aTypes( ::getCppuType( (const Reference< XMultiPropertySet > *)0 ), - ::getCppuType( (const Reference< XFastPropertySet > *)0 ), - ::getCppuType( (const Reference< XPropertySet > *)0 ), - ::getCppuType( (const Reference< XUnoTunnel > *)0 )); + ::cppu::OTypeCollection aTypes( cppu::UnoType<XMultiPropertySet>::get(), + cppu::UnoType<XFastPropertySet>::get(), + cppu::UnoType<XPropertySet>::get(), + cppu::UnoType<XUnoTunnel>::get()); return aTypes.getTypes(); } diff --git a/connectivity/source/sdbcx/VTable.cxx b/connectivity/source/sdbcx/VTable.cxx index e9cb3aeeb66c..42421f4cfcf1 100644 --- a/connectivity/source/sdbcx/VTable.cxx +++ b/connectivity/source/sdbcx/VTable.cxx @@ -130,7 +130,7 @@ Any SAL_CALL OTable::queryInterface( const Type & rType ) throw(RuntimeException { if(!isNew()) aRet = OTable_BASE::queryInterface( rType); - if(isNew() && (rType == getCppuType( (Reference<XIndexesSupplier>*)0))) + if(isNew() && (rType == cppu::UnoType<XIndexesSupplier>::get())) return Any(); if(!aRet.hasValue()) aRet = OTableDescriptor_BASE::queryInterface( rType); diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx index 7e7349755e9d..f40016db34e7 100644 --- a/cui/source/dialogs/scriptdlg.cxx +++ b/cui/source/dialogs/scriptdlg.cxx @@ -1404,18 +1404,18 @@ OUString GetErrorMessage( const Exception& e ) OUString GetErrorMessage( const com::sun::star::uno::Any& aException ) { if ( aException.getValueType() == - ::getCppuType( (const reflection::InvocationTargetException* ) NULL ) ) + cppu::UnoType<reflection::InvocationTargetException>::get()) { reflection::InvocationTargetException ite; aException >>= ite; - if ( ite.TargetException.getValueType() == ::getCppuType( ( const provider::ScriptErrorRaisedException* ) NULL ) ) + if ( ite.TargetException.getValueType() == cppu::UnoType<provider::ScriptErrorRaisedException>::get()) { // Error raised by script provider::ScriptErrorRaisedException scriptError; ite.TargetException >>= scriptError; return GetErrorMessage( scriptError ); } - else if ( ite.TargetException.getValueType() == ::getCppuType( ( const provider::ScriptExceptionRaisedException* ) NULL ) ) + else if ( ite.TargetException.getValueType() == cppu::UnoType<provider::ScriptExceptionRaisedException>::get()) { // Exception raised by script provider::ScriptExceptionRaisedException scriptException; @@ -1429,7 +1429,7 @@ OUString GetErrorMessage( const com::sun::star::uno::Any& aException ) } } - else if ( aException.getValueType() == ::getCppuType( ( const provider::ScriptFrameworkErrorException* ) NULL ) ) + else if ( aException.getValueType() == cppu::UnoType<provider::ScriptFrameworkErrorException>::get()) { // A Script Framework error has occurred provider::ScriptFrameworkErrorException sfe; diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx index 644b937183d7..f8ba99e50f4b 100644 --- a/dbaccess/source/core/api/RowSet.cxx +++ b/dbaccess/source/core/api/RowSet.cxx @@ -170,7 +170,7 @@ ORowSet::ORowSet( const Reference< ::com::sun::star::uno::XComponentContext >& _ m_aPrematureParamValues.get().resize( 0 ); // sdb.RowSet Properties - registerMayBeVoidProperty(PROPERTY_ACTIVE_CONNECTION,PROPERTY_ID_ACTIVE_CONNECTION, PropertyAttribute::MAYBEVOID|PropertyAttribute::TRANSIENT|PropertyAttribute::BOUND, &m_aActiveConnection, ::getCppuType(static_cast< Reference< XConnection >* >(0))); + registerMayBeVoidProperty(PROPERTY_ACTIVE_CONNECTION,PROPERTY_ID_ACTIVE_CONNECTION, PropertyAttribute::MAYBEVOID|PropertyAttribute::TRANSIENT|PropertyAttribute::BOUND, &m_aActiveConnection, cppu::UnoType<XConnection>::get()); registerProperty(PROPERTY_DATASOURCENAME, PROPERTY_ID_DATASOURCENAME, PropertyAttribute::BOUND, &m_aDataSourceName, ::cppu::UnoType<OUString>::get()); registerProperty(PROPERTY_COMMAND, PROPERTY_ID_COMMAND, PropertyAttribute::BOUND, &m_aCommand, ::cppu::UnoType<OUString>::get()); registerProperty(PROPERTY_COMMAND_TYPE, PROPERTY_ID_COMMAND_TYPE, PropertyAttribute::BOUND, &m_nCommandType, ::cppu::UnoType<sal_Int32>::get()); @@ -184,7 +184,7 @@ ORowSet::ORowSet( const Reference< ::com::sun::star::uno::XComponentContext >& _ registerProperty(PROPERTY_PRIVILEGES, PROPERTY_ID_PRIVILEGES, nRT, &m_nPrivileges, ::cppu::UnoType<sal_Int32>::get()); registerProperty(PROPERTY_ISMODIFIED, PROPERTY_ID_ISMODIFIED, nBT, &m_bModified, ::getBooleanCppuType()); registerProperty(PROPERTY_ISNEW, PROPERTY_ID_ISNEW, nRBT, &m_bNew, ::getBooleanCppuType()); - registerProperty(PROPERTY_SINGLESELECTQUERYCOMPOSER,PROPERTY_ID_SINGLESELECTQUERYCOMPOSER, nRT, &m_xComposer, ::getCppuType(static_cast< Reference< XSingleSelectQueryComposer >* >(0))); + registerProperty(PROPERTY_SINGLESELECTQUERYCOMPOSER,PROPERTY_ID_SINGLESELECTQUERYCOMPOSER, nRT, &m_xComposer, cppu::UnoType<XSingleSelectQueryComposer>::get()); // sdbcx.ResultSet Properties registerProperty(PROPERTY_ISBOOKMARKABLE, PROPERTY_ID_ISBOOKMARKABLE, nRT, &m_bIsBookmarkable, ::getBooleanCppuType()); @@ -198,7 +198,7 @@ ORowSet::ORowSet( const Reference< ::com::sun::star::uno::XComponentContext >& _ // sdbc.RowSet Properties registerProperty(PROPERTY_URL, PROPERTY_ID_URL, 0, &m_aURL, ::cppu::UnoType<OUString>::get()); registerProperty(PROPERTY_TRANSACTIONISOLATION, PROPERTY_ID_TRANSACTIONISOLATION, PropertyAttribute::TRANSIENT, &m_nTransactionIsolation,::cppu::UnoType<sal_Int32>::get()); - registerMayBeVoidProperty(PROPERTY_TYPEMAP, PROPERTY_ID_TYPEMAP, PropertyAttribute::MAYBEVOID|PropertyAttribute::TRANSIENT, &m_aTypeMap, ::getCppuType(static_cast< Reference< XNameAccess >* >(0))); + registerMayBeVoidProperty(PROPERTY_TYPEMAP, PROPERTY_ID_TYPEMAP, PropertyAttribute::MAYBEVOID|PropertyAttribute::TRANSIENT, &m_aTypeMap, cppu::UnoType<XNameAccess>::get()); registerProperty(PROPERTY_ESCAPE_PROCESSING,PROPERTY_ID_ESCAPE_PROCESSING, PropertyAttribute::BOUND, &m_bUseEscapeProcessing,::getBooleanCppuType() ); registerProperty(PROPERTY_QUERYTIMEOUT, PROPERTY_ID_QUERYTIMEOUT, PropertyAttribute::TRANSIENT, &m_nQueryTimeOut, ::cppu::UnoType<sal_Int32>::get()); registerProperty(PROPERTY_MAXFIELDSIZE, PROPERTY_ID_MAXFIELDSIZE, PropertyAttribute::TRANSIENT, &m_nMaxFieldSize, ::cppu::UnoType<sal_Int32>::get()); @@ -416,9 +416,9 @@ void SAL_CALL ORowSet::getFastPropertyValue(Any& rValue,sal_Int32 nHandle) const // com::sun::star::XTypeProvider Sequence< Type > SAL_CALL ORowSet::getTypes() throw (RuntimeException, std::exception) { - OTypeCollection aTypes(::getCppuType( (const Reference< XPropertySet > *)0 ), - ::getCppuType( (const Reference< XFastPropertySet > *)0 ), - ::getCppuType( (const Reference< XMultiPropertySet > *)0 ), + OTypeCollection aTypes(cppu::UnoType<XPropertySet>::get(), + cppu::UnoType<XFastPropertySet>::get(), + cppu::UnoType<XMultiPropertySet>::get(), ::comphelper::concatSequences(ORowSet_BASE1::getTypes(),ORowSetBase::getTypes())); return aTypes.getTypes(); } @@ -2826,7 +2826,7 @@ ORowSetClone::ORowSetClone( const Reference<XComponentContext>& _rContext, ORowS sal_Int32 nRT = PropertyAttribute::READONLY | PropertyAttribute::TRANSIENT; // sdb.RowSet Properties - registerMayBeVoidProperty(PROPERTY_ACTIVE_CONNECTION,PROPERTY_ID_ACTIVE_CONNECTION, PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY, &rParent.m_aActiveConnection, ::getCppuType(static_cast< Reference< XConnection >* >(0))); + registerMayBeVoidProperty(PROPERTY_ACTIVE_CONNECTION,PROPERTY_ID_ACTIVE_CONNECTION, PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY, &rParent.m_aActiveConnection, cppu::UnoType<XConnection>::get()); registerProperty(PROPERTY_RESULTSETCONCURRENCY, PROPERTY_ID_RESULTSETCONCURRENCY, PropertyAttribute::READONLY, &m_nResultSetConcurrency,::cppu::UnoType<sal_Int32>::get()); registerProperty(PROPERTY_RESULTSETTYPE, PROPERTY_ID_RESULTSETTYPE, PropertyAttribute::READONLY, &m_nResultSetType, ::cppu::UnoType<sal_Int32>::get()); registerProperty(PROPERTY_FETCHDIRECTION, PROPERTY_ID_FETCHDIRECTION, PropertyAttribute::TRANSIENT, &m_nFetchDirection, ::cppu::UnoType<sal_Int32>::get()); diff --git a/dbaccess/source/core/api/View.cxx b/dbaccess/source/core/api/View.cxx index e48a5ce82dfa..2cf497bf8fc8 100644 --- a/dbaccess/source/core/api/View.cxx +++ b/dbaccess/source/core/api/View.cxx @@ -82,7 +82,7 @@ namespace dbaccess Any SAL_CALL View::queryInterface( const Type & _rType ) throw(RuntimeException, std::exception) { - if(_rType == getCppuType( (Reference<XAlterView>*)0) && !m_xViewAccess.is() ) + if(_rType == cppu::UnoType<XAlterView>::get()&& !m_xViewAccess.is() ) return Any(); Any aReturn = View_Base::queryInterface( _rType ); if ( !aReturn.hasValue() ) @@ -92,7 +92,7 @@ namespace dbaccess Sequence< Type > SAL_CALL View::getTypes( ) throw(RuntimeException, std::exception) { - Type aAlterType = getCppuType( (Reference<XAlterView>*)0); + Type aAlterType = cppu::UnoType<XAlterView>::get(); Sequence< Type > aTypes( ::comphelper::concatSequences(View_Base::getTypes(),View_IBASE::getTypes()) ); ::std::vector<Type> aOwnTypes; diff --git a/dbaccess/source/core/api/callablestatement.cxx b/dbaccess/source/core/api/callablestatement.cxx index 988726e0ccc9..d0940967cff6 100644 --- a/dbaccess/source/core/api/callablestatement.cxx +++ b/dbaccess/source/core/api/callablestatement.cxx @@ -35,8 +35,8 @@ using namespace ::osl; // com::sun::star::lang::XTypeProvider Sequence< Type > OCallableStatement::getTypes() throw (RuntimeException, std::exception) { - OTypeCollection aTypes(::getCppuType( (const Reference< XRow > *)0 ), - ::getCppuType( (const Reference< XOutParameters > *)0 ), + OTypeCollection aTypes(cppu::UnoType<XRow>::get(), + cppu::UnoType<XOutParameters>::get(), OPreparedStatement::getTypes() ); return aTypes.getTypes(); diff --git a/dbaccess/source/core/api/column.cxx b/dbaccess/source/core/api/column.cxx index 2949515ddf41..9678304d00f1 100644 --- a/dbaccess/source/core/api/column.cxx +++ b/dbaccess/source/core/api/column.cxx @@ -291,9 +291,9 @@ Any SAL_CALL OColumns::queryInterface( const Type & rType ) throw(RuntimeExcepti } else if(!m_pTable || (m_pTable && !m_pTable->isNew())) { - if(!m_bAddColumn && rType == getCppuType( (Reference<XAppend>*)0)) + if(!m_bAddColumn && rType == cppu::UnoType<XAppend>::get()) return Any(); - if(!m_bDropColumn && rType == getCppuType( (Reference<XDrop>*)0)) + if(!m_bDropColumn && rType == cppu::UnoType<XDrop>::get()) return Any(); } @@ -308,8 +308,8 @@ Sequence< Type > SAL_CALL OColumns::getTypes( ) throw(RuntimeException, std::ex bool bAppendFound = false,bDropFound = false; sal_Int32 nSize = 0; - Type aAppendType = getCppuType( (Reference<XAppend>*)0); - Type aDropType = getCppuType( (Reference<XDrop>*)0); + Type aAppendType = cppu::UnoType<XAppend>::get(); + Type aDropType = cppu::UnoType<XDrop>::get(); if(m_xDrvColumns.is()) { Reference<XTypeProvider> xTypes(m_xDrvColumns,UNO_QUERY); diff --git a/dbaccess/source/core/api/datacolumn.cxx b/dbaccess/source/core/api/datacolumn.cxx index 8811b7329a80..9582a7e3177b 100644 --- a/dbaccess/source/core/api/datacolumn.cxx +++ b/dbaccess/source/core/api/datacolumn.cxx @@ -58,8 +58,8 @@ ODataColumn::~ODataColumn() // com::sun::star::lang::XTypeProvider Sequence< Type > ODataColumn::getTypes() throw (RuntimeException, std::exception) { - OTypeCollection aTypes(::getCppuType( (const Reference< XColumn > *)0 ), - ::getCppuType( (const Reference< XColumnUpdate > *)0 ), + OTypeCollection aTypes(cppu::UnoType<XColumn>::get(), + cppu::UnoType<XColumnUpdate>::get(), OColumn::getTypes()); return aTypes.getTypes(); } diff --git a/dbaccess/source/core/api/preparedstatement.cxx b/dbaccess/source/core/api/preparedstatement.cxx index 182212862c72..d3eb2fd217d6 100644 --- a/dbaccess/source/core/api/preparedstatement.cxx +++ b/dbaccess/source/core/api/preparedstatement.cxx @@ -65,11 +65,11 @@ OPreparedStatement::~OPreparedStatement() // com::sun::star::lang::XTypeProvider Sequence< Type > OPreparedStatement::getTypes() throw (RuntimeException, std::exception) { - OTypeCollection aTypes(::getCppuType( (const Reference< XServiceInfo > *)0 ), - ::getCppuType( (const Reference< XPreparedStatement > *)0 ), - ::getCppuType( (const Reference< XParameters > *)0 ), - ::getCppuType( (const Reference< XResultSetMetaDataSupplier > *)0 ), - ::getCppuType( (const Reference< XColumnsSupplier > *)0 ), + OTypeCollection aTypes(cppu::UnoType<XServiceInfo>::get(), + cppu::UnoType<XPreparedStatement>::get(), + cppu::UnoType<XParameters>::get(), + cppu::UnoType<XResultSetMetaDataSupplier>::get(), + cppu::UnoType<XColumnsSupplier>::get(), OStatementBase::getTypes() ); return aTypes.getTypes(); diff --git a/dbaccess/source/core/api/resultset.cxx b/dbaccess/source/core/api/resultset.cxx index 158c3ede8b85..fca574851ce1 100644 --- a/dbaccess/source/core/api/resultset.cxx +++ b/dbaccess/source/core/api/resultset.cxx @@ -102,7 +102,7 @@ OResultSet::~OResultSet() // com::sun::star::lang::XTypeProvider Sequence< Type > OResultSet::getTypes() throw (RuntimeException, std::exception) { - OTypeCollection aTypes(::getCppuType( (const Reference< XPropertySet > *)0 ), + OTypeCollection aTypes(cppu::UnoType<XPropertySet>::get(), OResultSetBase::getTypes()); return aTypes.getTypes(); diff --git a/dbaccess/source/core/api/statement.cxx b/dbaccess/source/core/api/statement.cxx index 07a48c198fb8..09e0dd0e463c 100644 --- a/dbaccess/source/core/api/statement.cxx +++ b/dbaccess/source/core/api/statement.cxx @@ -62,18 +62,18 @@ OStatementBase::~OStatementBase() // com::sun::star::lang::XTypeProvider Sequence< Type > OStatementBase::getTypes() throw (RuntimeException, std::exception) { - OTypeCollection aTypes(::getCppuType( (const Reference< XPropertySet > *)0 ), - ::getCppuType( (const Reference< XWarningsSupplier > *)0 ), - ::getCppuType( (const Reference< XCloseable > *)0 ), - ::getCppuType( (const Reference< XMultipleResults > *)0 ), - ::getCppuType( (const Reference< ::com::sun::star::util::XCancellable > *)0 ), + OTypeCollection aTypes(cppu::UnoType<XPropertySet>::get(), + cppu::UnoType<XWarningsSupplier>::get(), + cppu::UnoType<XCloseable>::get(), + cppu::UnoType<XMultipleResults>::get(), + cppu::UnoType<com::sun::star::util::XCancellable>::get(), OSubComponent::getTypes() ); Reference< XGeneratedResultSet > xGRes(m_xAggregateAsSet, UNO_QUERY); if ( xGRes.is() ) - aTypes = OTypeCollection(::getCppuType( (const Reference< XGeneratedResultSet > *)0 ),aTypes.getTypes()); + aTypes = OTypeCollection(cppu::UnoType<XGeneratedResultSet>::get(),aTypes.getTypes()); Reference< XPreparedBatchExecution > xPreparedBatchExecution(m_xAggregateAsSet, UNO_QUERY); if ( xPreparedBatchExecution.is() ) - aTypes = OTypeCollection(::getCppuType( (const Reference< XPreparedBatchExecution > *)0 ),aTypes.getTypes()); + aTypes = OTypeCollection(cppu::UnoType<XPreparedBatchExecution>::get(),aTypes.getTypes()); return aTypes.getTypes(); } @@ -94,13 +94,13 @@ Any OStatementBase::queryInterface( const Type & rType ) throw (RuntimeException if ( !aIface.hasValue() ) { Reference< XGeneratedResultSet > xGRes(m_xAggregateAsSet, UNO_QUERY); - if ( ::getCppuType( (const Reference< XGeneratedResultSet > *)0 ) == rType && xGRes.is() ) + if ( cppu::UnoType<XGeneratedResultSet>::get()== rType && xGRes.is() ) aIface = ::cppu::queryInterface(rType,static_cast< XGeneratedResultSet * >( this )); } if ( !aIface.hasValue() ) { Reference< XPreparedBatchExecution > xGRes(m_xAggregateAsSet, UNO_QUERY); - if ( ::getCppuType( (const Reference< XPreparedBatchExecution > *)0 ) == rType && xGRes.is() ) + if ( cppu::UnoType<XPreparedBatchExecution>::get()== rType && xGRes.is() ) aIface = ::cppu::queryInterface(rType,static_cast< XPreparedBatchExecution * >( this )); } } diff --git a/dbaccess/source/core/api/table.cxx b/dbaccess/source/core/api/table.cxx index 9fef736143d6..b4e827407390 100644 --- a/dbaccess/source/core/api/table.cxx +++ b/dbaccess/source/core/api/table.cxx @@ -252,17 +252,17 @@ IMPLEMENT_SERVICE_INFO1(ODBTable, "com.sun.star.sdb.dbaccess.ODBTable", SERVICE_ Any SAL_CALL ODBTable::queryInterface( const Type & rType ) throw(RuntimeException, std::exception) { - if(rType == getCppuType( (Reference<XRename>*)0) && !getRenameService().is() ) + if(rType == cppu::UnoType<XRename>::get()&& !getRenameService().is() ) return Any(); - if(rType == getCppuType( (Reference<XAlterTable>*)0) && !getAlterService().is() ) + if(rType == cppu::UnoType<XAlterTable>::get()&& !getAlterService().is() ) return Any(); return OTable_Base::queryInterface( rType); } Sequence< Type > SAL_CALL ODBTable::getTypes( ) throw(RuntimeException, std::exception) { - Type aRenameType = getCppuType( (Reference<XRename>*)0); - Type aAlterType = getCppuType( (Reference<XAlterTable>*)0); + Type aRenameType = cppu::UnoType<XRename>::get(); + Type aAlterType = cppu::UnoType<XAlterTable>::get(); Sequence< Type > aTypes(OTable_Base::getTypes()); ::std::vector<Type> aOwnTypes; diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx index 994b343b161b..94b3d37f5a95 100644 --- a/dbaccess/source/core/dataaccess/databasecontext.cxx +++ b/dbaccess/source/core/dataaccess/databasecontext.cxx @@ -580,7 +580,7 @@ void SAL_CALL ODatabaseContext::removeDatabaseRegistrationsListener( const Refer // ::com::sun::star::container::XElementAccess Type ODatabaseContext::getElementType( ) throw(RuntimeException, std::exception) { - return::getCppuType(static_cast<Reference<XDataSource>*>(NULL)); + returncppu::UnoType<XDataSource>::get(); } sal_Bool ODatabaseContext::hasElements(void) throw( RuntimeException, std::exception ) diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx index 85f070955393..6bf40a108e9a 100644 --- a/dbaccess/source/core/dataaccess/datasource.cxx +++ b/dbaccess/source/core/dataaccess/datasource.cxx @@ -520,9 +520,9 @@ void ODatabaseSource::setName( const Reference< XDocumentDataSource >& _rxDocume // com::sun::star::lang::XTypeProvider Sequence< Type > ODatabaseSource::getTypes() throw (RuntimeException, std::exception) { - OTypeCollection aPropertyHelperTypes( ::getCppuType( (const Reference< XFastPropertySet > *)0 ), - ::getCppuType( (const Reference< XPropertySet > *)0 ), - ::getCppuType( (const Reference< XMultiPropertySet > *)0 )); + OTypeCollection aPropertyHelperTypes( cppu::UnoType<XFastPropertySet>::get(), + cppu::UnoType<XPropertySet>::get(), + cppu::UnoType<XMultiPropertySet>::get()); return ::comphelper::concatSequences( ODatabaseSource_Base::getTypes(), diff --git a/dbaccess/source/core/dataaccess/definitioncontainer.cxx b/dbaccess/source/core/dataaccess/definitioncontainer.cxx index 8a15334ec4c4..226ab22fea70 100644 --- a/dbaccess/source/core/dataaccess/definitioncontainer.cxx +++ b/dbaccess/source/core/dataaccess/definitioncontainer.cxx @@ -334,7 +334,7 @@ void SAL_CALL ODefinitionContainer::removeContainerApproveListener( const Refere // XElementAccess Type SAL_CALL ODefinitionContainer::getElementType( ) throw (RuntimeException, std::exception) { - return ::getCppuType( static_cast< Reference< XContent >* >(NULL) ); + return cppu::UnoType<XContent>::get(); } sal_Bool SAL_CALL ODefinitionContainer::hasElements( ) throw (RuntimeException, std::exception) diff --git a/dbaccess/source/core/misc/apitools.cxx b/dbaccess/source/core/misc/apitools.cxx index 7a8374eae0ea..bd3e1f2a2dd8 100644 --- a/dbaccess/source/core/misc/apitools.cxx +++ b/dbaccess/source/core/misc/apitools.cxx @@ -47,9 +47,9 @@ OSubComponent::~OSubComponent() // com::sun::star::lang::XTypeProvider Sequence< Type > OSubComponent::getTypes() throw (RuntimeException, std::exception) { - OTypeCollection aTypes(::getCppuType( (const Reference< XComponent > *)0 ), - ::getCppuType( (const Reference< XTypeProvider > *)0 ), - ::getCppuType( (const Reference< XWeak > *)0 )); + OTypeCollection aTypes(cppu::UnoType<XComponent>::get(), + cppu::UnoType<XTypeProvider>::get(), + cppu::UnoType<XWeak>::get()); return aTypes.getTypes(); } @@ -112,7 +112,7 @@ void OSubComponent::release() throw ( ) Any OSubComponent::queryInterface( const Type & rType ) throw(RuntimeException, std::exception) { Any aReturn; - if (!rType.equals(::getCppuType(static_cast< Reference< XAggregation >* >(NULL)))) + if (!rType.equals(cppu::UnoType<XAggregation>::get())) aReturn = OComponentHelper::queryInterface(rType); return aReturn; diff --git a/dbaccess/source/ui/browser/formadapter.cxx b/dbaccess/source/ui/browser/formadapter.cxx index 53f0b282703f..bac906e81cc8 100644 --- a/dbaccess/source/ui/browser/formadapter.cxx +++ b/dbaccess/source/ui/browser/formadapter.cxx @@ -1491,8 +1491,7 @@ sal_Bool SAL_CALL SbaXFormAdapter::hasByName(const OUString& aName) throw( Runti // ::com::sun::star::container::XElementAccess Type SAL_CALL SbaXFormAdapter::getElementType() throw(RuntimeException, std::exception) { - return ::getCppuType( - static_cast< Reference< ::com::sun::star::form::XFormComponent >* >(NULL)); + return cppu::UnoType<com::sun::star::form::XFormComponent>::get(); } sal_Bool SAL_CALL SbaXFormAdapter::hasElements() throw(RuntimeException, std::exception) diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx index 1fd968578621..2d7d9c1804c2 100644 --- a/dbaccess/source/ui/browser/sbagrid.cxx +++ b/dbaccess/source/ui/browser/sbagrid.cxx @@ -181,7 +181,7 @@ Sequence< Type > SAL_CALL SbaXGridControl::getTypes( ) throw (RuntimeException, sal_Int32 nTypes = aTypes.getLength(); aTypes.realloc(nTypes + 1); - aTypes[nTypes] = ::getCppuType(static_cast< Reference< ::com::sun::star::frame::XDispatch >* >(NULL)); + aTypes[nTypes] = cppu::UnoType<com::sun::star::frame::XDispatch>::get(); return aTypes; } @@ -526,7 +526,7 @@ Sequence< Type > SAL_CALL SbaXGridPeer::getTypes() throw (RuntimeException, std: Sequence< Type > aTypes = FmXGridPeer::getTypes(); sal_Int32 nOldLen = aTypes.getLength(); aTypes.realloc(nOldLen + 1); - aTypes.getArray()[nOldLen] = ::getCppuType( static_cast< Reference< ::com::sun::star::frame::XDispatch >* >(0) ); + aTypes.getArray()[nOldLen] = cppu::UnoType<com::sun::star::frame::XDispatch>::get(); return aTypes; } diff --git a/desktop/source/deployment/misc/dp_interact.cxx b/desktop/source/deployment/misc/dp_interact.cxx index 3152817501e3..f61536868438 100644 --- a/desktop/source/deployment/misc/dp_interact.cxx +++ b/desktop/source/deployment/misc/dp_interact.cxx @@ -43,9 +43,7 @@ public: : m_type( type ), m_pselect( pselect ) { OSL_ASSERT( - ::getCppuType( - static_cast< Reference<task::XInteractionContinuation> - const *>(0) ).isAssignableFrom(m_type) ); } + cppu::UnoType<task::XInteractionContinuation>::get().isAssignableFrom(m_type) ); } // XInterface virtual void SAL_CALL acquire() throw () SAL_OVERRIDE; diff --git a/desktop/source/deployment/registry/dp_backend.cxx b/desktop/source/deployment/registry/dp_backend.cxx index 076e4dd6bf71..fb5c05d2458d 100644 --- a/desktop/source/deployment/registry/dp_backend.cxx +++ b/desktop/source/deployment/registry/dp_backend.cxx @@ -582,8 +582,7 @@ void Package::exportTo( void Package::fireModified() { ::cppu::OInterfaceContainerHelper * container = rBHelper.getContainer( - ::getCppuType( static_cast<Reference< - util::XModifyListener> const *>(0) ) ); + cppu::UnoType<util::XModifyListener>::get() ); if (container != 0) { Sequence< Reference<XInterface> > elements( container->getElements() ); @@ -821,7 +820,7 @@ Any Package::TypeInfo::getIcon( sal_Bool /*highContrast*/, sal_Bool smallIcon ) if (! smallIcon) return Any(); const sal_uInt16 nIconId = m_smallIcon; - return Any( &nIconId, getCppuType( static_cast<sal_uInt16 const *>(0) ) ); + return Any( &nIconId, cppu::UnoType<cppu::UnoUnsignedShortType>::get() ); } } diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx index 6f2def52dea3..a852f23bfaac 100644 --- a/desktop/source/deployment/registry/package/dp_package.cxx +++ b/desktop/source/deployment/registry/package/dp_package.cxx @@ -1377,9 +1377,7 @@ Reference<deployment::XPackage> BackendImpl::PackageImpl::bindBundleItem( catch (const Exception &) { const Any exc( ::cppu::getCaughtException() ); if (notifyDetectionError || - !exc.isExtractableTo( - ::getCppuType( reinterpret_cast< - lang::IllegalArgumentException const *>(0) ) )) + !exc.isExtractableTo( cppu::UnoType<lang::IllegalArgumentException>::get()) ) { interactContinuation( Any( lang::WrappedTargetException("bundle item error!", diff --git a/dtrans/source/generic/generic_clipboard.cxx b/dtrans/source/generic/generic_clipboard.cxx index d71161980829..42d8fc947ec0 100644 --- a/dtrans/source/generic/generic_clipboard.cxx +++ b/dtrans/source/generic/generic_clipboard.cxx @@ -101,7 +101,7 @@ void SAL_CALL GenericClipboard::setContents(const Reference< XTransferable >& xT // notify all listeners on content changes OInterfaceContainerHelper *pContainer = - rBHelper.aLC.getContainer(getCppuType( (Reference < XClipboardListener > *) 0)); + rBHelper.aLC.getContainer(cppu::UnoType<XClipboardListener>::get()); if (pContainer) { ClipboardEvent aEvent(static_cast < XClipboard * > (this), m_aContents); @@ -144,7 +144,7 @@ void SAL_CALL GenericClipboard::removeClipboardListener( const Reference< XClipb MutexGuard aGuard( rBHelper.rMutex ); OSL_ENSURE( !rBHelper.bDisposed, "object is disposed" ); if (!rBHelper.bInDispose && !rBHelper.bDisposed) - rBHelper.aLC.removeInterface( getCppuType( (const Reference< XClipboardListener > *) 0 ), listener ); \ + rBHelper.aLC.removeInterface( cppu::UnoType<XClipboardListener>::get(), listener ); \ } Sequence< OUString > SAL_CALL GenericClipboard_getSupportedServiceNames() diff --git a/dtrans/source/win32/clipb/WinClipboard.cxx b/dtrans/source/win32/clipb/WinClipboard.cxx index 3059324b6f31..2ffb7bd3c55a 100644 --- a/dtrans/source/win32/clipb/WinClipboard.cxx +++ b/dtrans/source/win32/clipb/WinClipboard.cxx @@ -191,7 +191,7 @@ void SAL_CALL CWinClipboard::notifyAllClipboardListener( ) aGuard.clear( ); OInterfaceContainerHelper* pICHelper = rBHelper.aLC.getContainer( - getCppuType( ( Reference< XClipboardListener > * ) 0 ) ); + cppu::UnoType<XClipboardListener>::get()); if ( pICHelper ) { diff --git a/dtrans/source/win32/dnd/sourcecontext.cxx b/dtrans/source/win32/dnd/sourcecontext.cxx index a6f106f5e99a..d97fc9b0b71f 100644 --- a/dtrans/source/win32/dnd/sourcecontext.cxx +++ b/dtrans/source/win32/dnd/sourcecontext.cxx @@ -95,7 +95,7 @@ void SourceContext::fire_dragDropEnd( sal_Bool success, sal_Int8 effect) e.Source= Reference<XInterface>( static_cast<XDragSourceContext*>( this), UNO_QUERY); OInterfaceContainerHelper* pContainer= rBHelper.getContainer( - getCppuType( (Reference<XDragSourceListener>* )0 ) ); + cppu::UnoType<XDragSourceListener>::get()); if( pContainer) { @@ -122,7 +122,7 @@ void SourceContext::fire_dropActionChanged( sal_Int8 dropAction, sal_Int8 userAc e.Source= Reference<XInterface>( static_cast<XDragSourceContext*>( this), UNO_QUERY); OInterfaceContainerHelper* pContainer= rBHelper.getContainer( - getCppuType( (Reference<XDragSourceListener>* )0 ) ); + cppu::UnoType<XDragSourceListener>::get()); if( pContainer) { diff --git a/dtrans/source/win32/dnd/target.cxx b/dtrans/source/win32/dnd/target.cxx index 74adbbb10a32..eac5404ee77a 100644 --- a/dtrans/source/win32/dnd/target.cxx +++ b/dtrans/source/win32/dnd/target.cxx @@ -482,7 +482,7 @@ HRESULT DropTarget::Drop( IDataObject * /*pDataObj*/, void DropTarget::fire_drop( const DropTargetDropEvent& dte) { - OInterfaceContainerHelper* pContainer= rBHelper.getContainer( getCppuType( (Reference<XDropTargetListener>* )0 ) ); + OInterfaceContainerHelper* pContainer= rBHelper.getContainer( cppu::UnoType<XDropTargetListener>::get()); if( pContainer) { OInterfaceIteratorHelper iter( *pContainer); @@ -496,7 +496,7 @@ void DropTarget::fire_drop( const DropTargetDropEvent& dte) void DropTarget::fire_dragEnter( const DropTargetDragEnterEvent& e ) { - OInterfaceContainerHelper* pContainer= rBHelper.getContainer( getCppuType( (Reference<XDropTargetListener>* )0 ) ); + OInterfaceContainerHelper* pContainer= rBHelper.getContainer( cppu::UnoType<XDropTargetListener>::get()); if( pContainer) { OInterfaceIteratorHelper iter( *pContainer); @@ -510,7 +510,7 @@ void DropTarget::fire_dragEnter( const DropTargetDragEnterEvent& e ) void DropTarget::fire_dragExit( const DropTargetEvent& dte ) { - OInterfaceContainerHelper* pContainer= rBHelper.getContainer( getCppuType( (Reference<XDropTargetListener>* )0 ) ); + OInterfaceContainerHelper* pContainer= rBHelper.getContainer( cppu::UnoType<XDropTargetListener>::get()); if( pContainer) { @@ -525,7 +525,7 @@ void DropTarget::fire_dragExit( const DropTargetEvent& dte ) void DropTarget::fire_dragOver( const DropTargetDragEvent& dtde ) { - OInterfaceContainerHelper* pContainer= rBHelper.getContainer( getCppuType( (Reference<XDropTargetListener>* )0 ) ); + OInterfaceContainerHelper* pContainer= rBHelper.getContainer( cppu::UnoType<XDropTargetListener>::get()); if( pContainer) { OInterfaceIteratorHelper iter( *pContainer ); @@ -539,7 +539,7 @@ void DropTarget::fire_dragOver( const DropTargetDragEvent& dtde ) void DropTarget::fire_dropActionChanged( const DropTargetDragEvent& dtde ) { - OInterfaceContainerHelper* pContainer= rBHelper.getContainer( getCppuType( (Reference<XDropTargetListener>* )0 ) ); + OInterfaceContainerHelper* pContainer= rBHelper.getContainer( cppu::UnoType<XDropTargetListener>::get()); if( pContainer) { OInterfaceIteratorHelper iter( *pContainer); diff --git a/editeng/source/accessibility/AccessibleComponentBase.cxx b/editeng/source/accessibility/AccessibleComponentBase.cxx index a962414409ce..f6215a64aa56 100644 --- a/editeng/source/accessibility/AccessibleComponentBase.cxx +++ b/editeng/source/accessibility/AccessibleComponentBase.cxx @@ -210,9 +210,9 @@ uno::Sequence<uno::Type> SAL_CALL uno::Sequence<uno::Type> aTypeList (2); // ...and add the additional type for the component. const uno::Type aComponentType = - ::getCppuType((const uno::Reference<XAccessibleComponent>*)0); + cppu::UnoType<XAccessibleComponent>::get(); const uno::Type aExtendedComponentType = - ::getCppuType((const uno::Reference<XAccessibleExtendedComponent>*)0); + cppu::UnoType<XAccessibleExtendedComponent>::get(); aTypeList[0] = aComponentType; aTypeList[1] = aExtendedComponentType; diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx index 0c9e494357d1..f65a39a04771 100644 --- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx +++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx @@ -96,8 +96,8 @@ namespace accessibility SVX_UNOEDIT_CHAR_PROPERTIES, SVX_UNOEDIT_PARA_PROPERTIES, SVX_UNOEDIT_NUMBERING_PROPERTIE, - {OUString("TextUserDefinedAttributes"), EE_CHAR_XMLATTRIBS, ::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, - {OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, ::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, + {OUString("TextUserDefinedAttributes"), EE_CHAR_XMLATTRIBS, cppu::UnoType<com::sun::star::container::XNameContainer>::get(), 0, 0}, + {OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, cppu::UnoType<com::sun::star::container::XNameContainer>::get(), 0, 0}, { OUString(), 0, css::uno::Type(), 0, 0 } }; static SvxItemPropertySet aPropSet( aPropMap, EditEngine::GetGlobalItemPool() ); @@ -672,17 +672,17 @@ namespace accessibility uno::Any aRet; // must provide XAccesibleText by hand, since it comes publicly inherited by XAccessibleEditableText - if ( rType == ::getCppuType((uno::Reference< XAccessibleText > *)0) ) + if ( rType == cppu::UnoType<XAccessibleText>::get()) { uno::Reference< XAccessibleText > aAccText = static_cast< XAccessibleEditableText * >(this); aRet <<= aAccText; } - else if ( rType == ::getCppuType((uno::Reference< XAccessibleEditableText > *)0) ) + else if ( rType == cppu::UnoType<XAccessibleEditableText>::get()) { uno::Reference< XAccessibleEditableText > aAccEditText = this; aRet <<= aAccEditText; } - else if ( rType == ::getCppuType((uno::Reference< XAccessibleHypertext > *)0) ) + else if ( rType == cppu::UnoType<XAccessibleHypertext>::get()) { uno::Reference< XAccessibleHypertext > aAccHyperText = this; aRet <<= aAccHyperText; diff --git a/editeng/source/items/xmlcnitm.cxx b/editeng/source/items/xmlcnitm.cxx index ef299ec36ad0..38d24e5c5752 100644 --- a/editeng/source/items/xmlcnitm.cxx +++ b/editeng/source/items/xmlcnitm.cxx @@ -84,7 +84,7 @@ bool SvXMLAttrContainerItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uIn Reference<XNameContainer> xContainer = new SvUnoAttributeContainer( new SvXMLAttrContainerData( *pImpl ) ); - rVal.setValue( &xContainer, ::getCppuType((Reference<XNameContainer>*)0) ); + rVal.setValue( &xContainer, cppu::UnoType<XNameContainer>::get()); return true; } @@ -128,7 +128,7 @@ bool SvXMLAttrContainerItem::PutValue( const com::sun::star::uno::Any& rVal, sal const OUString aName( *pNames++ ); aAny = xContainer->getByName( aName ); - if( aAny.getValue() == NULL || aAny.getValueType() != ::getCppuType((AttributeData*)0) ) + if( aAny.getValue() == NULL || aAny.getValueType() != cppu::UnoType<AttributeData>::get() ) return false; pData = (AttributeData*)aAny.getValue(); diff --git a/editeng/source/uno/unofield.cxx b/editeng/source/uno/unofield.cxx index fd44829e1a56..e84482e707e3 100644 --- a/editeng/source/uno/unofield.cxx +++ b/editeng/source/uno/unofield.cxx @@ -540,10 +540,10 @@ uno::Sequence< uno::Type > SAL_CALL SvxUnoTextField::getTypes() maTypeSequence.realloc( nOldCount + 4 ); // !DANGER! keep this updated uno::Type* pTypes = &maTypeSequence.getArray()[nOldCount]; - *pTypes++ = ::getCppuType(( const uno::Reference< text::XTextField >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< beans::XPropertySet >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< lang::XServiceInfo >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< lang::XUnoTunnel >*)0); + *pTypes++ = cppu::UnoType<text::XTextField>::get(); + *pTypes++ = cppu::UnoType<beans::XPropertySet>::get(); + *pTypes++ = cppu::UnoType<lang::XServiceInfo>::get(); + *pTypes++ = cppu::UnoType<lang::XUnoTunnel>::get(); } return maTypeSequence; } diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx index 6cfad262f457..f6d95bd09a96 100644 --- a/editeng/source/uno/unotext.cxx +++ b/editeng/source/uno/unotext.cxx @@ -88,10 +88,10 @@ const SfxItemPropertyMapEntry* ImplGetSvxTextPortionPropertyMap() SVX_UNOEDIT_FONT_PROPERTIES, SVX_UNOEDIT_OUTLINER_PROPERTIES, SVX_UNOEDIT_PARA_PROPERTIES, - {OUString("TextField"), EE_FEATURE_FIELD, ::getCppuType((const uno::Reference< text::XTextField >*)0), beans::PropertyAttribute::READONLY, 0 }, + {OUString("TextField"), EE_FEATURE_FIELD, cppu::UnoType<text::XTextField>::get(), beans::PropertyAttribute::READONLY, 0 }, {OUString("TextPortionType"), WID_PORTIONTYPE, ::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::READONLY, 0 }, - {OUString("TextUserDefinedAttributes"), EE_CHAR_XMLATTRIBS, ::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, - {OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, ::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, + {OUString("TextUserDefinedAttributes"), EE_CHAR_XMLATTRIBS, cppu::UnoType<com::sun::star::container::XNameContainer>::get(), 0, 0}, + {OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, cppu::UnoType<com::sun::star::container::XNameContainer>::get(), 0, 0}, { OUString(), 0, css::uno::Type(), 0, 0 } }; return aSvxTextPortionPropertyMap; @@ -117,8 +117,8 @@ const SfxItemPropertyMapEntry* ImplGetSvxUnoOutlinerTextCursorPropertyMap() SVX_UNOEDIT_FONT_PROPERTIES, SVX_UNOEDIT_OUTLINER_PROPERTIES, SVX_UNOEDIT_PARA_PROPERTIES, - {OUString("TextUserDefinedAttributes"), EE_CHAR_XMLATTRIBS, ::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, - {OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, ::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0}, + {OUString("TextUserDefinedAttributes"), EE_CHAR_XMLATTRIBS, cppu::UnoType<com::sun::star::container::XNameContainer>::get(), 0, 0}, + {OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, cppu::UnoType<com::sun::star::container::XNameContainer>::get(), 0, 0}, { OUString(), 0, css::uno::Type(), 0, 0 } }; @@ -1566,13 +1566,13 @@ uno::Any SAL_CALL SvxUnoTextRange::queryAggregation( const uno::Type & rType ) throw(uno::RuntimeException, std::exception) { QUERYINT( text::XTextRange ); - else if( rType == ::getCppuType((const uno::Reference< beans::XMultiPropertyStates >*)0) ) + else if( rType == cppu::UnoType<beans::XMultiPropertyStates>::get()) return uno::makeAny(uno::Reference< beans::XMultiPropertyStates >(this)); - else if( rType == ::getCppuType((const uno::Reference< beans::XPropertySet >*)0) ) + else if( rType == cppu::UnoType<beans::XPropertySet>::get()) return uno::makeAny(uno::Reference< beans::XPropertySet >(this)); else QUERYINT( beans::XPropertyState ); else QUERYINT( text::XTextRangeCompare ); - else if( rType == ::getCppuType((const uno::Reference< beans::XMultiPropertySet >*)0) ) + else if( rType == cppu::UnoType<beans::XMultiPropertySet>::get()) return uno::makeAny(uno::Reference< beans::XMultiPropertySet >(this)); else QUERYINT( lang::XServiceInfo ); else QUERYINT( lang::XTypeProvider ); @@ -1613,15 +1613,15 @@ namespace aTypeSequence.realloc( 9 ); // !DANGER! keep this updated uno::Type* pTypes = aTypeSequence.getArray(); - *pTypes++ = ::getCppuType(( const uno::Reference< text::XTextRange >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< beans::XPropertySet >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< beans::XMultiPropertySet >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< beans::XMultiPropertyStates >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< beans::XPropertyState >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< lang::XServiceInfo >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< lang::XTypeProvider >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< lang::XUnoTunnel >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< text::XTextRangeCompare >*)0); + *pTypes++ = cppu::UnoType<text::XTextRange>::get(); + *pTypes++ = cppu::UnoType<beans::XPropertySet>::get(); + *pTypes++ = cppu::UnoType<beans::XMultiPropertySet>::get(); + *pTypes++ = cppu::UnoType<beans::XMultiPropertyStates>::get(); + *pTypes++ = cppu::UnoType<beans::XPropertyState>::get(); + *pTypes++ = cppu::UnoType<lang::XServiceInfo>::get(); + *pTypes++ = cppu::UnoType<lang::XTypeProvider>::get(); + *pTypes++ = cppu::UnoType<lang::XUnoTunnel>::get(); + *pTypes++ = cppu::UnoType<text::XTextRangeCompare>::get(); return aTypeSequence; } @@ -1693,7 +1693,7 @@ uno::Any SAL_CALL SvxUnoTextBase::queryAggregation( const uno::Type & rType ) { QUERYINT( text::XText ); QUERYINT( text::XSimpleText ); - if( rType == ::getCppuType((const uno::Reference< text::XTextRange >*)0) ) + if( rType == cppu::UnoType<text::XTextRange>::get()) return uno::makeAny(uno::Reference< text::XTextRange >((text::XText*)(this))); QUERYINT(container::XEnumerationAccess ); QUERYINT( container::XElementAccess ); @@ -1728,21 +1728,21 @@ namespace aTypeSequence.realloc( 15 ); // !DANGER! keep this updated uno::Type* pTypes = aTypeSequence.getArray(); - *pTypes++ = ::getCppuType(( const uno::Reference< text::XText >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< container::XEnumerationAccess >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< beans::XPropertySet >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< beans::XMultiPropertySet >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< beans::XMultiPropertyStates >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< beans::XPropertyState >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< text::XTextRangeMover >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< text::XTextAppend >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< text::XTextCopy >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< text::XParagraphAppend >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< text::XTextPortionAppend >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< lang::XServiceInfo >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< lang::XTypeProvider >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< lang::XUnoTunnel >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< text::XTextRangeCompare >*)0); + *pTypes++ = cppu::UnoType<text::XText>::get(); + *pTypes++ = cppu::UnoType<container::XEnumerationAccess>::get(); + *pTypes++ = cppu::UnoType<beans::XPropertySet>::get(); + *pTypes++ = cppu::UnoType<beans::XMultiPropertySet>::get(); + *pTypes++ = cppu::UnoType<beans::XMultiPropertyStates>::get(); + *pTypes++ = cppu::UnoType<beans::XPropertyState>::get(); + *pTypes++ = cppu::UnoType<text::XTextRangeMover>::get(); + *pTypes++ = cppu::UnoType<text::XTextAppend>::get(); + *pTypes++ = cppu::UnoType<text::XTextCopy>::get(); + *pTypes++ = cppu::UnoType<text::XParagraphAppend>::get(); + *pTypes++ = cppu::UnoType<text::XTextPortionAppend>::get(); + *pTypes++ = cppu::UnoType<lang::XServiceInfo>::get(); + *pTypes++ = cppu::UnoType<lang::XTypeProvider>::get(); + *pTypes++ = cppu::UnoType<lang::XUnoTunnel>::get(); + *pTypes++ = cppu::UnoType<text::XTextRangeCompare>::get(); return aTypeSequence; } @@ -2017,7 +2017,7 @@ uno::Reference< container::XEnumeration > SAL_CALL SvxUnoTextBase::createEnumera // XElementAccess ( container::XEnumerationAccess ) uno::Type SAL_CALL SvxUnoTextBase::getElementType( ) throw(uno::RuntimeException, std::exception) { - return ::getCppuType((const uno::Reference< text::XTextRange >*)0 ); + return cppu::UnoType<text::XTextRange>::get(); } sal_Bool SAL_CALL SvxUnoTextBase::hasElements( ) throw(uno::RuntimeException, std::exception) diff --git a/editeng/source/uno/unotext2.cxx b/editeng/source/uno/unotext2.cxx index 95201133cd81..5614d76beaba 100644 --- a/editeng/source/uno/unotext2.cxx +++ b/editeng/source/uno/unotext2.cxx @@ -179,17 +179,17 @@ namespace aTypeSequence.realloc( 11 ); // !DANGER! keep this updated uno::Type* pTypes = aTypeSequence.getArray(); - *pTypes++ = ::getCppuType(( const uno::Reference< text::XTextRange >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< beans::XPropertySet >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< beans::XMultiPropertySet >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< beans::XMultiPropertyStates >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< beans::XPropertyState >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< text::XTextRangeCompare >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< text::XTextContent >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< container::XEnumerationAccess >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< lang::XServiceInfo >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< lang::XTypeProvider >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< lang::XUnoTunnel >*)0); + *pTypes++ = cppu::UnoType<text::XTextRange>::get(); + *pTypes++ = cppu::UnoType<beans::XPropertySet>::get(); + *pTypes++ = cppu::UnoType<beans::XMultiPropertySet>::get(); + *pTypes++ = cppu::UnoType<beans::XMultiPropertyStates>::get(); + *pTypes++ = cppu::UnoType<beans::XPropertyState>::get(); + *pTypes++ = cppu::UnoType<text::XTextRangeCompare>::get(); + *pTypes++ = cppu::UnoType<text::XTextContent>::get(); + *pTypes++ = cppu::UnoType<container::XEnumerationAccess>::get(); + *pTypes++ = cppu::UnoType<lang::XServiceInfo>::get(); + *pTypes++ = cppu::UnoType<lang::XTypeProvider>::get(); + *pTypes++ = cppu::UnoType<lang::XUnoTunnel>::get(); return aTypeSequence; } @@ -274,7 +274,7 @@ uno::Reference< container::XEnumeration > SAL_CALL SvxUnoTextContent::createEnum uno::Type SAL_CALL SvxUnoTextContent::getElementType() throw(uno::RuntimeException, std::exception) { - return ::getCppuType((const uno::Reference< text::XTextRange >*)0); + return cppu::UnoType<text::XTextRange>::get(); } sal_Bool SAL_CALL SvxUnoTextContent::hasElements() @@ -481,7 +481,7 @@ SvxUnoTextCursor::~SvxUnoTextCursor() throw() uno::Any SAL_CALL SvxUnoTextCursor::queryAggregation( const uno::Type & rType ) throw(uno::RuntimeException, std::exception) { - if( rType == ::getCppuType((const uno::Reference< text::XTextRange >*)0) ) + if( rType == cppu::UnoType<text::XTextRange>::get()) return uno::makeAny(uno::Reference< text::XTextRange >((text::XText*)(this))); else QUERYINT( text::XTextCursor ); else QUERYINT( beans::XMultiPropertyStates ); @@ -524,16 +524,16 @@ namespace aTypeSequence.realloc( 10 ); // !DANGER! keep this updated uno::Type* pTypes = aTypeSequence.getArray(); - *pTypes++ = ::getCppuType(( const uno::Reference< text::XTextRange >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< text::XTextCursor >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< beans::XPropertySet >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< beans::XMultiPropertySet >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< beans::XMultiPropertyStates >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< beans::XPropertyState >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< text::XTextRangeCompare >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< lang::XServiceInfo >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< lang::XTypeProvider >*)0); - *pTypes++ = ::getCppuType(( const uno::Reference< lang::XUnoTunnel >*)0); + *pTypes++ = cppu::UnoType<text::XTextRange>::get(); + *pTypes++ = cppu::UnoType<text::XTextCursor>::get(); + *pTypes++ = cppu::UnoType<beans::XPropertySet>::get(); + *pTypes++ = cppu::UnoType<beans::XMultiPropertySet>::get(); + *pTypes++ = cppu::UnoType<beans::XMultiPropertyStates>::get(); + *pTypes++ = cppu::UnoType<beans::XPropertyState>::get(); + *pTypes++ = cppu::UnoType<text::XTextRangeCompare>::get(); + *pTypes++ = cppu::UnoType<lang::XServiceInfo>::get(); + *pTypes++ = cppu::UnoType<lang::XTypeProvider>::get(); + *pTypes++ = cppu::UnoType<lang::XUnoTunnel>::get(); return aTypeSequence; } diff --git a/editeng/source/xml/xmltxtexp.cxx b/editeng/source/xml/xmltxtexp.cxx index 65bb17a8533e..324dbccced9e 100644 --- a/editeng/source/xml/xmltxtexp.cxx +++ b/editeng/source/xml/xmltxtexp.cxx @@ -383,7 +383,7 @@ SvxXMLTextExportComponent::SvxXMLTextExportComponent( SVX_UNOEDIT_CHAR_PROPERTIES, SVX_UNOEDIT_FONT_PROPERTIES, // SVX_UNOEDIT_OUTLINER_PROPERTIES, - {OUString(UNO_NAME_NUMBERING_RULES), EE_PARA_NUMBULLET, ::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexReplace>*)0), 0, 0 }, + {OUString(UNO_NAME_NUMBERING_RULES), EE_PARA_NUMBULLET, cppu::UnoType<com::sun::star::container::XIndexReplace>::get(), 0, 0 }, {OUString(UNO_NAME_NUMBERING), EE_PARA_BULLETSTATE,::getBooleanCppuType(), 0, 0 }, {OUString(UNO_NAME_NUMBERING_LEVEL), EE_PARA_OUTLLEVEL, ::cppu::UnoType<sal_Int16>::get(), 0, 0 }, SVX_UNOEDIT_PARA_PROPERTIES, diff --git a/embedserv/source/embed/docholder.cxx b/embedserv/source/embed/docholder.cxx index 1b2732cb8b51..71ce91baa19f 100644 --- a/embedserv/source/embed/docholder.cxx +++ b/embedserv/source/embed/docholder.cxx @@ -1046,7 +1046,7 @@ IDispatch* DocumentHolder::GetIDispatch() bridge::ModelDependent::OLE ); if ( anyResult.getValueTypeClass() == - getCppuType((sal_uInt32*) 0).getTypeClass() ) + cppu::UnoType<sal_uInt32>::get().getTypeClass() ) { VARIANT* pVariant = *(VARIANT**)anyResult.getValue(); if ( pVariant->vt == VT_DISPATCH ) diff --git a/embedserv/source/embed/ed_idataobj.cxx b/embedserv/source/embed/ed_idataobj.cxx index 2bad409194ca..ddb802aa318e 100644 --- a/embedserv/source/embed/ed_idataobj.cxx +++ b/embedserv/source/embed/ed_idataobj.cxx @@ -56,7 +56,7 @@ sal_uInt64 EmbedDocument_Impl::getMetaFileHandle_Impl( sal_Bool isEnhMeta ) aFlavor.HumanPresentableName = "Windows GDIMetaFile"; } - aFlavor.DataType = getCppuType( (const sal_uInt64*) 0 ); + aFlavor.DataType = cppu::UnoType<sal_uInt64>::get(); uno::Any aAny = xTransferable->getTransferData( aFlavor ); aAny >>= pResult; diff --git a/embedserv/source/embed/servprov.cxx b/embedserv/source/embed/servprov.cxx index 8f365414c327..a2db313a7778 100644 --- a/embedserv/source/embed/servprov.cxx +++ b/embedserv/source/embed/servprov.cxx @@ -161,11 +161,8 @@ EmbedServer_Impl::getTypes( ) if( ! pCollection ) { static ::cppu::OTypeCollection collection( - getCppuType( - reinterpret_cast<uno::Reference< uno::XWeak>*>(0)), - getCppuType( - reinterpret_cast< - uno::Reference< lang::XTypeProvider>*>(0))); + cppu::UnoType<uno::XWeak>::get(), + cppu::UnoType<lang::XTypeProvider>::get() ); pCollection = &collection; } } diff --git a/eventattacher/source/eventattacher.cxx b/eventattacher/source/eventattacher.cxx index 58106d25998a..883b49fd5a4a 100644 --- a/eventattacher/source/eventattacher.cxx +++ b/eventattacher/source/eventattacher.cxx @@ -547,7 +547,7 @@ Any SAL_CALL FilterAllListenerImpl::approveFiring( const AllEventObject& Event ) } catch( const CannotConvertException& e ) { - throw InvocationTargetException( OUString(), Reference< XInterface >(), Any(&e, ::getCppuType( (CannotConvertException*)0)) ); + throw InvocationTargetException( OUString(), Reference< XInterface >(), Any(&e, cppu::UnoType<CannotConvertException>::get()) ); } } return aRet; @@ -592,7 +592,7 @@ Reference< XEventListener > EventAttacherImpl::attachListener return Reference<XEventListener>(); // Inspect Introspection - Any aObjAny( &xObject, ::getCppuType( (const Reference< XInterface > *)0) ); + Any aObjAny( &xObject, cppu::UnoType<XInterface>::get()); Reference< XIntrospectionAccess > xAccess = xIntrospection->inspect( aObjAny ); if( !xAccess.is() ) @@ -735,7 +735,7 @@ Sequence< Reference<XEventListener> > EventAttacherImpl::attachListeners( return Sequence< Reference<XEventListener> >(); // Inspect Introspection - Any aObjAny( &xObject, ::getCppuType(static_cast<const Reference<XInterface>*>(0)) ); + Any aObjAny( &xObject, cppu::UnoType<XInterface>::get() ); Reference<XIntrospectionAccess> xAccess = xIntrospection->inspect(aObjAny); if (!xAccess.is()) @@ -798,7 +798,7 @@ void EventAttacherImpl::removeListener throw IntrospectionException(); //Inspect Introspection - Any aObjAny( &xObject, ::getCppuType( (const Reference< XInterface > *)0) ); + Any aObjAny( &xObject, cppu::UnoType<XInterface>::get()); Reference< XIntrospectionAccess > xAccess = xIntrospection->inspect( aObjAny ); if( !xAccess.is() ) throw IntrospectionException(); diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx index 28bbd27208df..ae784218a609 100644 --- a/extensions/source/bibliography/datman.cxx +++ b/extensions/source/bibliography/datman.cxx @@ -1432,7 +1432,7 @@ void BibDataManager::propertyChange(const beans::PropertyChangeEvent& evt) throw { if(evt.PropertyName == FM_PROP_VALUE) { - if( evt.NewValue.getValueType() == ::getCppuType((Reference<io::XInputStream>*)0) ) + if( evt.NewValue.getValueType() == cppu::UnoType<io::XInputStream>::get()) { Reference< io::XDataInputStream > xStream( *(const Reference< io::XInputStream > *)evt.NewValue.getValue(), UNO_QUERY ); diff --git a/extensions/source/bibliography/framectr.cxx b/extensions/source/bibliography/framectr.cxx index b569eb1c1543..3eeacbb1e074 100644 --- a/extensions/source/bibliography/framectr.cxx +++ b/extensions/source/bibliography/framectr.cxx @@ -273,12 +273,12 @@ void BibFrameController_Impl::dispose() throw (::com::sun::star::uno::RuntimeExc void BibFrameController_Impl::addEventListener( const uno::Reference< lang::XEventListener > & aListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) { - pImp->aLC.addInterface( ::getCppuType((const Reference< lang::XEventListener >*)0), aListener ); + pImp->aLC.addInterface( cppu::UnoType<lang::XEventListener>::get(), aListener ); } void BibFrameController_Impl::removeEventListener( const uno::Reference< lang::XEventListener > & aListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) { - pImp->aLC.removeInterface( ::getCppuType((const Reference< lang::XEventListener >*)0), aListener ); + pImp->aLC.removeInterface( cppu::UnoType<lang::XEventListener>::get(), aListener ); } uno::Reference< frame::XDispatch > BibFrameController_Impl::queryDispatch( const util::URL& aURL, const OUString& /*aTarget*/, sal_Int32 /*nSearchFlags*/ ) throw (::com::sun::star::uno::RuntimeException, std::exception) diff --git a/extensions/source/ole/oleobjw.cxx b/extensions/source/ole/oleobjw.cxx index ca0c8156be96..2b0c14792b01 100644 --- a/extensions/source/ole/oleobjw.cxx +++ b/extensions/source/ole/oleobjw.cxx @@ -138,11 +138,11 @@ IUnknownWrapper_Impl::~IUnknownWrapper_Impl() Any IUnknownWrapper_Impl::queryInterface(const Type& t) throw (RuntimeException) { - if (t == getCppuType(static_cast<Reference<XDefaultMethod>*>( 0)) && !m_bHasDfltMethod ) + if (t == cppu::UnoType<XDefaultMethod>::get() && !m_bHasDfltMethod ) return Any(); - if (t == getCppuType(static_cast<Reference<XDefaultProperty>*>( 0)) && !m_bHasDfltProperty ) + if (t == cppu::UnoType<XDefaultProperty>::get() && !m_bHasDfltProperty ) return Any(); - if ( ( t == getCppuType(static_cast<Reference<XInvocation>*>( 0)) || t == getCppuType(static_cast<Reference<XAutomationInvocation>*>( 0)) ) && !m_spDispatch) + if ( ( t == cppu::UnoType<XInvocation>::get() || t == cppu::UnoType<XAutomationInvocation>::get() ) && !m_spDispatch) return Any(); // XDirectInvocation seems to be an oracle replacement for XAutomationInvocation, however it is flawed esecially wrt. assumptions about whether to invoke a // Put or Get property, the implementation code has no business guessing that, it's up to the caller to decide that. Worse XDirectInvocation duplicates lots of code. diff --git a/extensions/source/ole/servprov.cxx b/extensions/source/ole/servprov.cxx index 77006bf6432c..221e9de00f8a 100644 --- a/extensions/source/ole/servprov.cxx +++ b/extensions/source/ole/servprov.cxx @@ -64,8 +64,7 @@ ProviderOleWrapper_Impl::ProviderOleWrapper_Impl(const Reference<XMultiServiceFa if (xInt.is()) { - Any a= xInt->queryInterface( ::getCppuType( reinterpret_cast< - Reference< XBridgeSupplier2>* >(0))); + Any a= xInt->queryInterface( cppu::UnoType<XBridgeSupplier2>::get() ); a >>= m_bridgeSupplier; } @@ -202,8 +201,7 @@ OneInstanceOleWrapper_Impl::OneInstanceOleWrapper_Impl( const Reference<XMultiS if (xInt.is()) { - Any a= xInt->queryInterface( getCppuType( - reinterpret_cast< Reference<XBridgeSupplier2>*>(0))); + Any a= xInt->queryInterface( cppu::UnoType<XBridgeSupplier2>::get() ); a >>= m_bridgeSupplier; } } @@ -481,8 +479,7 @@ OleClient_Impl::OleClient_Impl( const Reference<XMultiServiceFactory>& smgr): if (xInt.is()) { - Any a= xInt->queryInterface(getCppuType( - reinterpret_cast<Reference<XBridgeSupplier2>*>(0))); + Any a= xInt->queryInterface(cppu::UnoType<XBridgeSupplier2>::get() ); a >>= m_bridgeSupplier; } } @@ -597,8 +594,7 @@ OleServer_Impl::OleServer_Impl( const Reference<XMultiServiceFactory>& smgr): if (xInt.is()) { - Any a= xInt->queryInterface( getCppuType( - reinterpret_cast< Reference<XBridgeSupplier2>*>(0))); + Any a= xInt->queryInterface( cppu::UnoType<XBridgeSupplier2>::get() ); a >>= m_bridgeSupplier; } @@ -644,8 +640,8 @@ Sequence< Type > SAL_CALL OleServer_Impl::getTypes( ) throw(RuntimeException) if( ! pCollection ) { static OTypeCollection collection( - getCppuType(reinterpret_cast< Reference< XWeak>*>(0)), - getCppuType(reinterpret_cast< Reference< XTypeProvider>*>(0)) ); + cppu::UnoType<XWeak>::get(), + cppu::UnoType<XTypeProvider>::get() ); pCollection = &collection; } } diff --git a/extensions/source/ole/unoconversionutilities.hxx b/extensions/source/ole/unoconversionutilities.hxx index 083d50284165..2f969834d7a9 100644 --- a/extensions/source/ole/unoconversionutilities.hxx +++ b/extensions/source/ole/unoconversionutilities.hxx @@ -706,7 +706,7 @@ void UnoConversionUtilities<T>::anyToVariant(VARIANT* pVariant, const Any& rAny) } case TypeClass_STRUCT: { - if (rAny.getValueType() == getCppuType((Date*)0)) + if (rAny.getValueType() == cppu::UnoType<Date>::get() ) { Date d; if (rAny >>= d) @@ -1572,7 +1572,7 @@ void UnoConversionUtilities<T>::variantToAny( const VARIANT* pVariant, Any& rAny rAny.setValue( & var.bVal, cppu::UnoType<sal_Int8>::get()); break; case VT_UI2: - rAny.setValue( & var.uiVal, getCppuType( (sal_uInt16*)0)); + rAny.setValue( & var.uiVal, cppu::UnoType<cppu::UnoUnsignedShortType>::get() ); break; case VT_UI4: rAny.setValue( & var.ulVal, cppu::UnoType<sal_uInt32>::get()); @@ -1704,10 +1704,10 @@ Any UnoConversionUtilities<T>::createOleObjectWrapper(VARIANT* pVar, const Type& { case VT_EMPTY: case VT_UNKNOWN: - desiredType = getCppuType((Reference<XInterface>*) 0); + desiredType = cppu::UnoType<XInterface>::get(); break; case VT_DISPATCH: - desiredType = getCppuType((Reference<XInvocation>*) 0); + desiredType = cppu::UnoType<XInvocation>::get(); break; default: desiredType = aType; @@ -1811,7 +1811,7 @@ Any UnoConversionUtilities<T>::createOleObjectWrapper(VARIANT* pVar, const Type& // If the object implements UNO interfaces then get the types. Sequence<Type> seqTypes = getImplementedInterfaces(spUnknown); if (seqTypes.getLength() == 0 && - aType != VOID_TYPE && aType != getCppuType((Reference<XInvocation>*)0)) + aType != VOID_TYPE && aType != cppu::UnoType<XInvocation>::get()) { seqTypes = Sequence<Type>( & aType, 1); } @@ -1847,7 +1847,7 @@ Any UnoConversionUtilities<T>::createOleObjectWrapper(VARIANT* pVar, const Type& // we have a wrapper object //The wrapper implements already XInvocation and XInterface. If //param aType is void then the object is supposed to have XInvocation. - if (aType == getCppuType((Reference<XInvocation>*)0) || + if (aType == cppu::UnoType<XInvocation>::get()|| (aType == VOID_TYPE && seqTypes.getLength() == 0 )) { ret = xIntNewProxy->queryInterface(desiredType); diff --git a/extensions/source/plugin/base/multiplx.cxx b/extensions/source/plugin/base/multiplx.cxx index 48920c79a9e2..c810e4c084f2 100644 --- a/extensions/source/plugin/base/multiplx.cxx +++ b/extensions/source/plugin/base/multiplx.cxx @@ -85,19 +85,19 @@ void MRCListenerMultiplexerHelper::disposeAndClear() void MRCListenerMultiplexerHelper::adviseToPeer( const Reference< ::com::sun::star::awt::XWindow > & rPeer, const Type & type ) { // add a listener to the source (peer) - if( type == ::getCppuType((const Reference< ::com::sun::star::awt::XWindowListener >*)0) ) + if( type == cppu::UnoType<com::sun::star::awt::XWindowListener>::get()) rPeer->addWindowListener( this ); - else if( type == ::getCppuType((const Reference< ::com::sun::star::awt::XKeyListener >*)0) ) + else if( type == cppu::UnoType<com::sun::star::awt::XKeyListener>::get()) rPeer->addKeyListener( this ); - else if( type == ::getCppuType((const Reference< ::com::sun::star::awt::XFocusListener >*)0) ) + else if( type == cppu::UnoType<com::sun::star::awt::XFocusListener>::get()) rPeer->addFocusListener( this ); - else if( type == ::getCppuType((const Reference< ::com::sun::star::awt::XMouseListener >*)0) ) + else if( type == cppu::UnoType<com::sun::star::awt::XMouseListener>::get()) rPeer->addMouseListener( this ); - else if( type == ::getCppuType((const Reference< ::com::sun::star::awt::XMouseMotionListener >*)0) ) + else if( type == cppu::UnoType<com::sun::star::awt::XMouseMotionListener>::get()) rPeer->addMouseMotionListener( this ); - else if( type == ::getCppuType((const Reference< ::com::sun::star::awt::XPaintListener >*)0) ) + else if( type == cppu::UnoType<com::sun::star::awt::XPaintListener>::get()) rPeer->addPaintListener( this ); - else if( type == ::getCppuType((const Reference< ::com::sun::star::awt::XTopWindowListener >*)0) ) + else if( type == cppu::UnoType<com::sun::star::awt::XTopWindowListener>::get()) { Reference< ::com::sun::star::awt::XTopWindow > xTop( rPeer, UNO_QUERY ); if( xTop.is() ) @@ -113,19 +113,19 @@ void MRCListenerMultiplexerHelper::adviseToPeer( const Reference< ::com::sun::st void MRCListenerMultiplexerHelper::unadviseFromPeer( const Reference< ::com::sun::star::awt::XWindow > & rPeer, const Type & type ) { // the last listener is removed, remove the listener from the source (peer) - if( type == ::getCppuType((const Reference< ::com::sun::star::awt::XWindowListener >*)0) ) + if( type == cppu::UnoType<com::sun::star::awt::XWindowListener>::get()) rPeer->removeWindowListener( this ); - else if( type == ::getCppuType((const Reference< ::com::sun::star::awt::XKeyListener >*)0) ) + else if( type == cppu::UnoType<com::sun::star::awt::XKeyListener>::get()) rPeer->removeKeyListener( this ); - else if( type == ::getCppuType((const Reference< ::com::sun::star::awt::XFocusListener >*)0) ) + else if( type == cppu::UnoType<com::sun::star::awt::XFocusListener>::get()) rPeer->removeFocusListener( this ); - else if( type == ::getCppuType((const Reference< ::com::sun::star::awt::XMouseListener >*)0) ) + else if( type == cppu::UnoType<com::sun::star::awt::XMouseListener>::get()) rPeer->removeMouseListener( this ); - else if( type == ::getCppuType((const Reference< ::com::sun::star::awt::XMouseMotionListener >*)0) ) + else if( type == cppu::UnoType<com::sun::star::awt::XMouseMotionListener>::get()) rPeer->removeMouseMotionListener( this ); - else if( type == ::getCppuType((const Reference< ::com::sun::star::awt::XPaintListener >*)0) ) + else if( type == cppu::UnoType<com::sun::star::awt::XPaintListener>::get()) rPeer->removePaintListener( this ); - else if( type == ::getCppuType((const Reference< ::com::sun::star::awt::XTopWindowListener >*)0) ) + else if( type == cppu::UnoType<com::sun::star::awt::XTopWindowListener>::get()) { Reference< ::com::sun::star::awt::XTopWindow > xTop( rPeer, UNO_QUERY ); if( xTop.is() ) @@ -172,7 +172,7 @@ void MRCListenerMultiplexerHelper::disposing(const ::com::sun::star::lang::Event #define MULTIPLEX( InterfaceName, MethodName, EventName ) \ ::cppu::OInterfaceContainerHelper * pCont; \ -pCont = aListenerHolder.getContainer( ::getCppuType((const Reference< InterfaceName >*)0) ); \ +pCont = aListenerHolder.getContainer( cppu::UnoType<InterfaceName>::get()); \ if( pCont ) \ { \ ::cppu::OInterfaceIteratorHelper aIt( *pCont ); \ diff --git a/extensions/source/plugin/base/plctrl.cxx b/extensions/source/plugin/base/plctrl.cxx index fc19c0d20229..bceeaa61afb9 100644 --- a/extensions/source/plugin/base/plctrl.cxx +++ b/extensions/source/plugin/base/plctrl.cxx @@ -205,84 +205,84 @@ void PluginControl_Impl::setDesignMode( sal_Bool bOn ) void PluginControl_Impl::addPaintListener( const Reference< ::com::sun::star::awt::XPaintListener > & l ) throw( RuntimeException, std::exception ) { - getMultiplexer()->advise( ::getCppuType((const Reference< ::com::sun::star::awt::XPaintListener >*)0), l ); + getMultiplexer()->advise( cppu::UnoType<com::sun::star::awt::XPaintListener>::get(), l ); } //---- ::com::sun::star::awt::XWindow ------------------------------------------------------------------------------------- void PluginControl_Impl::removePaintListener( const Reference< ::com::sun::star::awt::XPaintListener > & l ) throw( RuntimeException, std::exception ) { - getMultiplexer()->unadvise( ::getCppuType((const Reference< ::com::sun::star::awt::XPaintListener >*)0), l ); + getMultiplexer()->unadvise( cppu::UnoType<com::sun::star::awt::XPaintListener>::get(), l ); } //---- ::com::sun::star::awt::XWindow ------------------------------------------------------------------------------------- void PluginControl_Impl::addWindowListener( const Reference< ::com::sun::star::awt::XWindowListener > & l ) throw( RuntimeException, std::exception ) { - getMultiplexer()->advise( ::getCppuType((const Reference< ::com::sun::star::awt::XWindowListener >*)0), l ); + getMultiplexer()->advise( cppu::UnoType<com::sun::star::awt::XWindowListener>::get(), l ); } //---- ::com::sun::star::awt::XWindow ------------------------------------------------------------------------------------- void PluginControl_Impl::removeWindowListener( const Reference< ::com::sun::star::awt::XWindowListener > & l ) throw( RuntimeException, std::exception ) { - getMultiplexer()->unadvise( ::getCppuType((const Reference< ::com::sun::star::awt::XWindowListener >*)0), l ); + getMultiplexer()->unadvise( cppu::UnoType<com::sun::star::awt::XWindowListener>::get(), l ); } //---- ::com::sun::star::awt::XWindow ------------------------------------------------------------------------------------- void PluginControl_Impl::addFocusListener( const Reference< ::com::sun::star::awt::XFocusListener > & l ) throw( RuntimeException, std::exception ) { - getMultiplexer()->advise( ::getCppuType((const Reference< ::com::sun::star::awt::XFocusListener >*)0), l ); + getMultiplexer()->advise( cppu::UnoType<com::sun::star::awt::XFocusListener>::get(), l ); } //---- ::com::sun::star::awt::XWindow ------------------------------------------------------------------------------------- void PluginControl_Impl::removeFocusListener( const Reference< ::com::sun::star::awt::XFocusListener > & l ) throw( RuntimeException, std::exception ) { - getMultiplexer()->unadvise( ::getCppuType((const Reference< ::com::sun::star::awt::XFocusListener >*)0), l ); + getMultiplexer()->unadvise( cppu::UnoType<com::sun::star::awt::XFocusListener>::get(), l ); } //---- ::com::sun::star::awt::XWindow ------------------------------------------------------------------------------------- void PluginControl_Impl::addKeyListener( const Reference< ::com::sun::star::awt::XKeyListener > & l ) throw( RuntimeException, std::exception ) { - getMultiplexer()->advise( ::getCppuType((const Reference< ::com::sun::star::awt::XKeyListener >*)0), l ); + getMultiplexer()->advise( cppu::UnoType<com::sun::star::awt::XKeyListener>::get(), l ); } //---- ::com::sun::star::awt::XWindow ------------------------------------------------------------------------------------- void PluginControl_Impl::removeKeyListener( const Reference< ::com::sun::star::awt::XKeyListener > & l ) throw( RuntimeException, std::exception ) { - getMultiplexer()->unadvise( ::getCppuType((const Reference< ::com::sun::star::awt::XKeyListener >*)0), l ); + getMultiplexer()->unadvise( cppu::UnoType<com::sun::star::awt::XKeyListener>::get(), l ); } //---- ::com::sun::star::awt::XWindow ------------------------------------------------------------------------------------- void PluginControl_Impl::addMouseListener( const Reference< ::com::sun::star::awt::XMouseListener > & l ) throw( RuntimeException, std::exception ) { - getMultiplexer()->advise( ::getCppuType((const Reference< ::com::sun::star::awt::XMouseListener >*)0), l ); + getMultiplexer()->advise( cppu::UnoType<com::sun::star::awt::XMouseListener>::get(), l ); } //---- ::com::sun::star::awt::XWindow ------------------------------------------------------------------------------------- void PluginControl_Impl::removeMouseListener( const Reference< ::com::sun::star::awt::XMouseListener > & l ) throw( RuntimeException, std::exception ) { - getMultiplexer()->unadvise( ::getCppuType((const Reference< ::com::sun::star::awt::XMouseListener >*)0), l ); + getMultiplexer()->unadvise( cppu::UnoType<com::sun::star::awt::XMouseListener>::get(), l ); } //---- ::com::sun::star::awt::XWindow ------------------------------------------------------------------------------------- void PluginControl_Impl::addMouseMotionListener( const Reference< ::com::sun::star::awt::XMouseMotionListener > & l ) throw( RuntimeException, std::exception ) { - getMultiplexer()->advise( ::getCppuType((const Reference< ::com::sun::star::awt::XMouseMotionListener >*)0), l ); + getMultiplexer()->advise( cppu::UnoType<com::sun::star::awt::XMouseMotionListener>::get(), l ); } //---- ::com::sun::star::awt::XWindow ------------------------------------------------------------------------------------- void PluginControl_Impl::removeMouseMotionListener( const Reference< ::com::sun::star::awt::XMouseMotionListener > & l ) throw( RuntimeException, std::exception ) { - getMultiplexer()->unadvise( ::getCppuType((const Reference< ::com::sun::star::awt::XMouseMotionListener >*)0), l ); + getMultiplexer()->unadvise( cppu::UnoType<com::sun::star::awt::XMouseMotionListener>::get(), l ); } diff --git a/extensions/source/propctrlr/eformspropertyhandler.cxx b/extensions/source/propctrlr/eformspropertyhandler.cxx index d052ea3a8f1d..97929ded6d83 100644 --- a/extensions/source/propctrlr/eformspropertyhandler.cxx +++ b/extensions/source/propctrlr/eformspropertyhandler.cxx @@ -304,7 +304,7 @@ namespace pcr if ( m_pHelper->isListEntrySink() ) { implAddPropertyDescription( aProperties, PROPERTY_LIST_BINDING, - ::getCppuType( static_cast< Reference< XListEntrySource > * >( NULL ) ) ); + cppu::UnoType<XListEntrySource>::get() ); } } diff --git a/extensions/source/propctrlr/formcontroller.cxx b/extensions/source/propctrlr/formcontroller.cxx index fc2279c82d57..38b2c3c7f2bf 100644 --- a/extensions/source/propctrlr/formcontroller.cxx +++ b/extensions/source/propctrlr/formcontroller.cxx @@ -103,9 +103,9 @@ namespace pcr Sequence< Type > SAL_CALL FormController::getTypes( ) throw(RuntimeException, std::exception) { ::cppu::OTypeCollection aTypes( - ::getCppuType( static_cast< Reference< XPropertySet >* >(NULL) ), - ::getCppuType( static_cast< Reference< XMultiPropertySet >* >(NULL) ), - ::getCppuType( static_cast< Reference< XFastPropertySet >* >(NULL) ), + cppu::UnoType<XPropertySet>::get(), + cppu::UnoType<XMultiPropertySet>::get(), + cppu::UnoType<XFastPropertySet>::get(), OPropertyBrowserController::getTypes()); return aTypes.getTypes(); } diff --git a/extensions/source/propctrlr/submissionhandler.cxx b/extensions/source/propctrlr/submissionhandler.cxx index 04f9c1627687..4603b451d8b0 100644 --- a/extensions/source/propctrlr/submissionhandler.cxx +++ b/extensions/source/propctrlr/submissionhandler.cxx @@ -268,7 +268,7 @@ namespace pcr ::std::vector< Property > aProperties; if ( m_pHelper.get() ) { - implAddPropertyDescription( aProperties, PROPERTY_SUBMISSION_ID, ::getCppuType( static_cast< Reference< submission::XSubmission > * >( NULL ) ) ); + implAddPropertyDescription( aProperties, PROPERTY_SUBMISSION_ID, cppu::UnoType<submission::XSubmission>::get() ); implAddPropertyDescription( aProperties, PROPERTY_XFORMS_BUTTONTYPE, ::cppu::UnoType<FormButtonType>::get() ); } if ( aProperties.empty() ) diff --git a/extensions/test/ole/cpnt/cpnt.cxx b/extensions/test/ole/cpnt/cpnt.cxx index 1e02b3601b4c..36483086ee89 100644 --- a/extensions/test/ole/cpnt/cpnt.cxx +++ b/extensions/test/ole/cpnt/cpnt.cxx @@ -1237,7 +1237,7 @@ void SAL_CALL OComponent::methodStruct(const Property& aProp) throw( RuntimeExce Property SAL_CALL OComponent::retMethodStruct(void) throw( RuntimeException ) { - Property a(L"OleTest_Property", 255, getCppuType( (Reference<XInterface>*)0), PropertyAttribute::MAYBEVOID | + Property a(L"OleTest_Property", 255, cppu::UnoType<XInterface>::get(), PropertyAttribute::MAYBEVOID | PropertyAttribute::BOUND | PropertyAttribute::CONSTRAINED | PropertyAttribute::TRANSIENT | PropertyAttribute::READONLY | PropertyAttribute::MAYBEAMBIGUOUS | PropertyAttribute::MAYBEDEFAULT ); @@ -1246,7 +1246,7 @@ Property SAL_CALL OComponent::retMethodStruct(void) throw( RuntimeException ) Property SAL_CALL OComponent::getAttrStruct(void) throw( RuntimeException) { - Property a(L"OleTest_Property", 255, getCppuType( (Reference<XInterface>*)0), PropertyAttribute::MAYBEVOID | + Property a(L"OleTest_Property", 255, cppu::UnoType<XInterface>::get(), PropertyAttribute::MAYBEVOID | PropertyAttribute::BOUND | PropertyAttribute::CONSTRAINED | PropertyAttribute::TRANSIENT | PropertyAttribute::READONLY | PropertyAttribute::MAYBEAMBIGUOUS | PropertyAttribute::MAYBEDEFAULT ); |