diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2014-05-05 23:24:25 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2014-05-05 23:24:49 +0200 |
commit | ebd4986c3495239f09510f2c0c79b6e30acda83e (patch) | |
tree | fce4db3c0eac639def371866654a93cdc2d0d7a2 /sfx2 | |
parent | fb0ca7eff0e16fa8dd1a4c8d75fef23830903a3f (diff) |
Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part2
Change-Id: Ibca921eff3647507ffb7e9011a84aeefbec58d7a
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/control/querystatus.cxx | 10 | ||||
-rw-r--r-- | sfx2/source/control/statcach.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/statbar/stbitem.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/toolbox/tbxitem.cxx | 20 |
4 files changed, 22 insertions, 22 deletions
diff --git a/sfx2/source/control/querystatus.cxx b/sfx2/source/control/querystatus.cxx index ef03199e3a22..f9fa48793531 100644 --- a/sfx2/source/control/querystatus.cxx +++ b/sfx2/source/control/querystatus.cxx @@ -117,32 +117,32 @@ throw( RuntimeException, std::exception ) rEvent.State >>= bTemp ; m_pItem = new SfxBoolItem( m_nSlotID, bTemp ); } - else if ( pType == ::getCppuType((const sal_uInt16*)0) ) + else if ( pType == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get() ) { sal_uInt16 nTemp = 0; rEvent.State >>= nTemp ; m_pItem = new SfxUInt16Item( m_nSlotID, nTemp ); } - else if ( pType == ::getCppuType((const sal_uInt32*)0) ) + else if ( pType == cppu::UnoType<sal_uInt32>::get() ) { sal_uInt32 nTemp = 0; rEvent.State >>= nTemp ; m_pItem = new SfxUInt32Item( m_nSlotID, nTemp ); } - else if ( pType == ::getCppuType((const OUString*)0) ) + else if ( pType == cppu::UnoType<OUString>::get() ) { OUString sTemp ; rEvent.State >>= sTemp ; m_pItem = new SfxStringItem( m_nSlotID, sTemp ); } - else if ( pType == ::getCppuType((const ::com::sun::star::frame::status::ItemStatus*)0) ) + else if ( pType == cppu::UnoType<::com::sun::star::frame::status::ItemStatus>::get() ) { ItemStatus aItemStatus; rEvent.State >>= aItemStatus; m_eState = aItemStatus.State; m_pItem = new SfxVoidItem( m_nSlotID ); } - else if ( pType == ::getCppuType((const ::com::sun::star::frame::status::Visibility*)0) ) + else if ( pType == cppu::UnoType<::com::sun::star::frame::status::Visibility>::get() ) { Visibility aVisibilityStatus; rEvent.State >>= aVisibilityStatus; diff --git a/sfx2/source/control/statcach.cxx b/sfx2/source/control/statcach.cxx index fcc7e7f65d92..6b5b5098de61 100644 --- a/sfx2/source/control/statcach.cxx +++ b/sfx2/source/control/statcach.cxx @@ -102,19 +102,19 @@ void SAL_CALL BindDispatch_Impl::statusChanged( const ::com::sun::star::frame:: aAny >>= bTemp ; pItem = new SfxBoolItem( nId, bTemp ); } - else if ( pType == ::getCppuType((const sal_uInt16*)0) ) + else if ( pType == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get() ) { sal_uInt16 nTemp = 0; aAny >>= nTemp ; pItem = new SfxUInt16Item( nId, nTemp ); } - else if ( pType == ::getCppuType((const sal_uInt32*)0) ) + else if ( pType == cppu::UnoType<sal_uInt32>::get() ) { sal_uInt32 nTemp = 0; aAny >>= nTemp ; pItem = new SfxUInt32Item( nId, nTemp ); } - else if ( pType == ::getCppuType((const OUString*)0) ) + else if ( pType == cppu::UnoType<OUString>::get() ) { OUString sTemp ; aAny >>= sTemp ; diff --git a/sfx2/source/statbar/stbitem.cxx b/sfx2/source/statbar/stbitem.cxx index 9805c80fe45b..549b46f37d38 100644 --- a/sfx2/source/statbar/stbitem.cxx +++ b/sfx2/source/statbar/stbitem.cxx @@ -268,25 +268,25 @@ throw ( ::com::sun::star::uno::RuntimeException, std::exception ) rEvent.State >>= bTemp ; pItem = new SfxBoolItem( nSlotID, bTemp ); } - else if ( pType == ::getCppuType((const sal_uInt16*)0) ) + else if ( pType == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get() ) { sal_uInt16 nTemp = 0; rEvent.State >>= nTemp ; pItem = new SfxUInt16Item( nSlotID, nTemp ); } - else if ( pType == ::getCppuType((const sal_uInt32*)0) ) + else if ( pType == cppu::UnoType<sal_uInt32>::get() ) { sal_uInt32 nTemp = 0; rEvent.State >>= nTemp ; pItem = new SfxUInt32Item( nSlotID, nTemp ); } - else if ( pType == ::getCppuType((const OUString*)0) ) + else if ( pType == cppu::UnoType<OUString>::get() ) { OUString sTemp ; rEvent.State >>= sTemp ; pItem = new SfxStringItem( nSlotID, sTemp ); } - else if ( pType == ::getCppuType((const ::com::sun::star::frame::status::ItemStatus*)0) ) + else if ( pType == cppu::UnoType<::com::sun::star::frame::status::ItemStatus>::get() ) { frame::status::ItemStatus aItemStatus; rEvent.State >>= aItemStatus; diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx index 8f87dae0a75d..bb1be33546a4 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -547,32 +547,32 @@ throw ( ::com::sun::star::uno::RuntimeException, std::exception ) rEvent.State >>= bTemp ; pItem = new SfxBoolItem( nSlotId, bTemp ); } - else if ( pType == ::getCppuType((const sal_uInt16*)0) ) + else if ( pType == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get()) { sal_uInt16 nTemp = 0; rEvent.State >>= nTemp ; pItem = new SfxUInt16Item( nSlotId, nTemp ); } - else if ( pType == cppu::UnoType<const sal_uInt32>::get() ) + else if ( pType == cppu::UnoType<sal_uInt32>::get() ) { sal_uInt32 nTemp = 0; rEvent.State >>= nTemp ; pItem = new SfxUInt32Item( nSlotId, nTemp ); } - else if ( pType == cppu::UnoType<const OUString>::get() ) + else if ( pType == cppu::UnoType<OUString>::get() ) { OUString sTemp ; rEvent.State >>= sTemp ; pItem = new SfxStringItem( nSlotId, sTemp ); } - else if ( pType == cppu::UnoType<const ::com::sun::star::frame::status::ItemStatus>::get() ) + else if ( pType == cppu::UnoType<::com::sun::star::frame::status::ItemStatus>::get() ) { ItemStatus aItemStatus; rEvent.State >>= aItemStatus; eState = aItemStatus.State; pItem = new SfxVoidItem( nSlotId ); } - else if ( pType == cppu::UnoType<const ::com::sun::star::frame::status::Visibility>::get() ) + else if ( pType == cppu::UnoType<::com::sun::star::frame::status::Visibility>::get() ) { Visibility aVisibilityStatus; rEvent.State >>= aVisibilityStatus; @@ -1093,32 +1093,32 @@ throw ( ::com::sun::star::uno::RuntimeException, std::exception ) rEvent.State >>= bTemp ; pItem = new SfxBoolItem( nSlotId, bTemp ); } - else if ( pType == ::getCppuType((const sal_uInt16*)0) ) + else if ( pType == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get()) { sal_uInt16 nTemp = 0; rEvent.State >>= nTemp ; pItem = new SfxUInt16Item( nSlotId, nTemp ); } - else if ( pType == cppu::UnoType<const sal_uInt32>::get() ) + else if ( pType == cppu::UnoType<sal_uInt32>::get() ) { sal_uInt32 nTemp = 0; rEvent.State >>= nTemp ; pItem = new SfxUInt32Item( nSlotId, nTemp ); } - else if ( pType == cppu::UnoType<const OUString>::get() ) + else if ( pType == cppu::UnoType<OUString>::get() ) { OUString sTemp ; rEvent.State >>= sTemp ; pItem = new SfxStringItem( nSlotId, sTemp ); } - else if ( pType == cppu::UnoType<const ::com::sun::star::frame::status::ItemStatus>::get() ) + else if ( pType == cppu::UnoType<::com::sun::star::frame::status::ItemStatus>::get() ) { ItemStatus aItemStatus; rEvent.State >>= aItemStatus; eState = aItemStatus.State; pItem = new SfxVoidItem( nSlotId ); } - else if ( pType == cppu::UnoType<const ::com::sun::star::frame::status::Visibility>::get() ) + else if ( pType == cppu::UnoType<::com::sun::star::frame::status::Visibility>::get() ) { Visibility aVisibilityStatus; rEvent.State >>= aVisibilityStatus; |