summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2014-03-04 15:00:14 -0600
committerNorbert Thiebaud <nthiebaud@gmail.com>2014-03-05 09:44:18 -0600
commite090a0f5802904ca8cded9208993e09bc08a3052 (patch)
tree6ca12ded814c240102202f4a4effc89a9143c8f2
parent149da07aed965ba8cc3330163821922f10381d8c (diff)
kill XINTERFACE_IMPL_2
Change-Id: Ic735b7d6ddfaacab9af7405e4dacc62f818bed8c
-rw-r--r--include/ucbhelper/macros.hxx24
-rw-r--r--ucb/source/cacher/cachedcontentresultset.cxx25
-rw-r--r--ucb/source/cacher/dynamicresultsetwrapper.cxx25
-rw-r--r--ucb/source/core/identify.cxx25
-rw-r--r--ucb/source/core/ucbstore.cxx24
-rw-r--r--ucb/source/sorter/sortdynres.cxx22
-rw-r--r--ucb/source/sorter/sortresult.cxx22
-rw-r--r--ucbhelper/source/client/activedatasink.cxx24
-rw-r--r--ucbhelper/source/client/activedatastreamer.cxx24
-rw-r--r--ucbhelper/source/client/commandenvironment.cxx24
-rw-r--r--ucbhelper/source/client/content.cxx24
-rw-r--r--ucbhelper/source/provider/contentinfo.cxx55
-rw-r--r--ucbhelper/source/provider/resultset.cxx26
-rw-r--r--ucbhelper/source/provider/resultsetmetadata.cxx24
14 files changed, 272 insertions, 96 deletions
diff --git a/include/ucbhelper/macros.hxx b/include/ucbhelper/macros.hxx
index 94c5b7d9cb16..ab35b0d3c006 100644
--- a/include/ucbhelper/macros.hxx
+++ b/include/ucbhelper/macros.hxx
@@ -37,30 +37,6 @@
// XInterface impl.
-// 2 interfaces implemented
-#define XINTERFACE_IMPL_2( Class, Ifc1, Ifc2 ) \
-void SAL_CALL Class::acquire() \
- throw() \
-{ \
- OWeakObject::acquire(); \
-} \
- \
-void SAL_CALL Class::release() \
- throw() \
-{ \
- OWeakObject::release(); \
-} \
-com::sun::star::uno::Any SAL_CALL Class::queryInterface( \
- const com::sun::star::uno::Type & rType ) \
- throw( com::sun::star::uno::RuntimeException, std::exception ) \
-{ \
- com::sun::star::uno::Any aRet = cppu::queryInterface( rType, \
- (static_cast< Ifc1* >(this)), \
- (static_cast< Ifc2* >(this)) \
- ); \
- return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ); \
-}\
-
// 3 interfaces implemented
#define XINTERFACE_IMPL_3( Class, Ifc1, Ifc2, Ifc3 ) \
void SAL_CALL Class::acquire() \
diff --git a/ucb/source/cacher/cachedcontentresultset.cxx b/ucb/source/cacher/cachedcontentresultset.cxx
index e6929265598f..15912091e074 100644
--- a/ucb/source/cacher/cachedcontentresultset.cxx
+++ b/ucb/source/cacher/cachedcontentresultset.cxx
@@ -521,12 +521,27 @@ CCRS_PropertySetInfo::~CCRS_PropertySetInfo()
// XInterface methods.
-//list all interfaces inclusive baseclasses of interfaces
-XINTERFACE_IMPL_2( CCRS_PropertySetInfo
- , XTypeProvider
- , XPropertySetInfo
- );
+void SAL_CALL CCRS_PropertySetInfo::acquire()
+ throw()
+{
+ OWeakObject::acquire();
+}
+
+void SAL_CALL CCRS_PropertySetInfo::release()
+ throw()
+{
+ OWeakObject::release();
+}
+css::uno::Any SAL_CALL CCRS_PropertySetInfo::queryInterface( const css::uno::Type & rType )
+ throw( css::uno::RuntimeException, std::exception )
+{
+ css::uno::Any aRet = cppu::queryInterface( rType,
+ (static_cast< XTypeProvider* >(this)),
+ (static_cast< XPropertySetInfo* >(this))
+ );
+ return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
+}
// XTypeProvider methods.
diff --git a/ucb/source/cacher/dynamicresultsetwrapper.cxx b/ucb/source/cacher/dynamicresultsetwrapper.cxx
index caf63780aed7..b0c510b11920 100644
--- a/ucb/source/cacher/dynamicresultsetwrapper.cxx
+++ b/ucb/source/cacher/dynamicresultsetwrapper.cxx
@@ -470,12 +470,27 @@ DynamicResultSetWrapperListener::~DynamicResultSetWrapperListener()
// XInterface methods.
-//list all interfaces inclusive baseclasses of interfaces
-XINTERFACE_IMPL_2( DynamicResultSetWrapperListener
- , XDynamicResultSetListener
- , XEventListener //base of XDynamicResultSetListener
- );
+void SAL_CALL DynamicResultSetWrapperListener::acquire()
+ throw()
+{
+ OWeakObject::acquire();
+}
+
+void SAL_CALL DynamicResultSetWrapperListener::release()
+ throw()
+{
+ OWeakObject::release();
+}
+css::uno::Any SAL_CALL DynamicResultSetWrapperListener::queryInterface( const css::uno::Type & rType )
+ throw( css::uno::RuntimeException, std::exception )
+{
+ css::uno::Any aRet = cppu::queryInterface( rType,
+ (static_cast< XDynamicResultSetListener* >(this)),
+ (static_cast< XEventListener* >(this))
+ );
+ return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
+}
// XDynamicResultSetListener methods:
diff --git a/ucb/source/core/identify.cxx b/ucb/source/core/identify.cxx
index e20ef5af6d95..7da0d476f89b 100644
--- a/ucb/source/core/identify.cxx
+++ b/ucb/source/core/identify.cxx
@@ -53,13 +53,28 @@ ContentIdentifier::~ContentIdentifier()
// XInterface methods.
+void SAL_CALL ContentIdentifier::acquire()
+ throw()
+{
+ OWeakObject::acquire();
+}
+void SAL_CALL ContentIdentifier::release()
+ throw()
+{
+ OWeakObject::release();
+}
-XINTERFACE_IMPL_2( ContentIdentifier,
- XTypeProvider,
- XContentIdentifier );
-
-
+css::uno::Any SAL_CALL ContentIdentifier::queryInterface(
+ const css::uno::Type & rType )
+ throw( css::uno::RuntimeException, std::exception )
+{
+ css::uno::Any aRet = cppu::queryInterface( rType,
+ (static_cast< XTypeProvider* >(this)),
+ (static_cast< XContentIdentifier* >(this))
+ );
+ return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
+}
// XTypeProvider methods.
diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx
index 3bbd9245a1d7..131aa365610c 100644
--- a/ucb/source/core/ucbstore.cxx
+++ b/ucb/source/core/ucbstore.cxx
@@ -2365,13 +2365,27 @@ PropertySetInfo_Impl::~PropertySetInfo_Impl()
// XInterface methods.
+void SAL_CALL PropertySetInfo_Impl::acquire()
+ throw()
+{
+ OWeakObject::acquire();
+}
+void SAL_CALL PropertySetInfo_Impl::release()
+ throw()
+{
+ OWeakObject::release();
+}
-XINTERFACE_IMPL_2( PropertySetInfo_Impl,
- XTypeProvider,
- XPropertySetInfo );
-
-
+css::uno::Any SAL_CALL PropertySetInfo_Impl::queryInterface( const css::uno::Type & rType )
+ throw( css::uno::RuntimeException, std::exception )
+{
+ css::uno::Any aRet = cppu::queryInterface( rType,
+ (static_cast< XTypeProvider* >(this)),
+ (static_cast< XPropertySetInfo* >(this))
+ );
+ return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
+}
// XTypeProvider methods.
diff --git a/ucb/source/sorter/sortdynres.cxx b/ucb/source/sorter/sortdynres.cxx
index 618f45a78fbd..28bc8f5a61d6 100644
--- a/ucb/source/sorter/sortdynres.cxx
+++ b/ucb/source/sorter/sortdynres.cxx
@@ -570,11 +570,27 @@ SortedDynamicResultSetListener::~SortedDynamicResultSetListener()
// XInterface methods.
+void SAL_CALL SortedDynamicResultSetListener::acquire()
+ throw()
+{
+ OWeakObject::acquire();
+}
-XINTERFACE_IMPL_2( SortedDynamicResultSetListener,
- XEventListener, /* base class of XDynamicResultSetListener */
- XDynamicResultSetListener );
+void SAL_CALL SortedDynamicResultSetListener::release()
+ throw()
+{
+ OWeakObject::release();
+}
+css::uno::Any SAL_CALL SortedDynamicResultSetListener::queryInterface( const css::uno::Type & rType )
+ throw( css::uno::RuntimeException, std::exception )
+{
+ css::uno::Any aRet = cppu::queryInterface( rType,
+ (static_cast< XEventListener* >(this)),
+ (static_cast< XDynamicResultSetListener* >(this))
+ );
+ return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
+}
// XEventListener ( base of XDynamicResultSetListener )
diff --git a/ucb/source/sorter/sortresult.cxx b/ucb/source/sorter/sortresult.cxx
index bbeec37c593a..29ae56c82c68 100644
--- a/ucb/source/sorter/sortresult.cxx
+++ b/ucb/source/sorter/sortresult.cxx
@@ -2021,11 +2021,27 @@ SRSPropertySetInfo::~SRSPropertySetInfo()
// XInterface methods.
+void SAL_CALL SRSPropertySetInfo::acquire()
+ throw()
+{
+ OWeakObject::acquire();
+}
-XINTERFACE_IMPL_2( SRSPropertySetInfo,
- XTypeProvider,
- XPropertySetInfo );
+void SAL_CALL SRSPropertySetInfo::release()
+ throw()
+{
+ OWeakObject::release();
+}
+css::uno::Any SAL_CALL SRSPropertySetInfo::queryInterface( const css::uno::Type & rType )
+ throw( css::uno::RuntimeException, std::exception )
+{
+ css::uno::Any aRet = cppu::queryInterface( rType,
+ (static_cast< XTypeProvider* >(this)),
+ (static_cast< XPropertySetInfo* >(this))
+ );
+ return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
+}
// XTypeProvider methods.
diff --git a/ucbhelper/source/client/activedatasink.cxx b/ucbhelper/source/client/activedatasink.cxx
index aed7305e5efe..d83643f63f5b 100644
--- a/ucbhelper/source/client/activedatasink.cxx
+++ b/ucbhelper/source/client/activedatasink.cxx
@@ -42,13 +42,27 @@ namespace ucbhelper
// XInterface methods
+void SAL_CALL ActiveDataSink::acquire()
+ throw()
+{
+ OWeakObject::acquire();
+}
+void SAL_CALL ActiveDataSink::release()
+ throw()
+{
+ OWeakObject::release();
+}
-XINTERFACE_IMPL_2( ActiveDataSink,
- lang::XTypeProvider,
- io::XActiveDataSink );
-
-
+css::uno::Any SAL_CALL ActiveDataSink::queryInterface( const css::uno::Type & rType )
+ throw( css::uno::RuntimeException, std::exception )
+{
+ css::uno::Any aRet = cppu::queryInterface( rType,
+ (static_cast< lang::XTypeProvider* >(this)),
+ (static_cast< io::XActiveDataSink* >(this))
+ );
+ return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
+}
// XTypeProvider methods
diff --git a/ucbhelper/source/client/activedatastreamer.cxx b/ucbhelper/source/client/activedatastreamer.cxx
index 27ab53a9b4c0..15baa8e65ebf 100644
--- a/ucbhelper/source/client/activedatastreamer.cxx
+++ b/ucbhelper/source/client/activedatastreamer.cxx
@@ -42,13 +42,27 @@ namespace ucbhelper
// XInterface methods
+void SAL_CALL ActiveDataStreamer::acquire()
+ throw()
+{
+ OWeakObject::acquire();
+}
+void SAL_CALL ActiveDataStreamer::release()
+ throw()
+{
+ OWeakObject::release();
+}
-XINTERFACE_IMPL_2( ActiveDataStreamer,
- lang::XTypeProvider,
- io::XActiveDataStreamer );
-
-
+css::uno::Any SAL_CALL ActiveDataStreamer::queryInterface( const css::uno::Type & rType )
+ throw( css::uno::RuntimeException, std::exception )
+{
+ css::uno::Any aRet = cppu::queryInterface( rType,
+ (static_cast< lang::XTypeProvider* >(this)),
+ (static_cast< io::XActiveDataStreamer* >(this))
+ );
+ return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
+}
// XTypeProvider methods
diff --git a/ucbhelper/source/client/commandenvironment.cxx b/ucbhelper/source/client/commandenvironment.cxx
index a8e938cd21c0..80b0004b6035 100644
--- a/ucbhelper/source/client/commandenvironment.cxx
+++ b/ucbhelper/source/client/commandenvironment.cxx
@@ -85,13 +85,27 @@ CommandEnvironment::~CommandEnvironment()
// XInterface methods
+void SAL_CALL CommandEnvironment::acquire()
+ throw()
+{
+ OWeakObject::acquire();
+}
+void SAL_CALL CommandEnvironment::release()
+ throw()
+{
+ OWeakObject::release();
+}
-XINTERFACE_IMPL_2( CommandEnvironment,
- XTypeProvider,
- XCommandEnvironment );
-
-
+css::uno::Any SAL_CALL CommandEnvironment::queryInterface( const css::uno::Type & rType )
+ throw( css::uno::RuntimeException, std::exception )
+{
+ css::uno::Any aRet = cppu::queryInterface( rType,
+ (static_cast< XTypeProvider* >(this)),
+ (static_cast< XCommandEnvironment* >(this))
+ );
+ return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
+}
// XTypeProvider methods
diff --git a/ucbhelper/source/client/content.cxx b/ucbhelper/source/client/content.cxx
index 2cffd349e300..f4b9beba6891 100644
--- a/ucbhelper/source/client/content.cxx
+++ b/ucbhelper/source/client/content.cxx
@@ -1321,13 +1321,27 @@ void Content_Impl::inserted()
// XInterface methods.
+void SAL_CALL ContentEventListener_Impl::acquire()
+ throw()
+{
+ OWeakObject::acquire();
+}
+void SAL_CALL ContentEventListener_Impl::release()
+ throw()
+{
+ OWeakObject::release();
+}
-XINTERFACE_IMPL_2( ContentEventListener_Impl,
- XContentEventListener,
- XEventListener ); /* base of XContentEventListener */
-
-
+css::uno::Any SAL_CALL ContentEventListener_Impl::queryInterface( const css::uno::Type & rType )
+ throw( css::uno::RuntimeException, std::exception )
+{
+ css::uno::Any aRet = cppu::queryInterface( rType,
+ (static_cast< XContentEventListener* >(this)),
+ (static_cast< XEventListener* >(this))
+ );
+ return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
+}
// XContentEventListener methods.
diff --git a/ucbhelper/source/provider/contentinfo.cxx b/ucbhelper/source/provider/contentinfo.cxx
index b3a20b8e0940..b3f0ca9d95a2 100644
--- a/ucbhelper/source/provider/contentinfo.cxx
+++ b/ucbhelper/source/provider/contentinfo.cxx
@@ -62,22 +62,32 @@ PropertySetInfo::~PropertySetInfo()
// XInterface methods.
+void SAL_CALL PropertySetInfo::acquire()
+ throw()
+{
+ OWeakObject::acquire();
+}
+void SAL_CALL PropertySetInfo::release()
+ throw()
+{
+ OWeakObject::release();
+}
-XINTERFACE_IMPL_2( PropertySetInfo,
- lang::XTypeProvider,
- beans::XPropertySetInfo );
-
-
+css::uno::Any SAL_CALL PropertySetInfo::queryInterface( const css::uno::Type & rType )
+ throw( css::uno::RuntimeException, std::exception )
+{
+ css::uno::Any aRet = cppu::queryInterface( rType,
+ (static_cast< lang::XTypeProvider* >(this)),
+ (static_cast< beans::XPropertySetInfo* >(this))
+ );
+ return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
+}
// XTypeProvider methods.
-
-
-
XTYPEPROVIDER_IMPL_2( PropertySetInfo,
- lang::XTypeProvider,
- beans::XPropertySetInfo );
-
+ lang::XTypeProvider,
+ beans::XPropertySetInfo );
// XPropertySetInfo methods.
@@ -236,12 +246,27 @@ CommandProcessorInfo::~CommandProcessorInfo()
// XInterface methods.
+void SAL_CALL CommandProcessorInfo::acquire()
+ throw()
+{
+ OWeakObject::acquire();
+}
-XINTERFACE_IMPL_2( CommandProcessorInfo,
- lang::XTypeProvider,
- com::sun::star::ucb::XCommandInfo );
-
+void SAL_CALL CommandProcessorInfo::release()
+ throw()
+{
+ OWeakObject::release();
+}
+css::uno::Any SAL_CALL CommandProcessorInfo::queryInterface( const css::uno::Type & rType )
+ throw( css::uno::RuntimeException, std::exception )
+{
+ css::uno::Any aRet = cppu::queryInterface( rType,
+ (static_cast< lang::XTypeProvider* >(this)),
+ (static_cast< css::ucb::XCommandInfo* >(this))
+ );
+ return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
+}
// XTypeProvider methods.
diff --git a/ucbhelper/source/provider/resultset.cxx b/ucbhelper/source/provider/resultset.cxx
index 6202e4c40c06..9e98e3681869 100644
--- a/ucbhelper/source/provider/resultset.cxx
+++ b/ucbhelper/source/provider/resultset.cxx
@@ -1594,14 +1594,28 @@ PropertySetInfo::~PropertySetInfo()
// XInterface methods.
+void SAL_CALL PropertySetInfo::acquire()
+ throw()
+{
+ OWeakObject::acquire();
+}
+void SAL_CALL PropertySetInfo::release()
+ throw()
+{
+ OWeakObject::release();
+}
-
-XINTERFACE_IMPL_2( PropertySetInfo,
- lang::XTypeProvider,
- beans::XPropertySetInfo );
-
-
+css::uno::Any SAL_CALL PropertySetInfo::queryInterface(
+ const css::uno::Type & rType )
+ throw( css::uno::RuntimeException, std::exception )
+{
+ css::uno::Any aRet = cppu::queryInterface( rType,
+ (static_cast< lang::XTypeProvider* >(this)),
+ (static_cast< beans::XPropertySetInfo* >(this))
+ );
+ return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
+}
// XTypeProvider methods.
diff --git a/ucbhelper/source/provider/resultsetmetadata.cxx b/ucbhelper/source/provider/resultsetmetadata.cxx
index 1bea9ae8a34e..25b6e8483502 100644
--- a/ucbhelper/source/provider/resultsetmetadata.cxx
+++ b/ucbhelper/source/provider/resultsetmetadata.cxx
@@ -118,13 +118,27 @@ ResultSetMetaData::~ResultSetMetaData()
// XInterface methods.
+void SAL_CALL ResultSetMetaData::acquire()
+ throw()
+{
+ OWeakObject::acquire();
+}
+void SAL_CALL ResultSetMetaData::release()
+ throw()
+{
+ OWeakObject::release();
+}
-XINTERFACE_IMPL_2( ResultSetMetaData,
- XTypeProvider,
- XResultSetMetaData );
-
-
+css::uno::Any SAL_CALL ResultSetMetaData::queryInterface( const css::uno::Type & rType )
+ throw( css::uno::RuntimeException, std::exception )
+{
+ css::uno::Any aRet = cppu::queryInterface( rType,
+ (static_cast< XTypeProvider* >(this)),
+ (static_cast< XResultSetMetaData* >(this))
+ );
+ return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
+}
// XTypeProvider methods.