From 05cd0965487ad631d84bfb89e3c29cc342577195 Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Fri, 25 Apr 2014 23:47:15 +0200 Subject: Prefer cppu::UnoType::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 --- sfx2/source/toolbox/tbxitem.cxx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'sfx2') 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::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::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::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::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::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::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::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::get() ) { Visibility aVisibilityStatus; rEvent.State >>= aVisibilityStatus; -- cgit