diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2014-05-23 22:11:27 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2014-05-23 22:11:52 +0200 |
commit | ac76cc7e605b1bc9c0ff8e24d0b9995a8247074e (patch) | |
tree | 797df8cc9387fa70a0c09e574f49714ce4dc6710 /UnoControls | |
parent | 3191d7d1302dbde2445b9f300b3eb853120ede65 (diff) |
Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part20
Change-Id: If87cdfb2c605254f6d69baa4ca5aec09091caa68
Diffstat (limited to 'UnoControls')
-rw-r--r-- | UnoControls/source/base/basecontainercontrol.cxx | 8 | ||||
-rw-r--r-- | UnoControls/source/base/basecontrol.cxx | 36 | ||||
-rw-r--r-- | UnoControls/source/base/multiplexer.cxx | 28 | ||||
-rw-r--r-- | UnoControls/source/controls/framecontrol.cxx | 18 | ||||
-rw-r--r-- | UnoControls/source/controls/progressbar.cxx | 4 | ||||
-rw-r--r-- | UnoControls/source/controls/progressmonitor.cxx | 6 | ||||
-rw-r--r-- | UnoControls/source/controls/statusindicator.cxx | 4 |
7 files changed, 52 insertions, 52 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! |