From 745a094a37e029afcf34ad1cf82b14f80062163f Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Sat, 17 May 2014 23:32:29 +0200 Subject: Prefer cppu::UnoType::get() to ::getCppuType((T*)0) part15 Change-Id: I38e855966598342eb2352e70e04f7a5e09e54f83 --- sd/source/filter/eppt/pptx-text.cxx | 2 +- sd/source/filter/xml/sdxmlwrp.cxx | 2 +- sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx | 10 +++++----- sd/source/ui/unoidl/unomodel.cxx | 6 +++--- sd/source/ui/unoidl/unoobj.cxx | 8 ++++---- sd/source/ui/unoidl/unopage.cxx | 2 +- sd/source/ui/unoidl/unopback.cxx | 4 ++-- 7 files changed, 17 insertions(+), 17 deletions(-) (limited to 'sd') diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx index e2cd4b66c2cb..9980d846c3d6 100644 --- a/sd/source/filter/eppt/pptx-text.cxx +++ b/sd/source/filter/eppt/pptx-text.cxx @@ -853,7 +853,7 @@ void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider& rBuProv, sal_Int1 aGraphicURL = ( *(OUString*)pValue ); else if ( aPropName == "GraphicSize" ) { - if ( pPropValue[ i ].Value.getValueType() == ::getCppuType( (::com::sun::star::awt::Size*)0) ) + if ( pPropValue[ i ].Value.getValueType() == cppu::UnoType::get()) { // don't cast awt::Size to Size as on 64-bits they are not the same. ::com::sun::star::awt::Size aSize; diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx index 3a9255818d94..1befad1fd752 100644 --- a/sd/source/filter/xml/sdxmlwrp.cxx +++ b/sd/source/filter/xml/sdxmlwrp.cxx @@ -445,7 +445,7 @@ bool SdXMLFilter::Import( ErrCode& nError ) { OUString("ProgressMax"), 0, ::cppu::UnoType::get(), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0}, { OUString("ProgressCurrent"), 0, ::cppu::UnoType::get(), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0}, { OUString("Preview"), 0, ::cppu::UnoType::get(), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0}, - { OUString("PageLayouts"), 0, ::getCppuType((const uno::Reference< container::XNameAccess >*)0), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0}, + { OUString("PageLayouts"), 0, cppu::UnoType::get(), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0}, { OUString("PrivateData"), 0, ::getCppuType( (Reference *)0 ), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0 }, diff --git a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx index ef184b82e3c3..1bede88c285c 100644 --- a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx +++ b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx @@ -502,15 +502,15 @@ OUString SAL_CALL // ...and add the additional type for the component, ... const uno::Type aLangEventListenerType = - ::getCppuType((const uno::Reference*)0); + cppu::UnoType::get(); const uno::Type aPropertyChangeListenerType = - ::getCppuType((const uno::Reference*)0); + cppu::UnoType::get(); const uno::Type aWindowListenerType = - ::getCppuType((const uno::Reference*)0); + cppu::UnoType::get(); const uno::Type aFocusListenerType = - ::getCppuType((const uno::Reference*)0); + cppu::UnoType::get(); const uno::Type aEventBroadcaster = - ::getCppuType((const uno::Reference*)0); + cppu::UnoType::get(); // ... and merge them all into one list. sal_Int32 nTypeCount (aTypeList.getLength()), diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index a6688696cdda..e8d243ffe746 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -187,11 +187,11 @@ const SvxItemPropertySet* ImplGetDrawModelPropertySet() { OUString(sUNO_Prop_TabStop), WID_MODEL_TABSTOP, ::cppu::UnoType::get(), 0, 0}, { OUString(sUNO_Prop_VisibleArea), WID_MODEL_VISAREA, ::cppu::UnoType::get(), 0, 0}, { OUString(sUNO_Prop_MapUnit), WID_MODEL_MAPUNIT, ::cppu::UnoType::get(), beans::PropertyAttribute::READONLY, 0}, - { OUString(sUNO_Prop_ForbiddenCharacters), WID_MODEL_FORBCHARS, ::getCppuType((const uno::Reference< i18n::XForbiddenCharacters > *)0), beans::PropertyAttribute::READONLY, 0}, + { OUString(sUNO_Prop_ForbiddenCharacters), WID_MODEL_FORBCHARS, cppu::UnoType::get(), beans::PropertyAttribute::READONLY, 0}, { OUString(sUNO_Prop_AutomContFocus), WID_MODEL_CONTFOCUS, ::getBooleanCppuType(), 0, 0}, { OUString(sUNO_Prop_ApplyFrmDsgnMode), WID_MODEL_DSGNMODE, ::getBooleanCppuType(), 0, 0}, - { OUString("BasicLibraries"), WID_MODEL_BASICLIBS, ::getCppuType((const uno::Reference< script::XLibraryContainer > *)0), beans::PropertyAttribute::READONLY, 0}, - { OUString("DialogLibraries"), WID_MODEL_DIALOGLIBS, ::getCppuType((const uno::Reference< script::XLibraryContainer > *)0), beans::PropertyAttribute::READONLY, 0}, + { OUString("BasicLibraries"), WID_MODEL_BASICLIBS, cppu::UnoType::get(), beans::PropertyAttribute::READONLY, 0}, + { OUString("DialogLibraries"), WID_MODEL_DIALOGLIBS, cppu::UnoType::get(), beans::PropertyAttribute::READONLY, 0}, { OUString(sUNO_Prop_RuntimeUID), WID_MODEL_RUNTIMEUID, ::cppu::UnoType::get(), beans::PropertyAttribute::READONLY, 0}, { OUString(sUNO_Prop_HasValidSignatures), WID_MODEL_HASVALIDSIGNATURES, ::cppu::UnoType::get(), beans::PropertyAttribute::READONLY, 0}, { OUString("Fonts"), WID_MODEL_FONTS, ::getCppuType((uno::Sequence*)0), beans::PropertyAttribute::READONLY, 0}, diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx index 5de5206d110b..a28043c24c24 100644 --- a/sd/source/ui/unoidl/unoobj.cxx +++ b/sd/source/ui/unoidl/unoobj.cxx @@ -161,7 +161,7 @@ static SdTypesCache gImplTypesCache; static const SfxItemPropertyMapEntry aImpress_SdXShapePropertyGraphicMap_Impl[] = { - { OUString("ImageMap"), WID_IMAGEMAP, ::getCppuType((const uno::Reference< container::XIndexContainer >*)0), 0, 0 }, + { OUString("ImageMap"), WID_IMAGEMAP, cppu::UnoType::get(), 0, 0 }, IMPRESS_MAP_ENTRIES }; return aImpress_SdXShapePropertyGraphicMap_Impl; @@ -196,7 +196,7 @@ static SdTypesCache gImplTypesCache; { static const SfxItemPropertyMapEntry aDraw_SdXShapePropertyGraphicMap_Impl[] = { - { OUString("ImageMap"), WID_IMAGEMAP, ::getCppuType((const uno::Reference< container::XIndexContainer >*)0), 0, 0 }, + { OUString("ImageMap"), WID_IMAGEMAP, cppu::UnoType::get(), 0, 0 }, DRAW_MAP_ENTRIES }; return aDraw_SdXShapePropertyGraphicMap_Impl; @@ -343,7 +343,7 @@ bool SdXShape::queryAggregation( const com::sun::star::uno::Type & rType, com::s { if( mpModel && mpModel ->IsImpressDocument() ) { - if( rType == ::getCppuType(( const uno::Reference< document::XEventsSupplier >*)0) ) + if( rType == cppu::UnoType::get()) { aAny <<= uno::Reference< document::XEventsSupplier >(this); return true; @@ -370,7 +370,7 @@ uno::Sequence< uno::Type > SAL_CALL SdXShape::getTypes() pTypes = new uno::Sequence< uno::Type >( mpShape->_getTypes() ); sal_uInt32 nCount = pTypes->getLength(); pTypes->realloc( nCount+1 ); - (*pTypes)[nCount] = ::getCppuType((const uno::Reference< lang::XTypeProvider>*)0); + (*pTypes)[nCount] = cppu::UnoType::get(); gImplTypesCache[ nObjId ] = pTypes; } diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index 35fcd9aefbd7..ebc9d65c9f53 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -160,7 +160,7 @@ const SvxItemPropertySet* ImplGetDrawPagePropertySet( bool bImpress, PageKind eP { OUString(UNO_NAME_PAGE_NUMBER), WID_PAGE_NUMBER, ::cppu::UnoType::get(), beans::PropertyAttribute::READONLY, 0}, \ { OUString(UNO_NAME_PAGE_ORIENTATION), WID_PAGE_ORIENT, ::cppu::UnoType::get(),0, 0}, \ { OUString(UNO_NAME_PAGE_WIDTH), WID_PAGE_WIDTH, ::cppu::UnoType::get(), 0, 0}, \ - { OUString(sUNO_Prop_UserDefinedAttributes),WID_PAGE_USERATTRIBS, ::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >*)0) , 0, 0},\ + { OUString(sUNO_Prop_UserDefinedAttributes),WID_PAGE_USERATTRIBS, cppu::UnoType::get(), 0, 0},\ { OUString("IsHeaderVisible"), WID_PAGE_HEADERVISIBLE, ::getBooleanCppuType(), 0, 0}, \ { OUString("HeaderText"), WID_PAGE_HEADERTEXT, ::cppu::UnoType::get(), 0, 0}, \ { OUString("IsBackgroundDark"), WID_PAGE_ISDARK, ::getBooleanCppuType(), beans::PropertyAttribute::READONLY, 0}, \ diff --git a/sd/source/ui/unoidl/unopback.cxx b/sd/source/ui/unoidl/unopback.cxx index d8702759a6ce..399d363f2c33 100644 --- a/sd/source/ui/unoidl/unopback.cxx +++ b/sd/source/ui/unoidl/unopback.cxx @@ -152,8 +152,8 @@ void SdUnoPageBackground::fillItemSet( SdDrawDocument* pDoc, SfxItemSet& rSet ) break; case XATTR_FILLBITMAP : { - if ( ( ( pAny->getValueType() == ::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XBitmap >*)0) ) || - ( pAny->getValueType() == ::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic >*)0) ) ) && + if ( ( ( pAny->getValueType() == cppu::UnoType::get()) || + ( pAny->getValueType() == cppu::UnoType::get()) ) && ( aIt->nMemberId == MID_BITMAP ) ) { setPropertyValue( aPropertyName, *pAny ); -- cgit