diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2014-05-23 22:11:27 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2014-05-23 22:11:52 +0200 |
commit | ac76cc7e605b1bc9c0ff8e24d0b9995a8247074e (patch) | |
tree | 797df8cc9387fa70a0c09e574f49714ce4dc6710 /unotools | |
parent | 3191d7d1302dbde2445b9f300b3eb853120ede65 (diff) |
Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part20
Change-Id: If87cdfb2c605254f6d69baa4ca5aec09091caa68
Diffstat (limited to 'unotools')
4 files changed, 10 insertions, 14 deletions
diff --git a/unotools/source/accessibility/accessiblerelationsethelper.cxx b/unotools/source/accessibility/accessiblerelationsethelper.cxx index 91753e43c7c6..7bdbedccc256 100644 --- a/unotools/source/accessibility/accessiblerelationsethelper.cxx +++ b/unotools/source/accessibility/accessiblerelationsethelper.cxx @@ -235,10 +235,8 @@ uno::Sequence< ::com::sun::star::uno::Type> { osl::MutexGuard aGuard (maMutex); const ::com::sun::star::uno::Type aTypeList[] = { - ::getCppuType((const uno::Reference< - XAccessibleRelationSet>*)0), - ::getCppuType((const uno::Reference< - lang::XTypeProvider>*)0) + cppu::UnoType<XAccessibleRelationSet>::get(), + cppu::UnoType<lang::XTypeProvider>::get() }; ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> aTypeSequence (aTypeList, 2); diff --git a/unotools/source/accessibility/accessiblestatesethelper.cxx b/unotools/source/accessibility/accessiblestatesethelper.cxx index d5aec78c0d8a..f37f93f19f83 100644 --- a/unotools/source/accessibility/accessiblestatesethelper.cxx +++ b/unotools/source/accessibility/accessiblestatesethelper.cxx @@ -247,10 +247,8 @@ uno::Sequence< ::com::sun::star::uno::Type> throw (::com::sun::star::uno::RuntimeException, std::exception) { const ::com::sun::star::uno::Type aTypeList[] = { - ::getCppuType((const uno::Reference< - XAccessibleStateSet>*)0), - ::getCppuType((const uno::Reference< - lang::XTypeProvider>*)0) + cppu::UnoType<XAccessibleStateSet>::get(), + cppu::UnoType<lang::XTypeProvider>::get() }; ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> aTypeSequence (aTypeList, 2); diff --git a/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx index f02b52b89d80..24f9fc2c488e 100644 --- a/unotools/source/config/lingucfg.cxx +++ b/unotools/source/config/lingucfg.cxx @@ -366,19 +366,19 @@ uno::Any SvtLinguConfigItem::GetProperty( sal_Int32 nPropertyHandle ) const case UPH_DEFAULT_LOCALE : { lang::Locale aLocale( LanguageTag::convertToLocale( rOpt.nDefaultLanguage, false) ); - aRes.setValue( &aLocale, ::getCppuType((lang::Locale*)0 )); + aRes.setValue( &aLocale, cppu::UnoType<lang::Locale>::get()); break; } case UPH_DEFAULT_LOCALE_CJK : { lang::Locale aLocale( LanguageTag::convertToLocale( rOpt.nDefaultLanguage_CJK, false) ); - aRes.setValue( &aLocale, ::getCppuType((lang::Locale*)0 )); + aRes.setValue( &aLocale, cppu::UnoType<lang::Locale>::get()); break; } case UPH_DEFAULT_LOCALE_CTL : { lang::Locale aLocale( LanguageTag::convertToLocale( rOpt.nDefaultLanguage_CTL, false) ); - aRes.setValue( &aLocale, ::getCppuType((lang::Locale*)0 )); + aRes.setValue( &aLocale, cppu::UnoType<lang::Locale>::get()); break; } case UPH_IS_IGNORE_POST_POSITIONAL_WORD : pbVal = &rOpt.bIsIgnorePostPositionalWord; break; @@ -676,8 +676,8 @@ bool SvtLinguConfigItem::SaveOptions( const uno::Sequence< OUString > &rProperyN bool bRet = false; const uno::Type &rBOOL = ::getBooleanCppuType(); - const uno::Type &rINT16 = ::getCppuType( (sal_Int16 *) NULL ); - const uno::Type &rINT32 = ::getCppuType( (sal_Int32 *) NULL ); + const uno::Type &rINT16 = cppu::UnoType<sal_Int16>::get(); + const uno::Type &rINT32 = cppu::UnoType<sal_Int32>::get(); sal_Int32 nProps = rProperyNames.getLength(); uno::Sequence< uno::Any > aValues( nProps ); diff --git a/unotools/source/ucbhelper/xtempfile.cxx b/unotools/source/ucbhelper/xtempfile.cxx index d162e97e78aa..9c197cdf59d1 100644 --- a/unotools/source/ucbhelper/xtempfile.cxx +++ b/unotools/source/ucbhelper/xtempfile.cxx @@ -82,7 +82,7 @@ throw ( css::uno::RuntimeException, std::exception ) if ( pTypeCollection == NULL ) { static ::cppu::OTypeCollection aTypeCollection( - ::getCppuType( ( const css::uno::Reference< css::beans::XPropertySet >*)NULL ) + cppu::UnoType<css::beans::XPropertySet>::get() ,OTempFileBase::getTypes() ); pTypeCollection = &aTypeCollection; } |