From 47317f041693db1a9d4618a1d9f7dcefe52b2904 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 25 Oct 2016 13:46:23 +0200 Subject: loplugin:expandablemethods in ucb..ucbhelper Change-Id: I42d077d7ebcfb77447d011644f8d64e80eae69c2 Reviewed-on: https://gerrit.libreoffice.org/30266 Tested-by: Jenkins Reviewed-by: Noel Grandin --- ucb/source/cacher/cachedcontentresultset.cxx | 21 ++++++++++--- ucb/source/cacher/cachedcontentresultset.hxx | 3 -- ucb/source/cacher/cachedcontentresultsetstub.cxx | 20 ++++++++++-- ucb/source/cacher/cachedcontentresultsetstub.hxx | 3 -- ucb/source/cacher/cacheddynamicresultset.cxx | 19 +++++++++-- ucb/source/cacher/cacheddynamicresultset.hxx | 4 --- ucb/source/cacher/cacheddynamicresultsetstub.cxx | 20 ++++++++++-- ucb/source/cacher/cacheddynamicresultsetstub.hxx | 4 --- ucb/source/core/provprox.cxx | 19 +++++++++-- ucb/source/core/provprox.hxx | 3 -- ucb/source/core/ucbstore.cxx | 40 ++++++++++++++++++++---- ucb/source/core/ucbstore.hxx | 6 ---- ucb/source/inc/regexpmap.hxx | 26 ++++++--------- ucb/source/sorter/sortdynres.cxx | 13 +------- ucb/source/sorter/sortdynres.hxx | 2 -- ucb/source/sorter/sortresult.cxx | 13 +------- ucb/source/sorter/sortresult.hxx | 3 -- ucb/source/ucp/ftp/ftpcontent.cxx | 13 +------- ucb/source/ucp/ftp/ftpcontent.hxx | 3 -- ucb/source/ucp/ftp/ftpcontentprovider.cxx | 11 +------ ucb/source/ucp/ftp/ftpcontentprovider.hxx | 4 --- ucb/source/ucp/hierarchy/hierarchydatasource.cxx | 24 ++++++++------ 22 files changed, 144 insertions(+), 130 deletions(-) (limited to 'ucb') diff --git a/ucb/source/cacher/cachedcontentresultset.cxx b/ucb/source/cacher/cachedcontentresultset.cxx index abf29aa1e12b..6b0a8fc7fc6d 100644 --- a/ucb/source/cacher/cachedcontentresultset.cxx +++ b/ucb/source/cacher/cachedcontentresultset.cxx @@ -978,11 +978,24 @@ XTYPEPROVIDER_IMPL_11( CachedContentResultSet // XServiceInfo methods. +OUString SAL_CALL CachedContentResultSet::getImplementationName() + throw( css::uno::RuntimeException, std::exception ) +{ + return OUString( "com.sun.star.comp.ucb.CachedContentResultSet" ); +} + +sal_Bool SAL_CALL CachedContentResultSet::supportsService( const OUString& ServiceName ) + throw( css::uno::RuntimeException, std::exception ) +{ + return cppu::supportsService( this, ServiceName ); +} + +css::uno::Sequence< OUString > SAL_CALL CachedContentResultSet::getSupportedServiceNames() + throw( css::uno::RuntimeException, std::exception ) +{ + return { CACHED_CONTENT_RESULTSET_SERVICE_NAME }; +} -XSERVICEINFO_NOFACTORY_IMPL_1( CachedContentResultSet, - OUString( - "com.sun.star.comp.ucb.CachedContentResultSet" ), - CACHED_CONTENT_RESULTSET_SERVICE_NAME ); // XPropertySet methods. ( inherited ) diff --git a/ucb/source/cacher/cachedcontentresultset.hxx b/ucb/source/cacher/cachedcontentresultset.hxx index 143fe0287e8d..12ff58132f73 100644 --- a/ucb/source/cacher/cachedcontentresultset.hxx +++ b/ucb/source/cacher/cachedcontentresultset.hxx @@ -211,9 +211,6 @@ public: virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) override; - static OUString getImplementationName_Static(); - static css::uno::Sequence< OUString > getSupportedServiceNames_Static(); - // XPropertySet inherited diff --git a/ucb/source/cacher/cachedcontentresultsetstub.cxx b/ucb/source/cacher/cachedcontentresultsetstub.cxx index aed7d5bc8c87..93f4467dc54b 100644 --- a/ucb/source/cacher/cachedcontentresultsetstub.cxx +++ b/ucb/source/cacher/cachedcontentresultsetstub.cxx @@ -169,10 +169,24 @@ Sequence< Type > SAL_CALL CachedContentResultSetStub // XServiceInfo methods. +OUString SAL_CALL CachedContentResultSetStub::getImplementationName() + throw( css::uno::RuntimeException, std::exception ) +{ + return OUString( "com.sun.star.comp.ucb.CachedContentResultSetStub" ); +} + +sal_Bool SAL_CALL CachedContentResultSetStub::supportsService( const OUString& ServiceName ) + throw( css::uno::RuntimeException, std::exception ) +{ + return cppu::supportsService( this, ServiceName ); +} + +css::uno::Sequence< OUString > SAL_CALL CachedContentResultSetStub::getSupportedServiceNames() + throw( css::uno::RuntimeException, std::exception ) +{ + return { CACHED_CRS_STUB_SERVICE_NAME }; +} -XSERVICEINFO_NOFACTORY_IMPL_1( CachedContentResultSetStub, - OUString( "com.sun.star.comp.ucb.CachedContentResultSetStub" ), - CACHED_CRS_STUB_SERVICE_NAME ); // XFetchProvider methods. diff --git a/ucb/source/cacher/cachedcontentresultsetstub.hxx b/ucb/source/cacher/cachedcontentresultsetstub.hxx index c0898d6874d7..6f855e8ddafe 100644 --- a/ucb/source/cacher/cachedcontentresultsetstub.hxx +++ b/ucb/source/cacher/cachedcontentresultsetstub.hxx @@ -123,9 +123,6 @@ public: virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) override; - static OUString getImplementationName_Static(); - static css::uno::Sequence< OUString > getSupportedServiceNames_Static(); - // XFetchProvider diff --git a/ucb/source/cacher/cacheddynamicresultset.cxx b/ucb/source/cacher/cacheddynamicresultset.cxx index f984e622937b..95acf89f921a 100644 --- a/ucb/source/cacher/cacheddynamicresultset.cxx +++ b/ucb/source/cacher/cacheddynamicresultset.cxx @@ -118,10 +118,23 @@ XTYPEPROVIDER_IMPL_4( CachedDynamicResultSet // XServiceInfo methods. +OUString SAL_CALL CachedDynamicResultSet::getImplementationName() + throw( css::uno::RuntimeException, std::exception ) +{ + return OUString( "com.sun.star.comp.ucb.CachedDynamicResultSet" ); +} + +sal_Bool SAL_CALL CachedDynamicResultSet::supportsService( const OUString& ServiceName ) + throw( css::uno::RuntimeException, std::exception ) +{ + return cppu::supportsService( this, ServiceName ); +} -XSERVICEINFO_NOFACTORY_IMPL_1( CachedDynamicResultSet, - OUString( "com.sun.star.comp.ucb.CachedDynamicResultSet" ), - CACHED_DRS_SERVICE_NAME ); +css::uno::Sequence< OUString > SAL_CALL CachedDynamicResultSet::getSupportedServiceNames() + throw( css::uno::RuntimeException, std::exception ) +{ + return { CACHED_DRS_SERVICE_NAME }; +} // own methods. ( inherited ) diff --git a/ucb/source/cacher/cacheddynamicresultset.hxx b/ucb/source/cacher/cacheddynamicresultset.hxx index cf5b1c92644b..c16a272701ad 100644 --- a/ucb/source/cacher/cacheddynamicresultset.hxx +++ b/ucb/source/cacher/cacheddynamicresultset.hxx @@ -73,10 +73,6 @@ public: virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) override; - static OUString getImplementationName_Static(); - static css::uno::Sequence< OUString > getSupportedServiceNames_Static(); - - // own methods ( inherited ) virtual void SAL_CALL diff --git a/ucb/source/cacher/cacheddynamicresultsetstub.cxx b/ucb/source/cacher/cacheddynamicresultsetstub.cxx index 6643d2fd5232..ed17b7ca7d3c 100644 --- a/ucb/source/cacher/cacheddynamicresultsetstub.cxx +++ b/ucb/source/cacher/cacheddynamicresultsetstub.cxx @@ -120,10 +120,24 @@ XTYPEPROVIDER_IMPL_5( CachedDynamicResultSetStub // XServiceInfo methods. +OUString SAL_CALL CachedDynamicResultSetStub::getImplementationName() + throw( css::uno::RuntimeException, std::exception ) +{ + return OUString( "com.sun.star.comp.ucb.CachedDynamicResultSetStub" ); +} + +sal_Bool SAL_CALL CachedDynamicResultSetStub::supportsService( const OUString& ServiceName ) + throw( css::uno::RuntimeException, std::exception ) +{ + return cppu::supportsService( this, ServiceName ); +} + +css::uno::Sequence< OUString > SAL_CALL CachedDynamicResultSetStub::getSupportedServiceNames() + throw( css::uno::RuntimeException, std::exception ) +{ + return { CACHED_DRS_STUB_SERVICE_NAME }; +} -XSERVICEINFO_NOFACTORY_IMPL_1( CachedDynamicResultSetStub, - OUString( "com.sun.star.comp.ucb.CachedDynamicResultSetStub" ), - CACHED_DRS_STUB_SERVICE_NAME ); // class CachedDynamicResultSetStubFactory diff --git a/ucb/source/cacher/cacheddynamicresultsetstub.hxx b/ucb/source/cacher/cacheddynamicresultsetstub.hxx index b0577d28937d..afc6144830d0 100644 --- a/ucb/source/cacher/cacheddynamicresultsetstub.hxx +++ b/ucb/source/cacher/cacheddynamicresultsetstub.hxx @@ -67,10 +67,6 @@ public: throw( css::uno::RuntimeException, std::exception ) override; virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) override; - - static OUString getImplementationName_Static(); - static css::uno::Sequence< OUString > getSupportedServiceNames_Static(); - }; diff --git a/ucb/source/core/provprox.cxx b/ucb/source/core/provprox.cxx index e1df4274b744..3bc13339824b 100644 --- a/ucb/source/core/provprox.cxx +++ b/ucb/source/core/provprox.cxx @@ -163,10 +163,23 @@ Sequence< Type > SAL_CALL UcbContentProviderProxy::getTypes() // XServiceInfo methods. +OUString SAL_CALL UcbContentProviderProxy::getImplementationName() + throw( css::uno::RuntimeException, std::exception ) +{ + return OUString( "com.sun.star.comp.ucb.UcbContentProviderProxy" ); +} -XSERVICEINFO_NOFACTORY_IMPL_1( UcbContentProviderProxy, - OUString( "com.sun.star.comp.ucb.UcbContentProviderProxy" ), - "com.sun.star.ucb.ContentProviderProxy" ); +sal_Bool SAL_CALL UcbContentProviderProxy::supportsService( const OUString& ServiceName ) + throw( css::uno::RuntimeException, std::exception ) +{ + return cppu::supportsService( this, ServiceName ); +} + +css::uno::Sequence< OUString > SAL_CALL UcbContentProviderProxy::getSupportedServiceNames() + throw( css::uno::RuntimeException, std::exception ) +{ + return { "com.sun.star.ucb.ContentProviderProxy" }; +} // XContentProvider methods. diff --git a/ucb/source/core/provprox.hxx b/ucb/source/core/provprox.hxx index c23ab690bd2c..2e1a4fc6590b 100644 --- a/ucb/source/core/provprox.hxx +++ b/ucb/source/core/provprox.hxx @@ -123,9 +123,6 @@ public: virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) override; - static OUString getImplementationName_Static(); - static css::uno::Sequence< OUString > getSupportedServiceNames_Static(); - // XContentProviderSupplier virtual css::uno::Reference< css::ucb::XContentProvider > SAL_CALL diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx index 19ba94a9739c..560a1228e4aa 100644 --- a/ucb/source/core/ucbstore.cxx +++ b/ucb/source/core/ucbstore.cxx @@ -249,9 +249,23 @@ PropertySetRegistry::~PropertySetRegistry() // XServiceInfo methods. -XSERVICEINFO_NOFACTORY_IMPL_1( PropertySetRegistry, - OUString( "com.sun.star.comp.ucb.PropertySetRegistry" ), - PROPSET_REG_SERVICE_NAME ); +OUString SAL_CALL PropertySetRegistry::getImplementationName() + throw( css::uno::RuntimeException, std::exception ) +{ + return OUString( "com.sun.star.comp.ucb.PropertySetRegistry" ); +} + +sal_Bool SAL_CALL PropertySetRegistry::supportsService( const OUString& ServiceName ) + throw( css::uno::RuntimeException, std::exception ) +{ + return cppu::supportsService( this, ServiceName ); +} + +css::uno::Sequence< OUString > SAL_CALL PropertySetRegistry::getSupportedServiceNames() + throw( css::uno::RuntimeException, std::exception ) +{ + return { PROPSET_REG_SERVICE_NAME }; +} // XPropertySetRegistry methods. @@ -1107,10 +1121,24 @@ PersistentPropertySet::~PersistentPropertySet() // XServiceInfo methods. +OUString SAL_CALL PersistentPropertySet::getImplementationName() + throw( css::uno::RuntimeException, std::exception ) +{ + return OUString( "com.sun.star.comp.ucb.PersistentPropertySet" ); +} -XSERVICEINFO_NOFACTORY_IMPL_1( PersistentPropertySet, - OUString( "com.sun.star.comp.ucb.PersistentPropertySet" ), - PERS_PROPSET_SERVICE_NAME ); +sal_Bool SAL_CALL PersistentPropertySet::supportsService( const OUString& ServiceName ) + throw( css::uno::RuntimeException, std::exception ) +{ + return cppu::supportsService( this, ServiceName ); +} + +css::uno::Sequence< OUString > SAL_CALL +PersistentPropertySet::getSupportedServiceNames() + throw( css::uno::RuntimeException, std::exception ) +{ + return { PERS_PROPSET_SERVICE_NAME }; +} // XComponent methods. diff --git a/ucb/source/core/ucbstore.hxx b/ucb/source/core/ucbstore.hxx index c0c8de3fb075..912256fcad47 100644 --- a/ucb/source/core/ucbstore.hxx +++ b/ucb/source/core/ucbstore.hxx @@ -124,9 +124,6 @@ public: virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) override; - static OUString getImplementationName_Static(); - static css::uno::Sequence< OUString > getSupportedServiceNames_Static(); - // XPropertySetRegistry virtual css::uno::Reference< css::ucb::XPersistentPropertySet > SAL_CALL openPropertySet( const OUString& key, sal_Bool create ) @@ -197,9 +194,6 @@ public: virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) override; - static OUString getImplementationName_Static(); - static css::uno::Sequence< OUString > getSupportedServiceNames_Static(); - // XComponent virtual void SAL_CALL dispose() diff --git a/ucb/source/inc/regexpmap.hxx b/ucb/source/inc/regexpmap.hxx index 6194b187b8dd..f8f5450596a7 100644 --- a/ucb/source/inc/regexpmap.hxx +++ b/ucb/source/inc/regexpmap.hxx @@ -119,8 +119,6 @@ private: RegexpMapImpl< Val > * m_pMap; int m_nList; mutable bool m_bEntrySet; - - void setEntry() const; }; template< typename Val > @@ -142,20 +140,6 @@ inline RegexpMapIterImpl< Val >::RegexpMapIterImpl(MapImpl * pTheMap, m_bEntrySet(false) {} -template< typename Val > -void RegexpMapIterImpl< Val >::setEntry() const -{ - if (!m_bEntrySet) - { - Entry< Val > const & rTheEntry - = m_nList == -1 ? *m_pMap->m_pDefault : *m_aIndex; - m_aEntry - = RegexpMapEntry< Val >(rTheEntry.m_aRegexp.getRegexp(), - const_cast< Val * >(&rTheEntry.m_aValue)); - m_bEntrySet = true; - } -} - template< typename Val > RegexpMapIterImpl< Val >::RegexpMapIterImpl(RegexpMapImpl< Val > * pTheMap, bool bBegin): @@ -243,7 +227,15 @@ void RegexpMapIterImpl< Val >::next() template< typename Val > RegexpMapEntry< Val > & RegexpMapIterImpl< Val >::get() { - setEntry(); + if (!m_bEntrySet) + { + Entry< Val > const & rTheEntry + = m_nList == -1 ? *m_pMap->m_pDefault : *m_aIndex; + m_aEntry + = RegexpMapEntry< Val >(rTheEntry.m_aRegexp.getRegexp(), + const_cast< Val * >(&rTheEntry.m_aValue)); + m_bEntrySet = true; + } return m_aEntry; } diff --git a/ucb/source/sorter/sortdynres.cxx b/ucb/source/sorter/sortdynres.cxx index 65f41326bee1..ead0def16a28 100644 --- a/ucb/source/sorter/sortdynres.cxx +++ b/ucb/source/sorter/sortdynres.cxx @@ -100,11 +100,6 @@ SortedDynamicResultSet::~SortedDynamicResultSet() OUString SAL_CALL SortedDynamicResultSet::getImplementationName() throw( css::uno::RuntimeException, std::exception ) -{ - return getImplementationName_Static(); -} - -OUString SortedDynamicResultSet::getImplementationName_Static() { return OUString( "com.sun.star.comp.ucb.SortedDynamicResultSet" ); } @@ -118,13 +113,7 @@ sal_Bool SAL_CALL SortedDynamicResultSet::supportsService( const OUString& Servi css::uno::Sequence< OUString > SAL_CALL SortedDynamicResultSet::getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) { - return getSupportedServiceNames_Static(); -} - -css::uno::Sequence< OUString > SortedDynamicResultSet::getSupportedServiceNames_Static() -{ - css::uno::Sequence aSNS { DYNAMIC_RESULTSET_SERVICE_NAME }; - return aSNS; + return { DYNAMIC_RESULTSET_SERVICE_NAME }; } // XComponent methods. diff --git a/ucb/source/sorter/sortdynres.hxx b/ucb/source/sorter/sortdynres.hxx index 0078fd8a5950..a766f5f79179 100644 --- a/ucb/source/sorter/sortdynres.hxx +++ b/ucb/source/sorter/sortdynres.hxx @@ -86,8 +86,6 @@ public: throw( css::uno::RuntimeException, std::exception ) override; virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) override; - static OUString getImplementationName_Static(); - static css::uno::Sequence< OUString > getSupportedServiceNames_Static(); // XComponent diff --git a/ucb/source/sorter/sortresult.cxx b/ucb/source/sorter/sortresult.cxx index b9d530cbb531..392775b16db8 100644 --- a/ucb/source/sorter/sortresult.cxx +++ b/ucb/source/sorter/sortresult.cxx @@ -163,11 +163,6 @@ SortedResultSet::~SortedResultSet() OUString SAL_CALL SortedResultSet::getImplementationName() throw( css::uno::RuntimeException, std::exception ) -{ - return getImplementationName_Static(); -} - -OUString SortedResultSet::getImplementationName_Static() { return OUString( "com.sun.star.comp.ucb.SortedResultSet" ); } @@ -181,13 +176,7 @@ sal_Bool SAL_CALL SortedResultSet::supportsService( const OUString& ServiceName css::uno::Sequence< OUString > SAL_CALL SortedResultSet::getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) { - return getSupportedServiceNames_Static(); -} - -css::uno::Sequence< OUString >SortedResultSet::getSupportedServiceNames_Static() -{ - css::uno::Sequence aSNS { RESULTSET_SERVICE_NAME }; - return aSNS; + return { RESULTSET_SERVICE_NAME }; } diff --git a/ucb/source/sorter/sortresult.hxx b/ucb/source/sorter/sortresult.hxx index b0b575a05ea9..af481be1520f 100644 --- a/ucb/source/sorter/sortresult.hxx +++ b/ucb/source/sorter/sortresult.hxx @@ -190,9 +190,6 @@ public: throw( css::uno::RuntimeException, std::exception ) override; - static OUString getImplementationName_Static(); - static css::uno::Sequence< OUString > getSupportedServiceNames_Static(); - // XComponent virtual void SAL_CALL dispose() throw( css::uno::RuntimeException, std::exception ) override; diff --git a/ucb/source/ucp/ftp/ftpcontent.cxx b/ucb/source/ucp/ftp/ftpcontent.cxx index 8e73b4908c8c..ca606c994b9c 100644 --- a/ucb/source/ucp/ftp/ftpcontent.cxx +++ b/ucb/source/ucp/ftp/ftpcontent.cxx @@ -176,11 +176,6 @@ css::uno::Sequence< css::uno::Type > SAL_CALL FTPContent::getTypes() OUString SAL_CALL FTPContent::getImplementationName() throw( css::uno::RuntimeException, std::exception ) -{ - return getImplementationName_Static(); -} - -OUString FTPContent::getImplementationName_Static() { return OUString( "com.sun.star.comp.FTPContent"); } @@ -194,13 +189,7 @@ sal_Bool SAL_CALL FTPContent::supportsService( const OUString& ServiceName ) css::uno::Sequence< OUString > SAL_CALL FTPContent::getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) { - return getSupportedServiceNames_Static(); -} - -css::uno::Sequence< OUString > FTPContent::getSupportedServiceNames_Static() -{ - css::uno::Sequence aSNS { "com.sun.star.ucb.FTPContent" }; - return aSNS; + return { "com.sun.star.ucb.FTPContent" }; } diff --git a/ucb/source/ucp/ftp/ftpcontent.hxx b/ucb/source/ucp/ftp/ftpcontent.hxx index dde4be2dc72e..9c7a64059b12 100644 --- a/ucb/source/ucp/ftp/ftpcontent.hxx +++ b/ucb/source/ucp/ftp/ftpcontent.hxx @@ -86,9 +86,6 @@ public: virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) override; - static OUString getImplementationName_Static(); - static css::uno::Sequence< OUString > getSupportedServiceNames_Static(); - // XContent virtual OUString SAL_CALL getContentType() throw( css::uno::RuntimeException, std::exception ) override; diff --git a/ucb/source/ucp/ftp/ftpcontentprovider.cxx b/ucb/source/ucp/ftp/ftpcontentprovider.cxx index cb67852db987..fb5db74b2244 100644 --- a/ucb/source/ucp/ftp/ftpcontentprovider.cxx +++ b/ucb/source/ucp/ftp/ftpcontentprovider.cxx @@ -209,8 +209,7 @@ Reference SAL_CALL FTPContentProvider::queryContent( registerNewContent(xContent); } else { - Reference - xProvider(getHttpProvider()); + Reference xProvider(UniversalContentBroker::create( m_xContext )->queryContentProvider("http:")); if(xProvider.is()) return xProvider->queryContent(xCanonicId); else @@ -288,12 +287,4 @@ bool FTPContentProvider::setHost( const OUString& host, return !present; } - -Reference FTPContentProvider::getHttpProvider() - throw(RuntimeException) -{ - // used for access to ftp-proxy - return UniversalContentBroker::create( m_xContext )->queryContentProvider("http:"); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/ucb/source/ucp/ftp/ftpcontentprovider.hxx b/ucb/source/ucp/ftp/ftpcontentprovider.hxx index aedc02fba3a0..1bba0043c63d 100644 --- a/ucb/source/ucp/ftp/ftpcontentprovider.hxx +++ b/ucb/source/ucp/ftp/ftpcontentprovider.hxx @@ -125,10 +125,6 @@ namespace ftp std::vector m_ServerInfo; void init(); - - css::uno::Reference getHttpProvider() - throw(css::uno::RuntimeException); - }; // end class FTPContentProvider } // end namespace ftp diff --git a/ucb/source/ucp/hierarchy/hierarchydatasource.cxx b/ucb/source/ucp/hierarchy/hierarchydatasource.cxx index 87d1353ac7dc..a3eed99bba95 100644 --- a/ucb/source/ucp/hierarchy/hierarchydatasource.cxx +++ b/ucb/source/ucp/hierarchy/hierarchydatasource.cxx @@ -107,9 +107,6 @@ public: virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) override; - static OUString getImplementationName_Static(); - static css::uno::Sequence< OUString > getSupportedServiceNames_Static(); - // XTypeProvider virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw( css::uno::RuntimeException, std::exception ) override; @@ -722,15 +719,22 @@ uno::Sequence< uno::Type > SAL_CALL HierarchyDataAccess::getTypes() // XServiceInfo methods. +OUString SAL_CALL HierarchyDataAccess::getImplementationName() + throw( css::uno::RuntimeException, std::exception ) +{ + return OUString("com.sun.star.comp.ucb.HierarchyDataAccess"); +} -XSERVICEINFO_NOFACTORY_IMPL_0( - HierarchyDataAccess, - OUString( "com.sun.star.comp.ucb.HierarchyDataAccess" ) ) +sal_Bool SAL_CALL HierarchyDataAccess::supportsService( const OUString& ServiceName ) + throw( css::uno::RuntimeException, std::exception ) { - uno::Sequence< OUString > aSNS( 2 ); - aSNS[ 0 ] = READ_SERVICE_NAME; - aSNS[ 1 ] = READWRITE_SERVICE_NAME; - return aSNS; + return cppu::supportsService( this, ServiceName ); +} + +css::uno::Sequence< OUString > SAL_CALL HierarchyDataAccess::getSupportedServiceNames() + throw( css::uno::RuntimeException, std::exception ) +{ + return { READ_SERVICE_NAME, READWRITE_SERVICE_NAME }; } -- cgit