diff options
117 files changed, 524 insertions, 540 deletions
diff --git a/UnoControls/source/base/basecontainercontrol.cxx b/UnoControls/source/base/basecontainercontrol.cxx index 2c58848c2c7a..5663cd5939b0 100644 --- a/UnoControls/source/base/basecontainercontrol.cxx +++ b/UnoControls/source/base/basecontainercontrol.cxx @@ -87,8 +87,8 @@ Sequence< Type > SAL_CALL BaseContainerControl::getTypes() throw( RuntimeExcepti if ( pTypeCollection == NULL ) { // Create a static typecollection ... - static OTypeCollection aTypeCollection ( ::getCppuType(( const Reference< XControlModel >*)NULL ) , - ::getCppuType(( const Reference< XControlContainer >*)NULL ) , + static OTypeCollection aTypeCollection ( cppu::UnoType<XControlModel>::get(), + cppu::UnoType<XControlContainer>::get(), BaseControl::getTypes() ); // ... and set his address to static pointer! @@ -250,7 +250,7 @@ void SAL_CALL BaseContainerControl::addControl ( const OUString& rName, const Re } // Send message to all listener - OInterfaceContainerHelper* pInterfaceContainer = m_aListeners.getContainer( ::getCppuType((const Reference< XContainerListener >*)0) ); + OInterfaceContainerHelper* pInterfaceContainer = m_aListeners.getContainer( cppu::UnoType<XContainerListener>::get()); if (pInterfaceContainer) { @@ -300,7 +300,7 @@ void SAL_CALL BaseContainerControl::removeControl ( const Reference< XControl > maControlInfoList.erase(itr); // Send message to all other listener - OInterfaceContainerHelper * pInterfaceContainer = m_aListeners.getContainer( ::getCppuType((const Reference< XContainerListener >*)0) ); + OInterfaceContainerHelper * pInterfaceContainer = m_aListeners.getContainer( cppu::UnoType<XContainerListener>::get()); if (pInterfaceContainer) { diff --git a/UnoControls/source/base/basecontrol.cxx b/UnoControls/source/base/basecontrol.cxx index 312bd6b3a799..78cc308f6925 100644 --- a/UnoControls/source/base/basecontrol.cxx +++ b/UnoControls/source/base/basecontrol.cxx @@ -130,12 +130,12 @@ Sequence< Type > SAL_CALL BaseControl::getTypes() throw( RuntimeException, std:: if ( pTypeCollection == NULL ) { // Create a static typecollection ... - static OTypeCollection aTypeCollection( ::getCppuType(( const Reference< XPaintListener >*)NULL ) , - ::getCppuType(( const Reference< XWindowListener>*)NULL ) , - ::getCppuType(( const Reference< XView >*)NULL ) , - ::getCppuType(( const Reference< XWindow >*)NULL ) , - ::getCppuType(( const Reference< XServiceInfo >*)NULL ) , - ::getCppuType(( const Reference< XControl >*)NULL ) , + static OTypeCollection aTypeCollection( cppu::UnoType<XPaintListener>::get(), + cppu::UnoType<XWindowListener>::get(), + cppu::UnoType<XView>::get(), + cppu::UnoType<XWindow>::get(), + cppu::UnoType<XServiceInfo>::get(), + cppu::UnoType<XControl>::get(), OComponentHelper::getTypes() ); @@ -481,84 +481,84 @@ Rectangle SAL_CALL BaseControl::getPosSize() throw( RuntimeException, std::excep void SAL_CALL BaseControl::addWindowListener( const Reference< XWindowListener >& xListener ) throw( RuntimeException, std::exception ) { - impl_getMultiplexer()->advise( ::getCppuType(( const Reference< XWindowListener >*)0), xListener ); + impl_getMultiplexer()->advise( cppu::UnoType<XWindowListener>::get(), xListener ); } // XWindow void SAL_CALL BaseControl::addFocusListener( const Reference< XFocusListener >& xListener ) throw( RuntimeException, std::exception ) { - impl_getMultiplexer()->advise( ::getCppuType(( const Reference< XFocusListener >*)0), xListener ); + impl_getMultiplexer()->advise( cppu::UnoType<XFocusListener>::get(), xListener ); } // XWindow void SAL_CALL BaseControl::addKeyListener( const Reference< XKeyListener >& xListener ) throw( RuntimeException, std::exception ) { - impl_getMultiplexer()->advise( ::getCppuType(( const Reference< XKeyListener >*)0), xListener ); + impl_getMultiplexer()->advise( cppu::UnoType<XKeyListener>::get(), xListener ); } // XWindow void SAL_CALL BaseControl::addMouseListener( const Reference< XMouseListener >& xListener ) throw( RuntimeException, std::exception ) { - impl_getMultiplexer()->advise( ::getCppuType(( const Reference< XMouseListener >*)0), xListener ); + impl_getMultiplexer()->advise( cppu::UnoType<XMouseListener>::get(), xListener ); } // XWindow void SAL_CALL BaseControl::addMouseMotionListener( const Reference< XMouseMotionListener >& xListener ) throw( RuntimeException, std::exception ) { - impl_getMultiplexer()->advise( ::getCppuType(( const Reference< XMouseMotionListener >*)0), xListener ); + impl_getMultiplexer()->advise( cppu::UnoType<XMouseMotionListener>::get(), xListener ); } // XWindow void SAL_CALL BaseControl::addPaintListener( const Reference< XPaintListener >& xListener ) throw( RuntimeException, std::exception ) { - impl_getMultiplexer()->advise( ::getCppuType(( const Reference< XPaintListener >*)0), xListener ); + impl_getMultiplexer()->advise( cppu::UnoType<XPaintListener>::get(), xListener ); } // XWindow void SAL_CALL BaseControl::removeWindowListener( const Reference< XWindowListener >& xListener ) throw( RuntimeException, std::exception ) { - impl_getMultiplexer()->unadvise( ::getCppuType(( const Reference< XWindowListener >*)0), xListener ); + impl_getMultiplexer()->unadvise( cppu::UnoType<XWindowListener>::get(), xListener ); } // XWindow void SAL_CALL BaseControl::removeFocusListener( const Reference< XFocusListener >& xListener ) throw( RuntimeException, std::exception ) { - impl_getMultiplexer()->unadvise( ::getCppuType(( const Reference< XFocusListener >*)0), xListener ); + impl_getMultiplexer()->unadvise( cppu::UnoType<XFocusListener>::get(), xListener ); } // XWindow void SAL_CALL BaseControl::removeKeyListener( const Reference< XKeyListener >& xListener ) throw( RuntimeException, std::exception ) { - impl_getMultiplexer()->unadvise( ::getCppuType(( const Reference< XKeyListener >*)0), xListener ); + impl_getMultiplexer()->unadvise( cppu::UnoType<XKeyListener>::get(), xListener ); } // XWindow void SAL_CALL BaseControl::removeMouseListener( const Reference< XMouseListener >& xListener ) throw( RuntimeException, std::exception ) { - impl_getMultiplexer()->unadvise( ::getCppuType(( const Reference< XMouseListener >*)0), xListener ); + impl_getMultiplexer()->unadvise( cppu::UnoType<XMouseListener>::get(), xListener ); } // XWindow void SAL_CALL BaseControl::removeMouseMotionListener( const Reference< XMouseMotionListener >& xListener ) throw( RuntimeException, std::exception ) { - impl_getMultiplexer()->unadvise( ::getCppuType(( const Reference< XMouseMotionListener >*)0), xListener ); + impl_getMultiplexer()->unadvise( cppu::UnoType<XMouseMotionListener>::get(), xListener ); } // XWindow void SAL_CALL BaseControl::removePaintListener( const Reference< XPaintListener >& xListener ) throw( RuntimeException, std::exception ) { - impl_getMultiplexer()->unadvise( ::getCppuType(( const Reference< XPaintListener >*)0), xListener ); + impl_getMultiplexer()->unadvise( cppu::UnoType<XPaintListener>::get(), xListener ); } // XView diff --git a/UnoControls/source/base/multiplexer.cxx b/UnoControls/source/base/multiplexer.cxx index 8ddaa4c22d2e..86e551ad3673 100644 --- a/UnoControls/source/base/multiplexer.cxx +++ b/UnoControls/source/base/multiplexer.cxx @@ -392,19 +392,19 @@ void OMRCListenerMultiplexerHelper::impl_adviseToPeer( const Reference< XWind const Type& aType ) { // add a listener to the source (peer) - if( aType == ::getCppuType((const Reference< XWindowListener >*)0) ) + if( aType == cppu::UnoType<XWindowListener>::get()) xPeer->addWindowListener( this ); - else if( aType == ::getCppuType((const Reference< XKeyListener >*)0) ) + else if( aType == cppu::UnoType<XKeyListener>::get()) xPeer->addKeyListener( this ); - else if( aType == ::getCppuType((const Reference< XFocusListener >*)0) ) + else if( aType == cppu::UnoType<XFocusListener>::get()) xPeer->addFocusListener( this ); - else if( aType == ::getCppuType((const Reference< XMouseListener >*)0) ) + else if( aType == cppu::UnoType<XMouseListener>::get()) xPeer->addMouseListener( this ); - else if( aType == ::getCppuType((const Reference< XMouseMotionListener >*)0) ) + else if( aType == cppu::UnoType<XMouseMotionListener>::get()) xPeer->addMouseMotionListener( this ); - else if( aType == ::getCppuType((const Reference< XPaintListener >*)0) ) + else if( aType == cppu::UnoType<XPaintListener>::get()) xPeer->addPaintListener( this ); - else if( aType == ::getCppuType((const Reference< XTopWindowListener >*)0) ) + else if( aType == cppu::UnoType<XTopWindowListener>::get()) { Reference< XTopWindow > xTop( xPeer, UNO_QUERY ); if( xTop.is() ) @@ -422,19 +422,19 @@ void OMRCListenerMultiplexerHelper::impl_unadviseFromPeer( const Reference< X const Type& aType ) { // the last listener is removed, remove the listener from the source (peer) - if( aType == ::getCppuType((const Reference< XWindowListener >*)0) ) + if( aType == cppu::UnoType<XWindowListener>::get()) xPeer->removeWindowListener( this ); - else if( aType == ::getCppuType((const Reference< XKeyListener >*)0) ) + else if( aType == cppu::UnoType<XKeyListener>::get()) xPeer->removeKeyListener( this ); - else if( aType == ::getCppuType((const Reference< XFocusListener >*)0) ) + else if( aType == cppu::UnoType<XFocusListener>::get()) xPeer->removeFocusListener( this ); - else if( aType == ::getCppuType((const Reference< XMouseListener >*)0) ) + else if( aType == cppu::UnoType<XMouseListener>::get()) xPeer->removeMouseListener( this ); - else if( aType == ::getCppuType((const Reference< XMouseMotionListener >*)0) ) + else if( aType == cppu::UnoType<XMouseMotionListener>::get()) xPeer->removeMouseMotionListener( this ); - else if( aType == ::getCppuType((const Reference< XPaintListener >*)0) ) + else if( aType == cppu::UnoType<XPaintListener>::get()) xPeer->removePaintListener( this ); - else if( aType == ::getCppuType((const Reference< XTopWindowListener >*)0) ) + else if( aType == cppu::UnoType<XTopWindowListener>::get()) { Reference< XTopWindow > xTop( xPeer, UNO_QUERY ); if( xTop.is() ) diff --git a/UnoControls/source/controls/framecontrol.cxx b/UnoControls/source/controls/framecontrol.cxx index 7b50c3287e0a..2be1c04fe019 100644 --- a/UnoControls/source/controls/framecontrol.cxx +++ b/UnoControls/source/controls/framecontrol.cxx @@ -122,9 +122,9 @@ Sequence< Type > SAL_CALL FrameControl::getTypes() throw( RuntimeException, std: if ( pTypeCollection == NULL ) { // Create a static typecollection ... - static OTypeCollection aTypeCollection ( ::getCppuType(( const Reference< XControlModel >*)NULL ) , - ::getCppuType(( const Reference< XControlContainer >*)NULL ) , - ::getCppuType(( const Reference< XConnectionPointContainer >*)NULL ) , + static OTypeCollection aTypeCollection ( cppu::UnoType<XControlModel>::get(), + cppu::UnoType<XControlContainer>::get(), + cppu::UnoType<XConnectionPointContainer>::get(), BaseControl::getTypes() ); // ... and set his address to static pointer! @@ -444,8 +444,8 @@ void FrameControl::impl_createFrame( const Reference< XWindowPeer >& xPee // notify the listeners sal_Int32 nFrameId = PROPERTYHANDLE_FRAME; - Any aNewFrame ( &xNewFrame, ::getCppuType((const Reference< XFrame >*)0) ); - Any aOldFrame ( &xOldFrame, ::getCppuType((const Reference< XFrame >*)0) ); + Any aNewFrame ( &xNewFrame, cppu::UnoType<XFrame>::get()); + Any aOldFrame ( &xOldFrame, cppu::UnoType<XFrame>::get()); fire ( &nFrameId, &aNewFrame, &aOldFrame, 1, sal_False ); @@ -471,8 +471,8 @@ void FrameControl::impl_deleteFrame() // notify the listeners sal_Int32 nFrameId = PROPERTYHANDLE_FRAME; - Any aNewFrame( &xNullFrame, ::getCppuType((const Reference< XFrame2 >*)0) ); - Any aOldFrame( &xOldFrame, ::getCppuType((const Reference< XFrame2 >*)0) ); + Any aNewFrame( &xNullFrame, cppu::UnoType<XFrame2>::get()); + Any aOldFrame( &xOldFrame, cppu::UnoType<XFrame2>::get()); fire( &nFrameId, &aNewFrame, &aOldFrame, 1, sal_False ); // dispose the frame @@ -487,8 +487,8 @@ const Sequence< Property > FrameControl::impl_getStaticPropertyDescriptor() // All Properties of this implementation. The array must be sorted! static const Property pPropertys[PROPERTY_COUNT] = { - Property( PROPERTYNAME_COMPONENTURL, PROPERTYHANDLE_COMPONENTURL, ::getCppuType((const OUString*)0), PropertyAttribute::BOUND | PropertyAttribute::CONSTRAINED ), - Property( PROPERTYNAME_FRAME, PROPERTYHANDLE_FRAME, ::getCppuType((const Reference< XFrame >*)0), PropertyAttribute::BOUND | PropertyAttribute::TRANSIENT ), + Property( PROPERTYNAME_COMPONENTURL, PROPERTYHANDLE_COMPONENTURL, cppu::UnoType<OUString>::get(), PropertyAttribute::BOUND | PropertyAttribute::CONSTRAINED ), + Property( PROPERTYNAME_FRAME, PROPERTYHANDLE_FRAME, cppu::UnoType<XFrame>::get(), PropertyAttribute::BOUND | PropertyAttribute::TRANSIENT ), Property( PROPERTYNAME_LOADERARGUMENTS, PROPERTYHANDLE_LOADERARGUMENTS, ::getCppuType((const Sequence< PropertyValue >*)0), PropertyAttribute::BOUND | PropertyAttribute::CONSTRAINED ) }; diff --git a/UnoControls/source/controls/progressbar.cxx b/UnoControls/source/controls/progressbar.cxx index e657dd5734d3..18ac7e5e72e4 100644 --- a/UnoControls/source/controls/progressbar.cxx +++ b/UnoControls/source/controls/progressbar.cxx @@ -120,8 +120,8 @@ Sequence< Type > SAL_CALL ProgressBar::getTypes() throw( RuntimeException, std:: if ( pTypeCollection == NULL ) { // Create a static typecollection ... - static OTypeCollection aTypeCollection ( ::getCppuType(( const Reference< XControlModel >*) NULL ) , - ::getCppuType(( const Reference< XProgressBar >*) NULL ) , + static OTypeCollection aTypeCollection ( cppu::UnoType<XControlModel>::get(), + cppu::UnoType<XProgressBar>::get(), BaseControl::getTypes() ); // ... and set his address to static pointer! diff --git a/UnoControls/source/controls/progressmonitor.cxx b/UnoControls/source/controls/progressmonitor.cxx index 4e7e1141b795..93be6b9ab8bf 100644 --- a/UnoControls/source/controls/progressmonitor.cxx +++ b/UnoControls/source/controls/progressmonitor.cxx @@ -161,9 +161,9 @@ Sequence< Type > SAL_CALL ProgressMonitor::getTypes() throw( RuntimeException, s if ( pTypeCollection == NULL ) { // Create a static typecollection ... - static OTypeCollection aTypeCollection ( ::getCppuType(( const css::uno::Reference< XLayoutConstrains >*)NULL ) , - ::getCppuType(( const css::uno::Reference< XButton >*)NULL ) , - ::getCppuType(( const css::uno::Reference< XProgressMonitor >*)NULL ) , + static OTypeCollection aTypeCollection ( cppu::UnoType<XLayoutConstrains>::get(), + cppu::UnoType<XButton>::get(), + cppu::UnoType<XProgressMonitor>::get(), BaseContainerControl::getTypes() ); // ... and set his address to static pointer! diff --git a/UnoControls/source/controls/statusindicator.cxx b/UnoControls/source/controls/statusindicator.cxx index 4acfdfa8eeca..b34b273bfb36 100644 --- a/UnoControls/source/controls/statusindicator.cxx +++ b/UnoControls/source/controls/statusindicator.cxx @@ -130,8 +130,8 @@ Sequence< Type > SAL_CALL StatusIndicator::getTypes() throw( RuntimeException, s if ( pTypeCollection == NULL ) { // Create a static typecollection ... - static OTypeCollection aTypeCollection ( ::getCppuType(( const css::uno::Reference< XLayoutConstrains >*)NULL ) , - ::getCppuType(( const css::uno::Reference< XStatusIndicator >*)NULL ) , + static OTypeCollection aTypeCollection ( cppu::UnoType<XLayoutConstrains>::get(), + cppu::UnoType<XStatusIndicator>::get(), BaseContainerControl::getTypes() ); // ... and set his address to static pointer! diff --git a/filter/source/graphicfilter/icgm/actimpr.cxx b/filter/source/graphicfilter/icgm/actimpr.cxx index 8db2cc36cda1..80f2d9c3054b 100644 --- a/filter/source/graphicfilter/icgm/actimpr.cxx +++ b/filter/source/graphicfilter/icgm/actimpr.cxx @@ -567,7 +567,7 @@ void CGMImpressOutAct::DrawEllipticalArc( FloatPoint& rCenter, FloatPoint& rSize { ImplSetLineBundle(); drawing::FillStyle eFillStyle = drawing::FillStyle_NONE; - aAny.setValue( &eFillStyle, ::getCppuType((const drawing::FillStyle*)0) ); + aAny.setValue( &eFillStyle, cppu::UnoType<drawing::FillStyle>::get()); maXPropSet->setPropertyValue( "FillStyle", aAny ); } } @@ -826,7 +826,7 @@ void CGMImpressOutAct::DrawText( awt::Point& rTextPos, awt::Size& rTextSize, cha if ( nWidth == -1 ) { sal_Bool bTrue( sal_True ); - aAny.setValue( &bTrue, ::getCppuType((const sal_Bool*)0 )); + aAny.setValue( &bTrue, cppu::UnoType<sal_Bool>::get()); maXPropSet->setPropertyValue( "TextAutoGrowWidth", aAny ); drawing::TextAdjust eTextAdjust; @@ -850,11 +850,11 @@ void CGMImpressOutAct::DrawText( awt::Point& rTextPos, awt::Size& rTextSize, cha if ( nHeight == -1 ) { sal_Bool bTrue = sal_True; - aAny.setValue( &bTrue, ::getCppuType((const sal_Bool*)0) ); + aAny.setValue( &bTrue, cppu::UnoType<sal_Bool>::get()); maXPropSet->setPropertyValue( "TextAutoGrowHeight", aAny ); } uno::Reference< text::XText > xText; - uno::Any aFirstQuery( maXShape->queryInterface( ::getCppuType((const uno::Reference< text::XText >*)0) )); + uno::Any aFirstQuery( maXShape->queryInterface( cppu::UnoType<text::XText>::get())); if( aFirstQuery >>= xText ) { OUString aStr( OUString::createFromAscii( pString ) ); @@ -863,12 +863,12 @@ void CGMImpressOutAct::DrawText( awt::Point& rTextPos, awt::Size& rTextSize, cha { aXTextCursor->gotoEnd( sal_False ); uno::Reference< text::XTextRange > aCursorText; - uno::Any aSecondQuery( aXTextCursor->queryInterface( ::getCppuType((const uno::Reference< text::XTextRange >*)0) )); + uno::Any aSecondQuery( aXTextCursor->queryInterface( cppu::UnoType<text::XTextRange>::get())); if ( aSecondQuery >>= aCursorText ) { uno::Reference< beans::XPropertySet > aCursorPropSet; - uno::Any aQuery( aCursorText->queryInterface( ::getCppuType((const uno::Reference< beans::XPropertySet >*)0) )); + uno::Any aQuery( aCursorText->queryInterface( cppu::UnoType<beans::XPropertySet>::get())); if( aQuery >>= aCursorPropSet ) { if ( nWidth != -1 ) // paragraph adjusting in a valid textbox ? @@ -892,7 +892,7 @@ void CGMImpressOutAct::DrawText( awt::Point& rTextPos, awt::Size& rTextSize, cha if ( nWidth > 0 && nHeight > 0 ) // restricted text { sal_Bool bTrue = sal_True; - aAny.setValue( &bTrue, ::getCppuType((const sal_Bool*)0)); + aAny.setValue( &bTrue, cppu::UnoType<sal_Bool>::get()); maXPropSet->setPropertyValue( "TextFitToSize", aAny ); } aCursorText->setString( aStr ); @@ -919,7 +919,7 @@ void CGMImpressOutAct::AppendText( char* pString, sal_uInt32 /*nSize*/, FinalFla if ( aShape.is() ) { uno::Reference< text::XText > xText; - uno::Any aFirstQuery( aShape->queryInterface( ::getCppuType((const uno::Reference< text::XText >*)0)) ); + uno::Any aFirstQuery( aShape->queryInterface( cppu::UnoType<text::XText>::get()) ); if( aFirstQuery >>= xText ) { OUString aStr( OUString::createFromAscii( pString ) ); @@ -929,11 +929,11 @@ void CGMImpressOutAct::AppendText( char* pString, sal_uInt32 /*nSize*/, FinalFla { aXTextCursor->gotoEnd( sal_False ); uno::Reference< text::XTextRange > aCursorText; - uno::Any aSecondQuery(aXTextCursor->queryInterface( ::getCppuType((const uno::Reference< text::XTextRange >*)0) )); + uno::Any aSecondQuery(aXTextCursor->queryInterface( cppu::UnoType<text::XTextRange>::get())); if ( aSecondQuery >>= aCursorText ) { uno::Reference< beans::XPropertySet > aPropSet; - uno::Any aQuery(aCursorText->queryInterface( ::getCppuType((const uno::Reference< beans::XPropertySet >*)0) )); + uno::Any aQuery(aCursorText->queryInterface( cppu::UnoType<beans::XPropertySet>::get())); if( aQuery >>= aPropSet ) { aCursorText->setString( aStr ); diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 7217ec10a9d3..d7ce53b4d4e9 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -1779,7 +1779,7 @@ PolyPolygon EscherPropertyContainer::GetPolyPolygon( const ::com::sun::star::uno PolyPolygon aRetPolyPoly; ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > aXPropSet; ::com::sun::star::uno::Any aAny( rXShape->queryInterface( - ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >*) 0 ) )); + cppu::UnoType<com::sun::star::beans::XPropertySet>::get())); OUString sPolyPolygonBezier ( "PolyPolygonBezier" ); OUString sPolyPolygon ( "PolyPolygon" ); @@ -1808,7 +1808,7 @@ PolyPolygon EscherPropertyContainer::GetPolyPolygon( const ::com::sun::star::uno Polygon aPolygon; PolyPolygon aPolyPolygon; - if ( rAny.getValueType() == ::getCppuType( ( const ::com::sun::star::drawing::PolyPolygonBezierCoords* ) 0 ) ) + if ( rAny.getValueType() == cppu::UnoType<com::sun::star::drawing::PolyPolygonBezierCoords>::get()) { ::com::sun::star::drawing::PolyPolygonBezierCoords* pSourcePolyPolygon = (::com::sun::star::drawing::PolyPolygonBezierCoords*)rAny.getValue(); @@ -2329,7 +2329,7 @@ bool EscherPropertyContainer::CreateConnectorProperties( ::com::sun::star::awt::Point aStartPoint, aEndPoint; ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > aXPropSet; ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > aShapeA, aShapeB; - ::com::sun::star::uno::Any aAny( rXShape->queryInterface( ::getCppuType( (const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >*) 0 ) )); + ::com::sun::star::uno::Any aAny( rXShape->queryInterface( cppu::UnoType<com::sun::star::beans::XPropertySet>::get())); if ( aAny >>= aXPropSet ) { if ( EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, sEdgeKind, true ) ) diff --git a/filter/source/msfilter/msocximex.cxx b/filter/source/msfilter/msocximex.cxx index fbb419d415a5..d037611cce20 100644 --- a/filter/source/msfilter/msocximex.cxx +++ b/filter/source/msfilter/msocximex.cxx @@ -137,7 +137,7 @@ const uno::Reference< container::XIndexContainer >& OSL_ENSURE( xForms.is(), "XForms not available" ); aTmp.setValue( &xForm, - ::getCppuType((uno::Reference < form::XForm >*)0)); + cppu::UnoType<form::XForm>::get()); xForms->insertByIndex( xForms->getCount(), aTmp ); xFormComps = uno::Reference< container::XIndexContainer > diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index 74588730498e..20acbda79dc9 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -1659,8 +1659,7 @@ bool PPTConvertOCXControls::InsertControl( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > & rFormComps = GetFormComps(); - ::com::sun::star::uno::Any aTmp( &rFComp, ::getCppuType((const ::com::sun::star::uno::Reference< - com::sun::star::form::XFormComponent >*)0) ); + ::com::sun::star::uno::Any aTmp( &rFComp, cppu::UnoType<com::sun::star::form::XFormComponent>::get() ); rFormComps->insertByIndex( rFormComps->getCount(), aTmp ); diff --git a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx index 7703264eab13..32274e908f5e 100644 --- a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx +++ b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx @@ -254,8 +254,8 @@ bool SAL_CALL XmlFilterAdaptor::exportImpl( const Sequence< ::com::sun::star::be // create an XProperty set to configure the exporter for pretty printing PropertyMapEntry aImportInfoMap[] = { - { OUString("UsePrettyPrinting"), 0, ::getCppuType((const sal_Bool*)0), PropertyAttribute::MAYBEVOID, 0}, - { OUString("ExportTextNumberElement"), 0, ::getCppuType((const sal_Bool*)0), PropertyAttribute::MAYBEVOID, 0}, + { OUString("UsePrettyPrinting"), 0, cppu::UnoType<sal_Bool>::get(), PropertyAttribute::MAYBEVOID, 0}, + { OUString("ExportTextNumberElement"), 0, cppu::UnoType<sal_Bool>::get(), PropertyAttribute::MAYBEVOID, 0}, { OUString("BaseURI"), 0, ::cppu::UnoType<OUString>::get(), PropertyAttribute::MAYBEVOID, 0}, { OUString(), 0, css::uno::Type(), 0, 0 } }; diff --git a/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx b/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx index df9ab44262a4..0f643f1d2932 100644 --- a/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx +++ b/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx @@ -151,22 +151,22 @@ Any SAL_CALL XMLFilterDialogComponent::queryInterface( const Type& aType ) throw Any SAL_CALL XMLFilterDialogComponent::queryAggregation( Type const & rType ) throw (RuntimeException, std::exception) { - if (rType == ::getCppuType( (Reference< ::com::sun::star::ui::dialogs::XExecutableDialog > const *)0 )) + if (rType == cppu::UnoType<com::sun::star::ui::dialogs::XExecutableDialog>::get()) { void * p = static_cast< ::com::sun::star::ui::dialogs::XExecutableDialog * >( this ); return Any( &p, rType ); } - else if (rType == ::getCppuType( (Reference< XServiceInfo > const *)0 )) + else if (rType == cppu::UnoType<XServiceInfo>::get()) { void * p = static_cast< XServiceInfo * >( this ); return Any( &p, rType ); } - else if (rType == ::getCppuType( (Reference< XInitialization > const *)0 )) + else if (rType == cppu::UnoType<XInitialization>::get()) { void * p = static_cast< XInitialization * >( this ); return Any( &p, rType ); } - else if (rType == ::getCppuType( (Reference< XTerminateListener > const *)0 )) + else if (rType == cppu::UnoType<XTerminateListener>::get()) { void * p = static_cast< XTerminateListener * >( this ); return Any( &p, rType ); @@ -230,14 +230,14 @@ namespace public: DialogComponentTypes() : m_aTypes( - ::getCppuType( (const Reference< XComponent > *)0 ), - ::getCppuType( (const Reference< XTypeProvider > *)0 ), - ::getCppuType( (const Reference< XAggregation > *)0 ), - ::getCppuType( (const Reference< XWeak > *)0 ), - ::getCppuType( (const Reference< XServiceInfo > *)0 ), - ::getCppuType( (const Reference< XInitialization > *)0 ), - ::getCppuType( (const Reference< XTerminateListener > *)0 ), - ::getCppuType( (const Reference< ::com::sun::star::ui::dialogs::XExecutableDialog > *)0 )) + cppu::UnoType<XComponent>::get(), + cppu::UnoType<XTypeProvider>::get(), + cppu::UnoType<XAggregation>::get(), + cppu::UnoType<XWeak>::get(), + cppu::UnoType<XServiceInfo>::get(), + cppu::UnoType<XInitialization>::get(), + cppu::UnoType<XTerminateListener>::get(), + cppu::UnoType<com::sun::star::ui::dialogs::XExecutableDialog>::get()) { } OTypeCollection& getTypeCollection() { return m_aTypes; } diff --git a/forms/source/component/Button.cxx b/forms/source/component/Button.cxx index 9fb6e466dd1e..262bd89fadef 100644 --- a/forms/source/component/Button.cxx +++ b/forms/source/component/Button.cxx @@ -393,7 +393,7 @@ Any SAL_CALL OButtonControl::queryAggregation(const Type& _rType) throw (Runtime { // if asked for the XTypeProvider, don't let OButtonControl_BASE do this Any aReturn; - if ( !_rType.equals( ::getCppuType( static_cast< Reference< XTypeProvider >* >( NULL ) ) ) ) + if ( !_rType.equals( cppu::UnoType<XTypeProvider>::get() ) ) aReturn = OButtonControl_BASE::queryInterface( _rType ); if ( !aReturn.hasValue() ) diff --git a/forms/source/component/Columns.cxx b/forms/source/component/Columns.cxx index 241476c57ca8..f53fa142a188 100644 --- a/forms/source/component/Columns.cxx +++ b/forms/source/component/Columns.cxx @@ -178,11 +178,11 @@ Any SAL_CALL OGridColumn::queryAggregation( const Type& _rType ) throw (RuntimeE { Any aReturn; // some functionality at our aggregate cannot be reasonably fulfilled here. - if ( _rType.equals(::getCppuType(static_cast< Reference< XFormComponent >* >(NULL))) - || _rType.equals(::getCppuType(static_cast< Reference< XServiceInfo >* >(NULL))) - || _rType.equals(::getCppuType(static_cast< Reference< XBindableValue >* >(NULL))) - || _rType.equals(::getCppuType(static_cast< Reference< XPropertyContainer >* >(NULL))) - || comphelper::isAssignableFrom(::getCppuType(static_cast< Reference< XTextRange >* >(NULL)),_rType) + if ( _rType.equals(cppu::UnoType<XFormComponent>::get()) + || _rType.equals(cppu::UnoType<XServiceInfo>::get()) + || _rType.equals(cppu::UnoType<XBindableValue>::get()) + || _rType.equals(cppu::UnoType<XPropertyContainer>::get()) + || comphelper::isAssignableFrom(cppu::UnoType<XTextRange>::get(),_rType) ) return aReturn; @@ -402,10 +402,10 @@ sal_Bool OGridColumn::convertFastPropertyValue( Any& rConvertedValue, Any& rOldV bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_aLabel); break; case PROPERTY_ID_WIDTH: - bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_aWidth, ::getCppuType((const sal_Int32*)NULL)); + bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_aWidth, cppu::UnoType<sal_Int32>::get()); break; case PROPERTY_ID_ALIGN: - bModified = tryPropertyValue( rConvertedValue, rOldValue, rValue, m_aAlign, ::getCppuType( (const sal_Int32*)NULL ) ); + bModified = tryPropertyValue( rConvertedValue, rOldValue, rValue, m_aAlign, cppu::UnoType<sal_Int32>::get()); // strange enough, css.awt.TextAlign is a 32-bit integer, while the Align property (both here for grid controls // and for ordinary toolkit controls) is a 16-bit integer. So, allow for 32 bit, but normalize it to 16 bit if ( bModified ) diff --git a/forms/source/component/Edit.cxx b/forms/source/component/Edit.cxx index e4f3219ab3d1..c5f364317415 100644 --- a/forms/source/component/Edit.cxx +++ b/forms/source/component/Edit.cxx @@ -216,7 +216,7 @@ void OEditControl::keyPressed(const ::com::sun::star::awt::KeyEvent& e) throw ( return; aTmp = xFormSet->getPropertyValue( PROPERTY_TARGET_URL ); - if (!aTmp.getValueType().equals(::getCppuType((const OUString*)NULL)) || + if (!aTmp.getValueType().equals(cppu::UnoType<OUString>::get()) || getString(aTmp).isEmpty() ) return; diff --git a/forms/source/component/EditBase.cxx b/forms/source/component/EditBase.cxx index 55714e10a9f3..6b8ca643fdae 100644 --- a/forms/source/component/EditBase.cxx +++ b/forms/source/component/EditBase.cxx @@ -108,9 +108,9 @@ void OEditBaseModel::write(const Reference<XObjectOutputStream>& _rxOutStream) t nAnyMask |= DEFAULT_LONG; else if (m_aDefault.getValueType().getTypeClass() == TypeClass_DOUBLE) nAnyMask |= DEFAULT_DOUBLE; - else if (m_aDefault.getValueType() == ::getCppuType((const util::Time*)0)) + else if (m_aDefault.getValueType() == cppu::UnoType<util::Time>::get()) nAnyMask |= DEFAULT_TIME; - else if (m_aDefault.getValueType() == ::getCppuType((const util::Date*)0)) + else if (m_aDefault.getValueType() == cppu::UnoType<util::Date>::get()) nAnyMask |= DEFAULT_DATE; if (m_bFilterProposal) // Don't save a value, because it's boolean @@ -308,13 +308,13 @@ sal_Bool OEditBaseModel::convertFastPropertyValue( Any& rConvertedValue, Any& rO bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_aDefaultText); break; case PROPERTY_ID_DEFAULT_VALUE: - bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_aDefault, ::getCppuType((const double*)0)); + bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_aDefault, cppu::UnoType<double>::get()); break; case PROPERTY_ID_DEFAULT_DATE: - bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_aDefault, ::getCppuType((const util::Date*)0)); + bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_aDefault, cppu::UnoType<util::Date>::get()); break; case PROPERTY_ID_DEFAULT_TIME: - bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_aDefault, ::getCppuType((const util::Time*)0)); + bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_aDefault, cppu::UnoType<util::Time>::get()); break; default: bModified = OBoundControlModel::convertFastPropertyValue( diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx index 951a37ffb4fe..615688e69961 100644 --- a/forms/source/component/FormComponent.cxx +++ b/forms/source/component/FormComponent.cxx @@ -358,7 +358,7 @@ Any SAL_CALL OBoundControl::queryAggregation(const Type& _rType) throw(RuntimeEx Any aReturn; // XTypeProvider first - don't ask the OBoundControl_BASE, it would deliver incomplete types - if ( _rType.equals( ::getCppuType( static_cast< Reference< XTypeProvider >* >( NULL ) ) ) ) + if ( _rType.equals( cppu::UnoType<XTypeProvider>::get() ) ) aReturn = OControl::queryAggregation( _rType ); // ask our own interfaces @@ -462,7 +462,7 @@ Any SAL_CALL OControlModel::queryAggregation(const Type& _rType) throw (RuntimeE { aReturn = OPropertySetAggregationHelper::queryInterface(_rType); // our aggregate - if (!aReturn.hasValue() && m_xAggregate.is() && !_rType.equals(::getCppuType(static_cast< Reference< XCloneable>* >(NULL)))) + if (!aReturn.hasValue() && m_xAggregate.is() && !_rType.equals(cppu::UnoType<XCloneable>::get())) aReturn = m_xAggregate->queryAggregation(_rType); } } @@ -975,12 +975,12 @@ void OControlModel::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, const A switch (_nHandle) { case PROPERTY_ID_NAME: - DBG_ASSERT(_rValue.getValueType() == getCppuType((const OUString*)NULL), + DBG_ASSERT(_rValue.getValueType() == cppu::UnoType<OUString>::get(), "OControlModel::setFastPropertyValue_NoBroadcast : invalid type" ); _rValue >>= m_aName; break; case PROPERTY_ID_TAG: - DBG_ASSERT(_rValue.getValueType() == getCppuType((const OUString*)NULL), + DBG_ASSERT(_rValue.getValueType() == cppu::UnoType<OUString>::get(), "OControlModel::setFastPropertyValue_NoBroadcast : invalid type" ); _rValue >>= m_aTag; break; diff --git a/forms/source/component/FormattedFieldWrapper.cxx b/forms/source/component/FormattedFieldWrapper.cxx index b30c53ec86c0..e3ae3ff9717f 100644 --- a/forms/source/component/FormattedFieldWrapper.cxx +++ b/forms/source/component/FormattedFieldWrapper.cxx @@ -140,7 +140,7 @@ Any SAL_CALL OFormattedFieldWrapper::queryAggregation(const Type& _rType) throw { Any aReturn; - if (_rType.equals( ::getCppuType( static_cast< Reference< XTypeProvider >* >(NULL) ) ) ) + if (_rType.equals( cppu::UnoType<XTypeProvider>::get() ) ) { // a XTypeProvider interface needs a working aggregate - we don't want to give the type provider // of our base class (OFormattedFieldWrapper_Base) to the caller as it supplies nearly nothing ensureAggregate(); @@ -152,7 +152,7 @@ Any SAL_CALL OFormattedFieldWrapper::queryAggregation(const Type& _rType) throw { aReturn = OFormattedFieldWrapper_Base::queryAggregation(_rType); - if ((_rType.equals( ::getCppuType( static_cast< Reference< XServiceInfo >* >(NULL) ) ) ) && aReturn.hasValue()) + if ((_rType.equals( cppu::UnoType<XServiceInfo>::get() ) ) && aReturn.hasValue()) { // somebody requested an XServiceInfo interface and our base class provided it // check our aggregate if it has one, too ensureAggregate(); @@ -200,7 +200,7 @@ Sequence< OUString > SAL_CALL OFormattedFieldWrapper::getSupportedServiceNames( { DBG_ASSERT(m_xAggregate.is(), "OFormattedFieldWrapper::getSupportedServiceNames: should never have made it 'til here without an aggregate!"); Reference< XServiceInfo > xSI; - m_xAggregate->queryAggregation(::getCppuType(static_cast< Reference< XServiceInfo >* >(NULL))) >>= xSI; + m_xAggregate->queryAggregation(cppu::UnoType<XServiceInfo>::get()) >>= xSI; return xSI->getSupportedServiceNames(); } diff --git a/forms/source/component/Grid.cxx b/forms/source/component/Grid.cxx index 196f2c3281b7..e9a306dd7e4b 100644 --- a/forms/source/component/Grid.cxx +++ b/forms/source/component/Grid.cxx @@ -67,7 +67,7 @@ InterfaceRef SAL_CALL OGridControlModel_CreateInstance(const Reference<XMultiSer } OGridControlModel::OGridControlModel(const Reference<XComponentContext>& _rxFactory) :OControlModel(_rxFactory, OUString()) - ,OInterfaceContainer(_rxFactory, m_aMutex, ::getCppuType(static_cast<Reference<XPropertySet>*>(NULL))) + ,OInterfaceContainer(_rxFactory, m_aMutex, cppu::UnoType<XPropertySet>::get()) ,OErrorBroadcaster( OComponentHelper::rBHelper ) ,FontControlModel( false ) ,m_aSelectListeners(m_aMutex) @@ -90,7 +90,7 @@ OGridControlModel::OGridControlModel(const Reference<XComponentContext>& _rxFact OGridControlModel::OGridControlModel( const OGridControlModel* _pOriginal, const Reference< XComponentContext >& _rxFactory ) :OControlModel( _pOriginal, _rxFactory ) - ,OInterfaceContainer( _rxFactory, m_aMutex, ::getCppuType( static_cast<Reference<XPropertySet>*>( NULL ) ) ) + ,OInterfaceContainer( _rxFactory, m_aMutex, cppu::UnoType<XPropertySet>::get() ) ,OErrorBroadcaster( OComponentHelper::rBHelper ) ,FontControlModel( _pOriginal ) ,m_aSelectListeners( m_aMutex ) @@ -547,17 +547,17 @@ sal_Bool OGridControlModel::convertFastPropertyValue( Any& rConvertedValue, Any& bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_nBorder); break; case PROPERTY_ID_BORDERCOLOR: - bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_aBorderColor, ::getCppuType((const sal_Int32*)NULL)); + bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_aBorderColor, cppu::UnoType<sal_Int32>::get()); break; case PROPERTY_ID_DEFAULTCONTROL: bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_aDefaultControl); break; case PROPERTY_ID_BACKGROUNDCOLOR: - bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_aBackgroundColor, ::getCppuType((const sal_Int32*)NULL)); + bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_aBackgroundColor, cppu::UnoType<sal_Int32>::get()); break; case PROPERTY_ID_ROWHEIGHT: { - bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_aRowHeight, ::getCppuType((const sal_Int32*)NULL)); + bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_aRowHeight, cppu::UnoType<sal_Int32>::get()); sal_Int32 nNewVal( 0 ); if ( ( rConvertedValue >>= nNewVal ) && ( nNewVal <= 0 ) ) { diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx index c2691aeecf10..fc3b65a4332a 100644 --- a/forms/source/component/ImageControl.cxx +++ b/forms/source/component/ImageControl.cxx @@ -217,7 +217,7 @@ Any SAL_CALL OImageControlModel::queryAggregation(const Type& _rType) throw (Run // BUT: _don't_ let it feel responsible for the XTypeProvider interface // (as this is implemented by our base class in the proper way) - if ( _rType.equals( ::getCppuType( static_cast< Reference< XTypeProvider >* >( NULL ) ) ) + if ( _rType.equals( cppu::UnoType<XTypeProvider>::get() ) || !aReturn.hasValue() ) aReturn = OBoundControlModel::queryAggregation( _rType ); diff --git a/forms/source/component/clickableimage.cxx b/forms/source/component/clickableimage.cxx index a99066c9cd52..55bd6ca278db 100644 --- a/forms/source/component/clickableimage.cxx +++ b/forms/source/component/clickableimage.cxx @@ -595,7 +595,7 @@ namespace frm // BUT: _don't_ let it feel responsible for the XTypeProvider interface // (as this is implemented by our base class in the proper way) - if ( _rType.equals( ::getCppuType( static_cast< Reference< XTypeProvider >* >( NULL ) ) ) + if ( _rType.equals( cppu::UnoType<XTypeProvider>::get() ) || !aReturn.hasValue() ) aReturn = OControlModel::queryAggregation( _rType ); diff --git a/forms/source/component/refvaluecomponent.cxx b/forms/source/component/refvaluecomponent.cxx index d2562bf0cbdb..b3f4afe30590 100644 --- a/forms/source/component/refvaluecomponent.cxx +++ b/forms/source/component/refvaluecomponent.cxx @@ -164,7 +164,7 @@ namespace frm Sequence< Type > OReferenceValueComponent::getSupportedBindingTypes() { ::std::list< Type > aTypes; - aTypes.push_back( ::getCppuType( static_cast< sal_Bool* >( NULL ) ) ); + aTypes.push_back( cppu::UnoType<sal_Bool>::get() ); if ( !m_sReferenceValue.isEmpty() ) aTypes.push_front( cppu::UnoType<OUString>::get() ); diff --git a/forms/source/richtext/richtextunowrapper.cxx b/forms/source/richtext/richtextunowrapper.cxx index c65daeca8fa4..cd81e794f026 100644 --- a/forms/source/richtext/richtextunowrapper.cxx +++ b/forms/source/richtext/richtextunowrapper.cxx @@ -49,8 +49,8 @@ namespace frm SVX_UNOEDIT_CHAR_PROPERTIES, SVX_UNOEDIT_FONT_PROPERTIES, SVX_UNOEDIT_PARA_PROPERTIES, - { OUString("TextUserDefinedAttributes"), EE_CHAR_XMLATTRIBS, ::getCppuType( static_cast< const Reference< XNameContainer >* >( NULL ) ), 0, 0 }, - { OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, ::getCppuType( static_cast< const Reference< XNameContainer >* >( NULL ) ), 0, 0 }, + { OUString("TextUserDefinedAttributes"), EE_CHAR_XMLATTRIBS, cppu::UnoType<XNameContainer>::get(), 0, 0 }, + { OUString("ParaUserDefinedAttributes"), EE_PARA_XMLATTRIBS, cppu::UnoType<XNameContainer>::get(), 0, 0 }, { OUString(), 0, css::uno::Type(), 0, 0 } }; static SvxItemPropertySet aTextEnginePropertySet( aTextEnginePropertyMap, SdrObject::GetGlobalDrawObjectItemPool() ); diff --git a/forms/source/xforms/datatyperepository.cxx b/forms/source/xforms/datatyperepository.cxx index f665cdd04a15..2e304a264180 100644 --- a/forms/source/xforms/datatyperepository.cxx +++ b/forms/source/xforms/datatyperepository.cxx @@ -205,7 +205,7 @@ namespace xforms Type SAL_CALL ODataTypeRepository::getElementType( ) throw (RuntimeException, std::exception) { - return ::getCppuType( static_cast< Reference< XDataType >* >( NULL ) ); + return cppu::UnoType<XDataType>::get(); } diff --git a/forms/source/xforms/datatypes.hxx b/forms/source/xforms/datatypes.hxx index d436059a6dad..383624d59d0b 100644 --- a/forms/source/xforms/datatypes.hxx +++ b/forms/source/xforms/datatypes.hxx @@ -234,7 +234,7 @@ namespace xforms protected: typedef VALUE_TYPE ValueType; inline const ::com::sun::star::uno::Type& - getCppuType() const { return ::getCppuType( static_cast< ValueType* >( NULL ) ); } + getCppuType() const { return cppu::UnoType<ValueType>::get(); } protected: OValueLimitedType( const OUString& _rName, sal_Int16 _nTypeClass ); diff --git a/fpicker/source/win32/filepicker/FilePicker.cxx b/fpicker/source/win32/filepicker/FilePicker.cxx index 6b4aab4a609c..842ab0564830 100644 --- a/fpicker/source/win32/filepicker/FilePicker.cxx +++ b/fpicker/source/win32/filepicker/FilePicker.cxx @@ -180,7 +180,7 @@ OUString SAL_CALL CFilePicker::helpRequested(FilePickerEvent aEvent) const OUString aHelpText; ::cppu::OInterfaceContainerHelper* pICHelper = - rBHelper.getContainer( getCppuType((uno::Reference<XFilePickerListener>*)0)); + rBHelper.getContainer( cppu::UnoType<XFilePickerListener>::get()); if (pICHelper) { diff --git a/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx b/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx index e6cec940e2b8..ef77bb3fdb2a 100644 --- a/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx +++ b/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx @@ -207,14 +207,14 @@ STDMETHODIMP VistaFilePickerEventHandler::OnControlActivating(IFileDialogCustomi void SAL_CALL VistaFilePickerEventHandler::addFilePickerListener( const css::uno::Reference< css::ui::dialogs::XFilePickerListener >& xListener ) throw( css::uno::RuntimeException ) { - m_lListener.addInterface(::getCppuType( (const css::uno::Reference< css::ui::dialogs::XFilePickerListener >*)NULL ), xListener); + m_lListener.addInterface(cppu::UnoType<css::ui::dialogs::XFilePickerListener>::get(), xListener); } void SAL_CALL VistaFilePickerEventHandler::removeFilePickerListener( const css::uno::Reference< css::ui::dialogs::XFilePickerListener >& xListener ) throw( css::uno::RuntimeException ) { - m_lListener.removeInterface(::getCppuType( (const css::uno::Reference< css::ui::dialogs::XFilePickerListener >*)NULL ), xListener); + m_lListener.removeInterface(cppu::UnoType<css::ui::dialogs::XFilePickerListener>::get(), xListener); } @@ -305,7 +305,7 @@ void VistaFilePickerEventHandler::impl_sendEvent( EEventType eEventType, { static AsyncRequests aNotify(RequestHandlerRef(new AsyncPickerEvents())); - ::cppu::OInterfaceContainerHelper* pContainer = m_lListener.getContainer( ::getCppuType( ( const css::uno::Reference< css::ui::dialogs::XFilePickerListener >*) NULL ) ); + ::cppu::OInterfaceContainerHelper* pContainer = m_lListener.getContainer( cppu::UnoType<css::ui::dialogs::XFilePickerListener>::get()); if ( ! pContainer) return; diff --git a/fpicker/source/win32/filepicker/asynceventnotifier.cxx b/fpicker/source/win32/filepicker/asynceventnotifier.cxx index 9eb1401e42d3..7d116d71620d 100644 --- a/fpicker/source/win32/filepicker/asynceventnotifier.cxx +++ b/fpicker/source/win32/filepicker/asynceventnotifier.cxx @@ -263,7 +263,7 @@ void SAL_CALL CAsyncEventNotifier::run() removeNextEventRecord(); ::cppu::OInterfaceContainerHelper* pICHelper = - m_rBroadcastHelper.getContainer(getCppuType((uno::Reference<XFilePickerListener>*)0)); + m_rBroadcastHelper.getContainer(cppu::UnoType<XFilePickerListener>::get()); if (pICHelper) { diff --git a/fpicker/source/win32/filepicker/workbench/Test_fps.cxx b/fpicker/source/win32/filepicker/workbench/Test_fps.cxx index 3576aa1467e7..9c5921f81865 100644 --- a/fpicker/source/win32/filepicker/workbench/Test_fps.cxx +++ b/fpicker/source/win32/filepicker/workbench/Test_fps.cxx @@ -296,7 +296,7 @@ int SAL_CALL main(int nArgc, char* Argv[], char* Env[] ) Any aAny; sal_Bool bChkState = sal_False; - aAny.setValue( &bChkState, getCppuType( (sal_Bool*)0 ) ); + aAny.setValue( &bChkState, cppu::UnoType<sal_Bool>::get()); xFPControlAccess->setValue( CHECKBOX_AUTOEXTENSION, 0, aAny ); OUString aVersion( L"Version 1" ); diff --git a/fpicker/source/win32/misc/WinImplHelper.cxx b/fpicker/source/win32/misc/WinImplHelper.cxx index 6011bcf18694..e12241c09611 100644 --- a/fpicker/source/win32/misc/WinImplHelper.cxx +++ b/fpicker/source/win32/misc/WinImplHelper.cxx @@ -333,7 +333,7 @@ Any SAL_CALL CheckboxGetState( HWND hwnd ) LRESULT lChkState = SendMessageW( hwnd, BM_GETCHECK, 0, 0 ); sal_Bool bChkState = (lChkState == BST_CHECKED) ? sal_True : sal_False; Any aAny; - aAny.setValue( &bChkState, getCppuType((sal_Bool*)0) ); + aAny.setValue( &bChkState, cppu::UnoType<sal_Bool>::get()); return aAny; } @@ -348,7 +348,7 @@ void SAL_CALL CheckboxSetState( OSL_ASSERT( IsWindow( hwnd ) ); if ( !aState.hasValue( ) || - aState.getValueType( ) != getCppuType((sal_Bool*)0) ) + aState.getValueType( ) != cppu::UnoType<sal_Bool>::get()) throw IllegalArgumentException( OUString( "invalid value type or any has no value" ), rXInterface, diff --git a/framework/inc/helper/propertysetcontainer.hxx b/framework/inc/helper/propertysetcontainer.hxx index e4b75929f5ce..2db5698e3d44 100644 --- a/framework/inc/helper/propertysetcontainer.hxx +++ b/framework/inc/helper/propertysetcontainer.hxx @@ -67,7 +67,7 @@ class FWE_DLLPUBLIC PropertySetContainer : public com::sun::star::container::XIn virtual ::com::sun::star::uno::Type SAL_CALL getElementType() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE { - return ::getCppuType((com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet >*)0); + return cppu::UnoType<com::sun::star::beans::XPropertySet>::get(); } virtual sal_Bool SAL_CALL hasElements() diff --git a/framework/source/fwe/classes/actiontriggercontainer.cxx b/framework/source/fwe/classes/actiontriggercontainer.cxx index e03ecf19d140..d1c71ed00f1d 100644 --- a/framework/source/fwe/classes/actiontriggercontainer.cxx +++ b/framework/source/fwe/classes/actiontriggercontainer.cxx @@ -140,10 +140,10 @@ Sequence< Type > SAL_CALL ActionTriggerContainer::getTypes() throw ( RuntimeExce { // Create a static typecollection ... static ::cppu::OTypeCollection aTypeCollection( - ::getCppuType(( const Reference< XMultiServiceFactory >*)NULL ) , - ::getCppuType(( const Reference< XIndexContainer >*)NULL ) , - ::getCppuType(( const Reference< XServiceInfo >*)NULL ) , - ::getCppuType(( const Reference< XTypeProvider >*)NULL ) ); + cppu::UnoType<XMultiServiceFactory>::get(), + cppu::UnoType<XIndexContainer>::get(), + cppu::UnoType<XServiceInfo>::get(), + cppu::UnoType<XTypeProvider>::get()); // ... and set his address to static pointer! pTypeCollection = &aTypeCollection; diff --git a/framework/source/fwe/classes/actiontriggerpropertyset.cxx b/framework/source/fwe/classes/actiontriggerpropertyset.cxx index a1d0e5e275a6..1c06d9bb4664 100644 --- a/framework/source/fwe/classes/actiontriggerpropertyset.cxx +++ b/framework/source/fwe/classes/actiontriggerpropertyset.cxx @@ -134,11 +134,11 @@ Sequence< Type > SAL_CALL ActionTriggerPropertySet::getTypes() throw ( RuntimeEx { // Create a static typecollection ... static ::cppu::OTypeCollection aTypeCollection( - ::getCppuType(( const Reference< XPropertySet >*)NULL ) , - ::getCppuType(( const Reference< XFastPropertySet >*)NULL ) , - ::getCppuType(( const Reference< XMultiPropertySet >*)NULL ) , - ::getCppuType(( const Reference< XServiceInfo >*)NULL ) , - ::getCppuType(( const Reference< XTypeProvider >*)NULL ) ); + cppu::UnoType<XPropertySet>::get(), + cppu::UnoType<XFastPropertySet>::get(), + cppu::UnoType<XMultiPropertySet>::get(), + cppu::UnoType<XServiceInfo>::get(), + cppu::UnoType<XTypeProvider>::get()); // ... and set his address to static pointer! pTypeCollection = &aTypeCollection; @@ -309,9 +309,9 @@ const Sequence< Property > ActionTriggerPropertySet::impl_getStaticPropertyDescr { Property( OUString( "CommandURL" ), HANDLE_COMMANDURL , cppu::UnoType<OUString>::get(), PropertyAttribute::TRANSIENT ), Property( OUString( "HelpURL" ), HANDLE_HELPURL , cppu::UnoType<OUString>::get(), PropertyAttribute::TRANSIENT ), - Property( OUString( "Image" ), HANDLE_IMAGE , ::getCppuType((Reference<XBitmap>*)0) , PropertyAttribute::TRANSIENT ), + Property( OUString( "Image" ), HANDLE_IMAGE , cppu::UnoType<XBitmap>::get(), PropertyAttribute::TRANSIENT ), Property( OUString( "SubContainer" ), HANDLE_SUBCONTAINER , cppu::UnoType<OUString>::get(), PropertyAttribute::TRANSIENT ), - Property( OUString( "Text" ), HANDLE_TEXT , ::getCppuType((Reference<XInterface>*)0) , PropertyAttribute::TRANSIENT ) + Property( OUString( "Text" ), HANDLE_TEXT , cppu::UnoType<XInterface>::get(), PropertyAttribute::TRANSIENT ) }; // Use it to initialize sequence! diff --git a/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx b/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx index c1c220e74573..127a365d99b8 100644 --- a/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx +++ b/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx @@ -127,11 +127,11 @@ Sequence< Type > SAL_CALL ActionTriggerSeparatorPropertySet::getTypes() throw ( { // Create a static typecollection ... static ::cppu::OTypeCollection aTypeCollection( - ::getCppuType(( const Reference< XPropertySet >*)NULL ) , - ::getCppuType(( const Reference< XFastPropertySet >*)NULL ) , - ::getCppuType(( const Reference< XMultiPropertySet >*)NULL ) , - ::getCppuType(( const Reference< XServiceInfo >*)NULL ) , - ::getCppuType(( const Reference< XTypeProvider >*)NULL ) ); + cppu::UnoType<XPropertySet>::get(), + cppu::UnoType<XFastPropertySet>::get(), + cppu::UnoType<XMultiPropertySet>::get(), + cppu::UnoType<XServiceInfo>::get(), + cppu::UnoType<XTypeProvider>::get()); // ... and set his address to static pointer! pTypeCollection = &aTypeCollection; @@ -252,7 +252,7 @@ const Sequence< Property > ActionTriggerSeparatorPropertySet::impl_getStaticProp { const Property pActionTriggerPropertys[] = { - Property( OUString( "SeparatorType" ), HANDLE_TYPE, ::getCppuType((sal_Int16*)0), PropertyAttribute::TRANSIENT ) + Property( OUString( "SeparatorType" ), HANDLE_TYPE, cppu::UnoType<sal_Int16>::get(), PropertyAttribute::TRANSIENT ) }; // Use it to initialize sequence! diff --git a/framework/source/fwe/classes/rootactiontriggercontainer.cxx b/framework/source/fwe/classes/rootactiontriggercontainer.cxx index fa408c64023a..23819a879270 100644 --- a/framework/source/fwe/classes/rootactiontriggercontainer.cxx +++ b/framework/source/fwe/classes/rootactiontriggercontainer.cxx @@ -197,7 +197,7 @@ throw ( IndexOutOfBoundsException, WrappedTargetException, RuntimeException, std Type SAL_CALL RootActionTriggerContainer::getElementType() throw (::com::sun::star::uno::RuntimeException, std::exception) { - return ::getCppuType(( Reference< XPropertySet >*)0); + return cppu::UnoType<XPropertySet>::get(); } sal_Bool SAL_CALL RootActionTriggerContainer::hasElements() @@ -261,12 +261,12 @@ Sequence< Type > SAL_CALL RootActionTriggerContainer::getTypes() throw ( Runtime { // Create a static typecollection ... static ::cppu::OTypeCollection aTypeCollection( - ::getCppuType(( const Reference< XMultiServiceFactory >*)NULL ) , - ::getCppuType(( const Reference< XIndexContainer >*)NULL ) , - ::getCppuType(( const Reference< XServiceInfo >*)NULL ) , - ::getCppuType(( const Reference< XTypeProvider >*)NULL ) , - ::getCppuType(( const Reference< XUnoTunnel >*)NULL ) , - ::getCppuType(( const Reference< XNamed >*)NULL )); + cppu::UnoType<XMultiServiceFactory>::get(), + cppu::UnoType<XIndexContainer>::get(), + cppu::UnoType<XServiceInfo>::get(), + cppu::UnoType<XTypeProvider>::get(), + cppu::UnoType<XUnoTunnel>::get(), + cppu::UnoType<XNamed>::get()); // ... and set his address to static pointer! pTypeCollection = &aTypeCollection; diff --git a/framework/source/fwe/helper/titlehelper.cxx b/framework/source/fwe/helper/titlehelper.cxx index d1a647796d11..2f50a3e691ce 100644 --- a/framework/source/fwe/helper/titlehelper.cxx +++ b/framework/source/fwe/helper/titlehelper.cxx @@ -139,14 +139,14 @@ void SAL_CALL TitleHelper::addTitleChangeListener(const css::uno::Reference< css throw (css::uno::RuntimeException, std::exception) { // container is threadsafe by himself - m_aListener.addInterface( ::getCppuType( (const css::uno::Reference< css::frame::XTitleChangeListener >*)NULL ), xListener ); + m_aListener.addInterface( cppu::UnoType<css::frame::XTitleChangeListener>::get(), xListener ); } void SAL_CALL TitleHelper::removeTitleChangeListener(const css::uno::Reference< css::frame::XTitleChangeListener >& xListener) throw (css::uno::RuntimeException, std::exception) { // container is threadsafe by himself - m_aListener.removeInterface( ::getCppuType( (const css::uno::Reference< css::frame::XTitleChangeListener >*)NULL ), xListener ); + m_aListener.removeInterface( cppu::UnoType<css::frame::XTitleChangeListener>::get(), xListener ); } void SAL_CALL TitleHelper::titleChanged(const css::frame::TitleChangedEvent& aEvent) @@ -265,7 +265,7 @@ void TitleHelper::impl_sendTitleChangedEvent () aLock.clear (); // <- SYNCHRONIZED - ::cppu::OInterfaceContainerHelper* pContainer = m_aListener.getContainer( ::getCppuType( ( const css::uno::Reference< css::frame::XTitleChangeListener >*) NULL ) ); + ::cppu::OInterfaceContainerHelper* pContainer = m_aListener.getContainer( cppu::UnoType<css::frame::XTitleChangeListener>::get()); if ( ! pContainer) return; diff --git a/framework/source/helper/ocomponentaccess.cxx b/framework/source/helper/ocomponentaccess.cxx index 12206c14bfaf..67862b931620 100644 --- a/framework/source/helper/ocomponentaccess.cxx +++ b/framework/source/helper/ocomponentaccess.cxx @@ -81,7 +81,7 @@ Type SAL_CALL OComponentAccess::getElementType() throw( RuntimeException, std::e { // Elements in list an enumeration are components! // Return the uno-type of XComponent. - return ::getCppuType((const css::uno::Reference< XComponent >*)NULL); + return cppu::UnoType<XComponent>::get(); } // XElementAccess diff --git a/framework/source/helper/oframes.cxx b/framework/source/helper/oframes.cxx index 7d86c5046f08..d21680aeaf7d 100644 --- a/framework/source/helper/oframes.cxx +++ b/framework/source/helper/oframes.cxx @@ -255,7 +255,7 @@ Any SAL_CALL OFrames::getByIndex( sal_Int32 nIndex ) throw( IndexOutOfBoundsExce Type SAL_CALL OFrames::getElementType() throw( RuntimeException, std::exception ) { // This "container" support XFrame-interfaces only! - return ::getCppuType( (const css::uno::Reference< XFrame >*)NULL ); + return cppu::UnoType<XFrame>::get(); } // XElementAccess diff --git a/framework/source/helper/uiconfigelementwrapperbase.cxx b/framework/source/helper/uiconfigelementwrapperbase.cxx index 741b9ea6c29a..a31cdb20e70b 100644 --- a/framework/source/helper/uiconfigelementwrapperbase.cxx +++ b/framework/source/helper/uiconfigelementwrapperbase.cxx @@ -435,13 +435,13 @@ const com::sun::star::uno::Sequence< com::sun::star::beans::Property > UIConfigE const com::sun::star::beans::Property pProperties[] = { com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_CONFIGLISTENER), UIELEMENT_PROPHANDLE_CONFIGLISTENER , cppu::UnoType<sal_Bool>::get(), com::sun::star::beans::PropertyAttribute::TRANSIENT ), - com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_CONFIGSOURCE), UIELEMENT_PROPHANDLE_CONFIGSOURCE , ::getCppuType((const Reference< ::com::sun::star::ui::XUIConfigurationManager >*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT ), - com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_FRAME), UIELEMENT_PROPHANDLE_FRAME , ::getCppuType((const Reference< com::sun::star::frame::XFrame >*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ), + com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_CONFIGSOURCE), UIELEMENT_PROPHANDLE_CONFIGSOURCE , cppu::UnoType<com::sun::star::ui::XUIConfigurationManager>::get(), com::sun::star::beans::PropertyAttribute::TRANSIENT ), + com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_FRAME), UIELEMENT_PROPHANDLE_FRAME , cppu::UnoType<com::sun::star::frame::XFrame>::get(), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ), com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_NOCLOSE), UIELEMENT_PROPHANDLE_NOCLOSE , cppu::UnoType<sal_Bool>::get(), com::sun::star::beans::PropertyAttribute::TRANSIENT ), com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_PERSISTENT), UIELEMENT_PROPHANDLE_PERSISTENT , cppu::UnoType<sal_Bool>::get(), com::sun::star::beans::PropertyAttribute::TRANSIENT ), com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_RESOURCEURL), UIELEMENT_PROPHANDLE_RESOURCEURL , cppu::UnoType<OUString>::get(), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ), com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_TYPE), UIELEMENT_PROPHANDLE_TYPE , cppu::UnoType<OUString>::get(), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ), - com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_XMENUBAR), UIELEMENT_PROPHANDLE_XMENUBAR , ::getCppuType((const Reference< com::sun::star::awt::XMenuBar >*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ) + com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_XMENUBAR), UIELEMENT_PROPHANDLE_XMENUBAR , cppu::UnoType<com::sun::star::awt::XMenuBar>::get(), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ) }; // Use it to initialize sequence! const com::sun::star::uno::Sequence< com::sun::star::beans::Property > lPropertyDescriptor( pProperties, UIELEMENT_PROPCOUNT ); diff --git a/framework/source/helper/uielementwrapperbase.cxx b/framework/source/helper/uielementwrapperbase.cxx index 1273c83a6b9b..b8780f214440 100644 --- a/framework/source/helper/uielementwrapperbase.cxx +++ b/framework/source/helper/uielementwrapperbase.cxx @@ -228,8 +228,8 @@ const com::sun::star::uno::Sequence< com::sun::star::beans::Property > UIElement const com::sun::star::beans::Property pProperties[] = { - com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_FRAME), UIELEMENT_PROPHANDLE_FRAME , ::getCppuType((Reference< XFrame >*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ), - com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_RESOURCEURL), UIELEMENT_PROPHANDLE_RESOURCEURL , ::getCppuType((sal_Int16*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ), + com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_FRAME), UIELEMENT_PROPHANDLE_FRAME , cppu::UnoType<XFrame>::get(), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ), + com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_RESOURCEURL), UIELEMENT_PROPHANDLE_RESOURCEURL , cppu::UnoType<sal_Int16>::get(), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ), com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_TYPE), UIELEMENT_PROPHANDLE_TYPE , cppu::UnoType<OUString>::get(), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ) }; // Use it to initialize sequence! diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx index 771dfa609b59..2bf3a09930d1 100644 --- a/framework/source/services/desktop.cxx +++ b/framework/source/services/desktop.cxx @@ -1581,8 +1581,8 @@ const css::uno::Sequence< css::beans::Property > Desktop::impl_getStaticProperty const css::beans::Property pProperties[] = { - css::beans::Property( DESKTOP_PROPNAME_ACTIVEFRAME , DESKTOP_PROPHANDLE_ACTIVEFRAME , ::getCppuType((const css::uno::Reference< css::lang::XComponent >*)NULL) , css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::READONLY ), - css::beans::Property( DESKTOP_PROPNAME_DISPATCHRECORDERSUPPLIER , DESKTOP_PROPHANDLE_DISPATCHRECORDERSUPPLIER, ::getCppuType((const css::uno::Reference< css::frame::XDispatchRecorderSupplier >*)NULL), css::beans::PropertyAttribute::TRANSIENT ), + css::beans::Property( DESKTOP_PROPNAME_ACTIVEFRAME , DESKTOP_PROPHANDLE_ACTIVEFRAME , cppu::UnoType<css::lang::XComponent>::get(), css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::READONLY ), + css::beans::Property( DESKTOP_PROPNAME_DISPATCHRECORDERSUPPLIER , DESKTOP_PROPHANDLE_DISPATCHRECORDERSUPPLIER, cppu::UnoType<css::frame::XDispatchRecorderSupplier>::get(), css::beans::PropertyAttribute::TRANSIENT ), css::beans::Property( DESKTOP_PROPNAME_ISPLUGGED , DESKTOP_PROPHANDLE_ISPLUGGED , ::getBooleanCppuType() , css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::READONLY ), css::beans::Property( DESKTOP_PROPNAME_SUSPENDQUICKSTARTVETO , DESKTOP_PROPHANDLE_SUSPENDQUICKSTARTVETO , ::getBooleanCppuType() , css::beans::PropertyAttribute::TRANSIENT ), css::beans::Property( DESKTOP_PROPNAME_TITLE , DESKTOP_PROPHANDLE_TITLE , cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::TRANSIENT ), diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx index e374471a5df4..2386f1807d17 100644 --- a/framework/source/services/frame.cxx +++ b/framework/source/services/frame.cxx @@ -1699,7 +1699,7 @@ void SAL_CALL Frame::addFrameActionListener( const css::uno::Reference< css::fra TransactionGuard aTransaction( m_aTransactionManager, E_SOFTEXCEPTIONS ); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - m_aListenerContainer.addInterface( ::getCppuType( (const css::uno::Reference< css::frame::XFrameActionListener >*)NULL ), xListener ); + m_aListenerContainer.addInterface( cppu::UnoType<css::frame::XFrameActionListener>::get(), xListener ); } void SAL_CALL Frame::removeFrameActionListener( const css::uno::Reference< css::frame::XFrameActionListener >& xListener ) throw( css::uno::RuntimeException, std::exception ) @@ -1713,7 +1713,7 @@ void SAL_CALL Frame::removeFrameActionListener( const css::uno::Reference< css:: TransactionGuard aTransaction( m_aTransactionManager, E_SOFTEXCEPTIONS ); /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - m_aListenerContainer.removeInterface( ::getCppuType( (const css::uno::Reference< css::frame::XFrameActionListener >*)NULL ), xListener ); + m_aListenerContainer.removeInterface( cppu::UnoType<css::frame::XFrameActionListener>::get(), xListener ); } /*-**************************************************************************************************** @@ -1750,7 +1750,7 @@ void SAL_CALL Frame::close( sal_Bool bDeliverOwnership ) throw( css::util::Close // internal operations too ... // Note: container is threadsafe himself. css::lang::EventObject aSource (static_cast< ::cppu::OWeakObject*>(this)); - ::cppu::OInterfaceContainerHelper* pContainer = m_aListenerContainer.getContainer( ::getCppuType( ( const css::uno::Reference< css::util::XCloseListener >*) NULL ) ); + ::cppu::OInterfaceContainerHelper* pContainer = m_aListenerContainer.getContainer( cppu::UnoType<css::util::XCloseListener>::get()); if (pContainer!=NULL) { ::cppu::OInterfaceIteratorHelper pIterator(*pContainer); @@ -1784,7 +1784,7 @@ void SAL_CALL Frame::close( sal_Bool bDeliverOwnership ) throw( css::util::Close throw css::util::CloseVetoException("Component couldn't be deattached ...",static_cast< ::cppu::OWeakObject*>(this)); // If closing is allowed ... inform all istener and dispose this frame! - pContainer = m_aListenerContainer.getContainer( ::getCppuType( ( const css::uno::Reference< css::util::XCloseListener >*) NULL ) ); + pContainer = m_aListenerContainer.getContainer( cppu::UnoType<css::util::XCloseListener>::get()); if (pContainer!=NULL) { ::cppu::OInterfaceIteratorHelper pIterator(*pContainer); @@ -1834,7 +1834,7 @@ void SAL_CALL Frame::addCloseListener( const css::uno::Reference< css::util::XCl TransactionGuard aTransaction( m_aTransactionManager, E_HARDEXCEPTIONS ); // We don't need any lock here ... // Container lives if we live and is threadsafe by himself. - m_aListenerContainer.addInterface( ::getCppuType( ( const css::uno::Reference< css::util::XCloseListener >* ) NULL ), xListener ); + m_aListenerContainer.addInterface( cppu::UnoType<css::util::XCloseListener>::get(), xListener ); } void SAL_CALL Frame::removeCloseListener( const css::uno::Reference< css::util::XCloseListener >& xListener ) throw (css::uno::RuntimeException, std::exception) @@ -1843,7 +1843,7 @@ void SAL_CALL Frame::removeCloseListener( const css::uno::Reference< css::util:: TransactionGuard aTransaction( m_aTransactionManager, E_SOFTEXCEPTIONS ); // We don't need any lock here ... // Container lives if we live and is threadsafe by himself. - m_aListenerContainer.removeInterface( ::getCppuType( ( const css::uno::Reference< css::util::XCloseListener >* ) NULL ), xListener ); + m_aListenerContainer.removeInterface( cppu::UnoType<css::util::XCloseListener>::get(), xListener ); } OUString SAL_CALL Frame::getTitle() @@ -2656,14 +2656,14 @@ void Frame::impl_initializePropInfo() css::beans::Property( FRAME_PROPNAME_DISPATCHRECORDERSUPPLIER, FRAME_PROPHANDLE_DISPATCHRECORDERSUPPLIER, - ::getCppuType((const css::uno::Reference< css::frame::XDispatchRecorderSupplier >*)NULL), + cppu::UnoType<css::frame::XDispatchRecorderSupplier>::get(), css::beans::PropertyAttribute::TRANSIENT)); impl_addPropertyInfo( css::beans::Property( FRAME_PROPNAME_INDICATORINTERCEPTION, FRAME_PROPHANDLE_INDICATORINTERCEPTION, - ::getCppuType((const css::uno::Reference< css::task::XStatusIndicator >*)NULL), + cppu::UnoType<css::task::XStatusIndicator>::get(), css::beans::PropertyAttribute::TRANSIENT)); impl_addPropertyInfo( @@ -2677,7 +2677,7 @@ void Frame::impl_initializePropInfo() css::beans::Property( FRAME_PROPNAME_LAYOUTMANAGER, FRAME_PROPHANDLE_LAYOUTMANAGER, - ::getCppuType((const css::uno::Reference< ::com::sun::star::frame::XLayoutManager >*)NULL), + cppu::UnoType<com::sun::star::frame::XLayoutManager>::get(), css::beans::PropertyAttribute::TRANSIENT)); impl_addPropertyInfo( @@ -2843,7 +2843,7 @@ void Frame::implts_sendFrameActionEvent( const css::frame::FrameAction& aAction // Get container for right listener. // FOLLOW LINES ARE THREADSAFE!!! // ( OInterfaceContainerHelper is synchronized with m_aListenerContainer! ) - ::cppu::OInterfaceContainerHelper* pContainer = m_aListenerContainer.getContainer( ::getCppuType( ( const css::uno::Reference< css::frame::XFrameActionListener >*) NULL ) ); + ::cppu::OInterfaceContainerHelper* pContainer = m_aListenerContainer.getContainer( cppu::UnoType<css::frame::XFrameActionListener>::get()); if( pContainer != NULL ) { diff --git a/framework/source/services/tabwindowservice.cxx b/framework/source/services/tabwindowservice.cxx index 8aa1e640947f..2fefbdb1cba9 100644 --- a/framework/source/services/tabwindowservice.cxx +++ b/framework/source/services/tabwindowservice.cxx @@ -333,7 +333,7 @@ void SAL_CALL TabWindowService::activateTab(::sal_Int32 nID) void SAL_CALL TabWindowService::addTabListener(const css::uno::Reference< css::awt::XTabListener >& xListener) throw (css::uno::RuntimeException, std::exception) { - m_lListener.addInterface(::getCppuType((const css::uno::Reference< css::awt::XTabListener >*)NULL), xListener); + m_lListener.addInterface(cppu::UnoType<css::awt::XTabListener>::get(), xListener); } // XSimpleTabController @@ -341,7 +341,7 @@ void SAL_CALL TabWindowService::addTabListener(const css::uno::Reference< css::a void SAL_CALL TabWindowService::removeTabListener(const css::uno::Reference< css::awt::XTabListener >& xListener) throw (css::uno::RuntimeException, std::exception) { - m_lListener.removeInterface(::getCppuType((const css::uno::Reference< css::awt::XTabListener >*)NULL), xListener); + m_lListener.removeInterface(cppu::UnoType<css::awt::XTabListener>::get(), xListener); } // XComponent @@ -445,7 +445,7 @@ IMPL_LINK( TabWindowService, EventListener, VclSimpleEvent*, pEvent ) return 0; } - ::cppu::OInterfaceContainerHelper* pContainer = m_lListener.getContainer(::getCppuType((const css::uno::Reference< css::awt::XTabListener >*) NULL)); + ::cppu::OInterfaceContainerHelper* pContainer = m_lListener.getContainer(cppu::UnoType<css::awt::XTabListener>::get()); if ( ! pContainer) return 0; diff --git a/framework/source/tabwin/tabwindow.cxx b/framework/source/tabwin/tabwindow.cxx index 05c1afc4dd15..eb2c8298bf8e 100644 --- a/framework/source/tabwin/tabwindow.cxx +++ b/framework/source/tabwin/tabwindow.cxx @@ -162,7 +162,7 @@ void TabWindow::impl_SetTitle( const OUString& rTitle ) void TabWindow::implts_SendNotification( Notification eNotify, sal_Int32 ID ) const { ::cppu::OInterfaceContainerHelper* pContainer = m_aListenerContainer.getContainer( - ::getCppuType( ( const css::uno::Reference< css::awt::XTabListener >*) NULL ) ); + cppu::UnoType<css::awt::XTabListener>::get()); if (pContainer!=NULL) { ::cppu::OInterfaceIteratorHelper pIterator(*pContainer); @@ -199,7 +199,7 @@ void TabWindow::implts_SendNotification( Notification eNotify, sal_Int32 ID ) co void TabWindow::implts_SendNotification( Notification eNotify, sal_Int32 ID, const css::uno::Sequence< css::beans::NamedValue >& rSeq ) const { ::cppu::OInterfaceContainerHelper* pContainer = m_aListenerContainer.getContainer( - ::getCppuType( ( const css::uno::Reference< css::awt::XTabListener >*) NULL ) ); + cppu::UnoType<css::awt::XTabListener>::get()); if (pContainer!=NULL) { ::cppu::OInterfaceIteratorHelper pIterator(*pContainer); @@ -774,7 +774,7 @@ throw (css::uno::RuntimeException, std::exception) /* SAFE AREA ----------------------------------------------------------------------------------------------- */ m_aListenerContainer.addInterface( - ::getCppuType( ( const css::uno::Reference< css::awt::XTabListener >* ) NULL ), xListener ); + cppu::UnoType<css::awt::XTabListener>::get(), xListener ); } void SAL_CALL TabWindow::removeTabListener( const css::uno::Reference< css::awt::XTabListener >& xListener ) @@ -788,7 +788,7 @@ throw (css::uno::RuntimeException, std::exception) /* SAFE AREA ----------------------------------------------------------------------------------------------- */ m_aListenerContainer.removeInterface( - ::getCppuType( ( const css::uno::Reference< css::awt::XTabListener >* ) NULL ), xListener ); + cppu::UnoType<css::awt::XTabListener>::get(), xListener ); } // OPropertySetHelper diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx index 42c57f0bc882..3fea283a21e4 100644 --- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx @@ -972,13 +972,13 @@ void SAL_CALL ModuleUIConfigurationManager::addEventListener( const Reference< X throw DisposedException(); } - m_aListenerContainer.addInterface( ::getCppuType( ( const Reference< XEventListener >* ) NULL ), xListener ); + m_aListenerContainer.addInterface( cppu::UnoType<XEventListener>::get(), xListener ); } void SAL_CALL ModuleUIConfigurationManager::removeEventListener( const Reference< XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) { /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - m_aListenerContainer.removeInterface( ::getCppuType( ( const Reference< XEventListener >* ) NULL ), xListener ); + m_aListenerContainer.removeInterface( cppu::UnoType<XEventListener>::get(), xListener ); } // XUIConfiguration @@ -992,13 +992,13 @@ void SAL_CALL ModuleUIConfigurationManager::addConfigurationListener( const Refe throw DisposedException(); } - m_aListenerContainer.addInterface( ::getCppuType( ( const Reference< ui::XUIConfigurationListener >* ) NULL ), xListener ); + m_aListenerContainer.addInterface( cppu::UnoType<ui::XUIConfigurationListener>::get(), xListener ); } void SAL_CALL ModuleUIConfigurationManager::removeConfigurationListener( const Reference< ::com::sun::star::ui::XUIConfigurationListener >& xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) { /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - m_aListenerContainer.removeInterface( ::getCppuType( ( const Reference< ui::XUIConfigurationListener >* ) NULL ), xListener ); + m_aListenerContainer.removeInterface( cppu::UnoType<ui::XUIConfigurationListener>::get(), xListener ); } // XUIConfigurationManager diff --git a/framework/source/uiconfiguration/uiconfigurationmanager.cxx b/framework/source/uiconfiguration/uiconfigurationmanager.cxx index 717a3cfd4061..09a201d72554 100644 --- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx @@ -741,13 +741,13 @@ void SAL_CALL UIConfigurationManager::addEventListener( const Reference< XEventL throw DisposedException(); } - m_aListenerContainer.addInterface( ::getCppuType( ( const Reference< XEventListener >* ) NULL ), xListener ); + m_aListenerContainer.addInterface( cppu::UnoType<XEventListener>::get(), xListener ); } void SAL_CALL UIConfigurationManager::removeEventListener( const Reference< XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) { /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - m_aListenerContainer.removeInterface( ::getCppuType( ( const Reference< XEventListener >* ) NULL ), xListener ); + m_aListenerContainer.removeInterface( cppu::UnoType<XEventListener>::get(), xListener ); } // XUIConfigurationManager @@ -761,13 +761,13 @@ void SAL_CALL UIConfigurationManager::addConfigurationListener( const Reference< throw DisposedException(); } - m_aListenerContainer.addInterface( ::getCppuType( ( const Reference< XUIConfigurationListener >* ) NULL ), xListener ); + m_aListenerContainer.addInterface( cppu::UnoType<XUIConfigurationListener>::get(), xListener ); } void SAL_CALL UIConfigurationManager::removeConfigurationListener( const Reference< ::com::sun::star::ui::XUIConfigurationListener >& xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) { /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - m_aListenerContainer.removeInterface( ::getCppuType( ( const Reference< XUIConfigurationListener >* ) NULL ), xListener ); + m_aListenerContainer.removeInterface( cppu::UnoType<XUIConfigurationListener>::get(), xListener ); } void SAL_CALL UIConfigurationManager::reset() throw (::com::sun::star::uno::RuntimeException, std::exception) diff --git a/framework/source/uiconfiguration/windowstateconfiguration.cxx b/framework/source/uiconfiguration/windowstateconfiguration.cxx index 6b5ca0768ab6..94b31ec236c8 100644 --- a/framework/source/uiconfiguration/windowstateconfiguration.cxx +++ b/framework/source/uiconfiguration/windowstateconfiguration.cxx @@ -1453,7 +1453,7 @@ throw (::com::sun::star::uno::RuntimeException, std::exception) Type SAL_CALL WindowStateConfiguration::getElementType() throw (::com::sun::star::uno::RuntimeException, std::exception) { - return( ::getCppuType( (const Reference< XNameAccess >*)NULL ) ); + return( cppu::UnoType<XNameAccess>::get()); } sal_Bool SAL_CALL WindowStateConfiguration::hasElements() diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index 2755b67572ca..de31c3c005ea 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -363,14 +363,14 @@ void SAL_CALL MenuBarManager::addEventListener( const Reference< XEventListener if ( m_bDisposed ) throw DisposedException(); - m_aListenerContainer.addInterface( ::getCppuType( ( const Reference< XEventListener >* ) NULL ), xListener ); + m_aListenerContainer.addInterface( cppu::UnoType<XEventListener>::get(), xListener ); } void SAL_CALL MenuBarManager::removeEventListener( const Reference< XEventListener >& xListener ) throw( RuntimeException, std::exception ) { SolarMutexGuard g; /* SAFE AREA ----------------------------------------------------------------------------------------------- */ - m_aListenerContainer.removeInterface( ::getCppuType( ( const Reference< XEventListener >* ) NULL ), xListener ); + m_aListenerContainer.removeInterface( cppu::UnoType<XEventListener>::get(), xListener ); } void SAL_CALL MenuBarManager::elementInserted( const ::com::sun::star::ui::ConfigurationEvent& Event ) diff --git a/framework/source/uielement/menubarwrapper.cxx b/framework/source/uielement/menubarwrapper.cxx index 5ef7442f5008..05a8be6992fe 100644 --- a/framework/source/uielement/menubarwrapper.cxx +++ b/framework/source/uielement/menubarwrapper.cxx @@ -252,7 +252,7 @@ void MenuBarWrapper::fillPopupControllerCache() Type SAL_CALL MenuBarWrapper::getElementType() throw (::com::sun::star::uno::RuntimeException, std::exception) { - return ::getCppuType(( Reference< XDispatchProvider >*)0); + return cppu::UnoType<XDispatchProvider>::get(); } sal_Bool SAL_CALL MenuBarWrapper::hasElements() diff --git a/framework/source/uielement/statusbarmanager.cxx b/framework/source/uielement/statusbarmanager.cxx index 7ab55aca255d..a7b534376c73 100644 --- a/framework/source/uielement/statusbarmanager.cxx +++ b/framework/source/uielement/statusbarmanager.cxx @@ -243,14 +243,12 @@ void SAL_CALL StatusBarManager::addEventListener( const uno::Reference< lang::XE if ( m_bDisposed ) throw lang::DisposedException(); - m_aListenerContainer.addInterface( ::getCppuType( - ( const uno::Reference< lang::XEventListener >* ) NULL ), xListener ); + m_aListenerContainer.addInterface( cppu::UnoType<lang::XEventListener>::get(), xListener ); } void SAL_CALL StatusBarManager::removeEventListener( const uno::Reference< lang::XEventListener >& xListener ) throw( uno::RuntimeException, std::exception ) { - m_aListenerContainer.removeInterface( ::getCppuType( - ( const uno::Reference< lang::XEventListener >* ) NULL ), xListener ); + m_aListenerContainer.removeInterface( cppu::UnoType<lang::XEventListener>::get(), xListener ); } // XUIConfigurationListener diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index fba6752fc13f..2878d2b7ef9c 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -643,12 +643,12 @@ void SAL_CALL ToolBarManager::addEventListener( const Reference< XEventListener if ( m_bDisposed ) throw DisposedException(); - m_aListenerContainer.addInterface( ::getCppuType( ( const Reference< XEventListener >* ) NULL ), xListener ); + m_aListenerContainer.addInterface( cppu::UnoType<XEventListener>::get(), xListener ); } void SAL_CALL ToolBarManager::removeEventListener( const Reference< XEventListener >& xListener ) throw( RuntimeException, std::exception ) { - m_aListenerContainer.removeInterface( ::getCppuType( ( const Reference< XEventListener >* ) NULL ), xListener ); + m_aListenerContainer.removeInterface( cppu::UnoType<XEventListener>::get(), xListener ); } // XUIConfigurationListener diff --git a/framework/source/uielement/uicommanddescription.cxx b/framework/source/uielement/uicommanddescription.cxx index 344511f847e4..f27ffdd6fb4c 100644 --- a/framework/source/uielement/uicommanddescription.cxx +++ b/framework/source/uielement/uicommanddescription.cxx @@ -736,7 +736,7 @@ throw (::com::sun::star::uno::RuntimeException, std::exception) Type SAL_CALL UICommandDescription::getElementType() throw (::com::sun::star::uno::RuntimeException, std::exception) { - return( ::getCppuType( (const Reference< XNameAccess >*)NULL ) ); + return( cppu::UnoType<XNameAccess>::get()); } sal_Bool SAL_CALL UICommandDescription::hasElements() diff --git a/helpcontent2 b/helpcontent2 -Subproject 2ef15cb93840390d9927f64bddb958ad699cb79 +Subproject fdfcaa991224f6ac15fdc778e0a301b9285208e diff --git a/io/test/stm/datatest.cxx b/io/test/stm/datatest.cxx index 0c4b2bed7f16..a5d3b79b19a6 100644 --- a/io/test/stm/datatest.cxx +++ b/io/test/stm/datatest.cxx @@ -484,7 +484,7 @@ void MyPersistObject::setPropertyValue( aValue >>= m_s; } else if( aPropertyName.equalsAscii("object") ) { - if( aValue.getValueType() == getCppuType( (Reference< XPersistObject> *)0 ) ) + if( aValue.getValueType() == cppu::UnoType<XPersistObject>::get()) { aValue >>= m_ref; } @@ -858,9 +858,9 @@ sal_Bool compareMyPropertySet( Reference< XPropertySet > &r1 , Reference < XProp Any o1 = r1->getPropertyValue("object"); Any o2 = r2->getPropertyValue("object"); - if( o1.getValueType() == getCppuType( (Reference<XPersistObject>*)0 ) ) { + if( o1.getValueType() == cppu::UnoType<XPersistObject>::get()) { - if( o2.getValueType() == getCppuType( (Reference<XPersistObject>*)0 ) ) { + if( o2.getValueType() == cppu::UnoType<XPersistObject>::get()) { Reference < XPersistObject > rPersist1; Reference < XPersistObject > rPersist2; o1 >>= rPersist1; @@ -879,7 +879,7 @@ sal_Bool compareMyPropertySet( Reference< XPropertySet > &r1 , Reference < XProp if( ! b ) fprintf( stderr, "compareMyPropertySet: 9\n" ); } else { - if( o2.getValueType() == getCppuType( (Reference<XPersistObject>*)0 ) ) { + if( o2.getValueType() == cppu::UnoType<XPersistObject>::get()) { b = sal_False; } if( ! b ) fprintf( stderr, "compareMyPropertySet: 10\n" ); diff --git a/javaunohelper/source/javaunohelper.cxx b/javaunohelper/source/javaunohelper.cxx index d779380e59a7..54d286451379 100644 --- a/javaunohelper/source/javaunohelper.cxx +++ b/javaunohelper/source/javaunohelper.cxx @@ -104,10 +104,10 @@ jboolean Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1writeInfo( { void * pSMgr = java2dest.mapInterface( - jSMgr, getCppuType((Reference< lang::XMultiServiceFactory > *) 0) ); + jSMgr, cppu::UnoType<lang::XMultiServiceFactory>::get()); void * pKey = java2dest.mapInterface( - jRegKey, getCppuType((Reference< registry::XRegistryKey > *) 0) ); + jRegKey, cppu::UnoType<registry::XRegistryKey>::get()); uno_ExtEnvironment * env = loader_env.get()->pExtEnv; if (pKey) @@ -198,10 +198,10 @@ jobject Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1getFactory( { void * pSMgr = java2dest.mapInterface( - jSMgr, ::getCppuType((Reference< lang::XMultiServiceFactory > *) 0) ); + jSMgr, cppu::UnoType<lang::XMultiServiceFactory>::get()); void * pKey = java2dest.mapInterface( - jRegKey, ::getCppuType((Reference< registry::XRegistryKey > *) 0) ); + jRegKey, cppu::UnoType<registry::XRegistryKey>::get()); const char* pImplName = pJEnv->GetStringUTFChars( jImplName, NULL ); @@ -220,7 +220,7 @@ jobject Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1getFactory( if (pSSF) { jobject jglobal = (jobject) dest2java.mapInterface( - pSSF, getCppuType((Reference< XInterface > *) 0) ); + pSSF, cppu::UnoType<XInterface>::get()); joSLL_cpp = pJEnv->NewLocalRef( jglobal ); pJEnv->DeleteGlobalRef( jglobal ); if (env) diff --git a/linguistic/source/convdiclist.cxx b/linguistic/source/convdiclist.cxx index d5cf1b78ca71..f1cc93064839 100644 --- a/linguistic/source/convdiclist.cxx +++ b/linguistic/source/convdiclist.cxx @@ -185,7 +185,7 @@ uno::Type SAL_CALL ConvDicNameContainer::getElementType( ) throw (RuntimeException, std::exception) { MutexGuard aGuard( GetLinguMutex() ); - return uno::Type( ::getCppuType( (uno::Reference< XConversionDictionary > *) 0) ); + return uno::Type( cppu::UnoType<XConversionDictionary>::get()); } sal_Bool SAL_CALL ConvDicNameContainer::hasElements( ) diff --git a/mysqlc/source/mysqlc_resultset.cxx b/mysqlc/source/mysqlc_resultset.cxx index 5942ae701e25..3541ec2b83e2 100644 --- a/mysqlc/source/mysqlc_resultset.cxx +++ b/mysqlc/source/mysqlc_resultset.cxx @@ -135,9 +135,9 @@ Sequence< Type > SAL_CALL OResultSet::getTypes() throw(RuntimeException, std::exception) { OSL_TRACE("OResultSet::getTypes"); - OTypeCollection aTypes( ::getCppuType((const Reference< XMultiPropertySet > *) NULL), - ::getCppuType((const Reference< XFastPropertySet > *) NULL), - ::getCppuType((const Reference< XPropertySet > *) NULL)); + OTypeCollection aTypes( cppu::UnoType<XMultiPropertySet>::get(), + cppu::UnoType<XFastPropertySet>::get(), + cppu::UnoType<XPropertySet>::get()); return concatSequences(aTypes.getTypes(), OResultSet_BASE::getTypes()); } diff --git a/mysqlc/source/mysqlc_statement.cxx b/mysqlc/source/mysqlc_statement.cxx index 57b051ea4568..2c6cb8e9b755 100644 --- a/mysqlc/source/mysqlc_statement.cxx +++ b/mysqlc/source/mysqlc_statement.cxx @@ -121,9 +121,9 @@ Sequence< Type > SAL_CALL OCommonStatement::getTypes() throw(RuntimeException, std::exception) { OSL_TRACE("OCommonStatement::getTypes"); - ::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 concatSequences(aTypes.getTypes(), OCommonStatement_IBase::getTypes()); } diff --git a/oox/source/export/ColorPropertySet.cxx b/oox/source/export/ColorPropertySet.cxx index d3fe84806507..3ff4f28c7aaa 100644 --- a/oox/source/export/ColorPropertySet.cxx +++ b/oox/source/export/ColorPropertySet.cxx @@ -56,7 +56,7 @@ lcl_ColorPropertySetInfo::lcl_ColorPropertySetInfo( bool bFillColor ) : // note: length of FillColor and LineColor is 9 m_aColorPropName( (bFillColor ? "FillColor" : "LineColor"), 9, RTL_TEXTENCODING_ASCII_US ), m_aColorProp( m_aColorPropName, -1, - ::getCppuType( reinterpret_cast< const sal_Int32 * >(0)), 0) + cppu::UnoType<sal_Int32>::get(), 0) {} Sequence< Property > SAL_CALL lcl_ColorPropertySetInfo::getProperties() diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index b5369c3357b2..6703669e3c95 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -1489,7 +1489,7 @@ void DrawingML::WriteParagraphNumbering( Reference< XPropertySet > rXPropSet, sa DBG(fprintf (stderr, "graphic url: %s\n", OUStringToOString( aGraphicURL, RTL_TEXTENCODING_UTF8 ).getStr())); } else if ( aPropName == "GraphicSize" ) { - if ( pPropValue[ i ].Value.getValueType() == ::getCppuType( (awt::Size*)0) ) + if ( pPropValue[ i ].Value.getValueType() == cppu::UnoType<awt::Size>::get()) { // don't cast awt::Size to Size as on 64-bits they are not the same. ::com::sun::star::awt::Size aSize; diff --git a/package/source/xstor/oseekinstream.cxx b/package/source/xstor/oseekinstream.cxx index be18fba7f496..cf5db722a906 100644 --- a/package/source/xstor/oseekinstream.cxx +++ b/package/source/xstor/oseekinstream.cxx @@ -67,7 +67,7 @@ uno::Sequence< uno::Type > SAL_CALL OInputSeekStream::getTypes() if ( pTypeCollection == NULL ) { static ::cppu::OTypeCollection aTypeCollection( - ::getCppuType(( const uno::Reference< io::XSeekable >* )NULL ), + cppu::UnoType<io::XSeekable>::get(), OInputCompStream::getTypes() ); pTypeCollection = &aTypeCollection ; diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx index 4ec30e962931..5de31ab99ee7 100644 --- a/package/source/xstor/owriteablestream.cxx +++ b/package/source/xstor/owriteablestream.cxx @@ -1933,53 +1933,53 @@ uno::Sequence< uno::Type > SAL_CALL OWriteStream::getTypes() if ( m_pData->m_nStorageType == embed::StorageFormats::PACKAGE ) { ::cppu::OTypeCollection aTmpCollection - ( ::getCppuType( ( const uno::Reference< lang::XTypeProvider >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XInputStream >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XOutputStream >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XStream >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XSeekable >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XTruncate >* )NULL ) - , ::getCppuType( ( const uno::Reference< lang::XComponent >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XEncryptionProtectedSource2 >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XEncryptionProtectedSource >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XExtendedStorageStream >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XTransactedObject >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XTransactionBroadcaster >* )NULL ) ); + ( cppu::UnoType<lang::XTypeProvider>::get() + , cppu::UnoType<io::XInputStream>::get() + , cppu::UnoType<io::XOutputStream>::get() + , cppu::UnoType<io::XStream>::get() + , cppu::UnoType<io::XSeekable>::get() + , cppu::UnoType<io::XTruncate>::get() + , cppu::UnoType<lang::XComponent>::get() + , cppu::UnoType<embed::XEncryptionProtectedSource2>::get() + , cppu::UnoType<embed::XEncryptionProtectedSource>::get() + , cppu::UnoType<embed::XExtendedStorageStream>::get() + , cppu::UnoType<embed::XTransactedObject>::get() + , cppu::UnoType<embed::XTransactionBroadcaster>::get()); m_pData->m_pTypeCollection = new ::cppu::OTypeCollection - ( ::getCppuType( ( const uno::Reference< beans::XPropertySet >* )NULL ) + ( cppu::UnoType<beans::XPropertySet>::get() , aTmpCollection.getTypes() ); } else if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML ) { m_pData->m_pTypeCollection = new ::cppu::OTypeCollection - ( ::getCppuType( ( const uno::Reference< lang::XTypeProvider >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XInputStream >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XOutputStream >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XStream >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XSeekable >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XTruncate >* )NULL ) - , ::getCppuType( ( const uno::Reference< lang::XComponent >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XRelationshipAccess >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XExtendedStorageStream >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XTransactedObject >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XTransactionBroadcaster >* )NULL ) - , ::getCppuType( ( const uno::Reference< beans::XPropertySet >* )NULL ) ); + ( cppu::UnoType<lang::XTypeProvider>::get() + , cppu::UnoType<io::XInputStream>::get() + , cppu::UnoType<io::XOutputStream>::get() + , cppu::UnoType<io::XStream>::get() + , cppu::UnoType<io::XSeekable>::get() + , cppu::UnoType<io::XTruncate>::get() + , cppu::UnoType<lang::XComponent>::get() + , cppu::UnoType<embed::XRelationshipAccess>::get() + , cppu::UnoType<embed::XExtendedStorageStream>::get() + , cppu::UnoType<embed::XTransactedObject>::get() + , cppu::UnoType<embed::XTransactionBroadcaster>::get() + , cppu::UnoType<beans::XPropertySet>::get()); } else // if ( m_pData->m_nStorageType == embed::StorageFormats::ZIP ) { m_pData->m_pTypeCollection = new ::cppu::OTypeCollection - ( ::getCppuType( ( const uno::Reference< lang::XTypeProvider >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XInputStream >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XOutputStream >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XStream >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XSeekable >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XTruncate >* )NULL ) - , ::getCppuType( ( const uno::Reference< lang::XComponent >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XExtendedStorageStream >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XTransactedObject >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XTransactionBroadcaster >* )NULL ) - , ::getCppuType( ( const uno::Reference< beans::XPropertySet >* )NULL ) ); + ( cppu::UnoType<lang::XTypeProvider>::get() + , cppu::UnoType<io::XInputStream>::get() + , cppu::UnoType<io::XOutputStream>::get() + , cppu::UnoType<io::XStream>::get() + , cppu::UnoType<io::XSeekable>::get() + , cppu::UnoType<io::XTruncate>::get() + , cppu::UnoType<lang::XComponent>::get() + , cppu::UnoType<embed::XExtendedStorageStream>::get() + , cppu::UnoType<embed::XTransactedObject>::get() + , cppu::UnoType<embed::XTransactionBroadcaster>::get() + , cppu::UnoType<beans::XPropertySet>::get()); } } else @@ -1987,41 +1987,41 @@ uno::Sequence< uno::Type > SAL_CALL OWriteStream::getTypes() if ( m_pData->m_nStorageType == embed::StorageFormats::PACKAGE ) { m_pData->m_pTypeCollection = new ::cppu::OTypeCollection - ( ::getCppuType( ( const uno::Reference< lang::XTypeProvider >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XInputStream >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XOutputStream >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XStream >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XSeekable >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XTruncate >* )NULL ) - , ::getCppuType( ( const uno::Reference< lang::XComponent >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XEncryptionProtectedSource2 >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XEncryptionProtectedSource >* )NULL ) - , ::getCppuType( ( const uno::Reference< beans::XPropertySet >* )NULL ) ); + ( cppu::UnoType<lang::XTypeProvider>::get() + , cppu::UnoType<io::XInputStream>::get() + , cppu::UnoType<io::XOutputStream>::get() + , cppu::UnoType<io::XStream>::get() + , cppu::UnoType<io::XSeekable>::get() + , cppu::UnoType<io::XTruncate>::get() + , cppu::UnoType<lang::XComponent>::get() + , cppu::UnoType<embed::XEncryptionProtectedSource2>::get() + , cppu::UnoType<embed::XEncryptionProtectedSource>::get() + , cppu::UnoType<beans::XPropertySet>::get()); } else if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML ) { m_pData->m_pTypeCollection = new ::cppu::OTypeCollection - ( ::getCppuType( ( const uno::Reference< lang::XTypeProvider >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XInputStream >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XOutputStream >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XStream >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XSeekable >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XTruncate >* )NULL ) - , ::getCppuType( ( const uno::Reference< lang::XComponent >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XRelationshipAccess >* )NULL ) - , ::getCppuType( ( const uno::Reference< beans::XPropertySet >* )NULL ) ); + ( cppu::UnoType<lang::XTypeProvider>::get() + , cppu::UnoType<io::XInputStream>::get() + , cppu::UnoType<io::XOutputStream>::get() + , cppu::UnoType<io::XStream>::get() + , cppu::UnoType<io::XSeekable>::get() + , cppu::UnoType<io::XTruncate>::get() + , cppu::UnoType<lang::XComponent>::get() + , cppu::UnoType<embed::XRelationshipAccess>::get() + , cppu::UnoType<beans::XPropertySet>::get()); } else // if ( m_pData->m_nStorageType == embed::StorageFormats::ZIP ) { m_pData->m_pTypeCollection = new ::cppu::OTypeCollection - ( ::getCppuType( ( const uno::Reference< lang::XTypeProvider >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XInputStream >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XOutputStream >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XStream >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XSeekable >* )NULL ) - , ::getCppuType( ( const uno::Reference< io::XTruncate >* )NULL ) - , ::getCppuType( ( const uno::Reference< lang::XComponent >* )NULL ) - , ::getCppuType( ( const uno::Reference< beans::XPropertySet >* )NULL ) ); + ( cppu::UnoType<lang::XTypeProvider>::get() + , cppu::UnoType<io::XInputStream>::get() + , cppu::UnoType<io::XOutputStream>::get() + , cppu::UnoType<io::XStream>::get() + , cppu::UnoType<io::XSeekable>::get() + , cppu::UnoType<io::XTruncate>::get() + , cppu::UnoType<lang::XComponent>::get() + , cppu::UnoType<beans::XPropertySet>::get()); } } } @@ -2500,7 +2500,7 @@ void SAL_CALL OWriteStream::addEventListener( throw lang::DisposedException(); } - m_pData->m_aListenersContainer.addInterface( ::getCppuType((const uno::Reference< lang::XEventListener >*)0), + m_pData->m_aListenersContainer.addInterface( cppu::UnoType<lang::XEventListener>::get(), xListener ); } @@ -2516,7 +2516,7 @@ void SAL_CALL OWriteStream::removeEventListener( throw lang::DisposedException(); } - m_pData->m_aListenersContainer.removeInterface( ::getCppuType((const uno::Reference< lang::XEventListener >*)0), + m_pData->m_aListenersContainer.removeInterface( cppu::UnoType<lang::XEventListener>::get(), xListener ); } @@ -3245,7 +3245,7 @@ void OWriteStream::BroadcastTransaction( sal_Int8 nMessage ) ::cppu::OInterfaceContainerHelper* pContainer = m_pData->m_aListenersContainer.getContainer( - ::getCppuType( ( const uno::Reference< embed::XTransactionListener >*) NULL ) ); + cppu::UnoType<embed::XTransactionListener>::get()); if ( pContainer ) { ::cppu::OInterfaceIteratorHelper pIterator( *pContainer ); @@ -3416,7 +3416,7 @@ void SAL_CALL OWriteStream::addTransactionListener( const uno::Reference< embed: if ( !m_bTransacted ) throw uno::RuntimeException(); - m_pData->m_aListenersContainer.addInterface( ::getCppuType((const uno::Reference< embed::XTransactionListener >*)0), + m_pData->m_aListenersContainer.addInterface( cppu::UnoType<embed::XTransactionListener>::get(), aListener ); } @@ -3434,7 +3434,7 @@ void SAL_CALL OWriteStream::removeTransactionListener( const uno::Reference< emb if ( !m_bTransacted ) throw uno::RuntimeException(); - m_pData->m_aListenersContainer.removeInterface( ::getCppuType((const uno::Reference< embed::XTransactionListener >*)0), + m_pData->m_aListenersContainer.removeInterface( cppu::UnoType<embed::XTransactionListener>::get(), aListener ); } diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx index 0a6adcd0e08b..61cfbe642ec9 100644 --- a/package/source/xstor/xstorage.cxx +++ b/package/source/xstor/xstorage.cxx @@ -2074,7 +2074,7 @@ void OStorage::BroadcastModifiedIfNecessary() ::cppu::OInterfaceContainerHelper* pContainer = m_pData->m_aListenersContainer.getContainer( - ::getCppuType( ( const uno::Reference< util::XModifyListener >*) NULL ) ); + cppu::UnoType<util::XModifyListener>::get()); if ( pContainer ) { ::cppu::OInterfaceIteratorHelper pIterator( *pContainer ); @@ -2106,7 +2106,7 @@ void OStorage::BroadcastTransaction( sal_Int8 nMessage ) ::cppu::OInterfaceContainerHelper* pContainer = m_pData->m_aListenersContainer.getContainer( - ::getCppuType( ( const uno::Reference< embed::XTransactionListener >*) NULL ) ); + cppu::UnoType<embed::XTransactionListener>::get()); if ( pContainer ) { ::cppu::OInterfaceIteratorHelper pIterator( *pContainer ); @@ -2277,51 +2277,51 @@ uno::Sequence< uno::Type > SAL_CALL OStorage::getTypes() if ( m_pData->m_bIsRoot ) { m_pData->m_pTypeCollection = new ::cppu::OTypeCollection - ( ::getCppuType( ( const uno::Reference< lang::XTypeProvider >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XStorage >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XStorage2 >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XStorageRawAccess >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XTransactedObject >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XTransactionBroadcaster >* )NULL ) - , ::getCppuType( ( const uno::Reference< util::XModifiable >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XEncryptionProtectedStorage >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XEncryptionProtectedSource2 >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XEncryptionProtectedSource >* )NULL ) - , ::getCppuType( ( const uno::Reference< beans::XPropertySet >* )NULL ) ); + ( cppu::UnoType<lang::XTypeProvider>::get() + , cppu::UnoType<embed::XStorage>::get() + , cppu::UnoType<embed::XStorage2>::get() + , cppu::UnoType<embed::XStorageRawAccess>::get() + , cppu::UnoType<embed::XTransactedObject>::get() + , cppu::UnoType<embed::XTransactionBroadcaster>::get() + , cppu::UnoType<util::XModifiable>::get() + , cppu::UnoType<embed::XEncryptionProtectedStorage>::get() + , cppu::UnoType<embed::XEncryptionProtectedSource2>::get() + , cppu::UnoType<embed::XEncryptionProtectedSource>::get() + , cppu::UnoType<beans::XPropertySet>::get()); } else { m_pData->m_pTypeCollection = new ::cppu::OTypeCollection - ( ::getCppuType( ( const uno::Reference< lang::XTypeProvider >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XStorage >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XStorage2 >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XStorageRawAccess >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XTransactedObject >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XTransactionBroadcaster >* )NULL ) - , ::getCppuType( ( const uno::Reference< util::XModifiable >* )NULL ) - , ::getCppuType( ( const uno::Reference< beans::XPropertySet >* )NULL ) ); + ( cppu::UnoType<lang::XTypeProvider>::get() + , cppu::UnoType<embed::XStorage>::get() + , cppu::UnoType<embed::XStorage2>::get() + , cppu::UnoType<embed::XStorageRawAccess>::get() + , cppu::UnoType<embed::XTransactedObject>::get() + , cppu::UnoType<embed::XTransactionBroadcaster>::get() + , cppu::UnoType<util::XModifiable>::get() + , cppu::UnoType<beans::XPropertySet>::get()); } } else if ( m_pData->m_nStorageType == embed::StorageFormats::OFOPXML ) { m_pData->m_pTypeCollection = new ::cppu::OTypeCollection - ( ::getCppuType( ( const uno::Reference< lang::XTypeProvider >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XStorage >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XTransactedObject >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XTransactionBroadcaster >* )NULL ) - , ::getCppuType( ( const uno::Reference< util::XModifiable >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XRelationshipAccess >* )NULL ) - , ::getCppuType( ( const uno::Reference< beans::XPropertySet >* )NULL ) ); + ( cppu::UnoType<lang::XTypeProvider>::get() + , cppu::UnoType<embed::XStorage>::get() + , cppu::UnoType<embed::XTransactedObject>::get() + , cppu::UnoType<embed::XTransactionBroadcaster>::get() + , cppu::UnoType<util::XModifiable>::get() + , cppu::UnoType<embed::XRelationshipAccess>::get() + , cppu::UnoType<beans::XPropertySet>::get()); } else { m_pData->m_pTypeCollection = new ::cppu::OTypeCollection - ( ::getCppuType( ( const uno::Reference< lang::XTypeProvider >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XStorage >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XTransactedObject >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XTransactionBroadcaster >* )NULL ) - , ::getCppuType( ( const uno::Reference< util::XModifiable >* )NULL ) - , ::getCppuType( ( const uno::Reference< beans::XPropertySet >* )NULL ) ); + ( cppu::UnoType<lang::XTypeProvider>::get() + , cppu::UnoType<embed::XStorage>::get() + , cppu::UnoType<embed::XTransactedObject>::get() + , cppu::UnoType<embed::XTransactionBroadcaster>::get() + , cppu::UnoType<util::XModifiable>::get() + , cppu::UnoType<beans::XPropertySet>::get()); } } } @@ -4098,7 +4098,7 @@ void SAL_CALL OStorage::addTransactionListener( const uno::Reference< embed::XTr throw lang::DisposedException( THROW_WHERE ); } - m_pData->m_aListenersContainer.addInterface( ::getCppuType((const uno::Reference< embed::XTransactionListener >*)0), + m_pData->m_aListenersContainer.addInterface( cppu::UnoType<embed::XTransactionListener>::get(), aListener ); } @@ -4113,7 +4113,7 @@ void SAL_CALL OStorage::removeTransactionListener( const uno::Reference< embed:: throw lang::DisposedException( THROW_WHERE ); } - m_pData->m_aListenersContainer.removeInterface( ::getCppuType((const uno::Reference< embed::XTransactionListener >*)0), + m_pData->m_aListenersContainer.removeInterface( cppu::UnoType<embed::XTransactionListener>::get(), aListener ); } @@ -4176,7 +4176,7 @@ void SAL_CALL OStorage::addModifyListener( osl_atomic_increment( &m_pImpl->m_nModifiedListenerCount ); m_pData->m_aListenersContainer.addInterface( - ::getCppuType( ( const uno::Reference< util::XModifyListener >* )0 ), aListener ); + cppu::UnoType<util::XModifyListener>::get(), aListener ); } void SAL_CALL OStorage::removeModifyListener( @@ -4193,7 +4193,7 @@ void SAL_CALL OStorage::removeModifyListener( osl_atomic_decrement( &m_pImpl->m_nModifiedListenerCount ); m_pData->m_aListenersContainer.removeInterface( - ::getCppuType( ( const uno::Reference< util::XModifyListener >* )0 ), aListener ); + cppu::UnoType<util::XModifyListener>::get(), aListener ); } // XNameAccess @@ -4436,7 +4436,7 @@ void SAL_CALL OStorage::addEventListener( } m_pData->m_aListenersContainer.addInterface( - ::getCppuType( ( const uno::Reference< lang::XEventListener >* )0 ), xListener ); + cppu::UnoType<lang::XEventListener>::get(), xListener ); } void SAL_CALL OStorage::removeEventListener( @@ -4452,7 +4452,7 @@ void SAL_CALL OStorage::removeEventListener( } m_pData->m_aListenersContainer.removeInterface( - ::getCppuType( ( const uno::Reference< lang::XEventListener >* )0 ), xListener ); + cppu::UnoType<lang::XEventListener>::get(), xListener ); } // XEncryptionProtectedSource diff --git a/package/source/zippackage/ZipPackageFolder.cxx b/package/source/zippackage/ZipPackageFolder.cxx index e232f1afeec9..8d994c6ede75 100644 --- a/package/source/zippackage/ZipPackageFolder.cxx +++ b/package/source/zippackage/ZipPackageFolder.cxx @@ -234,7 +234,7 @@ uno::Reference< XEnumeration > SAL_CALL ZipPackageFolder::createEnumeration( ) uno::Type SAL_CALL ZipPackageFolder::getElementType( ) throw(uno::RuntimeException, std::exception) { - return ::getCppuType ((const uno::Reference< XUnoTunnel > *) 0); + return cppu::UnoType<XUnoTunnel>::get(); } sal_Bool SAL_CALL ZipPackageFolder::hasElements( ) throw(uno::RuntimeException, std::exception) diff --git a/package/source/zippackage/zipfileaccess.cxx b/package/source/zippackage/zipfileaccess.cxx index 4cf2afbd7566..acb006336a99 100644 --- a/package/source/zippackage/zipfileaccess.cxx +++ b/package/source/zippackage/zipfileaccess.cxx @@ -316,7 +316,7 @@ uno::Type SAL_CALL OZipFileAccess::getElementType() if ( !m_pZipFile ) throw io::NotConnectedException(THROW_WHERE ); - return getCppuType( ( const uno::Reference< io::XInputStream >* )NULL ); + return cppu::UnoType<io::XInputStream>::get(); } sal_Bool SAL_CALL OZipFileAccess::hasElements() diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx index 49a932329823..5a3e6ca218bf 100644 --- a/pyuno/source/module/pyuno_runtime.cxx +++ b/pyuno/source/module/pyuno_runtime.cxx @@ -592,7 +592,7 @@ static Sequence< Type > invokeGetTypes( const Runtime & r , PyObject * o ) Any a = r.pyObject2Any(PyTuple_GetItem(types.get(),i)); a >>= ret[i]; } - ret[size] = getCppuType( (Reference< com::sun::star::lang::XUnoTunnel> *) 0 ); + ret[size] = cppu::UnoType<com::sun::star::lang::XUnoTunnel>::get(); } } return ret; diff --git a/reportdesign/source/core/api/ReportControlModel.cxx b/reportdesign/source/core/api/ReportControlModel.cxx index 96c9c5a8e04c..9c90a808fa1a 100644 --- a/reportdesign/source/core/api/ReportControlModel.cxx +++ b/reportdesign/source/core/api/ReportControlModel.cxx @@ -142,7 +142,7 @@ void OReportControlModel::checkIndex(sal_Int32 _nIndex) bool OReportControlModel::isInterfaceForbidden(const uno::Type& _rType) { - return (_rType == ::getCppuType((const uno::Reference< beans::XPropertyState>* )0) || _rType == ::getCppuType((const uno::Reference< beans::XMultiPropertySet>* )0)); + return (_rType == cppu::UnoType<beans::XPropertyState>::get()|| _rType == cppu::UnoType<beans::XMultiPropertySet>::get()); } } // reportdesign diff --git a/reportdesign/source/filter/xml/xmlHelper.cxx b/reportdesign/source/filter/xml/xmlHelper.cxx index d65163d16489..4c16131f95e9 100644 --- a/reportdesign/source/filter/xml/xmlHelper.cxx +++ b/reportdesign/source/filter/xml/xmlHelper.cxx @@ -84,7 +84,7 @@ const XMLPropertyHandler* OPropertyHandlerFactory::GetPropertyHandler(sal_Int32 { XML_TOKEN_INVALID, 0 } }; - pHandler = new XMLEnumPropertyHdl( pXML_VerticalAlign_Enum, ::getCppuType((const com::sun::star::style::VerticalAlignment*)0) ); + pHandler = new XMLEnumPropertyHdl( pXML_VerticalAlign_Enum, cppu::UnoType<com::sun::star::style::VerticalAlignment>::get()); } break; case (XML_SD_TYPES_START+34): @@ -319,10 +319,10 @@ uno::Reference<beans::XPropertySet> OXMLHelper::createBorderPropertySet() { static comphelper::PropertyMapEntry const pMap[] = { - {OUString(PROPERTY_BORDERLEFT), 0, ::getCppuType((const table::BorderLine2*)0) ,PropertyAttribute::BOUND,0}, - {OUString(PROPERTY_BORDERRIGHT), 1, ::getCppuType((const table::BorderLine2*)0) ,PropertyAttribute::BOUND,0}, - {OUString(PROPERTY_BORDERTOP), 2, ::getCppuType((const table::BorderLine2*)0) ,PropertyAttribute::BOUND,0}, - {OUString(PROPERTY_BORDERBOTTOM), 3, ::getCppuType((const table::BorderLine2*)0) ,PropertyAttribute::BOUND,0}, + {OUString(PROPERTY_BORDERLEFT), 0, cppu::UnoType<table::BorderLine2>::get(),PropertyAttribute::BOUND,0}, + {OUString(PROPERTY_BORDERRIGHT), 1, cppu::UnoType<table::BorderLine2>::get(),PropertyAttribute::BOUND,0}, + {OUString(PROPERTY_BORDERTOP), 2, cppu::UnoType<table::BorderLine2>::get(),PropertyAttribute::BOUND,0}, + {OUString(PROPERTY_BORDERBOTTOM), 3, cppu::UnoType<table::BorderLine2>::get(),PropertyAttribute::BOUND,0}, { OUString(), 0, css::uno::Type(), 0, 0 } }; return comphelper::GenericPropertySet_CreateInstance(new comphelper::PropertySetInfo(pMap)); diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx b/reportdesign/source/filter/xml/xmlfilter.cxx index 106c9d29ad85..d56b6367d799 100644 --- a/reportdesign/source/filter/xml/xmlfilter.cxx +++ b/reportdesign/source/filter/xml/xmlfilter.cxx @@ -508,11 +508,11 @@ bool ORptFilter::implImport( const Sequence< PropertyValue >& rDescriptor ) static const OUString s_sOld("OldFormat"); static comphelper::PropertyMapEntry const pMap[] = { - { OUString("OldFormat") , 1, ::getCppuType((const sal_Bool*)0), beans::PropertyAttribute::BOUND, 0 }, - { OUString("StreamName"), 0, ::getCppuType( (OUString *)0 ), beans::PropertyAttribute::MAYBEVOID, 0 }, - { OUString("PrivateData"),0, ::getCppuType( (uno::Reference<XInterface> *)0 ), beans::PropertyAttribute::MAYBEVOID, 0 }, - { OUString("BaseURI"), 0, ::getCppuType( (OUString *)0 ), beans::PropertyAttribute::MAYBEVOID, 0 }, - { OUString("StreamRelPath"), 0, ::getCppuType( (OUString *)0 ), beans::PropertyAttribute::MAYBEVOID, 0 }, + { OUString("OldFormat") , 1, cppu::UnoType<sal_Bool>::get(), beans::PropertyAttribute::BOUND, 0 }, + { OUString("StreamName"), 0, cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0 }, + { OUString("PrivateData"),0, cppu::UnoType<XInterface>::get(), beans::PropertyAttribute::MAYBEVOID, 0 }, + { OUString("BaseURI"), 0, cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0 }, + { OUString("StreamRelPath"), 0, cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID, 0 }, { OUString(), 0, css::uno::Type(), 0, 0 } }; utl::MediaDescriptor aDescriptor(rDescriptor); diff --git a/reportdesign/source/ui/report/propbrw.cxx b/reportdesign/source/ui/report/propbrw.cxx index ec347b649def..5534b5143cf9 100644 --- a/reportdesign/source/ui/report/propbrw.cxx +++ b/reportdesign/source/ui/report/propbrw.cxx @@ -410,7 +410,7 @@ uno::Reference< uno::XInterface> PropBrw::CreateComponentPair(OObjectBase* _pObj uno::Reference< uno::XInterface> PropBrw::CreateComponentPair(const uno::Reference< uno::XInterface>& _xFormComponent ,const uno::Reference< uno::XInterface>& _xReportComponent) { - uno::Reference< container::XNameContainer > xNameCont = ::comphelper::NameContainer_createInstance(::getCppuType(static_cast<Reference<XInterface> * >(NULL))); + uno::Reference< container::XNameContainer > xNameCont = ::comphelper::NameContainer_createInstance(cppu::UnoType<XInterface>::get()); xNameCont->insertByName(OUString("FormComponent"),uno::makeAny(_xFormComponent)); xNameCont->insertByName(OUString("ReportComponent"),uno::makeAny(_xReportComponent)); xNameCont->insertByName(OUString("RowSet") @@ -525,7 +525,7 @@ void PropBrw::Update( OSectionView* pNewView ) { uno::Reference< uno::XInterface> xTemp(m_pView->getReportSection()->getSection()); m_xLastSection = xTemp; - uno::Reference< container::XNameContainer > xNameCont = ::comphelper::NameContainer_createInstance(::getCppuType(static_cast<Reference<XInterface> * >(NULL))); + uno::Reference< container::XNameContainer > xNameCont = ::comphelper::NameContainer_createInstance(cppu::UnoType<XInterface>::get() ); xNameCont->insertByName(OUString("ReportComponent"),uno::makeAny(xTemp)); xTemp = xNameCont; diff --git a/sdext/source/presenter/PresenterSlideShowView.cxx b/sdext/source/presenter/PresenterSlideShowView.cxx index 2a2b9909d125..795843c2426b 100644 --- a/sdext/source/presenter/PresenterSlideShowView.cxx +++ b/sdext/source/presenter/PresenterSlideShowView.cxx @@ -186,7 +186,7 @@ void PresenterSlideShowView::disposing (void) aEvent.Source = static_cast<XWeak*>(this); ::cppu::OInterfaceContainerHelper* pIterator - = maBroadcaster.getContainer(getCppuType((Reference<lang::XEventListener>*)NULL)); + = maBroadcaster.getContainer(cppu::UnoType<lang::XEventListener>::get()); if (pIterator != NULL) pIterator->disposeAndClear(aEvent); @@ -391,7 +391,7 @@ void SAL_CALL PresenterSlideShowView::addTransformationChangedListener( { ThrowIfDisposed(); maBroadcaster.addListener( - getCppuType((Reference<util::XModifyListener>*)NULL), + cppu::UnoType<util::XModifyListener>::get(), rxListener); } @@ -401,7 +401,7 @@ void SAL_CALL PresenterSlideShowView::removeTransformationChangedListener( { ThrowIfDisposed(); maBroadcaster.removeListener( - getCppuType((Reference<util::XModifyListener>*)NULL), + cppu::UnoType<util::XModifyListener>::get(), rxListener); } @@ -411,7 +411,7 @@ void SAL_CALL PresenterSlideShowView::addPaintListener( { ThrowIfDisposed(); maBroadcaster.addListener( - getCppuType((Reference<awt::XPaintListener>*)NULL), + cppu::UnoType<awt::XPaintListener>::get(), rxListener); } @@ -421,7 +421,7 @@ void SAL_CALL PresenterSlideShowView::removePaintListener( { ThrowIfDisposed(); maBroadcaster.removeListener( - getCppuType((Reference<awt::XPaintListener>*)NULL), + cppu::UnoType<awt::XPaintListener>::get(), rxListener); } @@ -431,7 +431,7 @@ void SAL_CALL PresenterSlideShowView::addMouseListener( { ThrowIfDisposed(); maBroadcaster.addListener( - getCppuType((Reference<awt::XMouseListener>*)NULL), + cppu::UnoType<awt::XMouseListener>::get(), rxListener); } @@ -441,7 +441,7 @@ void SAL_CALL PresenterSlideShowView::removeMouseListener( { ThrowIfDisposed(); maBroadcaster.removeListener( - getCppuType((Reference<awt::XMouseListener>*)NULL), + cppu::UnoType<awt::XMouseListener>::get(), rxListener); } @@ -451,7 +451,7 @@ void SAL_CALL PresenterSlideShowView::addMouseMotionListener( { ThrowIfDisposed(); maBroadcaster.addListener( - getCppuType((Reference<awt::XMouseMotionListener>*)NULL), + cppu::UnoType<awt::XMouseMotionListener>::get(), rxListener); } @@ -461,7 +461,7 @@ void SAL_CALL PresenterSlideShowView::removeMouseMotionListener( { ThrowIfDisposed(); maBroadcaster.removeListener( - getCppuType((Reference<awt::XMouseMotionListener>*)NULL), + cppu::UnoType<awt::XMouseMotionListener>::get(), rxListener); } @@ -538,7 +538,7 @@ void SAL_CALL PresenterSlideShowView::mousePressed (const awt::MouseEvent& rEven awt::MouseEvent aEvent (rEvent); aEvent.Source = static_cast<XWeak*>(this); ::cppu::OInterfaceContainerHelper* pIterator - = maBroadcaster.getContainer(getCppuType((Reference<awt::XMouseListener>*)NULL)); + = maBroadcaster.getContainer(cppu::UnoType<awt::XMouseListener>::get()); if (pIterator != NULL) { pIterator->notifyEach(&awt::XMouseListener::mousePressed, aEvent); @@ -558,7 +558,7 @@ void SAL_CALL PresenterSlideShowView::mouseReleased (const awt::MouseEvent& rEve awt::MouseEvent aEvent (rEvent); aEvent.Source = static_cast<XWeak*>(this); ::cppu::OInterfaceContainerHelper* pIterator - = maBroadcaster.getContainer(getCppuType((Reference<awt::XMouseListener>*)NULL)); + = maBroadcaster.getContainer(cppu::UnoType<awt::XMouseListener>::get()); if (pIterator != NULL) { pIterator->notifyEach(&awt::XMouseListener::mouseReleased, aEvent); @@ -571,7 +571,7 @@ void SAL_CALL PresenterSlideShowView::mouseEntered (const awt::MouseEvent& rEven awt::MouseEvent aEvent (rEvent); aEvent.Source = static_cast<XWeak*>(this); ::cppu::OInterfaceContainerHelper* pIterator - = maBroadcaster.getContainer(getCppuType((Reference<awt::XMouseListener>*)NULL)); + = maBroadcaster.getContainer(cppu::UnoType<awt::XMouseListener>::get()); if (pIterator != NULL) { pIterator->notifyEach(&awt::XMouseListener::mouseEntered, aEvent); @@ -584,7 +584,7 @@ void SAL_CALL PresenterSlideShowView::mouseExited (const awt::MouseEvent& rEvent awt::MouseEvent aEvent (rEvent); aEvent.Source = static_cast<XWeak*>(this); ::cppu::OInterfaceContainerHelper* pIterator - = maBroadcaster.getContainer(getCppuType((Reference<awt::XMouseListener>*)NULL)); + = maBroadcaster.getContainer(cppu::UnoType<awt::XMouseListener>::get()); if (pIterator != NULL) { pIterator->notifyEach(&awt::XMouseListener::mouseExited, aEvent); @@ -599,7 +599,7 @@ void SAL_CALL PresenterSlideShowView::mouseDragged (const awt::MouseEvent& rEven awt::MouseEvent aEvent (rEvent); aEvent.Source = static_cast<XWeak*>(this); ::cppu::OInterfaceContainerHelper* pIterator - = maBroadcaster.getContainer(getCppuType((Reference<awt::XMouseMotionListener>*)NULL)); + = maBroadcaster.getContainer(cppu::UnoType<awt::XMouseMotionListener>::get()); if (pIterator != NULL) { pIterator->notifyEach(&awt::XMouseMotionListener::mouseDragged, aEvent); @@ -612,7 +612,7 @@ void SAL_CALL PresenterSlideShowView::mouseMoved (const awt::MouseEvent& rEvent) awt::MouseEvent aEvent (rEvent); aEvent.Source = static_cast<XWeak*>(this); ::cppu::OInterfaceContainerHelper* pIterator - = maBroadcaster.getContainer(getCppuType((Reference<awt::XMouseMotionListener>*)NULL)); + = maBroadcaster.getContainer(cppu::UnoType<awt::XMouseMotionListener>::get()); if (pIterator != NULL) { pIterator->notifyEach(&awt::XMouseMotionListener::mouseMoved, aEvent); @@ -811,7 +811,7 @@ void PresenterSlideShowView::PaintInnerWindow (const awt::PaintEvent& rEvent) awt::PaintEvent aEvent (rEvent); aEvent.Source = static_cast<XWeak*>(this); ::cppu::OInterfaceContainerHelper* pIterator - = maBroadcaster.getContainer(getCppuType((Reference<awt::XPaintListener>*)NULL)); + = maBroadcaster.getContainer(cppu::UnoType<awt::XPaintListener>::get()); if (pIterator != NULL) { pIterator->notifyEach(&awt::XPaintListener::windowPaint, aEvent); @@ -920,7 +920,7 @@ void PresenterSlideShowView::Resize (void) // window has changed. lang::EventObject aEvent (static_cast<XWeak*>(this)); ::cppu::OInterfaceContainerHelper* pIterator - = maBroadcaster.getContainer(getCppuType((Reference<util::XModifyListener>*)NULL)); + = maBroadcaster.getContainer(cppu::UnoType<util::XModifyListener>::get()); if (pIterator != NULL) { pIterator->notifyEach(&util::XModifyListener::modified, aEvent); diff --git a/sot/source/base/exchange.cxx b/sot/source/base/exchange.cxx index bfd29d6d93d1..084b1b57c1e9 100644 --- a/sot/source/base/exchange.cxx +++ b/sot/source/base/exchange.cxx @@ -61,7 +61,7 @@ namespace static const DataFlavorRepresentation aInstance[] = { /* 0 SOT_FORMAT_SYSTEM_START*/ { "", "", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - /* 1 SOT_FORMAT_STRING*/ { "text/plain;charset=utf-16", "Text", &::getCppuType( (const OUString*) 0 ) }, + /* 1 SOT_FORMAT_STRING*/ { "text/plain;charset=utf-16", "Text", &cppu::UnoType<OUString>::get()}, /* 2 SOT_FORMAT_BITMAP*/ { "application/x-openoffice-bitmap;windows_formatname=\"Bitmap\"", "Bitmap", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, /* 3 SOT_FORMAT_GDIMETAFILE*/ { "application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\"", "GDIMetaFile", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, /* 4 SOT_FORMAT_PRIVATE*/ { "application/x-openoffice-private;windows_formatname=\"Private\"", "Private", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, @@ -261,7 +261,7 @@ sal_uLong SotExchange::RegisterFormatName( const OUString& rName ) pNewFlavor->MimeType = rName; pNewFlavor->HumanPresentableName = rName; - pNewFlavor->DataType = ::getCppuType( (const OUString*) 0 ); + pNewFlavor->DataType = cppu::UnoType<OUString>::get(); rL.push_back( pNewFlavor ); @@ -296,7 +296,7 @@ sal_uLong SotExchange::RegisterFormatMimeType( const OUString& rMimeType ) pNewFlavor->MimeType = rMimeType; pNewFlavor->HumanPresentableName = rMimeType; - pNewFlavor->DataType = ::getCppuType( (const OUString*) 0 ); + pNewFlavor->DataType = cppu::UnoType<OUString>::get(); rL.push_back( pNewFlavor ); diff --git a/sot/source/unoolestorage/xolesimplestorage.cxx b/sot/source/unoolestorage/xolesimplestorage.cxx index 12fcd50141e3..1e8ba5027f9e 100644 --- a/sot/source/unoolestorage/xolesimplestorage.cxx +++ b/sot/source/unoolestorage/xolesimplestorage.cxx @@ -597,7 +597,7 @@ uno::Type SAL_CALL OLESimpleStorage::getElementType() if ( m_bDisposed ) throw lang::DisposedException(); - return getCppuType( (const uno::Reference< io::XInputStream >*)NULL ); + return cppu::UnoType<io::XInputStream>::get(); } diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx index 5e1f74357e15..0ea7bc2ee384 100644 --- a/starmath/source/mathmlimport.cxx +++ b/starmath/source/mathmlimport.cxx @@ -136,7 +136,7 @@ sal_uLong SmXMLImportWrapper::Import(SfxMedium &rMedium) comphelper::PropertyMapEntry aInfoMap[] = { { OUString("PrivateData"), 0, - ::getCppuType( (Reference<XInterface> *)0 ), + cppu::UnoType<XInterface>::get(), beans::PropertyAttribute::MAYBEVOID, 0 }, { OUString("BaseURI"), 0, ::cppu::UnoType<OUString>::get(), diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx index 995914816343..26ac82511b99 100644 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -235,12 +235,12 @@ static PropertySetInfo * lcl_createModelPropertyInfo () { { OUString("Alignment") , HANDLE_ALIGNMENT , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, 0 }, { OUString("BaseFontHeight") , HANDLE_BASE_FONT_HEIGHT , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, 0 }, - { OUString("BasicLibraries") , HANDLE_BASIC_LIBRARIES , ::getCppuType((const uno::Reference< script::XLibraryContainer > *)0), PropertyAttribute::READONLY, 0 }, + { OUString("BasicLibraries") , HANDLE_BASIC_LIBRARIES , cppu::UnoType<script::XLibraryContainer>::get(), PropertyAttribute::READONLY, 0 }, { OUString("BottomMargin") , HANDLE_BOTTOM_MARGIN , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_BOTTOMSPACE }, { OUString("CustomFontNameFixed") , HANDLE_CUSTOM_FONT_NAME_FIXED , ::cppu::UnoType<OUString>::get(), PROPERTY_NONE, FNT_FIXED }, { OUString("CustomFontNameSans") , HANDLE_CUSTOM_FONT_NAME_SANS , ::cppu::UnoType<OUString>::get(), PROPERTY_NONE, FNT_SANS }, { OUString("CustomFontNameSerif") , HANDLE_CUSTOM_FONT_NAME_SERIF , ::cppu::UnoType<OUString>::get(), PROPERTY_NONE, FNT_SERIF }, - { OUString("DialogLibraries") , HANDLE_DIALOG_LIBRARIES , ::getCppuType((const uno::Reference< script::XLibraryContainer > *)0), PropertyAttribute::READONLY, 0 }, + { OUString("DialogLibraries") , HANDLE_DIALOG_LIBRARIES , cppu::UnoType<script::XLibraryContainer>::get(), PropertyAttribute::READONLY, 0 }, { OUString("FontFixedIsBold") , HANDLE_CUSTOM_FONT_FIXED_WEIGHT , ::getBooleanCppuType(), PROPERTY_NONE, FNT_FIXED }, { OUString("FontFixedIsItalic") , HANDLE_CUSTOM_FONT_FIXED_POSTURE , ::getBooleanCppuType(), PROPERTY_NONE, FNT_FIXED }, { OUString("FontFunctionsIsBold") , HANDLE_FONT_FUNCTIONS_WEIGHT , ::getBooleanCppuType(), PROPERTY_NONE, FNT_FUNCTION }, @@ -355,10 +355,10 @@ uno::Sequence< uno::Type > SAL_CALL SmModel::getTypes( ) throw(uno::RuntimeExce sal_Int32 nLen = aTypes.getLength(); aTypes.realloc(nLen + 4); uno::Type* pTypes = aTypes.getArray(); - pTypes[nLen++] = ::getCppuType((Reference<XServiceInfo>*)0); - pTypes[nLen++] = ::getCppuType((Reference<XPropertySet>*)0); - pTypes[nLen++] = ::getCppuType((Reference<XMultiPropertySet>*)0); - pTypes[nLen++] = ::getCppuType((Reference<XRenderable>*)0); + pTypes[nLen++] = cppu::UnoType<XServiceInfo>::get(); + pTypes[nLen++] = cppu::UnoType<XPropertySet>::get(); + pTypes[nLen++] = cppu::UnoType<XMultiPropertySet>::get(); + pTypes[nLen++] = cppu::UnoType<XRenderable>::get(); return aTypes; } diff --git a/stoc/source/corereflection/crarray.cxx b/stoc/source/corereflection/crarray.cxx index 0a3ac3142b17..5bf6622bbf31 100644 --- a/stoc/source/corereflection/crarray.cxx +++ b/stoc/source/corereflection/crarray.cxx @@ -60,7 +60,7 @@ Sequence< Type > ArrayIdlClassImpl::getTypes() if (! s_pTypes) { static ::cppu::OTypeCollection s_aTypes( - ::getCppuType( (const Reference< XIdlArray > *)0 ), + cppu::UnoType<XIdlArray>::get(), IdlClassImpl::getTypes() ); s_pTypes = &s_aTypes; } diff --git a/stoc/source/corereflection/crcomp.cxx b/stoc/source/corereflection/crcomp.cxx index f56e4238f1f8..91442274bde5 100644 --- a/stoc/source/corereflection/crcomp.cxx +++ b/stoc/source/corereflection/crcomp.cxx @@ -102,8 +102,8 @@ Sequence< Type > IdlCompFieldImpl::getTypes() if (! s_pTypes) { static ::cppu::OTypeCollection s_aTypes( - ::getCppuType( (const Reference< XIdlField2 > *)0 ), - ::getCppuType( (const Reference< XIdlField > *)0 ), + cppu::UnoType<XIdlField2>::get(), + cppu::UnoType<XIdlField>::get(), IdlMemberImpl::getTypes() ); s_pTypes = &s_aTypes; } diff --git a/stoc/source/corereflection/crefl.cxx b/stoc/source/corereflection/crefl.cxx index dcf74a4a3f8b..66ad8c703fcf 100644 --- a/stoc/source/corereflection/crefl.cxx +++ b/stoc/source/corereflection/crefl.cxx @@ -108,9 +108,9 @@ Sequence< Type > IdlReflectionServiceImpl::getTypes() if (! s_pTypes) { static OTypeCollection s_aTypes( - ::getCppuType( (const Reference< XIdlReflection > *)0 ), - ::getCppuType( (const Reference< XHierarchicalNameAccess > *)0 ), - ::getCppuType( (const Reference< XServiceInfo > *)0 ), + cppu::UnoType<XIdlReflection>::get(), + cppu::UnoType<XHierarchicalNameAccess>::get(), + cppu::UnoType<XServiceInfo>::get(), OComponentHelper::getTypes() ); s_pTypes = &s_aTypes; } @@ -263,7 +263,7 @@ Any IdlReflectionServiceImpl::getByHierarchicalName( const OUString & rName ) { // type retrieved from tdmgr OSL_ASSERT( (*(Reference< XInterface > *)aRet.getValue())->queryInterface( - ::getCppuType( (const Reference< XTypeDescription > *)0 ) ).hasValue() ); + cppu::UnoType<XTypeDescription>::get()).hasValue() ); css::uno::Reference< css::reflection::XConstantTypeDescription > ctd; @@ -288,7 +288,7 @@ Any IdlReflectionServiceImpl::getByHierarchicalName( const OUString & rName ) if (pTD) { Reference< XIdlClass > xIdlClass( constructClass( pTD ) ); - aRet.setValue( &xIdlClass, ::getCppuType( (const Reference< XIdlClass > *)0 ) ); + aRet.setValue( &xIdlClass, cppu::UnoType<XIdlClass>::get()); typelib_typedescription_release( pTD ); } } diff --git a/stoc/source/corereflection/crenum.cxx b/stoc/source/corereflection/crenum.cxx index 9a9e86f8530c..d55893cdc3e9 100644 --- a/stoc/source/corereflection/crenum.cxx +++ b/stoc/source/corereflection/crenum.cxx @@ -100,8 +100,8 @@ Sequence< Type > IdlEnumFieldImpl::getTypes() if (! s_pTypes) { static ::cppu::OTypeCollection s_aTypes( - ::getCppuType( (const Reference< XIdlField2 > *)0 ), - ::getCppuType( (const Reference< XIdlField > *)0 ), + cppu::UnoType<XIdlField2>::get(), + cppu::UnoType<XIdlField>::get(), IdlMemberImpl::getTypes() ); s_pTypes = &s_aTypes; } diff --git a/stoc/source/corereflection/criface.cxx b/stoc/source/corereflection/criface.cxx index d4f5ef03ce9a..b23fc2738fcf 100644 --- a/stoc/source/corereflection/criface.cxx +++ b/stoc/source/corereflection/criface.cxx @@ -114,8 +114,8 @@ Sequence< Type > IdlAttributeFieldImpl::getTypes() if (! s_pTypes) { static ::cppu::OTypeCollection s_aTypes( - ::getCppuType( (const Reference< XIdlField2 > *)0 ), - ::getCppuType( (const Reference< XIdlField > *)0 ), + cppu::UnoType<XIdlField2>::get(), + cppu::UnoType<XIdlField>::get(), IdlMemberImpl::getTypes() ); s_pTypes = &s_aTypes; } @@ -409,7 +409,7 @@ Sequence< Type > IdlInterfaceMethodImpl::getTypes() if (! s_pTypes) { static ::cppu::OTypeCollection s_aTypes( - ::getCppuType( (const Reference< XIdlMethod > *)0 ), + cppu::UnoType<XIdlMethod>::get(), IdlMemberImpl::getTypes() ); s_pTypes = &s_aTypes; } @@ -725,7 +725,7 @@ Any SAL_CALL IdlInterfaceMethodImpl::invoke( const Any & rObj, Sequence< Any > & &aExc.TargetException, reinterpret_cast< uno_ReleaseFunc >(cpp_release) ); uno_type_copyAndConvertData( - &aExc.TargetException, pUnoExc, ::getCppuType( (const Any *)0 ).getTypeLibType(), + &aExc.TargetException, pUnoExc, cppu::UnoType<Any>::get().getTypeLibType(), getReflection()->getUno2Cpp().get() ); uno_any_destruct( pUnoExc, 0 ); throw aExc; diff --git a/stoc/source/invocation/invocation.cxx b/stoc/source/invocation/invocation.cxx index 7d65f7df7269..8f0a543b7817 100644 --- a/stoc/source/invocation/invocation.cxx +++ b/stoc/source/invocation/invocation.cxx @@ -270,7 +270,7 @@ Any SAL_CALL Invocation_Impl::queryInterface( const Type & aType ) return a; } - if( aType == getCppuType( (Reference<XExactName>*) NULL ) ) + if( aType == cppu::UnoType<XExactName>::get()) { // Ivocation does not support XExactName, if direct object supports // XInvocation, but not XExactName. @@ -280,32 +280,32 @@ Any SAL_CALL Invocation_Impl::queryInterface( const Type & aType ) return makeAny( Reference< XExactName >( (static_cast< XExactName* >(this)) ) ); } } - else if ( aType == getCppuType( (Reference<XNameContainer>*) NULL ) ) + else if ( aType == cppu::UnoType<XNameContainer>::get()) { if( _xNameContainer.is() ) return makeAny( Reference< XNameContainer >( (static_cast< XNameContainer* >(this)) ) ); } - else if ( aType == getCppuType( (Reference<XNameAccess>*) NULL ) ) + else if ( aType == cppu::UnoType<XNameAccess>::get()) { if( _xNameAccess.is() ) return makeAny( Reference< XNameAccess >( (static_cast< XNameAccess* >(this)) ) ); } - else if ( aType == getCppuType( (Reference<XIndexContainer>*) NULL ) ) + else if ( aType == cppu::UnoType<XIndexContainer>::get()) { if (_xIndexContainer.is()) return makeAny( Reference< XIndexContainer >( (static_cast< XIndexContainer* >(this)) ) ); } - else if ( aType == getCppuType( (Reference<XIndexAccess>*) NULL ) ) + else if ( aType == cppu::UnoType<XIndexAccess>::get()) { if (_xIndexAccess.is()) return makeAny( Reference< XIndexAccess >( (static_cast< XIndexAccess* >(this)) ) ); } - else if ( aType == getCppuType( (Reference<XEnumerationAccess>*) NULL ) ) + else if ( aType == cppu::UnoType<XEnumerationAccess>::get()) { if (_xEnumerationAccess.is()) return makeAny( Reference< XEnumerationAccess >( (static_cast< XEnumerationAccess* >(this)) ) ); } - else if ( aType == getCppuType( (Reference<XElementAccess>*) NULL ) ) + else if ( aType == cppu::UnoType<XElementAccess>::get()) { if (_xElementAccess.is()) { @@ -313,7 +313,7 @@ Any SAL_CALL Invocation_Impl::queryInterface( const Type & aType ) (static_cast< XElementAccess* >((static_cast< XNameContainer* >(this))) ) ) ); } } - else if ( aType == getCppuType( (Reference<XInvocation2>*) NULL ) ) + else if ( aType == cppu::UnoType<XInvocation2>::get()) { // Invocation does not support XInvocation2, if direct object supports // XInvocation, but not XInvocation2. @@ -392,31 +392,31 @@ void Invocation_Impl::setMaterial( const Any& rMaterial ) _xElementAccess = Reference<XElementAccess>::query( _xIntrospectionAccess->queryAdapter( - getCppuType( (Reference<XElementAccess>*) NULL ) ) ); + cppu::UnoType<XElementAccess>::get()) ); _xEnumerationAccess = Reference<XEnumerationAccess>::query( _xIntrospectionAccess->queryAdapter( - getCppuType( (Reference<XEnumerationAccess>*) NULL )) ); + cppu::UnoType<XEnumerationAccess>::get()) ); _xIndexAccess = Reference<XIndexAccess>::query( _xIntrospectionAccess->queryAdapter( - getCppuType( (Reference<XIndexAccess>*) NULL ) ) ); + cppu::UnoType<XIndexAccess>::get()) ); _xIndexContainer = Reference<XIndexContainer>::query( _xIntrospectionAccess->queryAdapter( - getCppuType( (Reference<XIndexContainer>*) NULL ) ) ); + cppu::UnoType<XIndexContainer>::get()) ); _xNameAccess = Reference<XNameAccess>::query( _xIntrospectionAccess->queryAdapter( - getCppuType( (Reference<XNameAccess>*) NULL ) ) ); + cppu::UnoType<XNameAccess>::get()) ); _xNameContainer = Reference<XNameContainer>::query( _xIntrospectionAccess->queryAdapter( - getCppuType( (Reference<XNameContainer>*) NULL ) ) ); + cppu::UnoType<XNameContainer>::get()) ); _xPropertySet = Reference<XPropertySet>::query( _xIntrospectionAccess->queryAdapter( - getCppuType( (Reference<XPropertySet>*) NULL )) ); + cppu::UnoType<XPropertySet>::get()) ); _xENIntrospection = Reference<XExactName>::query( _xIntrospectionAccess ); if (_xNameAccess.is()) @@ -983,48 +983,48 @@ Sequence< Type > SAL_CALL Invocation_Impl::getTypes(void) throw( RuntimeExceptio Type * pTypes = types.getArray(); sal_Int32 n = 0; - pTypes[ n++ ] = ::getCppuType( (Reference< XTypeProvider > const *)0 ); - pTypes[ n++ ] = ::getCppuType( (Reference< XWeak > const *)0 ); - pTypes[ n++ ] = ::getCppuType( (Reference< XInvocation > const *)0 ); - pTypes[ n++ ] = ::getCppuType( (Reference< XMaterialHolder > const *)0 ); + pTypes[ n++ ] = cppu::UnoType<XTypeProvider>::get(); + pTypes[ n++ ] = cppu::UnoType<XWeak>::get(); + pTypes[ n++ ] = cppu::UnoType<XInvocation>::get(); + pTypes[ n++ ] = cppu::UnoType<XMaterialHolder>::get(); // Ivocation does not support XExactName, if direct object supports // XInvocation, but not XExactName. if ((_xDirect.is() && _xENDirect.is()) || (!_xDirect.is() && (_xENIntrospection.is() || _xENNameAccess.is()))) { - pTypes[ n++ ] = ::getCppuType( (Reference< XExactName > const *)0 ); + pTypes[ n++ ] = cppu::UnoType<XExactName>::get(); } if( _xNameContainer.is() ) { - pTypes[ n++ ] = ::getCppuType( (Reference< XNameContainer > const *)0 ); + pTypes[ n++ ] = cppu::UnoType<XNameContainer>::get(); } if( _xNameAccess.is() ) { - pTypes[ n++ ] = ::getCppuType( (Reference< XNameAccess > const *)0 ); + pTypes[ n++ ] = cppu::UnoType<XNameAccess>::get(); } if (_xIndexContainer.is()) { - pTypes[ n++ ] = ::getCppuType( (Reference< XIndexContainer > const *)0 ); + pTypes[ n++ ] = cppu::UnoType<XIndexContainer>::get(); } if (_xIndexAccess.is()) { - pTypes[ n++ ] = ::getCppuType( (Reference< XIndexAccess > const *)0 ); + pTypes[ n++ ] = cppu::UnoType<XIndexAccess>::get(); } if (_xEnumerationAccess.is()) { - pTypes[ n++ ] = ::getCppuType( (Reference< XEnumerationAccess > const *)0 ); + pTypes[ n++ ] = cppu::UnoType<XEnumerationAccess>::get(); } if (_xElementAccess.is()) { - pTypes[ n++ ] = ::getCppuType( (Reference< XElementAccess > const *)0 ); + pTypes[ n++ ] = cppu::UnoType<XElementAccess>::get(); } // Invocation does not support XInvocation2, if direct object supports // XInvocation, but not XInvocation2. if ( ( _xDirect.is() && _xDirect2.is()) || (!_xDirect.is() && _xIntrospectionAccess.is() ) ) { - pTypes[ n++ ] = ::getCppuType( (Reference< XInvocation2 > const *)0 ); + pTypes[ n++ ] = cppu::UnoType<XInvocation2>::get(); } types.realloc( n ); diff --git a/stoc/source/invocation_adapterfactory/iafactory.cxx b/stoc/source/invocation_adapterfactory/iafactory.cxx index 216ee96b8562..3c0951f0af21 100644 --- a/stoc/source/invocation_adapterfactory/iafactory.cxx +++ b/stoc/source/invocation_adapterfactory/iafactory.cxx @@ -276,9 +276,7 @@ bool AdapterImpl::coerce_assign( { OSL_ASSERT( p_exc->pType->eTypeClass == typelib_TypeClass_EXCEPTION ); - if (typelib_typedescriptionreference_isAssignableFrom( - ::getCppuType( - (RuntimeException const *) 0 ).getTypeLibType(), + if (typelib_typedescriptionreference_isAssignableFrom( cppu::UnoType<RuntimeException>::get() ).getTypeLibType(), p_exc->pType )) { // is RuntimeException or derived: rethrow @@ -731,8 +729,7 @@ FactoryImpl::FactoryImpl( Reference< XComponentContext > const & xContext ) rShortSeqType.getDescription( &m_pShortSeqTD ); // script.XInvocation typelib_TypeDescription * pTD = 0; - const Type & rInvType = ::getCppuType( - (const Reference< script::XInvocation > *)0 ); + const Type & rInvType = cppu::UnoType<script::XInvocation>::get(); TYPELIB_DANGER_GET( &pTD, rInvType.getTypeLibType() ); typelib_InterfaceTypeDescription * pITD; pITD = reinterpret_cast<typelib_InterfaceTypeDescription*>(pTD); @@ -746,7 +743,7 @@ FactoryImpl::FactoryImpl( Reference< XComponentContext > const & xContext ) &m_pGetValueTD, pITD->ppMembers[ 3 ] ); // getValue() // script.XTypeConverter const Type & rTCType = - ::getCppuType( (const Reference< script::XTypeConverter > *)0 ); + cppu::UnoType<script::XTypeConverter>::get(); TYPELIB_DANGER_GET( &pTD, rTCType.getTypeLibType() ); pITD = reinterpret_cast<typelib_InterfaceTypeDescription*>(pTD); ::typelib_typedescriptionreference_getDescription( diff --git a/stoc/source/javaloader/javaloader.cxx b/stoc/source/javaloader/javaloader.cxx index c985dbbe7948..3b33627f6fca 100644 --- a/stoc/source/javaloader/javaloader.cxx +++ b/stoc/source/javaloader/javaloader.cxx @@ -242,7 +242,7 @@ const css::uno::Reference<XImplementationLoader> & JavaComponentLoader::getJavaL pUno_environment->release(pUno_environment); pUno_environment = NULL; - getCppuType((css::uno::Reference<XImplementationLoader> *) 0). + cppu::UnoType<XImplementationLoader>::get(). getDescription((typelib_TypeDescription **) & pType_XImplementationLoader); if(!pType_XImplementationLoader) throw RuntimeException( diff --git a/stoc/source/proxy_factory/proxyfac.cxx b/stoc/source/proxy_factory/proxyfac.cxx index 0ddc2a00391d..14f0df8d0c4f 100644 --- a/stoc/source/proxy_factory/proxyfac.cxx +++ b/stoc/source/proxy_factory/proxyfac.cxx @@ -106,8 +106,7 @@ UnoInterfaceReference FactoryImpl::binuno_queryInterface( typelib_TypeDescription * pTXInterfaceDescr = 0; TYPELIB_DANGER_GET( &pTXInterfaceDescr, - ::getCppuType( reinterpret_cast< Reference< XInterface > - const * >(0) ).getTypeLibType() ); + cppu::UnoType<XInterface>::get().getTypeLibType() ); typelib_TypeDescription * pQITD = 0; typelib_typedescriptionreference_getDescription( &pQITD, reinterpret_cast< typelib_InterfaceTypeDescription * >( @@ -149,9 +148,7 @@ UnoInterfaceReference FactoryImpl::binuno_queryInterface( { // exception occurred: OSL_ENSURE( - typelib_typedescriptionreference_isAssignableFrom( - ::getCppuType( reinterpret_cast< - RuntimeException const * >(0) ).getTypeLibType(), + typelib_typedescriptionreference_isAssignableFrom( cppu::UnoType<RuntimeException>::get() ).getTypeLibType(), exc->pType ), "### RuntimeException expected!" ); Any cpp_exc; diff --git a/stoc/source/security/permissions.cxx b/stoc/source/security/permissions.cxx index d39bb2283b3c..7b9994319b51 100644 --- a/stoc/source/security/permissions.cxx +++ b/stoc/source/security/permissions.cxx @@ -495,22 +495,22 @@ PermissionCollection::PermissionCollection( Type const & perm_type = perm.getValueType(); // supported permission types - if (perm_type.equals( ::getCppuType( (io::FilePermission const *)0 ) )) + if (perm_type.equals( cppu::UnoType<io::FilePermission>::get())) { m_head = new FilePermission( *reinterpret_cast< io::FilePermission const * >( perm.pData ), m_head ); } - else if (perm_type.equals( ::getCppuType( (connection::SocketPermission const *)0 ) )) + else if (perm_type.equals( cppu::UnoType<connection::SocketPermission>::get())) { m_head = new SocketPermission( *reinterpret_cast< connection::SocketPermission const * >( perm.pData ), m_head ); } - else if (perm_type.equals( ::getCppuType( (security::RuntimePermission const *)0 ) )) + else if (perm_type.equals( cppu::UnoType<security::RuntimePermission>::get())) { m_head = new RuntimePermission( *reinterpret_cast< security::RuntimePermission const * >( perm.pData ), m_head ); } - else if (perm_type.equals( ::getCppuType( (security::AllPermission const *)0 ) )) + else if (perm_type.equals( cppu::UnoType<security::AllPermission>::get())) { m_head = new AllPermission( m_head ); } @@ -584,7 +584,7 @@ void PermissionCollection::checkPermission( Any const & perm ) const // supported permission types // stack object of SimpleReferenceObject are ok, as long as they are not // assigned to a ::rtl::Reference<> (=> delete this) - if (demanded_type.equals( ::getCppuType( (io::FilePermission const *)0 ) )) + if (demanded_type.equals( cppu::UnoType<io::FilePermission>::get())) { FilePermission demanded( *reinterpret_cast< io::FilePermission const * >( perm.pData ) ); @@ -597,7 +597,7 @@ void PermissionCollection::checkPermission( Any const & perm ) const } throwAccessControlException( demanded, perm ); } - else if (demanded_type.equals( ::getCppuType( (connection::SocketPermission const *)0 ) )) + else if (demanded_type.equals( cppu::UnoType<connection::SocketPermission>::get())) { SocketPermission demanded( *reinterpret_cast< connection::SocketPermission const * >( perm.pData ) ); @@ -610,7 +610,7 @@ void PermissionCollection::checkPermission( Any const & perm ) const } throwAccessControlException( demanded, perm ); } - else if (demanded_type.equals( ::getCppuType( (security::RuntimePermission const *)0 ) )) + else if (demanded_type.equals( cppu::UnoType<security::RuntimePermission>::get())) { RuntimePermission demanded( *reinterpret_cast< security::RuntimePermission const * >( perm.pData ) ); @@ -623,7 +623,7 @@ void PermissionCollection::checkPermission( Any const & perm ) const } throwAccessControlException( demanded, perm ); } - else if (demanded_type.equals( ::getCppuType( (security::AllPermission const *)0 ) )) + else if (demanded_type.equals( cppu::UnoType<security::AllPermission>::get())) { AllPermission demanded; if (__implies( m_head, demanded )) diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx index 80746280e0b2..a3aaee6f7eaf 100644 --- a/stoc/source/servicemanager/servicemanager.cxx +++ b/stoc/source/servicemanager/servicemanager.cxx @@ -185,7 +185,7 @@ Any ServiceEnumeration_Impl::nextElement() if( nIt == aFactories.getLength() ) throw NoSuchElementException(); - return Any( &aFactories.getConstArray()[nIt++], ::getCppuType( (const Reference<XInterface > *)0 ) ); + return Any( &aFactories.getConstArray()[nIt++], cppu::UnoType<XInterface>::get()); } @@ -282,7 +282,7 @@ Any ImplementationEnumeration_Impl::nextElement() if( aIt == aImplementationMap.end() ) throw NoSuchElementException(); - Any ret( &(*aIt), ::getCppuType( (const Reference<XInterface > *)0 ) ); + Any ret( &(*aIt), cppu::UnoType<XInterface>::get()); ++aIt; return ret; } @@ -350,7 +350,7 @@ void OServiceManager_Listener::disposing(const EventObject & rEvt ) { try { - x->remove( Any( &rEvt.Source, ::getCppuType( (const Reference<XInterface > *)0 ) ) ); + x->remove( Any( &rEvt.Source, cppu::UnoType<XInterface>::get()) ); } catch( const IllegalArgumentException & ) { @@ -1144,7 +1144,7 @@ Type OServiceManager::getElementType() throw(css::uno::RuntimeException, std::exception) { check_undisposed(); - return ::getCppuType( (const Reference< XInterface > *)0 ); + return cppu::UnoType<XInterface>::get(); } // XElementAccess diff --git a/stoc/source/typeconv/convert.cxx b/stoc/source/typeconv/convert.cxx index 5cd31abab9cb..b11260fd856d 100644 --- a/stoc/source/typeconv/convert.cxx +++ b/stoc/source/typeconv/convert.cxx @@ -847,7 +847,7 @@ Any TypeConverter_Impl::convertToSimpleType( const Any& rVal, TypeClass aDestina { aRet.setValue( &((typelib_EnumTypeDescription *)aEnumTD.get())->ppEnumNames[nPos], - ::getCppuType( (const OUString *)0 ) ); + cppu::UnoType<OUString>::get()); } else { diff --git a/stoc/test/testconv.cxx b/stoc/test/testconv.cxx index ee588b4bd1c4..3f897294a697 100644 --- a/stoc/test/testconv.cxx +++ b/stoc/test/testconv.cxx @@ -562,10 +562,10 @@ static sal_Int32 initBlocks( ConvBlock * pTestBlocks ) pTestBlocks[nElems++] = ConvBlock( aVal, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 ); // st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa int e = 1; - aVal.setValue( &e, ::getCppuType( (const TypeClass *)0 ) ); + aVal.setValue( &e, cppu::UnoType<TypeClass>::get()); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0 ); // st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa - aVal.setValue( &e, ::getCppuType( (const FieldAccessMode *)0 ) ); + aVal.setValue( &e, cppu::UnoType<FieldAccessMode>::get()); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 ); // st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa // ==SEQ of INT== @@ -618,17 +618,17 @@ static void test_Conversion( const Reference< XMultiServiceFactory > & xMgr ) const ConvBlock& rBlock = pTestBlocks[nPos]; const Any & rVal = rBlock._value; - convertTo( ::getCppuType( (const OUString *)0 ), rVal, rBlock._toString ); - convertTo( ::getCppuType( (const float *)0 ), rVal, rBlock._toFloat ); - convertTo( ::getCppuType( (const double *)0 ), rVal, rBlock._toDouble ); - convertTo( ::getCppuType( (const sal_uInt32 *)0 ), rVal, rBlock._toUINT32 ); - convertTo( ::getCppuType( (const sal_Int32 *)0 ), rVal, rBlock._toINT32 ); - convertTo( ::getCppuType( (const sal_uInt16 *)0 ), rVal, rBlock._toUINT16 ); - convertTo( ::getCppuType( (const sal_Int16 *)0 ), rVal, rBlock._toINT16 ); - convertTo( ::getCppuType( (const sal_Int8 *)0 ), rVal, rBlock._toBYTE ); + convertTo( cppu::UnoType<OUString>::get(), rVal, rBlock._toString ); + convertTo( cppu::UnoType<float>::get(), rVal, rBlock._toFloat ); + convertTo( cppu::UnoType<double>::get(), rVal, rBlock._toDouble ); + convertTo( cppu::UnoType<sal_uInt32>::get(), rVal, rBlock._toUINT32 ); + convertTo( cppu::UnoType<sal_Int32>::get(), rVal, rBlock._toINT32 ); + convertTo( cppu::UnoType<cppu::UnoUnsignedShortType>::get(), rVal, rBlock._toUINT16 ); + convertTo( cppu::UnoType<sal_Int16>::get(), rVal, rBlock._toINT16 ); + convertTo( cppu::UnoType<sal_Int8>::get(), rVal, rBlock._toBYTE ); convertTo( ::getBooleanCppuType(), rVal, rBlock._toBOOL ); convertTo( ::getCharCppuType(), rVal, rBlock._toChar ); - convertTo( ::getCppuType( (const TypeClass *)0 ), rVal, rBlock._toTypeClass ); + convertTo( cppu::UnoType<TypeClass>::get(), rVal, rBlock._toTypeClass ); convertTo( ::getCppuType( (const Sequence< sal_Int16 > *)0 ), rVal, rBlock._toSeqINT16 ); convertTo( ::getCppuType( (const Sequence< Any > *)0 ), rVal, rBlock._toSeqAny ); @@ -639,18 +639,18 @@ static void test_Conversion( const Reference< XMultiServiceFactory > & xMgr ) delete [] pTestBlocks; Any aRet; - aRet = xConverter->convertTo( Any( &xMgr, ::getCppuType( (const Reference< XMultiServiceFactory > *)0 ) ), - ::getCppuType( (const Reference< XServiceInfo > *)0 ) ); - aRet = xConverter->convertTo( aRet, ::getCppuType( (const Reference< XMultiServiceFactory > *)0 ) ); - aRet = xConverter->convertTo( aRet, ::getCppuType( (const Reference< XServiceInfo > *)0 ) ); + aRet = xConverter->convertTo( Any( &xMgr, cppu::UnoType<XMultiServiceFactory>::get()), + cppu::UnoType<XServiceInfo>::get()); + aRet = xConverter->convertTo( aRet, cppu::UnoType<XMultiServiceFactory>::get()); + aRet = xConverter->convertTo( aRet, cppu::UnoType<XServiceInfo>::get()); aRet <<= SAL_CONST_INT64(0x7fffffffffffffff); - aRet = xConverter->convertTo( aRet, ::getCppuType( (const sal_uInt64 *)0 ) ); + aRet = xConverter->convertTo( aRet, cppu::UnoType<sal_uInt64>::get()); OSL_ASSERT( *(const sal_uInt64 *)aRet.getValue() == SAL_CONST_UINT64(0x7fffffffffffffff) ); aRet <<= SAL_CONST_UINT64(0xffffffffffffffff); - aRet = xConverter->convertTo( aRet, ::getCppuType( (const sal_uInt64 *)0 ) ); + aRet = xConverter->convertTo( aRet, cppu::UnoType<sal_uInt64>::get()); OSL_ASSERT( *(const sal_uInt64 *)aRet.getValue() == SAL_CONST_UINT64(0xffffffffffffffff) ); aRet <<= SAL_CONST_INT64(-1); - aRet = xConverter->convertTo( aRet, ::getCppuType( (const sal_Int8 *)0 ) ); + aRet = xConverter->convertTo( aRet, cppu::UnoType<sal_Int8>::get()); OSL_ASSERT( *(const sal_Int8 *)aRet.getValue() == (-1) ); printf( "test_Conversion(): end.\n" ); } diff --git a/stoc/test/testcorefl.cxx b/stoc/test/testcorefl.cxx index d958301beaf7..e5d8b01a0c68 100644 --- a/stoc/test/testcorefl.cxx +++ b/stoc/test/testcorefl.cxx @@ -208,7 +208,7 @@ static sal_Bool test_corefl( const Reference< XIdlReflection > & xRefl ) Any aStructAny(&aStructC, ::getCppuType( (const StructC *) 0 )); sal_Int32 nLong = aConstLong * 2; - aAny.setValue( &nLong, ::getCppuType( (const sal_Int32 *)0 ) ); + aAny.setValue( &nLong, cppu::UnoType<sal_Int32>::get()); OSL_ENSURE(*(sal_Int32*)xRefl->forName("ModuleA.StructA")->getField(OUString( "aLong" ))->get( Any(&aStructC, ::getCppuType( (const StructC *)0 ))).getValue() == aConstLong, "test_RegCoreReflection(): error 52"); diff --git a/stoc/test/testiadapter.cxx b/stoc/test/testiadapter.cxx index d69836683b84..097597f927e2 100644 --- a/stoc/test/testiadapter.cxx +++ b/stoc/test/testiadapter.cxx @@ -753,7 +753,7 @@ sal_Bool performTest( const Reference<XLanguageBindingTest > & xLBT ) SAL_CONST_INT64(0x123456789abcdef0), SAL_CONST_UINT64(0xfedcba9876543210), (float)17.0815, 3.1415926359, TestEnum_LOLA, OUString("dumdidum"), xI, - Any( &xI, ::getCppuType( (const Reference<XInterface > *)0 ) ) ); + Any( &xI, cppu::UnoType<XInterface>::get()) ); OSL_ENSURE( aData.Any == xI, "### unexpected any!" ); OSL_ENSURE( !(aData.Any != xI), "### unexpected any!" ); @@ -769,7 +769,7 @@ sal_Bool performTest( const Reference<XLanguageBindingTest > & xLBT ) aData.Bool, aData.Char, aData.Byte, aData.Short, aData.UShort, aData.Long, aData.ULong, aData.Hyper, aData.UHyper, aData.Float, aData.Double, aData.Enum, aData.String, xI, - Any( &xI, ::getCppuType( (const Reference<XInterface > *)0 ) ) ); + Any( &xI, cppu::UnoType<XInterface>::get()) ); aSetData.Sequence = Sequence<test::TestElement >( (const test::TestElement *)&aSetData, 1 ); @@ -942,27 +942,27 @@ static sal_Bool test_adapter( const Reference< XMultiServiceFactory > & xMgr ) Reference< XLanguageBindingTest > xOriginal( (XLanguageBindingTest *)new Test_Impl() ); Reference< XInvocation > xInvok( new XLB_Invocation( xMgr, xOriginal ) ); Reference< XLanguageBindingTest > xLBT( xAdapFac->createAdapter( - xInvok, ::getCppuType( (const Reference< XLanguageBindingTest > *)0 ) ), UNO_QUERY ); + xInvok, cppu::UnoType<XLanguageBindingTest>::get()), UNO_QUERY ); Reference< XLanguageBindingTest > xLBT2( xAdapFac->createAdapter( - xInvok, ::getCppuType( (const Reference< XLanguageBindingTest > *)0 ) ), UNO_QUERY ); + xInvok, cppu::UnoType<XLanguageBindingTest>::get()), UNO_QUERY ); if (xLBT != xLBT2) return sal_False; Reference< XInterface > xLBT3( xAdapFac->createAdapter( - xInvok, ::getCppuType( (const Reference< XInterface > *)0 ) ), UNO_QUERY ); + xInvok, cppu::UnoType<XInterface>::get()), UNO_QUERY ); if (xLBT != xLBT3) return sal_False; Type ar[ 2 ] = { - ::getCppuType( (const Reference< XLBTestBase > *)0 ), - ::getCppuType( (const Reference< XInterface > *)0 ) }; + cppu::UnoType<XLBTestBase>::get(), + cppu::UnoType<XInterface>::get()}; Reference< XInterface > xLBT4( xAdapFac2->createAdapter( xInvok, Sequence< Type >( ar, 2 ) ), UNO_QUERY ); if (xLBT != xLBT4) return sal_False; Reference< XSimpleRegistry > xInvalidAdapter( xAdapFac->createAdapter( - xInvok, ::getCppuType( (const Reference< XSimpleRegistry > *)0 ) ), UNO_QUERY ); + xInvok, cppu::UnoType<XSimpleRegistry>::get()), UNO_QUERY ); if (xLBT == xInvalidAdapter) return sal_False; @@ -991,7 +991,7 @@ static sal_Bool test_invocation( const Reference< XMultiServiceFactory > & xMgr xInvocFac->createInstanceWithArguments( Sequence< Any >( &aOriginal, 1 ) ), UNO_QUERY ); Reference< XLanguageBindingTest > xLBT( xAdapFac->createAdapter( - xInvok, ::getCppuType( (const Reference< XLanguageBindingTest > *)0 ) ), UNO_QUERY ); + xInvok, cppu::UnoType<XLanguageBindingTest>::get()), UNO_QUERY ); return (performTest( xLBT ) && raiseException( xLBT )); } diff --git a/stoc/test/testintrosp.cxx b/stoc/test/testintrosp.cxx index 54da3eb3ff43..b3908eb7e771 100644 --- a/stoc/test/testintrosp.cxx +++ b/stoc/test/testintrosp.cxx @@ -209,17 +209,17 @@ Sequence< Property > ImplPropertySetInfo::getProperties(void) pAry[0].Name = "Factor"; pAry[0].Handle = -1; - pAry[0].Type = getCppuType( (double*) NULL ); + pAry[0].Type = cppu::UnoType<double>::get(); pAry[0].Attributes = BOUND | TRANSIENT; pAry[1].Name = "MyCount"; pAry[1].Handle = -1; - pAry[1].Type = getCppuType( (sal_Int32*) NULL ); + pAry[1].Type = cppu::UnoType<sal_Int32>::get(); pAry[1].Attributes = BOUND | TRANSIENT; pAry[2].Name = "Info"; pAry[2].Handle = -1; - pAry[2].Type = getCppuType( (OUString*) NULL ); + pAry[2].Type = cppu::UnoType<OUString>::get(); pAry[2].Attributes = TRANSIENT; } // Return information about all three properties @@ -681,7 +681,7 @@ Any getIntrospectionTestObject( const Reference< XMultiServiceFactory > & xMgr ) { Any aObjAny; Reference< XIntroTest > xTestObj = new ImplIntroTest( xMgr ); - aObjAny.setValue( &xTestObj, ::getCppuType( (const Reference< XIntroTest > *)0 ) ); + aObjAny.setValue( &xTestObj, cppu::UnoType<XIntroTest>::get()); return aObjAny; } @@ -860,7 +860,7 @@ static sal_Bool test_introsp( Reference< XMultiServiceFactory > xMgr, // check result of introspection // determine XPropertySet-UIK - Type aType = getCppuType( (Reference< XPropertySet >*) NULL ); + Type aType = cppu::UnoType<XPropertySet>::get(); Reference< XInterface > xPropSetIface = xAccess->queryAdapter( aType ); Reference< XPropertySet > xPropSet( xPropSetIface, UNO_QUERY ); diff --git a/svl/source/fsstor/fsstorage.cxx b/svl/source/fsstor/fsstorage.cxx index d1f2f1323af8..7ccfeb721806 100644 --- a/svl/source/fsstor/fsstorage.cxx +++ b/svl/source/fsstor/fsstorage.cxx @@ -318,10 +318,10 @@ uno::Sequence< uno::Type > SAL_CALL FSStorage::getTypes() if ( m_pImpl->m_pTypeCollection == NULL ) { m_pImpl->m_pTypeCollection = new ::cppu::OTypeCollection - ( ::getCppuType( ( const uno::Reference< lang::XTypeProvider >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XStorage >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XHierarchicalStorageAccess >* )NULL ) - , ::getCppuType( ( const uno::Reference< beans::XPropertySet >* )NULL ) ); + ( cppu::UnoType<lang::XTypeProvider>::get() + , cppu::UnoType<embed::XStorage>::get() + , cppu::UnoType<embed::XHierarchicalStorageAccess>::get() + , cppu::UnoType<beans::XPropertySet>::get()); } } diff --git a/svl/source/fsstor/oinputstreamcontainer.cxx b/svl/source/fsstor/oinputstreamcontainer.cxx index 0b3384dd981e..3a9280d75012 100644 --- a/svl/source/fsstor/oinputstreamcontainer.cxx +++ b/svl/source/fsstor/oinputstreamcontainer.cxx @@ -56,17 +56,17 @@ uno::Sequence< uno::Type > SAL_CALL OFSInputStreamContainer::getTypes() if ( m_bSeekable ) { static ::cppu::OTypeCollection aTypeCollection( - ::getCppuType(( const uno::Reference< io::XStream >* )NULL ), - ::getCppuType(( const uno::Reference< io::XInputStream >* )NULL ), - ::getCppuType(( const uno::Reference< io::XSeekable >* )NULL ) ); + cppu::UnoType<io::XStream>::get(), + cppu::UnoType<io::XInputStream>::get(), + cppu::UnoType<io::XSeekable>::get()); pTypeCollection = &aTypeCollection ; } else { static ::cppu::OTypeCollection aTypeCollection( - ::getCppuType(( const uno::Reference< io::XStream >* )NULL ), - ::getCppuType(( const uno::Reference< io::XInputStream >* )NULL ) ); + cppu::UnoType<io::XStream>::get(), + cppu::UnoType<io::XInputStream>::get()); pTypeCollection = &aTypeCollection ; } diff --git a/svl/source/fsstor/ostreamcontainer.cxx b/svl/source/fsstor/ostreamcontainer.cxx index eed5e5a9b4f6..2651ad4c8398 100644 --- a/svl/source/fsstor/ostreamcontainer.cxx +++ b/svl/source/fsstor/ostreamcontainer.cxx @@ -151,29 +151,29 @@ uno::Sequence< uno::Type > SAL_CALL OFSStreamContainer::getTypes() if ( m_pTypeCollection == NULL ) { ::cppu::OTypeCollection aTypeCollection - ( ::getCppuType( ( const uno::Reference< lang::XTypeProvider >* )NULL ) - , ::getCppuType( ( const uno::Reference< embed::XExtendedStorageStream >* )NULL ) ); + ( cppu::UnoType<lang::XTypeProvider>::get() + , cppu::UnoType<embed::XExtendedStorageStream>::get()); if ( m_xSeekable.is() ) aTypeCollection = ::cppu::OTypeCollection - ( ::getCppuType( ( const uno::Reference< io::XSeekable >* )NULL ), + ( cppu::UnoType<io::XSeekable>::get(), aTypeCollection.getTypes() ); if ( m_xInputStream.is() ) aTypeCollection = ::cppu::OTypeCollection - ( ::getCppuType( ( const uno::Reference< io::XInputStream >* )NULL ), + ( cppu::UnoType<io::XInputStream>::get(), aTypeCollection.getTypes() ); if ( m_xOutputStream.is() ) aTypeCollection = ::cppu::OTypeCollection - ( ::getCppuType( ( const uno::Reference< io::XOutputStream >* )NULL ), + ( cppu::UnoType<io::XOutputStream>::get(), aTypeCollection.getTypes() ); if ( m_xTruncate.is() ) aTypeCollection = ::cppu::OTypeCollection - ( ::getCppuType( ( const uno::Reference< io::XTruncate >* )NULL ), + ( cppu::UnoType<io::XTruncate>::get(), aTypeCollection.getTypes() ); if ( m_xAsyncOutputMonitor.is() ) aTypeCollection = ::cppu::OTypeCollection - ( ::getCppuType( ( const uno::Reference< io::XAsyncOutputMonitor >* )NULL ), + ( cppu::UnoType<io::XAsyncOutputMonitor>::get(), aTypeCollection.getTypes() ); m_pTypeCollection = new ::cppu::OTypeCollection( aTypeCollection ); diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 8e3a43551b3f..7539c9b1f557 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -1542,11 +1542,11 @@ void lclProcessRecursiveGrabBag(sal_Int32 aElementId, const css::uno::Sequence<c uno::Any aAny = aAttributes[j].Value; OString aValue; - if(aAny.getValueType() == getCppuType<sal_Int32>()) + if(aAny.getValueType() == cppu::UnoType<sal_Int32>::get()) { aValue = OString::number(aAny.get<sal_Int32>()); } - else if(aAny.getValueType() == getCppuType<OUString>()) + else if(aAny.getValueType() == cppu::UnoType<OUString>::get()) { aValue = OUStringToOString(aAny.get<OUString>(), RTL_TEXTENCODING_ASCII_US); } diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx index fe33e1ea40c1..d197fb14a9a9 100644 --- a/toolkit/source/controls/controlmodelcontainerbase.cxx +++ b/toolkit/source/controls/controlmodelcontainerbase.cxx @@ -476,7 +476,7 @@ void ControlModelContainerBase::removeContainerListener( const Reference< XConta // XElementAcces Type ControlModelContainerBase::getElementType() throw(RuntimeException, std::exception) { - Type aType = getCppuType( ( Reference< XControlModel>* ) NULL ); + Type aType = cppu::UnoType<XControlModel>::get(); return aType; } diff --git a/toolkit/source/controls/geometrycontrolmodel.cxx b/toolkit/source/controls/geometrycontrolmodel.cxx index 18f470a6240a..43d410faa9a0 100644 --- a/toolkit/source/controls/geometrycontrolmodel.cxx +++ b/toolkit/source/controls/geometrycontrolmodel.cxx @@ -247,7 +247,7 @@ Any SAL_CALL OGeometryControlModel_Base::queryAggregation( const Type& _rType ) throw(RuntimeException, std::exception) { Any aReturn; - if (_rType.equals(::getCppuType(static_cast< Reference< XCloneable>* >(NULL))) && !m_bCloneable) + if (_rType.equals(cppu::UnoType<XCloneable>::get()) && !m_bCloneable) // somebody is asking for the XCloneable interface, but our aggregate does not support it // -> outta here // (need this extra check, cause OGCM_Base::queryAggregation would return this interface diff --git a/toolkit/source/controls/roadmapcontrol.cxx b/toolkit/source/controls/roadmapcontrol.cxx index f326c7cf8c55..ab0c4467d139 100644 --- a/toolkit/source/controls/roadmapcontrol.cxx +++ b/toolkit/source/controls/roadmapcontrol.cxx @@ -332,7 +332,7 @@ static void lcl_throwIndexOutOfBoundsException( ) Type SAL_CALL UnoControlRoadmapModel::getElementType() throw(RuntimeException, std::exception) { - Type aType = getCppuType( ( Reference< XPropertySet>* ) NULL ); + Type aType = cppu::UnoType<XPropertySet>::get(); return aType; } diff --git a/toolkit/source/controls/stdtabcontroller.cxx b/toolkit/source/controls/stdtabcontroller.cxx index 273d9173f25e..812ffef5ae15 100644 --- a/toolkit/source/controls/stdtabcontroller.cxx +++ b/toolkit/source/controls/stdtabcontroller.cxx @@ -169,8 +169,8 @@ Any StdTabController::queryAggregation( const Type & rType ) throw(RuntimeExcept // XTypeProvider IMPL_XTYPEPROVIDER_START( StdTabController ) - getCppuType( ( Reference< XTabController>* ) NULL ), - getCppuType( ( Reference< XServiceInfo>* ) NULL ) + cppu::UnoType<XTabController>::get(), + cppu::UnoType<XServiceInfo>::get() IMPL_XTYPEPROVIDER_END void StdTabController::setModel( const Reference< XTabControllerModel >& Model ) throw(RuntimeException, std::exception) diff --git a/toolkit/source/controls/tabpagecontainer.cxx b/toolkit/source/controls/tabpagecontainer.cxx index f841478eef85..d6878c17cc05 100644 --- a/toolkit/source/controls/tabpagecontainer.cxx +++ b/toolkit/source/controls/tabpagecontainer.cxx @@ -196,7 +196,7 @@ uno::Any SAL_CALL UnoControlTabPageContainerModel::getByIndex( ::sal_Int32 nInde // XElementAccess uno::Type SAL_CALL UnoControlTabPageContainerModel::getElementType( ) throw (uno::RuntimeException, std::exception) { - return ::getCppuType(static_cast< Reference< com::sun::star::awt::XControlModel>* >(NULL)); + return cppu::UnoType<com::sun::star::awt::XControlModel>::get(); } sal_Bool SAL_CALL UnoControlTabPageContainerModel::hasElements( ) throw (uno::RuntimeException, std::exception) diff --git a/toolkit/source/controls/unocontrol.cxx b/toolkit/source/controls/unocontrol.cxx index cb8b7a5df7b9..9437258714b5 100644 --- a/toolkit/source/controls/unocontrol.cxx +++ b/toolkit/source/controls/unocontrol.cxx @@ -1098,7 +1098,7 @@ void UnoControl::createPeer( const Reference< XToolkit >& rxToolkit, const Refer // kein TopWindow if ( !xToolkit.is() ) xToolkit = rParentPeer->getToolkit(); - Any aAny = OWeakAggObject::queryInterface( ::getCppuType((const Reference< XControlContainer>*)0) ); + Any aAny = OWeakAggObject::queryInterface( cppu::UnoType<XControlContainer>::get()); Reference< XControlContainer > xC; aAny >>= xC; if( xC.is() ) diff --git a/ucb/source/core/ucbprops.cxx b/ucb/source/core/ucbprops.cxx index 2693fb6b7f75..f21154d4663b 100644 --- a/ucb/source/core/ucbprops.cxx +++ b/ucb/source/core/ucbprops.cxx @@ -140,8 +140,7 @@ static const com::sun::star::uno::Type& Sequence_RecipientInfo_getCppuType() static const com::sun::star::uno::Type& RuleSet_getCppuType() { - return getCppuType( - static_cast< com::sun::star::ucb::RuleSet * >( 0 ) ); + return cppu::UnoType<com::sun::star::ucb::RuleSet>::get(); } static const com::sun::star::uno::Type& Sequence_SendInfo_getCppuType() diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx index a4fad5a44c20..421b364e1ac1 100644 --- a/ucb/source/core/ucbstore.cxx +++ b/ucb/source/core/ucbstore.cxx @@ -500,7 +500,7 @@ void SAL_CALL PropertySetRegistry::removePropertySet( const OUString& key ) com::sun::star::uno::Type SAL_CALL PropertySetRegistry::getElementType() throw( RuntimeException, std::exception ) { - return getCppuType( ( Reference< XPersistentPropertySet > * ) 0 ); + return cppu::UnoType<XPersistentPropertySet>::get(); } diff --git a/ucb/source/sorter/sortresult.cxx b/ucb/source/sorter/sortresult.cxx index ac4668524517..eb35bb6ffbca 100644 --- a/ucb/source/sorter/sortresult.cxx +++ b/ucb/source/sorter/sortresult.cxx @@ -1956,7 +1956,7 @@ SRSPropertySetInfo::SRSPropertySetInfo() { maProps[0].Name = "RowCount"; maProps[0].Handle = -1; - maProps[0].Type = ::getCppuType( (const OUString*) NULL ); + maProps[0].Type = cppu::UnoType<OUString>::get(); maProps[0].Attributes = -1; maProps[1].Name = "IsRowCountFinal"; diff --git a/ucbhelper/source/provider/contentidentifier.cxx b/ucbhelper/source/provider/contentidentifier.cxx index 6d389af0d195..f040b3b166ec 100644 --- a/ucbhelper/source/provider/contentidentifier.cxx +++ b/ucbhelper/source/provider/contentidentifier.cxx @@ -152,10 +152,8 @@ ContentIdentifier::getTypes() if ( !pCollection ) { static cppu::OTypeCollection collection( - getCppuType( static_cast< - Reference < XTypeProvider > * >( 0 ) ), - getCppuType( static_cast< - Reference< XContentIdentifier > * >( 0 ) ) ); + cppu::UnoType<XTypeProvider>::get(), + cppu::UnoType<XContentIdentifier>::get() ); pCollection = &collection; } } diff --git a/ucbhelper/source/provider/resultsetmetadata.cxx b/ucbhelper/source/provider/resultsetmetadata.cxx index b894f74c5c63..0b389eb4d4ac 100644 --- a/ucbhelper/source/provider/resultsetmetadata.cxx +++ b/ucbhelper/source/provider/resultsetmetadata.cxx @@ -480,16 +480,16 @@ sal_Int32 SAL_CALL ResultSetMetaData::getColumnType( sal_Int32 column ) nType = DataType::TIME; // XRow::getTime else if ( rType == cppu::UnoType<DateTime>::get() ) nType = DataType::TIMESTAMP;// XRow::getTimestamp - else if ( rType == getCppuType( static_cast< Reference< XInputStream > * >( 0 ) ) ) + else if ( rType == cppu::UnoType<XInputStream>::get() ) nType = DataType::LONGVARBINARY; // XRow::getBinaryStream // nType = DataType::LONGVARCHAR; // XRow::getCharacterStream - else if ( rType == getCppuType( static_cast< Reference< XClob > * >( 0 ) ) ) + else if ( rType == cppu::UnoType<XClob>::get() ) nType = DataType::CLOB; // XRow::getClob - else if ( rType == getCppuType( static_cast< Reference< XBlob > * >( 0 ) ) ) + else if ( rType == cppu::UnoType<XBlob>::get() ) nType = DataType::BLOB; // XRow::getBlob - else if ( rType == getCppuType( static_cast< Reference< XArray > * >( 0 ) ) ) + else if ( rType == cppu::UnoType<XArray>::get() ) nType = DataType::ARRAY;// XRow::getArray - else if ( rType == getCppuType( static_cast< Reference< XRef > * >( 0 ) ) ) + else if ( rType == cppu::UnoType<XRef>::get() ) nType = DataType::REF;// XRow::getRef else nType = DataType::OBJECT;// XRow::getObject diff --git a/unotools/source/accessibility/accessiblerelationsethelper.cxx b/unotools/source/accessibility/accessiblerelationsethelper.cxx index 91753e43c7c6..7bdbedccc256 100644 --- a/unotools/source/accessibility/accessiblerelationsethelper.cxx +++ b/unotools/source/accessibility/accessiblerelationsethelper.cxx @@ -235,10 +235,8 @@ uno::Sequence< ::com::sun::star::uno::Type> { osl::MutexGuard aGuard (maMutex); const ::com::sun::star::uno::Type aTypeList[] = { - ::getCppuType((const uno::Reference< - XAccessibleRelationSet>*)0), - ::getCppuType((const uno::Reference< - lang::XTypeProvider>*)0) + cppu::UnoType<XAccessibleRelationSet>::get(), + cppu::UnoType<lang::XTypeProvider>::get() }; ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> aTypeSequence (aTypeList, 2); diff --git a/unotools/source/accessibility/accessiblestatesethelper.cxx b/unotools/source/accessibility/accessiblestatesethelper.cxx index d5aec78c0d8a..f37f93f19f83 100644 --- a/unotools/source/accessibility/accessiblestatesethelper.cxx +++ b/unotools/source/accessibility/accessiblestatesethelper.cxx @@ -247,10 +247,8 @@ uno::Sequence< ::com::sun::star::uno::Type> throw (::com::sun::star::uno::RuntimeException, std::exception) { const ::com::sun::star::uno::Type aTypeList[] = { - ::getCppuType((const uno::Reference< - XAccessibleStateSet>*)0), - ::getCppuType((const uno::Reference< - lang::XTypeProvider>*)0) + cppu::UnoType<XAccessibleStateSet>::get(), + cppu::UnoType<lang::XTypeProvider>::get() }; ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> aTypeSequence (aTypeList, 2); diff --git a/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx index f02b52b89d80..24f9fc2c488e 100644 --- a/unotools/source/config/lingucfg.cxx +++ b/unotools/source/config/lingucfg.cxx @@ -366,19 +366,19 @@ uno::Any SvtLinguConfigItem::GetProperty( sal_Int32 nPropertyHandle ) const case UPH_DEFAULT_LOCALE : { lang::Locale aLocale( LanguageTag::convertToLocale( rOpt.nDefaultLanguage, false) ); - aRes.setValue( &aLocale, ::getCppuType((lang::Locale*)0 )); + aRes.setValue( &aLocale, cppu::UnoType<lang::Locale>::get()); break; } case UPH_DEFAULT_LOCALE_CJK : { lang::Locale aLocale( LanguageTag::convertToLocale( rOpt.nDefaultLanguage_CJK, false) ); - aRes.setValue( &aLocale, ::getCppuType((lang::Locale*)0 )); + aRes.setValue( &aLocale, cppu::UnoType<lang::Locale>::get()); break; } case UPH_DEFAULT_LOCALE_CTL : { lang::Locale aLocale( LanguageTag::convertToLocale( rOpt.nDefaultLanguage_CTL, false) ); - aRes.setValue( &aLocale, ::getCppuType((lang::Locale*)0 )); + aRes.setValue( &aLocale, cppu::UnoType<lang::Locale>::get()); break; } case UPH_IS_IGNORE_POST_POSITIONAL_WORD : pbVal = &rOpt.bIsIgnorePostPositionalWord; break; @@ -676,8 +676,8 @@ bool SvtLinguConfigItem::SaveOptions( const uno::Sequence< OUString > &rProperyN bool bRet = false; const uno::Type &rBOOL = ::getBooleanCppuType(); - const uno::Type &rINT16 = ::getCppuType( (sal_Int16 *) NULL ); - const uno::Type &rINT32 = ::getCppuType( (sal_Int32 *) NULL ); + const uno::Type &rINT16 = cppu::UnoType<sal_Int16>::get(); + const uno::Type &rINT32 = cppu::UnoType<sal_Int32>::get(); sal_Int32 nProps = rProperyNames.getLength(); uno::Sequence< uno::Any > aValues( nProps ); diff --git a/unotools/source/ucbhelper/xtempfile.cxx b/unotools/source/ucbhelper/xtempfile.cxx index d162e97e78aa..9c197cdf59d1 100644 --- a/unotools/source/ucbhelper/xtempfile.cxx +++ b/unotools/source/ucbhelper/xtempfile.cxx @@ -82,7 +82,7 @@ throw ( css::uno::RuntimeException, std::exception ) if ( pTypeCollection == NULL ) { static ::cppu::OTypeCollection aTypeCollection( - ::getCppuType( ( const css::uno::Reference< css::beans::XPropertySet >*)NULL ) + cppu::UnoType<css::beans::XPropertySet>::get() ,OTempFileBase::getTypes() ); pTypeCollection = &aTypeCollection; } diff --git a/vbahelper/source/msforms/vbauserform.cxx b/vbahelper/source/msforms/vbauserform.cxx index 8cc8d99a571c..23bbd23f80be 100644 --- a/vbahelper/source/msforms/vbauserform.cxx +++ b/vbahelper/source/msforms/vbauserform.cxx @@ -218,7 +218,7 @@ ScVbaUserForm::setValue( const OUString& aPropertyName, const uno::Any& aValue ) uno::Reference< script::XDefaultProperty > xDfltProp( aObject, uno::UNO_QUERY_THROW ); OUString aDfltPropName = xDfltProp->getDefaultPropertyName(); uno::Reference< beans::XIntrospectionAccess > xUnoAccess( getIntrospectionAccess( aObject ) ); - uno::Reference< beans::XPropertySet > xPropSet( xUnoAccess->queryAdapter( ::getCppuType( (const uno::Reference< beans::XPropertySet > *)0 ) ), uno::UNO_QUERY_THROW ); + uno::Reference< beans::XPropertySet > xPropSet( xUnoAccess->queryAdapter( cppu::UnoType<beans::XPropertySet>::get()), uno::UNO_QUERY_THROW ); xPropSet->setPropertyValue( aDfltPropName, aValue ); } } diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx index 517334d113e6..6ab7dba455ac 100644 --- a/vbahelper/source/vbahelper/vbahelper.cxx +++ b/vbahelper/source/vbahelper/vbahelper.cxx @@ -750,7 +750,7 @@ void setDefaultPropByIntrospection( const uno::Any& aObj, const uno::Any& aValue uno::Reference< beans::XPropertySet > xPropSet; if ( xUnoAccess.is() ) - xPropSet.set( xUnoAccess->queryAdapter( ::getCppuType( (const uno::Reference< beans::XPropertySet > *)0 ) ), uno::UNO_QUERY); + xPropSet.set( xUnoAccess->queryAdapter( cppu::UnoType<beans::XPropertySet>::get()), uno::UNO_QUERY); if ( xPropSet.is() ) xPropSet->setPropertyValue( xDflt->getDefaultPropertyName(), aValue ); diff --git a/winaccessibility/source/UAccCOM/AccEditableText.cxx b/winaccessibility/source/UAccCOM/AccEditableText.cxx index 2515c65fd81e..054c3c9e9449 100644 --- a/winaccessibility/source/UAccCOM/AccEditableText.cxx +++ b/winaccessibility/source/UAccCOM/AccEditableText.cxx @@ -274,14 +274,14 @@ void CAccEditableText::get_AnyFromOLECHAR(const ::rtl::OUString &ouName, const : // Convert to int. // NOTE: CharFontPitch is not implemented in java file. sal_Int32 nValue = ouValue.toInt32(); - rAny.setValue(&nValue, getCppuType((sal_Int32 *)0)); + rAny.setValue(&nValue, cppu::UnoType<sal_Int32>::get()); } else if(ouName.compareTo(L"CharShadowed") == 0 || ouName.compareTo(L"CharContoured") == 0) { // Convert to boolean. boolean nValue = (boolean)ouValue.toBoolean(); - rAny.setValue(&nValue, getCppuType((sal_Bool *)sal_False)); + rAny.setValue(&nValue, cppu::UnoType<sal_Bool>::get() ); } else if(ouName.compareTo(L"CharEscapement") == 0 || ouName.compareTo(L"CharStrikeout") == 0 || @@ -290,25 +290,25 @@ void CAccEditableText::get_AnyFromOLECHAR(const ::rtl::OUString &ouName, const : { // Convert to short. short nValue = (short)ouValue.toInt32(); - rAny.setValue(&nValue, getCppuType((short *)0)); + rAny.setValue(&nValue, cppu::UnoType<short>::get()); } else if(ouName.compareTo(L"CharHeight") == 0 || ouName.compareTo(L"CharWeight") == 0) { // Convert to float. float fValue = ouValue.toFloat(); - rAny.setValue(&fValue, getCppuType((float *)0)); + rAny.setValue(&fValue, cppu::UnoType<float>::get()); } else if(ouName.compareTo(L"CharFontName") == 0) { // Convert to string. - rAny.setValue(&ouValue, getCppuType((::rtl::OUString *)0)); + rAny.setValue(&ouValue, cppu::UnoType<rtl::OUString>::get()); } else if(ouName.compareTo(L"CharPosture") == 0) { // Convert to FontSlant. ::com::sun::star::awt::FontSlant fontSlant = (::com::sun::star::awt::FontSlant)ouValue.toInt32(); - rAny.setValue(&fontSlant, getCppuType((::com::sun::star::awt::FontSlant*)0)); + rAny.setValue(&fontSlant, cppu::UnoType<com::sun::star::awt::FontSlant>::get()); } else if(ouName.compareTo(L"ParaTabStops") == 0) { @@ -461,13 +461,13 @@ void CAccEditableText::get_AnyFromOLECHAR(const ::rtl::OUString &ouName, const : } // Convert to Any object. - rAny.setValue(&lineSpacing, getCppuType((::com::sun::star::style::LineSpacing* )0)); + rAny.setValue(&lineSpacing, cppu::UnoType<com::sun::star::style::LineSpacing>::get()); } else { // Do nothing. sal_Int32 nDefault = 0; - rAny.setValue(&nDefault, getCppuType((sal_Int32 *)0)); + rAny.setValue(&nDefault, cppu::UnoType<sal_Int32>::get()); } } diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx b/winaccessibility/source/UAccCOM/MAccessible.cxx index c067cbdd27a0..81e0d53507e1 100644 --- a/winaccessibility/source/UAccCOM/MAccessible.cxx +++ b/winaccessibility/source/UAccCOM/MAccessible.cxx @@ -2860,7 +2860,7 @@ void CMAccessible::get_OLECHARFromAny(Any& pAny, OLECHAR* pChar) } case TypeClass_ENUM: { - if (pAny.getValueType() == getCppuType( (::com::sun::star::awt::FontSlant* )0 ) ) + if (pAny.getValueType() == cppu::UnoType<com::sun::star::awt::FontSlant>::get()) { com::sun::star::awt::FontSlant val; pAny >>= val; @@ -2869,13 +2869,13 @@ void CMAccessible::get_OLECHARFromAny(Any& pAny, OLECHAR* pChar) } case TypeClass_STRUCT: { - if (pAny.getValueType() == getCppuType( (::com::sun::star::style::LineSpacing* )0 ) ) + if (pAny.getValueType() == cppu::UnoType<com::sun::star::style::LineSpacing>::get()) { com::sun::star::style::LineSpacing val; pAny >>= val; swprintf( pChar, L"Mode=%ld,Height=%ld,", val.Mode, val.Height); } - else if (pAny.getValueType() == getCppuType( (com::sun::star::accessibility::TextSegment *)0 ) ) + else if (pAny.getValueType() == cppu::UnoType<com::sun::star::accessibility::TextSegment>::get()) { com::sun::star::accessibility::TextSegment val; pAny >>= val; diff --git a/winaccessibility/source/service/AccObject.cxx b/winaccessibility/source/service/AccObject.cxx index 63db986a069b..eb5bcb05ce87 100644 --- a/winaccessibility/source/service/AccObject.cxx +++ b/winaccessibility/source/service/AccObject.cxx @@ -427,7 +427,7 @@ void AccObject::SetValue( Any pAny ) if(NULL == m_pIMAcc) return strValue; - if(pAny.getValueType() == getCppuType( (sal_uInt16 *)0 ) ) + if(pAny.getValueType() == cppu::UnoType<cppu::UnoUnsignedShortType>::get() ) { sal_uInt16 val; if (pAny >>= val) @@ -436,7 +436,7 @@ void AccObject::SetValue( Any pAny ) } } - else if(pAny.getValueType() == getCppuType( (::rtl::OUString *)0 ) ) + else if(pAny.getValueType() == cppu::UnoType<rtl::OUString>::get()) { pAny >>= strValue ; @@ -457,7 +457,7 @@ void AccObject::SetValue( Any pAny ) } } - else if(pAny.getValueType() == getCppuType( (double *)0 ) ) + else if(pAny.getValueType() == cppu::UnoType<double>::get()) { double val; if (pAny >>= val) @@ -465,7 +465,7 @@ void AccObject::SetValue( Any pAny ) strValue=::rtl::OUString::number(val); } } - else if(pAny.getValueType() == getCppuType( (sal_Int32 *)0 ) ) + else if(pAny.getValueType() == cppu::UnoType<sal_Int32>::get()) { sal_Int32 val; if (pAny >>= val) @@ -473,7 +473,7 @@ void AccObject::SetValue( Any pAny ) strValue=::rtl::OUString::number(val); } } - else if (pAny.getValueType() == getCppuType( (com::sun::star::accessibility::TextSegment *)0 ) ) + else if (pAny.getValueType() == cppu::UnoType<com::sun::star::accessibility::TextSegment>::get()) { com::sun::star::accessibility::TextSegment val; if (pAny >>= val) diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx index d64ba5a06edf..291a2df2ac36 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx @@ -581,7 +581,7 @@ void ElementDescriptor::readDateAttr( OUString const & rPropName, OUString const if (beans::PropertyState_DEFAULT_VALUE != _xPropState->getPropertyState( rPropName )) { Any a( _xProps->getPropertyValue( rPropName ) ); - if (a.getValueTypeClass() == TypeClass_STRUCT && a.getValueType() == ::getCppuType( (util::Date*)0 )) + if (a.getValueTypeClass() == TypeClass_STRUCT && a.getValueType() == cppu::UnoType<util::Date>::get()) { util::Date aUDate; if (a >>= aUDate) @@ -602,7 +602,7 @@ void ElementDescriptor::readTimeAttr( OUString const & rPropName, OUString const if (beans::PropertyState_DEFAULT_VALUE != _xPropState->getPropertyState( rPropName )) { Any a( _xProps->getPropertyValue( rPropName ) ); - if (a.getValueTypeClass() == TypeClass_STRUCT && a.getValueType() == ::getCppuType( (util::Time*)0 )) + if (a.getValueTypeClass() == TypeClass_STRUCT && a.getValueType() == cppu::UnoType<util::Time>::get()) { util::Time aUTime; if (a >>= aUTime) @@ -688,7 +688,7 @@ void ElementDescriptor::readVerticalAlignAttr( OUString const & rPropName, OUStr if (beans::PropertyState_DEFAULT_VALUE != _xPropState->getPropertyState( rPropName )) { Any a( _xProps->getPropertyValue( rPropName ) ); - if (a.getValueTypeClass() == TypeClass_ENUM && a.getValueType() == ::getCppuType( (style::VerticalAlignment*)0 )) + if (a.getValueTypeClass() == TypeClass_ENUM && a.getValueType() == cppu::UnoType<style::VerticalAlignment>::get()) { style::VerticalAlignment eAlign; a >>= eAlign; @@ -966,7 +966,7 @@ void ElementDescriptor::readSelectionTypeAttr( OUString const & rPropName, OUStr { Any aSelectionType ( _xProps->getPropertyValue( rPropName ) ); - if (aSelectionType.getValueTypeClass() == TypeClass_ENUM && aSelectionType.getValueType() == ::getCppuType( (::view::SelectionType*)0 )) + if (aSelectionType.getValueTypeClass() == TypeClass_ENUM && aSelectionType.getValueType() == cppu::UnoType<view::SelectionType>::get()) { ::view::SelectionType eSelectionType; aSelectionType >>= eSelectionType; |