summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2014-05-23 22:11:27 +0200
committerJulien Nabet <serval2412@yahoo.fr>2014-05-23 22:11:52 +0200
commitac76cc7e605b1bc9c0ff8e24d0b9995a8247074e (patch)
tree797df8cc9387fa70a0c09e574f49714ce4dc6710 /framework
parent3191d7d1302dbde2445b9f300b3eb853120ede65 (diff)
Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part20
Change-Id: If87cdfb2c605254f6d69baa4ca5aec09091caa68
Diffstat (limited to 'framework')
-rw-r--r--framework/inc/helper/propertysetcontainer.hxx2
-rw-r--r--framework/source/fwe/classes/actiontriggercontainer.cxx8
-rw-r--r--framework/source/fwe/classes/actiontriggerpropertyset.cxx14
-rw-r--r--framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx12
-rw-r--r--framework/source/fwe/classes/rootactiontriggercontainer.cxx14
-rw-r--r--framework/source/fwe/helper/titlehelper.cxx6
-rw-r--r--framework/source/helper/ocomponentaccess.cxx2
-rw-r--r--framework/source/helper/oframes.cxx2
-rw-r--r--framework/source/helper/uiconfigelementwrapperbase.cxx6
-rw-r--r--framework/source/helper/uielementwrapperbase.cxx4
-rw-r--r--framework/source/services/desktop.cxx4
-rw-r--r--framework/source/services/frame.cxx20
-rw-r--r--framework/source/services/tabwindowservice.cxx6
-rw-r--r--framework/source/tabwin/tabwindow.cxx8
-rw-r--r--framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx8
-rw-r--r--framework/source/uiconfiguration/uiconfigurationmanager.cxx8
-rw-r--r--framework/source/uiconfiguration/windowstateconfiguration.cxx2
-rw-r--r--framework/source/uielement/menubarmanager.cxx4
-rw-r--r--framework/source/uielement/menubarwrapper.cxx2
-rw-r--r--framework/source/uielement/statusbarmanager.cxx6
-rw-r--r--framework/source/uielement/toolbarmanager.cxx4
-rw-r--r--framework/source/uielement/uicommanddescription.cxx2
22 files changed, 71 insertions, 73 deletions
diff --git a/framework/inc/helper/propertysetcontainer.hxx b/framework/inc/helper/propertysetcontainer.hxx
index e4b75929f5ce..2db5698e3d44 100644
--- a/framework/inc/helper/propertysetcontainer.hxx
+++ b/framework/inc/helper/propertysetcontainer.hxx
@@ -67,7 +67,7 @@ class FWE_DLLPUBLIC PropertySetContainer : public com::sun::star::container::XIn
virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
{
- return ::getCppuType((com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet >*)0);
+ return cppu::UnoType<com::sun::star::beans::XPropertySet>::get();
}
virtual sal_Bool SAL_CALL hasElements()
diff --git a/framework/source/fwe/classes/actiontriggercontainer.cxx b/framework/source/fwe/classes/actiontriggercontainer.cxx
index e03ecf19d140..d1c71ed00f1d 100644
--- a/framework/source/fwe/classes/actiontriggercontainer.cxx
+++ b/framework/source/fwe/classes/actiontriggercontainer.cxx
@@ -140,10 +140,10 @@ Sequence< Type > SAL_CALL ActionTriggerContainer::getTypes() throw ( RuntimeExce
{
// Create a static typecollection ...
static ::cppu::OTypeCollection aTypeCollection(
- ::getCppuType(( const Reference< XMultiServiceFactory >*)NULL ) ,
- ::getCppuType(( const Reference< XIndexContainer >*)NULL ) ,
- ::getCppuType(( const Reference< XServiceInfo >*)NULL ) ,
- ::getCppuType(( const Reference< XTypeProvider >*)NULL ) );
+ cppu::UnoType<XMultiServiceFactory>::get(),
+ cppu::UnoType<XIndexContainer>::get(),
+ cppu::UnoType<XServiceInfo>::get(),
+ cppu::UnoType<XTypeProvider>::get());
// ... and set his address to static pointer!
pTypeCollection = &aTypeCollection;
diff --git a/framework/source/fwe/classes/actiontriggerpropertyset.cxx b/framework/source/fwe/classes/actiontriggerpropertyset.cxx
index a1d0e5e275a6..1c06d9bb4664 100644
--- a/framework/source/fwe/classes/actiontriggerpropertyset.cxx
+++ b/framework/source/fwe/classes/actiontriggerpropertyset.cxx
@@ -134,11 +134,11 @@ Sequence< Type > SAL_CALL ActionTriggerPropertySet::getTypes() throw ( RuntimeEx
{
// Create a static typecollection ...
static ::cppu::OTypeCollection aTypeCollection(
- ::getCppuType(( const Reference< XPropertySet >*)NULL ) ,
- ::getCppuType(( const Reference< XFastPropertySet >*)NULL ) ,
- ::getCppuType(( const Reference< XMultiPropertySet >*)NULL ) ,
- ::getCppuType(( const Reference< XServiceInfo >*)NULL ) ,
- ::getCppuType(( const Reference< XTypeProvider >*)NULL ) );
+ cppu::UnoType<XPropertySet>::get(),
+ cppu::UnoType<XFastPropertySet>::get(),
+ cppu::UnoType<XMultiPropertySet>::get(),
+ cppu::UnoType<XServiceInfo>::get(),
+ cppu::UnoType<XTypeProvider>::get());
// ... and set his address to static pointer!
pTypeCollection = &aTypeCollection;
@@ -309,9 +309,9 @@ const Sequence< Property > ActionTriggerPropertySet::impl_getStaticPropertyDescr
{
Property( OUString( "CommandURL" ), HANDLE_COMMANDURL , cppu::UnoType<OUString>::get(), PropertyAttribute::TRANSIENT ),
Property( OUString( "HelpURL" ), HANDLE_HELPURL , cppu::UnoType<OUString>::get(), PropertyAttribute::TRANSIENT ),
- Property( OUString( "Image" ), HANDLE_IMAGE , ::getCppuType((Reference<XBitmap>*)0) , PropertyAttribute::TRANSIENT ),
+ Property( OUString( "Image" ), HANDLE_IMAGE , cppu::UnoType<XBitmap>::get(), PropertyAttribute::TRANSIENT ),
Property( OUString( "SubContainer" ), HANDLE_SUBCONTAINER , cppu::UnoType<OUString>::get(), PropertyAttribute::TRANSIENT ),
- Property( OUString( "Text" ), HANDLE_TEXT , ::getCppuType((Reference<XInterface>*)0) , PropertyAttribute::TRANSIENT )
+ Property( OUString( "Text" ), HANDLE_TEXT , cppu::UnoType<XInterface>::get(), PropertyAttribute::TRANSIENT )
};
// Use it to initialize sequence!
diff --git a/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx b/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx
index c1c220e74573..127a365d99b8 100644
--- a/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx
+++ b/framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx
@@ -127,11 +127,11 @@ Sequence< Type > SAL_CALL ActionTriggerSeparatorPropertySet::getTypes() throw (
{
// Create a static typecollection ...
static ::cppu::OTypeCollection aTypeCollection(
- ::getCppuType(( const Reference< XPropertySet >*)NULL ) ,
- ::getCppuType(( const Reference< XFastPropertySet >*)NULL ) ,
- ::getCppuType(( const Reference< XMultiPropertySet >*)NULL ) ,
- ::getCppuType(( const Reference< XServiceInfo >*)NULL ) ,
- ::getCppuType(( const Reference< XTypeProvider >*)NULL ) );
+ cppu::UnoType<XPropertySet>::get(),
+ cppu::UnoType<XFastPropertySet>::get(),
+ cppu::UnoType<XMultiPropertySet>::get(),
+ cppu::UnoType<XServiceInfo>::get(),
+ cppu::UnoType<XTypeProvider>::get());
// ... and set his address to static pointer!
pTypeCollection = &aTypeCollection;
@@ -252,7 +252,7 @@ const Sequence< Property > ActionTriggerSeparatorPropertySet::impl_getStaticProp
{
const Property pActionTriggerPropertys[] =
{
- Property( OUString( "SeparatorType" ), HANDLE_TYPE, ::getCppuType((sal_Int16*)0), PropertyAttribute::TRANSIENT )
+ Property( OUString( "SeparatorType" ), HANDLE_TYPE, cppu::UnoType<sal_Int16>::get(), PropertyAttribute::TRANSIENT )
};
// Use it to initialize sequence!
diff --git a/framework/source/fwe/classes/rootactiontriggercontainer.cxx b/framework/source/fwe/classes/rootactiontriggercontainer.cxx
index fa408c64023a..23819a879270 100644
--- a/framework/source/fwe/classes/rootactiontriggercontainer.cxx
+++ b/framework/source/fwe/classes/rootactiontriggercontainer.cxx
@@ -197,7 +197,7 @@ throw ( IndexOutOfBoundsException, WrappedTargetException, RuntimeException, std
Type SAL_CALL RootActionTriggerContainer::getElementType()
throw (::com::sun::star::uno::RuntimeException, std::exception)
{
- return ::getCppuType(( Reference< XPropertySet >*)0);
+ return cppu::UnoType<XPropertySet>::get();
}
sal_Bool SAL_CALL RootActionTriggerContainer::hasElements()
@@ -261,12 +261,12 @@ Sequence< Type > SAL_CALL RootActionTriggerContainer::getTypes() throw ( Runtime
{
// Create a static typecollection ...
static ::cppu::OTypeCollection aTypeCollection(
- ::getCppuType(( const Reference< XMultiServiceFactory >*)NULL ) ,
- ::getCppuType(( const Reference< XIndexContainer >*)NULL ) ,
- ::getCppuType(( const Reference< XServiceInfo >*)NULL ) ,
- ::getCppuType(( const Reference< XTypeProvider >*)NULL ) ,
- ::getCppuType(( const Reference< XUnoTunnel >*)NULL ) ,
- ::getCppuType(( const Reference< XNamed >*)NULL ));
+ cppu::UnoType<XMultiServiceFactory>::get(),
+ cppu::UnoType<XIndexContainer>::get(),
+ cppu::UnoType<XServiceInfo>::get(),
+ cppu::UnoType<XTypeProvider>::get(),
+ cppu::UnoType<XUnoTunnel>::get(),
+ cppu::UnoType<XNamed>::get());
// ... and set his address to static pointer!
pTypeCollection = &aTypeCollection;
diff --git a/framework/source/fwe/helper/titlehelper.cxx b/framework/source/fwe/helper/titlehelper.cxx
index d1a647796d11..2f50a3e691ce 100644
--- a/framework/source/fwe/helper/titlehelper.cxx
+++ b/framework/source/fwe/helper/titlehelper.cxx
@@ -139,14 +139,14 @@ void SAL_CALL TitleHelper::addTitleChangeListener(const css::uno::Reference< css
throw (css::uno::RuntimeException, std::exception)
{
// container is threadsafe by himself
- m_aListener.addInterface( ::getCppuType( (const css::uno::Reference< css::frame::XTitleChangeListener >*)NULL ), xListener );
+ m_aListener.addInterface( cppu::UnoType<css::frame::XTitleChangeListener>::get(), xListener );
}
void SAL_CALL TitleHelper::removeTitleChangeListener(const css::uno::Reference< css::frame::XTitleChangeListener >& xListener)
throw (css::uno::RuntimeException, std::exception)
{
// container is threadsafe by himself
- m_aListener.removeInterface( ::getCppuType( (const css::uno::Reference< css::frame::XTitleChangeListener >*)NULL ), xListener );
+ m_aListener.removeInterface( cppu::UnoType<css::frame::XTitleChangeListener>::get(), xListener );
}
void SAL_CALL TitleHelper::titleChanged(const css::frame::TitleChangedEvent& aEvent)
@@ -265,7 +265,7 @@ void TitleHelper::impl_sendTitleChangedEvent ()
aLock.clear ();
// <- SYNCHRONIZED
- ::cppu::OInterfaceContainerHelper* pContainer = m_aListener.getContainer( ::getCppuType( ( const css::uno::Reference< css::frame::XTitleChangeListener >*) NULL ) );
+ ::cppu::OInterfaceContainerHelper* pContainer = m_aListener.getContainer( cppu::UnoType<css::frame::XTitleChangeListener>::get());
if ( ! pContainer)
return;
diff --git a/framework/source/helper/ocomponentaccess.cxx b/framework/source/helper/ocomponentaccess.cxx
index 12206c14bfaf..67862b931620 100644
--- a/framework/source/helper/ocomponentaccess.cxx
+++ b/framework/source/helper/ocomponentaccess.cxx
@@ -81,7 +81,7 @@ Type SAL_CALL OComponentAccess::getElementType() throw( RuntimeException, std::e
{
// Elements in list an enumeration are components!
// Return the uno-type of XComponent.
- return ::getCppuType((const css::uno::Reference< XComponent >*)NULL);
+ return cppu::UnoType<XComponent>::get();
}
// XElementAccess
diff --git a/framework/source/helper/oframes.cxx b/framework/source/helper/oframes.cxx
index 7d86c5046f08..d21680aeaf7d 100644
--- a/framework/source/helper/oframes.cxx
+++ b/framework/source/helper/oframes.cxx
@@ -255,7 +255,7 @@ Any SAL_CALL OFrames::getByIndex( sal_Int32 nIndex ) throw( IndexOutOfBoundsExce
Type SAL_CALL OFrames::getElementType() throw( RuntimeException, std::exception )
{
// This "container" support XFrame-interfaces only!
- return ::getCppuType( (const css::uno::Reference< XFrame >*)NULL );
+ return cppu::UnoType<XFrame>::get();
}
// XElementAccess
diff --git a/framework/source/helper/uiconfigelementwrapperbase.cxx b/framework/source/helper/uiconfigelementwrapperbase.cxx
index 741b9ea6c29a..a31cdb20e70b 100644
--- a/framework/source/helper/uiconfigelementwrapperbase.cxx
+++ b/framework/source/helper/uiconfigelementwrapperbase.cxx
@@ -435,13 +435,13 @@ const com::sun::star::uno::Sequence< com::sun::star::beans::Property > UIConfigE
const com::sun::star::beans::Property pProperties[] =
{
com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_CONFIGLISTENER), UIELEMENT_PROPHANDLE_CONFIGLISTENER , cppu::UnoType<sal_Bool>::get(), com::sun::star::beans::PropertyAttribute::TRANSIENT ),
- com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_CONFIGSOURCE), UIELEMENT_PROPHANDLE_CONFIGSOURCE , ::getCppuType((const Reference< ::com::sun::star::ui::XUIConfigurationManager >*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT ),
- com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_FRAME), UIELEMENT_PROPHANDLE_FRAME , ::getCppuType((const Reference< com::sun::star::frame::XFrame >*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ),
+ com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_CONFIGSOURCE), UIELEMENT_PROPHANDLE_CONFIGSOURCE , cppu::UnoType<com::sun::star::ui::XUIConfigurationManager>::get(), com::sun::star::beans::PropertyAttribute::TRANSIENT ),
+ com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_FRAME), UIELEMENT_PROPHANDLE_FRAME , cppu::UnoType<com::sun::star::frame::XFrame>::get(), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ),
com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_NOCLOSE), UIELEMENT_PROPHANDLE_NOCLOSE , cppu::UnoType<sal_Bool>::get(), com::sun::star::beans::PropertyAttribute::TRANSIENT ),
com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_PERSISTENT), UIELEMENT_PROPHANDLE_PERSISTENT , cppu::UnoType<sal_Bool>::get(), com::sun::star::beans::PropertyAttribute::TRANSIENT ),
com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_RESOURCEURL), UIELEMENT_PROPHANDLE_RESOURCEURL , cppu::UnoType<OUString>::get(), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ),
com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_TYPE), UIELEMENT_PROPHANDLE_TYPE , cppu::UnoType<OUString>::get(), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ),
- com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_XMENUBAR), UIELEMENT_PROPHANDLE_XMENUBAR , ::getCppuType((const Reference< com::sun::star::awt::XMenuBar >*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY )
+ com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_XMENUBAR), UIELEMENT_PROPHANDLE_XMENUBAR , cppu::UnoType<com::sun::star::awt::XMenuBar>::get(), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY )
};
// Use it to initialize sequence!
const com::sun::star::uno::Sequence< com::sun::star::beans::Property > lPropertyDescriptor( pProperties, UIELEMENT_PROPCOUNT );
diff --git a/framework/source/helper/uielementwrapperbase.cxx b/framework/source/helper/uielementwrapperbase.cxx
index 1273c83a6b9b..b8780f214440 100644
--- a/framework/source/helper/uielementwrapperbase.cxx
+++ b/framework/source/helper/uielementwrapperbase.cxx
@@ -228,8 +228,8 @@ const com::sun::star::uno::Sequence< com::sun::star::beans::Property > UIElement
const com::sun::star::beans::Property pProperties[] =
{
- com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_FRAME), UIELEMENT_PROPHANDLE_FRAME , ::getCppuType((Reference< XFrame >*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ),
- com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_RESOURCEURL), UIELEMENT_PROPHANDLE_RESOURCEURL , ::getCppuType((sal_Int16*)NULL), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ),
+ com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_FRAME), UIELEMENT_PROPHANDLE_FRAME , cppu::UnoType<XFrame>::get(), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ),
+ com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_RESOURCEURL), UIELEMENT_PROPHANDLE_RESOURCEURL , cppu::UnoType<sal_Int16>::get(), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY ),
com::sun::star::beans::Property( OUString(UIELEMENT_PROPNAME_TYPE), UIELEMENT_PROPHANDLE_TYPE , cppu::UnoType<OUString>::get(), com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY )
};
// Use it to initialize sequence!
diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx
index 771dfa609b59..2bf3a09930d1 100644
--- a/framework/source/services/desktop.cxx
+++ b/framework/source/services/desktop.cxx
@@ -1581,8 +1581,8 @@ const css::uno::Sequence< css::beans::Property > Desktop::impl_getStaticProperty
const css::beans::Property pProperties[] =
{
- css::beans::Property( DESKTOP_PROPNAME_ACTIVEFRAME , DESKTOP_PROPHANDLE_ACTIVEFRAME , ::getCppuType((const css::uno::Reference< css::lang::XComponent >*)NULL) , css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::READONLY ),
- css::beans::Property( DESKTOP_PROPNAME_DISPATCHRECORDERSUPPLIER , DESKTOP_PROPHANDLE_DISPATCHRECORDERSUPPLIER, ::getCppuType((const css::uno::Reference< css::frame::XDispatchRecorderSupplier >*)NULL), css::beans::PropertyAttribute::TRANSIENT ),
+ css::beans::Property( DESKTOP_PROPNAME_ACTIVEFRAME , DESKTOP_PROPHANDLE_ACTIVEFRAME , cppu::UnoType<css::lang::XComponent>::get(), css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::READONLY ),
+ css::beans::Property( DESKTOP_PROPNAME_DISPATCHRECORDERSUPPLIER , DESKTOP_PROPHANDLE_DISPATCHRECORDERSUPPLIER, cppu::UnoType<css::frame::XDispatchRecorderSupplier>::get(), css::beans::PropertyAttribute::TRANSIENT ),
css::beans::Property( DESKTOP_PROPNAME_ISPLUGGED , DESKTOP_PROPHANDLE_ISPLUGGED , ::getBooleanCppuType() , css::beans::PropertyAttribute::TRANSIENT | css::beans::PropertyAttribute::READONLY ),
css::beans::Property( DESKTOP_PROPNAME_SUSPENDQUICKSTARTVETO , DESKTOP_PROPHANDLE_SUSPENDQUICKSTARTVETO , ::getBooleanCppuType() , css::beans::PropertyAttribute::TRANSIENT ),
css::beans::Property( DESKTOP_PROPNAME_TITLE , DESKTOP_PROPHANDLE_TITLE , cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::TRANSIENT ),
diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx
index e374471a5df4..2386f1807d17 100644
--- a/framework/source/services/frame.cxx
+++ b/framework/source/services/frame.cxx
@@ -1699,7 +1699,7 @@ void SAL_CALL Frame::addFrameActionListener( const css::uno::Reference< css::fra
TransactionGuard aTransaction( m_aTransactionManager, E_SOFTEXCEPTIONS );
/* SAFE AREA ----------------------------------------------------------------------------------------------- */
- m_aListenerContainer.addInterface( ::getCppuType( (const css::uno::Reference< css::frame::XFrameActionListener >*)NULL ), xListener );
+ m_aListenerContainer.addInterface( cppu::UnoType<css::frame::XFrameActionListener>::get(), xListener );
}
void SAL_CALL Frame::removeFrameActionListener( const css::uno::Reference< css::frame::XFrameActionListener >& xListener ) throw( css::uno::RuntimeException, std::exception )
@@ -1713,7 +1713,7 @@ void SAL_CALL Frame::removeFrameActionListener( const css::uno::Reference< css::
TransactionGuard aTransaction( m_aTransactionManager, E_SOFTEXCEPTIONS );
/* SAFE AREA ----------------------------------------------------------------------------------------------- */
- m_aListenerContainer.removeInterface( ::getCppuType( (const css::uno::Reference< css::frame::XFrameActionListener >*)NULL ), xListener );
+ m_aListenerContainer.removeInterface( cppu::UnoType<css::frame::XFrameActionListener>::get(), xListener );
}
/*-****************************************************************************************************
@@ -1750,7 +1750,7 @@ void SAL_CALL Frame::close( sal_Bool bDeliverOwnership ) throw( css::util::Close
// internal operations too ...
// Note: container is threadsafe himself.
css::lang::EventObject aSource (static_cast< ::cppu::OWeakObject*>(this));
- ::cppu::OInterfaceContainerHelper* pContainer = m_aListenerContainer.getContainer( ::getCppuType( ( const css::uno::Reference< css::util::XCloseListener >*) NULL ) );
+ ::cppu::OInterfaceContainerHelper* pContainer = m_aListenerContainer.getContainer( cppu::UnoType<css::util::XCloseListener>::get());
if (pContainer!=NULL)
{
::cppu::OInterfaceIteratorHelper pIterator(*pContainer);
@@ -1784,7 +1784,7 @@ void SAL_CALL Frame::close( sal_Bool bDeliverOwnership ) throw( css::util::Close
throw css::util::CloseVetoException("Component couldn't be deattached ...",static_cast< ::cppu::OWeakObject*>(this));
// If closing is allowed ... inform all istener and dispose this frame!
- pContainer = m_aListenerContainer.getContainer( ::getCppuType( ( const css::uno::Reference< css::util::XCloseListener >*) NULL ) );
+ pContainer = m_aListenerContainer.getContainer( cppu::UnoType<css::util::XCloseListener>::get());
if (pContainer!=NULL)
{
::cppu::OInterfaceIteratorHelper pIterator(*pContainer);
@@ -1834,7 +1834,7 @@ void SAL_CALL Frame::addCloseListener( const css::uno::Reference< css::util::XCl
TransactionGuard aTransaction( m_aTransactionManager, E_HARDEXCEPTIONS );
// We don't need any lock here ...
// Container lives if we live and is threadsafe by himself.
- m_aListenerContainer.addInterface( ::getCppuType( ( const css::uno::Reference< css::util::XCloseListener >* ) NULL ), xListener );
+ m_aListenerContainer.addInterface( cppu::UnoType<css::util::XCloseListener>::get(), xListener );
}
void SAL_CALL Frame::removeCloseListener( const css::uno::Reference< css::util::XCloseListener >& xListener ) throw (css::uno::RuntimeException, std::exception)
@@ -1843,7 +1843,7 @@ void SAL_CALL Frame::removeCloseListener( const css::uno::Reference< css::util::
TransactionGuard aTransaction( m_aTransactionManager, E_SOFTEXCEPTIONS );
// We don't need any lock here ...
// Container lives if we live and is threadsafe by himself.
- m_aListenerContainer.removeInterface( ::getCppuType( ( const css::uno::Reference< css::util::XCloseListener >* ) NULL ), xListener );
+ m_aListenerContainer.removeInterface( cppu::UnoType<css::util::XCloseListener>::get(), xListener );
}
OUString SAL_CALL Frame::getTitle()
@@ -2656,14 +2656,14 @@ void Frame::impl_initializePropInfo()
css::beans::Property(
FRAME_PROPNAME_DISPATCHRECORDERSUPPLIER,
FRAME_PROPHANDLE_DISPATCHRECORDERSUPPLIER,
- ::getCppuType((const css::uno::Reference< css::frame::XDispatchRecorderSupplier >*)NULL),
+ cppu::UnoType<css::frame::XDispatchRecorderSupplier>::get(),
css::beans::PropertyAttribute::TRANSIENT));
impl_addPropertyInfo(
css::beans::Property(
FRAME_PROPNAME_INDICATORINTERCEPTION,
FRAME_PROPHANDLE_INDICATORINTERCEPTION,
- ::getCppuType((const css::uno::Reference< css::task::XStatusIndicator >*)NULL),
+ cppu::UnoType<css::task::XStatusIndicator>::get(),
css::beans::PropertyAttribute::TRANSIENT));
impl_addPropertyInfo(
@@ -2677,7 +2677,7 @@ void Frame::impl_initializePropInfo()
css::beans::Property(
FRAME_PROPNAME_LAYOUTMANAGER,
FRAME_PROPHANDLE_LAYOUTMANAGER,
- ::getCppuType((const css::uno::Reference< ::com::sun::star::frame::XLayoutManager >*)NULL),
+ cppu::UnoType<com::sun::star::frame::XLayoutManager>::get(),
css::beans::PropertyAttribute::TRANSIENT));
impl_addPropertyInfo(
@@ -2843,7 +2843,7 @@ void Frame::implts_sendFrameActionEvent( const css::frame::FrameAction& aAction
// Get container for right listener.
// FOLLOW LINES ARE THREADSAFE!!!
// ( OInterfaceContainerHelper is synchronized with m_aListenerContainer! )
- ::cppu::OInterfaceContainerHelper* pContainer = m_aListenerContainer.getContainer( ::getCppuType( ( const css::uno::Reference< css::frame::XFrameActionListener >*) NULL ) );
+ ::cppu::OInterfaceContainerHelper* pContainer = m_aListenerContainer.getContainer( cppu::UnoType<css::frame::XFrameActionListener>::get());
if( pContainer != NULL )
{
diff --git a/framework/source/services/tabwindowservice.cxx b/framework/source/services/tabwindowservice.cxx
index 8aa1e640947f..2fefbdb1cba9 100644
--- a/framework/source/services/tabwindowservice.cxx
+++ b/framework/source/services/tabwindowservice.cxx
@@ -333,7 +333,7 @@ void SAL_CALL TabWindowService::activateTab(::sal_Int32 nID)
void SAL_CALL TabWindowService::addTabListener(const css::uno::Reference< css::awt::XTabListener >& xListener)
throw (css::uno::RuntimeException, std::exception)
{
- m_lListener.addInterface(::getCppuType((const css::uno::Reference< css::awt::XTabListener >*)NULL), xListener);
+ m_lListener.addInterface(cppu::UnoType<css::awt::XTabListener>::get(), xListener);
}
// XSimpleTabController
@@ -341,7 +341,7 @@ void SAL_CALL TabWindowService::addTabListener(const css::uno::Reference< css::a
void SAL_CALL TabWindowService::removeTabListener(const css::uno::Reference< css::awt::XTabListener >& xListener)
throw (css::uno::RuntimeException, std::exception)
{
- m_lListener.removeInterface(::getCppuType((const css::uno::Reference< css::awt::XTabListener >*)NULL), xListener);
+ m_lListener.removeInterface(cppu::UnoType<css::awt::XTabListener>::get(), xListener);
}
// XComponent
@@ -445,7 +445,7 @@ IMPL_LINK( TabWindowService, EventListener, VclSimpleEvent*, pEvent )
return 0;
}
- ::cppu::OInterfaceContainerHelper* pContainer = m_lListener.getContainer(::getCppuType((const css::uno::Reference< css::awt::XTabListener >*) NULL));
+ ::cppu::OInterfaceContainerHelper* pContainer = m_lListener.getContainer(cppu::UnoType<css::awt::XTabListener>::get());
if ( ! pContainer)
return 0;
diff --git a/framework/source/tabwin/tabwindow.cxx b/framework/source/tabwin/tabwindow.cxx
index 05c1afc4dd15..eb2c8298bf8e 100644
--- a/framework/source/tabwin/tabwindow.cxx
+++ b/framework/source/tabwin/tabwindow.cxx
@@ -162,7 +162,7 @@ void TabWindow::impl_SetTitle( const OUString& rTitle )
void TabWindow::implts_SendNotification( Notification eNotify, sal_Int32 ID ) const
{
::cppu::OInterfaceContainerHelper* pContainer = m_aListenerContainer.getContainer(
- ::getCppuType( ( const css::uno::Reference< css::awt::XTabListener >*) NULL ) );
+ cppu::UnoType<css::awt::XTabListener>::get());
if (pContainer!=NULL)
{
::cppu::OInterfaceIteratorHelper pIterator(*pContainer);
@@ -199,7 +199,7 @@ void TabWindow::implts_SendNotification( Notification eNotify, sal_Int32 ID ) co
void TabWindow::implts_SendNotification( Notification eNotify, sal_Int32 ID, const css::uno::Sequence< css::beans::NamedValue >& rSeq ) const
{
::cppu::OInterfaceContainerHelper* pContainer = m_aListenerContainer.getContainer(
- ::getCppuType( ( const css::uno::Reference< css::awt::XTabListener >*) NULL ) );
+ cppu::UnoType<css::awt::XTabListener>::get());
if (pContainer!=NULL)
{
::cppu::OInterfaceIteratorHelper pIterator(*pContainer);
@@ -774,7 +774,7 @@ throw (css::uno::RuntimeException, std::exception)
/* SAFE AREA ----------------------------------------------------------------------------------------------- */
m_aListenerContainer.addInterface(
- ::getCppuType( ( const css::uno::Reference< css::awt::XTabListener >* ) NULL ), xListener );
+ cppu::UnoType<css::awt::XTabListener>::get(), xListener );
}
void SAL_CALL TabWindow::removeTabListener( const css::uno::Reference< css::awt::XTabListener >& xListener )
@@ -788,7 +788,7 @@ throw (css::uno::RuntimeException, std::exception)
/* SAFE AREA ----------------------------------------------------------------------------------------------- */
m_aListenerContainer.removeInterface(
- ::getCppuType( ( const css::uno::Reference< css::awt::XTabListener >* ) NULL ), xListener );
+ cppu::UnoType<css::awt::XTabListener>::get(), xListener );
}
// OPropertySetHelper
diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
index 42c57f0bc882..3fea283a21e4 100644
--- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
@@ -972,13 +972,13 @@ void SAL_CALL ModuleUIConfigurationManager::addEventListener( const Reference< X
throw DisposedException();
}
- m_aListenerContainer.addInterface( ::getCppuType( ( const Reference< XEventListener >* ) NULL ), xListener );
+ m_aListenerContainer.addInterface( cppu::UnoType<XEventListener>::get(), xListener );
}
void SAL_CALL ModuleUIConfigurationManager::removeEventListener( const Reference< XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception)
{
/* SAFE AREA ----------------------------------------------------------------------------------------------- */
- m_aListenerContainer.removeInterface( ::getCppuType( ( const Reference< XEventListener >* ) NULL ), xListener );
+ m_aListenerContainer.removeInterface( cppu::UnoType<XEventListener>::get(), xListener );
}
// XUIConfiguration
@@ -992,13 +992,13 @@ void SAL_CALL ModuleUIConfigurationManager::addConfigurationListener( const Refe
throw DisposedException();
}
- m_aListenerContainer.addInterface( ::getCppuType( ( const Reference< ui::XUIConfigurationListener >* ) NULL ), xListener );
+ m_aListenerContainer.addInterface( cppu::UnoType<ui::XUIConfigurationListener>::get(), xListener );
}
void SAL_CALL ModuleUIConfigurationManager::removeConfigurationListener( const Reference< ::com::sun::star::ui::XUIConfigurationListener >& xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception)
{
/* SAFE AREA ----------------------------------------------------------------------------------------------- */
- m_aListenerContainer.removeInterface( ::getCppuType( ( const Reference< ui::XUIConfigurationListener >* ) NULL ), xListener );
+ m_aListenerContainer.removeInterface( cppu::UnoType<ui::XUIConfigurationListener>::get(), xListener );
}
// XUIConfigurationManager
diff --git a/framework/source/uiconfiguration/uiconfigurationmanager.cxx b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
index 717a3cfd4061..09a201d72554 100644
--- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
@@ -741,13 +741,13 @@ void SAL_CALL UIConfigurationManager::addEventListener( const Reference< XEventL
throw DisposedException();
}
- m_aListenerContainer.addInterface( ::getCppuType( ( const Reference< XEventListener >* ) NULL ), xListener );
+ m_aListenerContainer.addInterface( cppu::UnoType<XEventListener>::get(), xListener );
}
void SAL_CALL UIConfigurationManager::removeEventListener( const Reference< XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception)
{
/* SAFE AREA ----------------------------------------------------------------------------------------------- */
- m_aListenerContainer.removeInterface( ::getCppuType( ( const Reference< XEventListener >* ) NULL ), xListener );
+ m_aListenerContainer.removeInterface( cppu::UnoType<XEventListener>::get(), xListener );
}
// XUIConfigurationManager
@@ -761,13 +761,13 @@ void SAL_CALL UIConfigurationManager::addConfigurationListener( const Reference<
throw DisposedException();
}
- m_aListenerContainer.addInterface( ::getCppuType( ( const Reference< XUIConfigurationListener >* ) NULL ), xListener );
+ m_aListenerContainer.addInterface( cppu::UnoType<XUIConfigurationListener>::get(), xListener );
}
void SAL_CALL UIConfigurationManager::removeConfigurationListener( const Reference< ::com::sun::star::ui::XUIConfigurationListener >& xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception)
{
/* SAFE AREA ----------------------------------------------------------------------------------------------- */
- m_aListenerContainer.removeInterface( ::getCppuType( ( const Reference< XUIConfigurationListener >* ) NULL ), xListener );
+ m_aListenerContainer.removeInterface( cppu::UnoType<XUIConfigurationListener>::get(), xListener );
}
void SAL_CALL UIConfigurationManager::reset() throw (::com::sun::star::uno::RuntimeException, std::exception)
diff --git a/framework/source/uiconfiguration/windowstateconfiguration.cxx b/framework/source/uiconfiguration/windowstateconfiguration.cxx
index 6b5ca0768ab6..94b31ec236c8 100644
--- a/framework/source/uiconfiguration/windowstateconfiguration.cxx
+++ b/framework/source/uiconfiguration/windowstateconfiguration.cxx
@@ -1453,7 +1453,7 @@ throw (::com::sun::star::uno::RuntimeException, std::exception)
Type SAL_CALL WindowStateConfiguration::getElementType()
throw (::com::sun::star::uno::RuntimeException, std::exception)
{
- return( ::getCppuType( (const Reference< XNameAccess >*)NULL ) );
+ return( cppu::UnoType<XNameAccess>::get());
}
sal_Bool SAL_CALL WindowStateConfiguration::hasElements()
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index 2755b67572ca..de31c3c005ea 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -363,14 +363,14 @@ void SAL_CALL MenuBarManager::addEventListener( const Reference< XEventListener
if ( m_bDisposed )
throw DisposedException();
- m_aListenerContainer.addInterface( ::getCppuType( ( const Reference< XEventListener >* ) NULL ), xListener );
+ m_aListenerContainer.addInterface( cppu::UnoType<XEventListener>::get(), xListener );
}
void SAL_CALL MenuBarManager::removeEventListener( const Reference< XEventListener >& xListener ) throw( RuntimeException, std::exception )
{
SolarMutexGuard g;
/* SAFE AREA ----------------------------------------------------------------------------------------------- */
- m_aListenerContainer.removeInterface( ::getCppuType( ( const Reference< XEventListener >* ) NULL ), xListener );
+ m_aListenerContainer.removeInterface( cppu::UnoType<XEventListener>::get(), xListener );
}
void SAL_CALL MenuBarManager::elementInserted( const ::com::sun::star::ui::ConfigurationEvent& Event )
diff --git a/framework/source/uielement/menubarwrapper.cxx b/framework/source/uielement/menubarwrapper.cxx
index 5ef7442f5008..05a8be6992fe 100644
--- a/framework/source/uielement/menubarwrapper.cxx
+++ b/framework/source/uielement/menubarwrapper.cxx
@@ -252,7 +252,7 @@ void MenuBarWrapper::fillPopupControllerCache()
Type SAL_CALL MenuBarWrapper::getElementType()
throw (::com::sun::star::uno::RuntimeException, std::exception)
{
- return ::getCppuType(( Reference< XDispatchProvider >*)0);
+ return cppu::UnoType<XDispatchProvider>::get();
}
sal_Bool SAL_CALL MenuBarWrapper::hasElements()
diff --git a/framework/source/uielement/statusbarmanager.cxx b/framework/source/uielement/statusbarmanager.cxx
index 7ab55aca255d..a7b534376c73 100644
--- a/framework/source/uielement/statusbarmanager.cxx
+++ b/framework/source/uielement/statusbarmanager.cxx
@@ -243,14 +243,12 @@ void SAL_CALL StatusBarManager::addEventListener( const uno::Reference< lang::XE
if ( m_bDisposed )
throw lang::DisposedException();
- m_aListenerContainer.addInterface( ::getCppuType(
- ( const uno::Reference< lang::XEventListener >* ) NULL ), xListener );
+ m_aListenerContainer.addInterface( cppu::UnoType<lang::XEventListener>::get(), xListener );
}
void SAL_CALL StatusBarManager::removeEventListener( const uno::Reference< lang::XEventListener >& xListener ) throw( uno::RuntimeException, std::exception )
{
- m_aListenerContainer.removeInterface( ::getCppuType(
- ( const uno::Reference< lang::XEventListener >* ) NULL ), xListener );
+ m_aListenerContainer.removeInterface( cppu::UnoType<lang::XEventListener>::get(), xListener );
}
// XUIConfigurationListener
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index fba6752fc13f..2878d2b7ef9c 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -643,12 +643,12 @@ void SAL_CALL ToolBarManager::addEventListener( const Reference< XEventListener
if ( m_bDisposed )
throw DisposedException();
- m_aListenerContainer.addInterface( ::getCppuType( ( const Reference< XEventListener >* ) NULL ), xListener );
+ m_aListenerContainer.addInterface( cppu::UnoType<XEventListener>::get(), xListener );
}
void SAL_CALL ToolBarManager::removeEventListener( const Reference< XEventListener >& xListener ) throw( RuntimeException, std::exception )
{
- m_aListenerContainer.removeInterface( ::getCppuType( ( const Reference< XEventListener >* ) NULL ), xListener );
+ m_aListenerContainer.removeInterface( cppu::UnoType<XEventListener>::get(), xListener );
}
// XUIConfigurationListener
diff --git a/framework/source/uielement/uicommanddescription.cxx b/framework/source/uielement/uicommanddescription.cxx
index 344511f847e4..f27ffdd6fb4c 100644
--- a/framework/source/uielement/uicommanddescription.cxx
+++ b/framework/source/uielement/uicommanddescription.cxx
@@ -736,7 +736,7 @@ throw (::com::sun::star::uno::RuntimeException, std::exception)
Type SAL_CALL UICommandDescription::getElementType()
throw (::com::sun::star::uno::RuntimeException, std::exception)
{
- return( ::getCppuType( (const Reference< XNameAccess >*)NULL ) );
+ return( cppu::UnoType<XNameAccess>::get());
}
sal_Bool SAL_CALL UICommandDescription::hasElements()