diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-03-04 15:41:50 -0600 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-03-05 09:44:19 -0600 |
commit | a5aad2ac58f01702b91db051e66e2e855de00b10 (patch) | |
tree | 22a3cde45a9e2b3c41b802e9d3a548c2562cc8dd | |
parent | 2ef98b947e8babddeaf5b67e580ba2f184c0e157 (diff) |
kill XINTERFACE_IMPL_9
Change-Id: I651599cf3ec82a31f3260985907b5b2d56665da3
-rw-r--r-- | include/ucbhelper/macros.hxx | 30 | ||||
-rw-r--r-- | ucb/source/core/ucb.cxx | 39 | ||||
-rw-r--r-- | ucb/source/core/ucbstore.cxx | 39 | ||||
-rw-r--r-- | ucb/source/sorter/sortresult.cxx | 36 | ||||
-rw-r--r-- | ucbhelper/source/provider/resultset.cxx | 38 |
5 files changed, 104 insertions, 78 deletions
diff --git a/include/ucbhelper/macros.hxx b/include/ucbhelper/macros.hxx index b745f4073b93..c7f87f33de97 100644 --- a/include/ucbhelper/macros.hxx +++ b/include/ucbhelper/macros.hxx @@ -89,36 +89,6 @@ com::sun::star::uno::Any SAL_CALL Class::queryInterface( \ }\ // 9 interfaces implemented -#define XINTERFACE_IMPL_9( Class,I1,I2,I3,I4,I5,I6,I7,I8,I9 ) \ -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< I1* >(this)), \ - (static_cast< I2* >(this)), \ - (static_cast< I3* >(this)), \ - (static_cast< I4* >(this)), \ - (static_cast< I5* >(this)), \ - (static_cast< I6* >(this)), \ - (static_cast< I7* >(this)), \ - (static_cast< I8* >(this)), \ - (static_cast< I9* >(this)) \ - ); \ - return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ); \ -}\ - // XTypeProvider decl. diff --git a/ucb/source/core/ucb.cxx b/ucb/source/core/ucb.cxx index 70ea59b49b96..0f3308f6b9d6 100644 --- a/ucb/source/core/ucb.cxx +++ b/ucb/source/core/ucb.cxx @@ -251,21 +251,34 @@ UniversalContentBroker::~UniversalContentBroker() // XInterface methods. +void SAL_CALL UniversalContentBroker::acquire() + throw() +{ + OWeakObject::acquire(); +} +void SAL_CALL UniversalContentBroker::release() + throw() +{ + OWeakObject::release(); +} - -XINTERFACE_IMPL_9( UniversalContentBroker, - XUniversalContentBroker, - XTypeProvider, - XComponent, - XServiceInfo, - XInitialization, - XContentProviderManager, - XContentProvider, - XContentIdentifierFactory, - XCommandProcessor ); - - +css::uno::Any SAL_CALL UniversalContentBroker::queryInterface( const css::uno::Type & rType ) + throw( css::uno::RuntimeException, std::exception ) +{ + css::uno::Any aRet = cppu::queryInterface( rType, + (static_cast< XUniversalContentBroker* >(this)), + (static_cast< XTypeProvider* >(this)), + (static_cast< XComponent* >(this)), + (static_cast< XServiceInfo* >(this)), + (static_cast< XInitialization* >(this)), + (static_cast< XContentProviderManager* >(this)), + (static_cast< XContentProvider* >(this)), + (static_cast< XContentIdentifierFactory* >(this)), + (static_cast< XCommandProcessor* >(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 28d34269209b..010ff2159aaf 100644 --- a/ucb/source/core/ucbstore.cxx +++ b/ucb/source/core/ucbstore.cxx @@ -1282,21 +1282,34 @@ PersistentPropertySet::~PersistentPropertySet() // XInterface methods. +void SAL_CALL PersistentPropertySet::acquire() + throw() +{ + OWeakObject::acquire(); +} +void SAL_CALL PersistentPropertySet::release() + throw() +{ + OWeakObject::release(); +} - -XINTERFACE_IMPL_9( PersistentPropertySet, - XTypeProvider, - XServiceInfo, - XComponent, - XPropertySet, /* base of XPersistentPropertySet */ - XNamed, - XPersistentPropertySet, - XPropertyContainer, - XPropertySetInfoChangeNotifier, - XPropertyAccess ); - - +css::uno::Any SAL_CALL PersistentPropertySet::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< XPropertySet* >(this)), + (static_cast< XNamed* >(this)), + (static_cast< XPersistentPropertySet* >(this)), + (static_cast< XPropertyContainer* >(this)), + (static_cast< XPropertySetInfoChangeNotifier* >(this)), + (static_cast< XPropertyAccess* >(this)) + ); + return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ); +} // XTypeProvider methods. diff --git a/ucb/source/sorter/sortresult.cxx b/ucb/source/sorter/sortresult.cxx index 29ae56c82c68..22577ca22d3d 100644 --- a/ucb/source/sorter/sortresult.cxx +++ b/ucb/source/sorter/sortresult.cxx @@ -210,18 +210,34 @@ SortedResultSet::~SortedResultSet() // XInterface methods. +void SAL_CALL SortedResultSet::acquire() + throw() +{ + OWeakObject::acquire(); +} -XINTERFACE_IMPL_9( SortedResultSet, - XTypeProvider, - XServiceInfo, - XComponent, - XContentAccess, - XResultSet, - XRow, - XCloseable, - XResultSetMetaDataSupplier, - XPropertySet ); +void SAL_CALL SortedResultSet::release() + throw() +{ + OWeakObject::release(); +} +css::uno::Any SAL_CALL SortedResultSet::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< XContentAccess* >(this)), + (static_cast< XResultSet* >(this)), + (static_cast< XRow* >(this)), + (static_cast< XCloseable* >(this)), + (static_cast< XResultSetMetaDataSupplier* >(this)), + (static_cast< XPropertySet* >(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 9e98e3681869..8c3d79112e19 100644 --- a/ucbhelper/source/provider/resultset.cxx +++ b/ucbhelper/source/provider/resultset.cxx @@ -248,20 +248,34 @@ ResultSet::~ResultSet() // XInterface methods. +void SAL_CALL ResultSet::acquire() + throw() +{ + OWeakObject::acquire(); +} +void SAL_CALL ResultSet::release() + throw() +{ + OWeakObject::release(); +} -XINTERFACE_IMPL_9( ResultSet, - lang::XTypeProvider, - lang::XServiceInfo, - lang::XComponent, - com::sun::star::ucb::XContentAccess, - sdbc::XResultSet, - sdbc::XResultSetMetaDataSupplier, - sdbc::XRow, - sdbc::XCloseable, - beans::XPropertySet ); - - +css::uno::Any SAL_CALL ResultSet::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::XContentAccess* >(this)), + (static_cast< sdbc::XResultSet* >(this)), + (static_cast< sdbc::XResultSetMetaDataSupplier* >(this)), + (static_cast< sdbc::XRow* >(this)), + (static_cast< sdbc::XCloseable* >(this)), + (static_cast< beans::XPropertySet* >(this)) + ); + return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ); +} // XTypeProvider methods. |