diff options
-rw-r--r-- | include/ucbhelper/macros.hxx | 27 | ||||
-rw-r--r-- | ucb/source/core/ucbstore.cxx | 29 | ||||
-rw-r--r-- | ucb/source/sorter/sortdynres.cxx | 27 | ||||
-rw-r--r-- | ucb/source/ucp/hierarchy/hierarchydatasource.cxx | 29 | ||||
-rw-r--r-- | ucb/source/ucp/hierarchy/hierarchyprovider.cxx | 28 | ||||
-rw-r--r-- | ucb/source/ucp/tdoc/tdoc_provider.cxx | 29 | ||||
-rw-r--r-- | ucbhelper/source/provider/resultsethelper.cxx | 29 |
7 files changed, 126 insertions, 72 deletions
diff --git a/include/ucbhelper/macros.hxx b/include/ucbhelper/macros.hxx index c7f87f33de97..6b80fc89fdb9 100644 --- a/include/ucbhelper/macros.hxx +++ b/include/ucbhelper/macros.hxx @@ -62,33 +62,6 @@ com::sun::star::uno::Any SAL_CALL Class::queryInterface( \ return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ); \ }\ -// 4 interfaces implemented -#define XINTERFACE_IMPL_4( Class, Ifc1, Ifc2, Ifc3, Ifc4 ) \ -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)), \ - (static_cast< Ifc3* >(this)), \ - (static_cast< Ifc4* >(this)) \ - ); \ - return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ); \ -}\ - -// 9 interfaces implemented // XTypeProvider decl. diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx index 010ff2159aaf..8b2d2bea6f30 100644 --- a/ucb/source/core/ucbstore.cxx +++ b/ucb/source/core/ucbstore.cxx @@ -194,16 +194,29 @@ UcbStore::~UcbStore() // XInterface methods. +void SAL_CALL UcbStore::acquire() + throw() +{ + OWeakObject::acquire(); +} +void SAL_CALL UcbStore::release() + throw() +{ + OWeakObject::release(); +} - -XINTERFACE_IMPL_4( UcbStore, - XTypeProvider, - XServiceInfo, - XPropertySetRegistryFactory, - XInitialization ); - - +css::uno::Any SAL_CALL UcbStore::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< XServiceInfo* >(this)), + (static_cast< XPropertySetRegistryFactory* >(this)), + (static_cast< XInitialization* >(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 28bc8f5a61d6..9bce7009b585 100644 --- a/ucb/source/sorter/sortdynres.cxx +++ b/ucb/source/sorter/sortdynres.cxx @@ -103,14 +103,29 @@ SortedDynamicResultSet::~SortedDynamicResultSet() // XInterface methods. +void SAL_CALL SortedDynamicResultSet::acquire() + throw() +{ + OWeakObject::acquire(); +} +void SAL_CALL SortedDynamicResultSet::release() + throw() +{ + OWeakObject::release(); +} -XINTERFACE_IMPL_4( SortedDynamicResultSet, - XTypeProvider, - XServiceInfo, - XComponent, /* base class of XDynamicResultSet */ - XDynamicResultSet ); - +css::uno::Any SAL_CALL SortedDynamicResultSet::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< XServiceInfo* >(this)), + (static_cast< XComponent* >(this)), + (static_cast< XDynamicResultSet* >(this)) + ); + return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ); +} // XTypeProvider methods. diff --git a/ucb/source/ucp/hierarchy/hierarchydatasource.cxx b/ucb/source/ucp/hierarchy/hierarchydatasource.cxx index 4208f12aefaa..5d4d9c9557fa 100644 --- a/ucb/source/ucp/hierarchy/hierarchydatasource.cxx +++ b/ucb/source/ucp/hierarchy/hierarchydatasource.cxx @@ -234,16 +234,29 @@ HierarchyDataSource::~HierarchyDataSource() // XInterface methods. +void SAL_CALL HierarchyDataSource::acquire() + throw() +{ + OWeakObject::acquire(); +} +void SAL_CALL HierarchyDataSource::release() + throw() +{ + OWeakObject::release(); +} - -XINTERFACE_IMPL_4( HierarchyDataSource, - lang::XTypeProvider, - lang::XServiceInfo, - lang::XComponent, - lang::XMultiServiceFactory ); - - +css::uno::Any SAL_CALL HierarchyDataSource::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< lang::XServiceInfo* >(this)), + (static_cast< lang::XComponent* >(this)), + (static_cast< lang::XMultiServiceFactory* >(this)) + ); + return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ); +} // XTypeProvider methods. diff --git a/ucb/source/ucp/hierarchy/hierarchyprovider.cxx b/ucb/source/ucp/hierarchy/hierarchyprovider.cxx index e5e981a68fe0..6355d86d99de 100644 --- a/ucb/source/ucp/hierarchy/hierarchyprovider.cxx +++ b/ucb/source/ucp/hierarchy/hierarchyprovider.cxx @@ -64,15 +64,29 @@ HierarchyContentProvider::~HierarchyContentProvider() // XInterface methods. +void SAL_CALL HierarchyContentProvider::acquire() + throw() +{ + OWeakObject::acquire(); +} +void SAL_CALL HierarchyContentProvider::release() + throw() +{ + OWeakObject::release(); +} -XINTERFACE_IMPL_4( HierarchyContentProvider, - lang::XTypeProvider, - lang::XServiceInfo, - ucb::XContentProvider, - lang::XInitialization ); - - +css::uno::Any SAL_CALL HierarchyContentProvider::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< lang::XServiceInfo* >(this)), + (static_cast< ucb::XContentProvider* >(this)), + (static_cast< lang::XInitialization* >(this)) + ); + return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ); +} // XTypeProvider methods. diff --git a/ucb/source/ucp/tdoc/tdoc_provider.cxx b/ucb/source/ucp/tdoc/tdoc_provider.cxx index 422609100a95..1b0f11ade2ff 100644 --- a/ucb/source/ucp/tdoc/tdoc_provider.cxx +++ b/ucb/source/ucp/tdoc/tdoc_provider.cxx @@ -68,16 +68,29 @@ ContentProvider::~ContentProvider() // XInterface methods. +void SAL_CALL ContentProvider::acquire() + throw() +{ + OWeakObject::acquire(); +} +void SAL_CALL ContentProvider::release() + throw() +{ + OWeakObject::release(); +} - -XINTERFACE_IMPL_4( ContentProvider, - lang::XTypeProvider, - lang::XServiceInfo, - ucb::XContentProvider, - frame::XTransientDocumentsDocumentContentFactory ); - - +css::uno::Any SAL_CALL ContentProvider::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< lang::XServiceInfo* >(this)), + (static_cast< ucb::XContentProvider* >(this)), + (static_cast< frame::XTransientDocumentsDocumentContentFactory* >(this)) + ); + return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ); +} // XTypeProvider methods. diff --git a/ucbhelper/source/provider/resultsethelper.cxx b/ucbhelper/source/provider/resultsethelper.cxx index 4fcd0e10e622..359cca501d7f 100644 --- a/ucbhelper/source/provider/resultsethelper.cxx +++ b/ucbhelper/source/provider/resultsethelper.cxx @@ -70,16 +70,29 @@ ResultSetImplHelper::~ResultSetImplHelper() // XInterface methods. +void SAL_CALL ResultSetImplHelper::acquire() + throw() +{ + OWeakObject::acquire(); +} +void SAL_CALL ResultSetImplHelper::release() + throw() +{ + OWeakObject::release(); +} - -XINTERFACE_IMPL_4( ResultSetImplHelper, - lang::XTypeProvider, - lang::XServiceInfo, - lang::XComponent, /* base of XDynamicResultSet */ - com::sun::star::ucb::XDynamicResultSet ); - - +css::uno::Any SAL_CALL ResultSetImplHelper::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< lang::XServiceInfo* >(this)), + (static_cast< lang::XComponent* >(this)), + (static_cast< css::ucb::XDynamicResultSet* >(this)) + ); + return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ); +} // XTypeProvider methods. |