summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2014-05-20 23:29:28 +0200
committerJulien Nabet <serval2412@yahoo.fr>2014-05-20 23:29:53 +0200
commit227af32d8c6d5e3649c83fcdb274298bc7faa294 (patch)
tree8490a6c94094d1fbf5a190a911070c3142d3cca7 /sfx2
parent0f836296ea3cdc10326ad54983b634168285b8e2 (diff)
Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part18
Change-Id: Ibf958dbfbf7cdbe6ad31d390138be8d4d468c225
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/dialog/backingcomp.cxx14
-rw-r--r--sfx2/source/doc/iframe.cxx8
-rw-r--r--sfx2/source/doc/plugin.cxx4
-rw-r--r--sfx2/source/doc/printhelper.cxx8
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx58
-rw-r--r--sfx2/source/sidebar/Theme.cxx10
-rw-r--r--sfx2/source/view/sfxbasecontroller.cxx10
7 files changed, 56 insertions, 56 deletions
diff --git a/sfx2/source/dialog/backingcomp.cxx b/sfx2/source/dialog/backingcomp.cxx
index 355a37357fdf..4a3d45ff90c0 100644
--- a/sfx2/source/dialog/backingcomp.cxx
+++ b/sfx2/source/dialog/backingcomp.cxx
@@ -268,13 +268,13 @@ css::uno::Sequence< css::uno::Type > SAL_CALL BackingComp::getTypes()
lWindowTypes = xProvider->getTypes();
static ::cppu::OTypeCollection aTypeCollection(
- ::getCppuType((const ::com::sun::star::uno::Reference< css::lang::XInitialization >*)NULL ),
- ::getCppuType((const ::com::sun::star::uno::Reference< css::lang::XTypeProvider >*)NULL ),
- ::getCppuType((const ::com::sun::star::uno::Reference< css::lang::XServiceInfo >*)NULL ),
- ::getCppuType((const ::com::sun::star::uno::Reference< css::frame::XController >*)NULL ),
- ::getCppuType((const ::com::sun::star::uno::Reference< css::lang::XComponent >*)NULL ),
- ::getCppuType((const ::com::sun::star::uno::Reference< css::frame::XDispatchProvider >*)NULL ),
- ::getCppuType((const ::com::sun::star::uno::Reference< css::frame::XDispatch >*)NULL ),
+ cppu::UnoType<css::lang::XInitialization>::get(),
+ cppu::UnoType<css::lang::XTypeProvider>::get(),
+ cppu::UnoType<css::lang::XServiceInfo>::get(),
+ cppu::UnoType<css::frame::XController>::get(),
+ cppu::UnoType<css::lang::XComponent>::get(),
+ cppu::UnoType<css::frame::XDispatchProvider>::get(),
+ cppu::UnoType<css::frame::XDispatch>::get(),
lWindowTypes);
pTypeCollection = &aTypeCollection;
diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx
index c0631e0e8bb5..bfa748502772 100644
--- a/sfx2/source/doc/iframe.cxx
+++ b/sfx2/source/doc/iframe.cxx
@@ -143,10 +143,10 @@ const SfxItemPropertyMapEntry* lcl_GetIFramePropertyMap_Impl()
{ OUString("FrameIsAutoScroll"), WID_FRAME_IS_AUTO_SCROLL, ::getBooleanCppuType(), PROPERTY_UNBOUND, 0 },
{ OUString("FrameIsBorder"), WID_FRAME_IS_BORDER, ::getBooleanCppuType(), PROPERTY_UNBOUND, 0 },
{ OUString("FrameIsScrollingMode"), WID_FRAME_IS_SCROLLING_MODE,::getBooleanCppuType(), PROPERTY_UNBOUND, 0 },
- { OUString("FrameMarginHeight"), WID_FRAME_MARGIN_HEIGHT, ::getCppuType( (sal_Int32*)0 ), PROPERTY_UNBOUND, 0 },
- { OUString("FrameMarginWidth"), WID_FRAME_MARGIN_WIDTH, ::getCppuType( (sal_Int32*)0 ), PROPERTY_UNBOUND, 0 },
- { OUString("FrameName"), WID_FRAME_NAME, ::getCppuType((const OUString*)0), PROPERTY_UNBOUND, 0 },
- { OUString("FrameURL"), WID_FRAME_URL, ::getCppuType((const OUString*)0), PROPERTY_UNBOUND, 0 },
+ { OUString("FrameMarginHeight"), WID_FRAME_MARGIN_HEIGHT, cppu::UnoType<sal_Int32>::get(), PROPERTY_UNBOUND, 0 },
+ { OUString("FrameMarginWidth"), WID_FRAME_MARGIN_WIDTH, cppu::UnoType<sal_Int32>::get(), PROPERTY_UNBOUND, 0 },
+ { OUString("FrameName"), WID_FRAME_NAME, cppu::UnoType<OUString>::get(), PROPERTY_UNBOUND, 0 },
+ { OUString("FrameURL"), WID_FRAME_URL, cppu::UnoType<OUString>::get(), PROPERTY_UNBOUND, 0 },
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
return aIFramePropertyMap_Impl;
diff --git a/sfx2/source/doc/plugin.cxx b/sfx2/source/doc/plugin.cxx
index a1743fdd16d5..51ce5b185bea 100644
--- a/sfx2/source/doc/plugin.cxx
+++ b/sfx2/source/doc/plugin.cxx
@@ -73,8 +73,8 @@ const SfxItemPropertyMapEntry* lcl_GetPluginPropertyMap_Impl()
static const SfxItemPropertyMapEntry aPluginPropertyMap_Impl[] =
{
{ OUString("PluginCommands"), WID_COMMANDS, ::getCppuType((::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >*)0), PROPERTY_UNBOUND, 0},
- { OUString("PluginMimeType"), WID_MIMETYPE, ::getCppuType((const OUString*)0), PROPERTY_UNBOUND, 0 },
- { OUString("PluginURL"), WID_URL , ::getCppuType((const OUString*)0), PROPERTY_UNBOUND, 0 },
+ { OUString("PluginMimeType"), WID_MIMETYPE, cppu::UnoType<OUString>::get(), PROPERTY_UNBOUND, 0 },
+ { OUString("PluginURL"), WID_URL , cppu::UnoType<OUString>::get(), PROPERTY_UNBOUND, 0 },
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
return aPluginPropertyMap_Impl;
diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx
index e87d2a7ddf34..87e2ca8675ae 100644
--- a/sfx2/source/doc/printhelper.cxx
+++ b/sfx2/source/doc/printhelper.cxx
@@ -623,7 +623,7 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< beans::PropertyValue >&
// unpack th URL and check for a valid and well known protocol
OUString sTemp;
if (
- ( rProp.Value.getValueType()!=::getCppuType((const OUString*)0)) ||
+ ( rProp.Value.getValueType()!=cppu::UnoType<OUString>::get()) ||
(!(rProp.Value>>=sTemp))
)
{
@@ -807,7 +807,7 @@ void IMPL_PrintListener_DataContainer::Notify( SfxBroadcaster& rBC, const SfxHin
}
::cppu::OInterfaceContainerHelper* pContainer = m_aInterfaceContainer.getContainer(
- ::getCppuType( ( const uno::Reference< view::XPrintJobListener >*) NULL ) );
+ cppu::UnoType<view::XPrintJobListener>::get());
if ( !pContainer )
return;
@@ -823,13 +823,13 @@ void IMPL_PrintListener_DataContainer::Notify( SfxBroadcaster& rBC, const SfxHin
void SAL_CALL SfxPrintHelper::addPrintJobListener( const ::com::sun::star::uno::Reference< ::com::sun::star::view::XPrintJobListener >& xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- m_pData->m_aInterfaceContainer.addInterface( ::getCppuType((const uno::Reference < view::XPrintJobListener>*)0), xListener );
+ m_pData->m_aInterfaceContainer.addInterface( cppu::UnoType<view::XPrintJobListener>::get(), xListener );
}
void SAL_CALL SfxPrintHelper::removePrintJobListener( const ::com::sun::star::uno::Reference< ::com::sun::star::view::XPrintJobListener >& xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- m_pData->m_aInterfaceContainer.removeInterface( ::getCppuType((const uno::Reference < view::XPrintJobListener>*)0), xListener );
+ m_pData->m_aInterfaceContainer.removeInterface( cppu::UnoType<view::XPrintJobListener>::get(), xListener );
}
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index b50afe1ea866..40ab2128492f 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -333,7 +333,7 @@ void SAL_CALL SfxPrintHelperListener_Impl::disposing( const lang::EventObject& )
void SAL_CALL SfxPrintHelperListener_Impl::printJobEvent( const view::PrintJobEvent& rEvent ) throw (RuntimeException, std::exception)
{
- ::cppu::OInterfaceContainerHelper* pContainer = m_pData->m_aInterfaceContainer.getContainer( ::getCppuType( ( const Reference< view::XPrintJobListener >*) NULL ) );
+ ::cppu::OInterfaceContainerHelper* pContainer = m_pData->m_aInterfaceContainer.getContainer( cppu::UnoType<view::XPrintJobListener>::get());
if ( pContainer!=NULL )
{
::cppu::OInterfaceIteratorHelper pIterator(*pContainer);
@@ -802,7 +802,7 @@ void SAL_CALL SfxBaseModel::addEventListener( const Reference< lang::XEventListe
throw(RuntimeException, std::exception)
{
SfxModelGuard aGuard( *this, SfxModelGuard::E_INITIALIZING );
- m_pData->m_aInterfaceContainer.addInterface( ::getCppuType((const Reference< lang::XEventListener >*)0), aListener );
+ m_pData->m_aInterfaceContainer.addInterface( cppu::UnoType<lang::XEventListener>::get(), aListener );
}
@@ -813,7 +813,7 @@ void SAL_CALL SfxBaseModel::removeEventListener( const Reference< lang::XEventLi
throw(RuntimeException, std::exception)
{
SfxModelGuard aGuard( *this, SfxModelGuard::E_INITIALIZING );
- m_pData->m_aInterfaceContainer.removeInterface( ::getCppuType((const Reference< lang::XEventListener >*)0), aListener );
+ m_pData->m_aInterfaceContainer.removeInterface( cppu::UnoType<lang::XEventListener>::get(), aListener );
}
void
@@ -859,11 +859,11 @@ void SAL_CALL SfxBaseModel::disposing( const lang::EventObject& aObject )
Reference< document::XEventListener > xDocListener( aObject.Source, UNO_QUERY );
if ( xMod.is() )
- m_pData->m_aInterfaceContainer.removeInterface( ::getCppuType((const Reference< util::XModifyListener >*)0), xMod );
+ m_pData->m_aInterfaceContainer.removeInterface( cppu::UnoType<util::XModifyListener>::get(), xMod );
else if ( xListener.is() )
- m_pData->m_aInterfaceContainer.removeInterface( ::getCppuType((const Reference< lang::XEventListener >*)0), xListener );
+ m_pData->m_aInterfaceContainer.removeInterface( cppu::UnoType<lang::XEventListener>::get(), xListener );
else if ( xDocListener.is() )
- m_pData->m_aInterfaceContainer.removeInterface( ::getCppuType((const Reference< document::XEventListener >*)0), xListener );
+ m_pData->m_aInterfaceContainer.removeInterface( cppu::UnoType<document::XEventListener>::get(), xListener );
}
@@ -1337,7 +1337,7 @@ void SAL_CALL SfxBaseModel::addModifyListener(const Reference< util::XModifyList
{
SfxModelGuard aGuard( *this, SfxModelGuard::E_INITIALIZING );
- m_pData->m_aInterfaceContainer.addInterface( ::getCppuType((const Reference< util::XModifyListener >*)0),xListener );
+ m_pData->m_aInterfaceContainer.addInterface( cppu::UnoType<util::XModifyListener>::get(),xListener );
}
@@ -1348,7 +1348,7 @@ void SAL_CALL SfxBaseModel::removeModifyListener(const Reference< util::XModifyL
{
SfxModelGuard aGuard( *this );
- m_pData->m_aInterfaceContainer.removeInterface( ::getCppuType((const Reference< util::XModifyListener >*)0), xListener );
+ m_pData->m_aInterfaceContainer.removeInterface( cppu::UnoType<util::XModifyListener>::get(), xListener );
}
@@ -1363,7 +1363,7 @@ void SAL_CALL SfxBaseModel::close( sal_Bool bDeliverOwnership ) throw (util::Clo
Reference< XInterface > xSelfHold( static_cast< ::cppu::OWeakObject* >(this) );
lang::EventObject aSource (static_cast< ::cppu::OWeakObject*>(this));
- ::cppu::OInterfaceContainerHelper* pContainer = m_pData->m_aInterfaceContainer.getContainer( ::getCppuType( ( const Reference< util::XCloseListener >*) NULL ) );
+ ::cppu::OInterfaceContainerHelper* pContainer = m_pData->m_aInterfaceContainer.getContainer( cppu::UnoType<util::XCloseListener>::get());
if (pContainer!=NULL)
{
::cppu::OInterfaceIteratorHelper pIterator(*pContainer);
@@ -1391,7 +1391,7 @@ void SAL_CALL SfxBaseModel::close( sal_Bool bDeliverOwnership ) throw (util::Clo
// no own objections against closing!
m_pData->m_bClosing = true;
- pContainer = m_pData->m_aInterfaceContainer.getContainer( ::getCppuType( ( const Reference< util::XCloseListener >*) NULL ) );
+ pContainer = m_pData->m_aInterfaceContainer.getContainer( cppu::UnoType<util::XCloseListener>::get());
if (pContainer!=NULL)
{
::cppu::OInterfaceIteratorHelper pCloseIterator(*pContainer);
@@ -1422,7 +1422,7 @@ void SAL_CALL SfxBaseModel::addCloseListener( const Reference< util::XCloseListe
{
SfxModelGuard aGuard( *this, SfxModelGuard::E_INITIALIZING );
- m_pData->m_aInterfaceContainer.addInterface( ::getCppuType((const Reference< util::XCloseListener >*)0), xListener );
+ m_pData->m_aInterfaceContainer.addInterface( cppu::UnoType<util::XCloseListener>::get(), xListener );
}
@@ -1433,7 +1433,7 @@ void SAL_CALL SfxBaseModel::removeCloseListener( const Reference< util::XCloseLi
{
SfxModelGuard aGuard( *this );
- m_pData->m_aInterfaceContainer.removeInterface( ::getCppuType((const Reference< util::XCloseListener >*)0), xListener );
+ m_pData->m_aInterfaceContainer.removeInterface( cppu::UnoType<util::XCloseListener>::get(), xListener );
}
@@ -2058,7 +2058,7 @@ Any SAL_CALL SfxBaseModel::getTransferData( const datatransfer::DataFlavor& aFla
}
}
else if ( GraphicHelper::supportsMetaFileHandle_Impl()
- && aFlavor.DataType == getCppuType( (const sal_uInt64*) 0 ) )
+ && aFlavor.DataType == cppu::UnoType<sal_uInt64>::get())
{
::boost::shared_ptr<GDIMetaFile> pMetaFile =
m_pData->m_pObjectShell->GetPreviewMetaFile( true );
@@ -2094,7 +2094,7 @@ Any SAL_CALL SfxBaseModel::getTransferData( const datatransfer::DataFlavor& aFla
}
}
else if ( GraphicHelper::supportsMetaFileHandle_Impl()
- && aFlavor.DataType == getCppuType( (const sal_uInt64*) 0 ) )
+ && aFlavor.DataType == cppu::UnoType<sal_uInt64>::get())
{
// means HGLOBAL handler to memory storage containing METAFILEPICT structure
@@ -2225,12 +2225,12 @@ Sequence< datatransfer::DataFlavor > SAL_CALL SfxBaseModel::getTransferDataFlavo
aFlavorSeq[8].MimeType =
OUString( "application/x-openoffice-emf;windows_formatname=\"Image EMF\"" );
aFlavorSeq[8].HumanPresentableName = "Enhanced Windows MetaFile";
- aFlavorSeq[8].DataType = getCppuType( (const sal_uInt64*) 0 );
+ aFlavorSeq[8].DataType = cppu::UnoType<sal_uInt64>::get();
aFlavorSeq[9].MimeType =
OUString( "application/x-openoffice-wmf;windows_formatname=\"Image WMF\"" );
aFlavorSeq[9].HumanPresentableName = "Windows MetaFile";
- aFlavorSeq[9].DataType = getCppuType( (const sal_uInt64*) 0 );
+ aFlavorSeq[9].DataType = cppu::UnoType<sal_uInt64>::get();
}
return aFlavorSeq;
@@ -2261,7 +2261,7 @@ sal_Bool SAL_CALL SfxBaseModel::isDataFlavorSupported( const datatransfer::DataF
if ( aFlavor.DataType == getCppuType( (const Sequence< sal_Int8 >*) 0 ) )
return sal_True;
else if ( GraphicHelper::supportsMetaFileHandle_Impl()
- && aFlavor.DataType == getCppuType( (const sal_uInt64*) 0 ) )
+ && aFlavor.DataType == cppu::UnoType<sal_uInt64>::get())
return sal_True;
}
else if ( aFlavor.MimeType == "application/x-openoffice-wmf;windows_formatname=\"Image WMF\"" )
@@ -2269,7 +2269,7 @@ sal_Bool SAL_CALL SfxBaseModel::isDataFlavorSupported( const datatransfer::DataF
if ( aFlavor.DataType == getCppuType( (const Sequence< sal_Int8 >*) 0 ) )
return sal_True;
else if ( GraphicHelper::supportsMetaFileHandle_Impl()
- && aFlavor.DataType == getCppuType( (const sal_uInt64*) 0 ) )
+ && aFlavor.DataType == cppu::UnoType<sal_uInt64>::get())
return sal_True;
}
else if ( aFlavor.MimeType == "application/x-openoffice-objectdescriptor-xml;windows_formatname=\"Star Object Descriptor (XML)\"" )
@@ -2390,7 +2390,7 @@ void SAL_CALL SfxBaseModel::addEventListener( const Reference< document::XEventL
{
SfxModelGuard aGuard( *this, SfxModelGuard::E_INITIALIZING );
- m_pData->m_aInterfaceContainer.addInterface( ::getCppuType((const Reference< document::XEventListener >*)0), aListener );
+ m_pData->m_aInterfaceContainer.addInterface( cppu::UnoType<document::XEventListener>::get(), aListener );
}
@@ -2401,7 +2401,7 @@ void SAL_CALL SfxBaseModel::removeEventListener( const Reference< document::XEve
{
SfxModelGuard aGuard( *this );
- m_pData->m_aInterfaceContainer.removeInterface( ::getCppuType((const Reference< document::XEventListener >*)0), aListener );
+ m_pData->m_aInterfaceContainer.removeInterface( cppu::UnoType<document::XEventListener>::get(), aListener );
}
@@ -2412,7 +2412,7 @@ void SAL_CALL SfxBaseModel::addDocumentEventListener( const Reference< document:
throw ( RuntimeException, std::exception )
{
SfxModelGuard aGuard( *this, SfxModelGuard::E_INITIALIZING );
- m_pData->m_aInterfaceContainer.addInterface( ::getCppuType((const Reference< document::XDocumentEventListener >*)0), aListener );
+ m_pData->m_aInterfaceContainer.addInterface( cppu::UnoType<document::XDocumentEventListener>::get(), aListener );
}
@@ -2420,7 +2420,7 @@ void SAL_CALL SfxBaseModel::removeDocumentEventListener( const Reference< docume
throw ( RuntimeException, std::exception )
{
SfxModelGuard aGuard( *this );
- m_pData->m_aInterfaceContainer.removeInterface( ::getCppuType((const Reference< document::XDocumentEventListener >*)0), aListener );
+ m_pData->m_aInterfaceContainer.removeInterface( cppu::UnoType<document::XDocumentEventListener>::get(), aListener );
}
@@ -2834,7 +2834,7 @@ void SfxBaseModel::Notify( SfxBroadcaster& rBC ,
void SfxBaseModel::NotifyModifyListeners_Impl() const
{
- ::cppu::OInterfaceContainerHelper* pIC = m_pData->m_aInterfaceContainer.getContainer( ::getCppuType((const Reference< util::XModifyListener >*)0) );
+ ::cppu::OInterfaceContainerHelper* pIC = m_pData->m_aInterfaceContainer.getContainer( cppu::UnoType<util::XModifyListener>::get());
if ( pIC )
{
lang::EventObject aEvent( (frame::XModel *)this );
@@ -3164,7 +3164,7 @@ void SfxBaseModel::postEvent_Impl( const OUString& aName, const Reference< frame
return;
::cppu::OInterfaceContainerHelper* pIC =
- m_pData->m_aInterfaceContainer.getContainer( ::getCppuType( (const Reference< document::XDocumentEventListener >*)0 ) );
+ m_pData->m_aInterfaceContainer.getContainer( cppu::UnoType<document::XDocumentEventListener>::get());
if ( pIC )
{
SAL_INFO("sfx.doc", "SfxDocumentEvent: " + aName);
@@ -3177,7 +3177,7 @@ void SfxBaseModel::postEvent_Impl( const OUString& aName, const Reference< frame
aDocumentEvent ) );
}
- pIC = m_pData->m_aInterfaceContainer.getContainer( ::getCppuType( (const Reference< document::XEventListener >*)0 ) );
+ pIC = m_pData->m_aInterfaceContainer.getContainer( cppu::UnoType<document::XEventListener>::get());
if ( pIC )
{
SAL_INFO("sfx.doc", "SfxEvent: " + aName);
@@ -3250,7 +3250,7 @@ void SfxBaseModel::notifyEvent( const document::EventObject& aEvent ) const
return;
::cppu::OInterfaceContainerHelper* pIC = m_pData->m_aInterfaceContainer.getContainer(
- ::getCppuType((const Reference< document::XEventListener >*)0) );
+ cppu::UnoType<document::XEventListener>::get());
if( pIC )
{
@@ -3272,7 +3272,7 @@ void SfxBaseModel::notifyEvent( const document::EventObject& aEvent ) const
/** returns true if someone added a XEventListener to this XEventBroadcaster */
bool SfxBaseModel::hasEventListeners() const
{
- return !impl_isDisposed() && (NULL != m_pData->m_aInterfaceContainer.getContainer( ::getCppuType((const Reference< document::XEventListener >*)0) ) );
+ return !impl_isDisposed() && (NULL != m_pData->m_aInterfaceContainer.getContainer( cppu::UnoType<document::XEventListener>::get()) );
}
void SAL_CALL SfxBaseModel::addPrintJobListener( const Reference< view::XPrintJobListener >& xListener ) throw (RuntimeException, std::exception)
@@ -3869,7 +3869,7 @@ void SAL_CALL SfxBaseModel::addStorageChangeListener(
SfxModelGuard aGuard( *this, SfxModelGuard::E_INITIALIZING );
m_pData->m_aInterfaceContainer.addInterface(
- ::getCppuType((const Reference< document::XStorageChangeListener >*)0), xListener );
+ cppu::UnoType<document::XStorageChangeListener>::get(), xListener );
}
void SAL_CALL SfxBaseModel::removeStorageChangeListener(
@@ -3879,7 +3879,7 @@ void SAL_CALL SfxBaseModel::removeStorageChangeListener(
SfxModelGuard aGuard( *this );
m_pData->m_aInterfaceContainer.removeInterface(
- ::getCppuType((const Reference< document::XStorageChangeListener >*)0), xListener );
+ cppu::UnoType<document::XStorageChangeListener>::get(), xListener );
}
#include "printhelper.hxx"
diff --git a/sfx2/source/sidebar/Theme.cxx b/sfx2/source/sidebar/Theme.cxx
index 151cfed648e2..701a09474082 100644
--- a/sfx2/source/sidebar/Theme.cxx
+++ b/sfx2/source/sidebar/Theme.cxx
@@ -904,22 +904,22 @@ cssu::Type Theme::GetCppuType (const PropertyType eType)
switch(eType)
{
case PT_Image:
- return getCppuType((rtl::OUString*)NULL);
+ return cppu::UnoType<rtl::OUString>::get();
case PT_Color:
- return getCppuType((sal_uInt32*)NULL);
+ return cppu::UnoType<sal_uInt32>::get();
case PT_Paint:
return getCppuVoidType();
case PT_Integer:
- return getCppuType((sal_Int32*)NULL);
+ return cppu::UnoType<sal_Int32>::get();
case PT_Boolean:
- return getCppuType((sal_Bool*)NULL);
+ return cppu::UnoType<sal_Bool>::get();
case PT_Rectangle:
- return getCppuType((awt::Rectangle*)NULL);
+ return cppu::UnoType<awt::Rectangle>::get();
case PT_Invalid:
default:
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index 98ad17d9c978..9c07350be105 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -911,14 +911,14 @@ frame::BorderWidths SAL_CALL SfxBaseController::getBorder()
void SAL_CALL SfxBaseController::addBorderResizeListener( const Reference< frame::XBorderResizeListener >& xListener )
throw ( RuntimeException, std::exception )
{
- m_pData->m_aListenerContainer.addInterface( ::getCppuType((const Reference< frame::XBorderResizeListener >*)0),
+ m_pData->m_aListenerContainer.addInterface( cppu::UnoType<frame::XBorderResizeListener>::get(),
xListener );
}
void SAL_CALL SfxBaseController::removeBorderResizeListener( const Reference< frame::XBorderResizeListener >& xListener )
throw ( RuntimeException, std::exception )
{
- m_pData->m_aListenerContainer.removeInterface( ::getCppuType((const Reference< frame::XBorderResizeListener >*)0),
+ m_pData->m_aListenerContainer.removeInterface( cppu::UnoType<frame::XBorderResizeListener>::get(),
xListener );
}
@@ -939,7 +939,7 @@ awt::Rectangle SAL_CALL SfxBaseController::queryBorderedArea( const awt::Rectang
void SfxBaseController::BorderWidthsChanged_Impl()
{
::cppu::OInterfaceContainerHelper* pContainer = m_pData->m_aListenerContainer.getContainer(
- ::getCppuType( ( const Reference< frame::XBorderResizeListener >*) NULL ) );
+ cppu::UnoType<frame::XBorderResizeListener>::get());
if ( pContainer )
{
frame::BorderWidths aBWidths = getBorder();
@@ -1037,7 +1037,7 @@ void SAL_CALL SfxBaseController::dispose() throw( RuntimeException, std::excepti
void SAL_CALL SfxBaseController::addEventListener( const Reference< lang::XEventListener >& aListener ) throw( RuntimeException, std::exception )
{
- m_pData->m_aListenerContainer.addInterface( ::getCppuType((const Reference< lang::XEventListener >*)0), aListener );
+ m_pData->m_aListenerContainer.addInterface( cppu::UnoType<lang::XEventListener>::get(), aListener );
}
@@ -1046,7 +1046,7 @@ void SAL_CALL SfxBaseController::addEventListener( const Reference< lang::XEvent
void SAL_CALL SfxBaseController::removeEventListener( const Reference< lang::XEventListener >& aListener ) throw( RuntimeException, std::exception )
{
- m_pData->m_aListenerContainer.removeInterface( ::getCppuType((const Reference< lang::XEventListener >*)0), aListener );
+ m_pData->m_aListenerContainer.removeInterface( cppu::UnoType<lang::XEventListener>::get(), aListener );
}
void SfxBaseController::ReleaseShell_Impl()