From c288b17cc5a1d5051325e02a29aa40df5be6f016 Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Wed, 14 May 2014 23:17:17 +0200 Subject: Prefer cppu::UnoType::get() to ::getCppuType((T*)0) part12 Change-Id: I7c514b7a1d86f52d77672b826b1f08b825fd7aa7 --- forms/source/component/DatabaseForm.cxx | 14 +++++++------- forms/source/component/Date.cxx | 2 +- forms/source/component/ListBox.cxx | 6 +++--- forms/source/component/Time.cxx | 2 +- forms/source/component/formcontrolfont.cxx | 4 ++-- forms/source/component/refvaluecomponent.cxx | 2 +- forms/source/component/scrollbar.cxx | 2 +- forms/source/component/spinbutton.cxx | 2 +- 8 files changed, 17 insertions(+), 17 deletions(-) (limited to 'forms') diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index 64caa172e4bd..162ff6fd95f6 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -1621,7 +1621,7 @@ sal_Bool ODatabaseForm::convertFastPropertyValue( Any& rConvertedValue, Any& rOl { Any aAggregateProperty; getFastPropertyValue(aAggregateProperty, PROPERTY_ID_DATASOURCE); - bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, aAggregateProperty, ::getCppuType(static_cast(NULL))); + bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, aAggregateProperty, cppu::UnoType::get()); } break; case PROPERTY_ID_TARGET_URL: @@ -1646,7 +1646,7 @@ sal_Bool ODatabaseForm::convertFastPropertyValue( Any& rConvertedValue, Any& rOl bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_aDetailFields); break; case PROPERTY_ID_CYCLE: - bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_aCycle, ::getCppuType(static_cast(NULL))); + bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_aCycle, cppu::UnoType::get()); break; case PROPERTY_ID_NAVIGATION: bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_eNavigation); @@ -1664,13 +1664,13 @@ sal_Bool ODatabaseForm::convertFastPropertyValue( Any& rConvertedValue, Any& rOl bModified = tryPropertyValue( rConvertedValue, rOldValue, rValue, m_aDynamicControlBorder, ::getBooleanCppuType() ); break; case PROPERTY_ID_CONTROL_BORDER_COLOR_FOCUS: - bModified = tryPropertyValue( rConvertedValue, rOldValue, rValue, m_aControlBorderColorFocus, getCppuType( static_cast< sal_Int32* >( NULL ) ) ); + bModified = tryPropertyValue( rConvertedValue, rOldValue, rValue, m_aControlBorderColorFocus, cppu::UnoType::get() ); break; case PROPERTY_ID_CONTROL_BORDER_COLOR_MOUSE: - bModified = tryPropertyValue( rConvertedValue, rOldValue, rValue, m_aControlBorderColorMouse, getCppuType( static_cast< sal_Int32* >( NULL ) ) ); + bModified = tryPropertyValue( rConvertedValue, rOldValue, rValue, m_aControlBorderColorMouse, cppu::UnoType::get() ); break; case PROPERTY_ID_CONTROL_BORDER_COLOR_INVALID: - bModified = tryPropertyValue( rConvertedValue, rOldValue, rValue, m_aControlBorderColorInvalid, getCppuType( static_cast< sal_Int32* >( NULL ) ) ); + bModified = tryPropertyValue( rConvertedValue, rOldValue, rValue, m_aControlBorderColorInvalid, cppu::UnoType::get() ); break; default: if ( m_aPropertyBagHelper.hasDynamicPropertyByHandle ( nHandle ) ) @@ -4033,7 +4033,7 @@ void SAL_CALL ODatabaseForm::read(const Reference& _rxInStre if (nVersion > 1) { sal_Int32 nCycle = _rxInStream->readShort(); - m_aCycle = ::cppu::int2enum(nCycle, ::getCppuType(static_cast(NULL))); + m_aCycle = ::cppu::int2enum(nCycle, cppu::UnoType::get()); m_eNavigation = (NavigationBarMode)_rxInStream->readShort(); _rxInStream >> sAggregateProp; @@ -4051,7 +4051,7 @@ void SAL_CALL ODatabaseForm::read(const Reference& _rxInStre if (nAnyMask & CYCLE) { sal_Int32 nCycle = _rxInStream->readShort(); - m_aCycle = ::cppu::int2enum(nCycle, ::getCppuType(static_cast(NULL))); + m_aCycle = ::cppu::int2enum(nCycle, cppu::UnoType::get()); } else m_aCycle.clear(); diff --git a/forms/source/component/Date.cxx b/forms/source/component/Date.cxx index 187cd30c22e5..9ede6468514b 100644 --- a/forms/source/component/Date.cxx +++ b/forms/source/component/Date.cxx @@ -318,7 +318,7 @@ void ODateModel::resetNoBroadcast() Sequence< Type > ODateModel::getSupportedBindingTypes() { - return Sequence< Type >( &::getCppuType( static_cast< util::Date* >( NULL ) ), 1 ); + return Sequence< Type >( & cppu::UnoType::get(), 1 ); } diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx index e0c017febbb8..5931ac7e280d 100644 --- a/forms/source/component/ListBox.cxx +++ b/forms/source/component/ListBox.cxx @@ -1656,11 +1656,11 @@ namespace frm { Sequence< Type > aTypes(6); aTypes[0] = ::getCppuType( static_cast< Sequence< Any >* >( NULL ) ); - aTypes[1] = ::getCppuType( static_cast< Any* >( NULL ) ); + aTypes[1] = cppu::UnoType::get(); aTypes[2] = ::getCppuType( static_cast< Sequence< sal_Int32 >* >( NULL ) ); - aTypes[3] = ::getCppuType( static_cast< sal_Int32* >( NULL ) ); + aTypes[3] = cppu::UnoType::get(); aTypes[4] = ::getCppuType( static_cast< Sequence< OUString >* >( NULL ) ); - aTypes[5] = ::getCppuType( static_cast< OUString* >( NULL ) ); + aTypes[5] = cppu::UnoType::get(); return aTypes; } diff --git a/forms/source/component/Time.cxx b/forms/source/component/Time.cxx index 36f5e7c64ca3..87a98c591deb 100644 --- a/forms/source/component/Time.cxx +++ b/forms/source/component/Time.cxx @@ -316,7 +316,7 @@ void OTimeModel::resetNoBroadcast() Sequence< Type > OTimeModel::getSupportedBindingTypes() { - return Sequence< Type >( &::getCppuType( static_cast< util::Time* >( NULL ) ), 1 ); + return Sequence< Type >( & cppu::UnoType::get(), 1 ); } diff --git a/forms/source/component/formcontrolfont.cxx b/forms/source/component/formcontrolfont.cxx index db64e80a676e..1c8c991fefa1 100644 --- a/forms/source/component/formcontrolfont.cxx +++ b/forms/source/component/formcontrolfont.cxx @@ -259,11 +259,11 @@ namespace frm switch( _nHandle ) { case PROPERTY_ID_TEXTCOLOR: - bModified = tryPropertyValue( _rConvertedValue, _rOldValue, _rValue, m_aTextColor, ::getCppuType( static_cast< const sal_Int32* >( NULL ) ) ); + bModified = tryPropertyValue( _rConvertedValue, _rOldValue, _rValue, m_aTextColor, cppu::UnoType::get() ); break; case PROPERTY_ID_TEXTLINECOLOR: - bModified = tryPropertyValue( _rConvertedValue, _rOldValue, _rValue, m_aTextLineColor, ::getCppuType( static_cast< sal_Int32* >( NULL ) ) ); + bModified = tryPropertyValue( _rConvertedValue, _rOldValue, _rValue, m_aTextLineColor, cppu::UnoType::get() ); break; case PROPERTY_ID_FONTEMPHASISMARK: diff --git a/forms/source/component/refvaluecomponent.cxx b/forms/source/component/refvaluecomponent.cxx index 3e9b652529b1..d2562bf0cbdb 100644 --- a/forms/source/component/refvaluecomponent.cxx +++ b/forms/source/component/refvaluecomponent.cxx @@ -167,7 +167,7 @@ namespace frm aTypes.push_back( ::getCppuType( static_cast< sal_Bool* >( NULL ) ) ); if ( !m_sReferenceValue.isEmpty() ) - aTypes.push_front( ::getCppuType( static_cast< OUString* >( NULL ) ) ); + aTypes.push_front( cppu::UnoType::get() ); // push_front, because this is the preferred type Sequence< Type > aTypesRet( aTypes.size() ); diff --git a/forms/source/component/scrollbar.cxx b/forms/source/component/scrollbar.cxx index 97ad753dc730..3de7203292ca 100644 --- a/forms/source/component/scrollbar.cxx +++ b/forms/source/component/scrollbar.cxx @@ -297,7 +297,7 @@ namespace frm Sequence< Type > OScrollBarModel::getSupportedBindingTypes() { - return Sequence< Type >( &::getCppuType( static_cast< double* >( NULL ) ), 1 ); + return Sequence< Type >( & cppu::UnoType::get(), 1 ); } diff --git a/forms/source/component/spinbutton.cxx b/forms/source/component/spinbutton.cxx index 14f0efa80389..a006e9667919 100644 --- a/forms/source/component/spinbutton.cxx +++ b/forms/source/component/spinbutton.cxx @@ -253,7 +253,7 @@ namespace frm Sequence< Type > OSpinButtonModel::getSupportedBindingTypes() { - return Sequence< Type >( &::getCppuType( static_cast< double* >( NULL ) ), 1 ); + return Sequence< Type >( &cppu::UnoType::get(), 1 ); } -- cgit