[Libreoffice-commits] core.git: chart2/source sfx2/source
Julien Nabet
serval2412 at yahoo.fr
Mon May 5 14:25:31 PDT 2014
chart2/source/tools/ObjectIdentifier.cxx | 4 ++--
chart2/source/tools/RangeHighlighter.cxx | 6 +++---
sfx2/source/control/querystatus.cxx | 10 +++++-----
sfx2/source/control/statcach.cxx | 6 +++---
sfx2/source/statbar/stbitem.cxx | 8 ++++----
sfx2/source/toolbox/tbxitem.cxx | 20 ++++++++++----------
6 files changed, 27 insertions(+), 27 deletions(-)
New commits:
commit ebd4986c3495239f09510f2c0c79b6e30acda83e
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Mon May 5 23:24:25 2014 +0200
Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part2
Change-Id: Ibca921eff3647507ffb7e9011a84aeefbec58d7a
diff --git a/chart2/source/tools/ObjectIdentifier.cxx b/chart2/source/tools/ObjectIdentifier.cxx
index c681b86..9edbdf0 100644
--- a/chart2/source/tools/ObjectIdentifier.cxx
+++ b/chart2/source/tools/ObjectIdentifier.cxx
@@ -259,11 +259,11 @@ ObjectIdentifier::ObjectIdentifier( const Any& rAny )
,m_xAdditionalShape( 0 )
{
const uno::Type& rType = rAny.getValueType();
- if ( rType == ::getCppuType( static_cast< const OUString* >( 0 ) ) )
+ if ( rType == cppu::UnoType<OUString>::get() )
{
rAny >>= m_aObjectCID;
}
- else if ( rType == ::getCppuType( static_cast< const Reference< drawing::XShape >* >( 0 ) ) )
+ else if ( rType == cppu::UnoType< drawing::XShape >::get() )
{
rAny >>= m_xAdditionalShape;
}
diff --git a/chart2/source/tools/RangeHighlighter.cxx b/chart2/source/tools/RangeHighlighter.cxx
index 6a865a1..cc7e431 100644
--- a/chart2/source/tools/RangeHighlighter.cxx
+++ b/chart2/source/tools/RangeHighlighter.cxx
@@ -97,7 +97,7 @@ void RangeHighlighter::determineRanges()
uno::Any aSelection( m_xSelectionSupplier->getSelection());
const uno::Type& rType = aSelection.getValueType();
- if ( rType == ::getCppuType( static_cast< const OUString* >( 0 ) ) )
+ if ( rType == cppu::UnoType<OUString>::get() )
{
// @todo??: maybe getSelection() should return a model object rather than a CID
@@ -164,7 +164,7 @@ void RangeHighlighter::determineRanges()
}
}
}
- else if ( rType == ::getCppuType( static_cast< const Reference< drawing::XShape >* >( 0 ) ) )
+ else if ( rType == cppu::UnoType< drawing::XShape >::get() )
{
// #i12587# support for shapes in chart
Reference< drawing::XShape > xShape;
@@ -336,7 +336,7 @@ void SAL_CALL RangeHighlighter::selectionChanged( const lang::EventObject& /*aEv
void RangeHighlighter::fireSelectionEvent()
{
::cppu::OInterfaceContainerHelper* pIC = rBHelper.getContainer(
- ::getCppuType((const uno::Reference< view::XSelectionChangeListener >*)0) );
+ cppu::UnoType< view::XSelectionChangeListener >::get() );
if( pIC )
{
lang::EventObject aEvent( static_cast< lang::XComponent* >( this ) );
diff --git a/sfx2/source/control/querystatus.cxx b/sfx2/source/control/querystatus.cxx
index ef03199..f9fa487 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 fcc7e7f..6b5b509 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 9805c80..549b46f 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 8f87dae..bb1be33 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;
More information about the Libreoffice-commits
mailing list