diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2014-04-25 23:47:15 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2014-04-25 23:47:15 +0200 |
commit | 05cd0965487ad631d84bfb89e3c29cc342577195 (patch) | |
tree | c7dc8a3a14601907d2a179f1b11af98f7bdd5356 /sfx2 | |
parent | dc469b9d0be2e17b351169df4bf8740ce4a27321 (diff) |
Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0)
There's still a case with const sal_uInt16 which couldn't be converted
See http://nabble.documentfoundation.org/Questions-about-getCppuType-td4106361.html for more details
Change-Id: Iddc31168dba88d3ca0454fc76d31cda5f70eb5d1
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/toolbox/tbxitem.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx index 81cae6cf568c..8f87dae0a75d 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -553,26 +553,26 @@ throw ( ::com::sun::star::uno::RuntimeException, std::exception ) rEvent.State >>= nTemp ; pItem = new SfxUInt16Item( nSlotId, nTemp ); } - else if ( pType == ::getCppuType((const sal_uInt32*)0) ) + else if ( pType == cppu::UnoType<const 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<const 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<const ::com::sun::star::frame::status::ItemStatus>::get() ) { ItemStatus aItemStatus; rEvent.State >>= aItemStatus; eState = aItemStatus.State; pItem = new SfxVoidItem( nSlotId ); } - else if ( pType == ::getCppuType((const ::com::sun::star::frame::status::Visibility*)0) ) + else if ( pType == cppu::UnoType<const ::com::sun::star::frame::status::Visibility>::get() ) { Visibility aVisibilityStatus; rEvent.State >>= aVisibilityStatus; @@ -1099,26 +1099,26 @@ throw ( ::com::sun::star::uno::RuntimeException, std::exception ) rEvent.State >>= nTemp ; pItem = new SfxUInt16Item( nSlotId, nTemp ); } - else if ( pType == ::getCppuType((const sal_uInt32*)0) ) + else if ( pType == cppu::UnoType<const 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<const 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<const ::com::sun::star::frame::status::ItemStatus>::get() ) { ItemStatus aItemStatus; rEvent.State >>= aItemStatus; eState = aItemStatus.State; pItem = new SfxVoidItem( nSlotId ); } - else if ( pType == ::getCppuType((const ::com::sun::star::frame::status::Visibility*)0) ) + else if ( pType == cppu::UnoType<const ::com::sun::star::frame::status::Visibility>::get() ) { Visibility aVisibilityStatus; rEvent.State >>= aVisibilityStatus; |