Kaydet (Commit) 05cd0965 authored tarafından Julien Nabet's avatar Julien Nabet

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
üst dc469b9d
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment