[Libreoffice-commits] core.git: 2 commits - ucb/source

Norbert Thiebaud nthiebaud at gmail.com
Thu Mar 6 21:35:01 PST 2014


 ucb/source/core/identify.cxx     |   49 ----------
 ucb/source/core/identify.hxx     |   27 +----
 ucb/source/sorter/sortdynres.cxx |  180 +++++++++++++--------------------------
 ucb/source/sorter/sortdynres.hxx |  119 ++++++++-----------------
 4 files changed, 107 insertions(+), 268 deletions(-)

New commits:
commit edb2dcffaa94ae9949e6f76e409b9ee47a602629
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Thu Mar 6 23:34:18 2014 -0600

    de-macroize ucb sortdynres
    
    Change-Id: I292875fde0be3f838ad838233df11d765e4affd1

diff --git a/ucb/source/sorter/sortdynres.cxx b/ucb/source/sorter/sortdynres.cxx
index f174a96..07cbfd1 100644
--- a/ucb/source/sorter/sortdynres.cxx
+++ b/ucb/source/sorter/sortdynres.cxx
@@ -17,7 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-
 #include <vector>
 #include <sortdynres.hxx>
 #include <cppuhelper/interfacecontainer.hxx>
@@ -27,7 +26,6 @@
 #include <com/sun/star/ucb/CachedDynamicResultSetStubFactory.hpp>
 #include <com/sun/star/ucb/XSourceInitialization.hpp>
 
-
 using namespace com::sun::star::beans;
 using namespace com::sun::star::lang;
 using namespace com::sun::star::sdbc;
@@ -36,8 +34,6 @@ using namespace com::sun::star::uno;
 using namespace cppu;
 
 
-
-
 //  The mutex to synchronize access to containers.
 static osl::Mutex& getContainerMutex()
 {
@@ -56,11 +52,8 @@ static osl::Mutex& getContainerMutex()
 }
 
 
-
 // SortedDynamicResultSet
 
-
-
 SortedDynamicResultSet::SortedDynamicResultSet(
                         const Reference < XDynamicResultSet > &xOriginal,
                         const Sequence < NumberedSortingInfo > &aOptions,
@@ -101,48 +94,37 @@ SortedDynamicResultSet::~SortedDynamicResultSet()
     mpTwo = NULL;
 }
 
+// XServiceInfo methods.
 
-// XInterface methods.
-void SAL_CALL SortedDynamicResultSet::acquire()
-    throw()
+OUString SAL_CALL SortedDynamicResultSet::getImplementationName()
+    throw( css::uno::RuntimeException, std::exception )
 {
-    OWeakObject::acquire();
+    return getImplementationName_Static();
 }
 
-void SAL_CALL SortedDynamicResultSet::release()
-    throw()
+OUString SortedDynamicResultSet::getImplementationName_Static()
 {
-    OWeakObject::release();
+    return OUString( "com.sun.star.comp.ucb.SortedDynamicResultSet" );
 }
 
-css::uno::Any SAL_CALL SortedDynamicResultSet::queryInterface( const css::uno::Type & rType )
+sal_Bool SAL_CALL SortedDynamicResultSet::supportsService( const OUString& ServiceName )
     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 );
+    return cppu::supportsService( this, ServiceName );
 }
 
-// XTypeProvider methods.
-
-
-XTYPEPROVIDER_IMPL_3( SortedDynamicResultSet,
-                      XTypeProvider,
-                         XServiceInfo,
-                      XDynamicResultSet );
-
-
-// XServiceInfo methods.
-
-
-XSERVICEINFO_NOFACTORY_IMPL_1( SortedDynamicResultSet,
-                                   OUString( "com.sun.star.comp.ucb.SortedDynamicResultSet" ),
-                                   OUString( DYNAMIC_RESULTSET_SERVICE_NAME ) );
+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< OUString > aSNS( 1 );
+    aSNS.getArray()[ 0 ] = OUString( DYNAMIC_RESULTSET_SERVICE_NAME );
+    return aSNS;
+}
 
 // XComponent methods.
 
@@ -167,7 +149,6 @@ void SAL_CALL SortedDynamicResultSet::dispose()
     mbUseOne = sal_True;
 }
 
-
 void SAL_CALL SortedDynamicResultSet::addEventListener(
                             const Reference< XEventListener >& Listener )
     throw( RuntimeException, std::exception )
@@ -181,7 +162,6 @@ void SAL_CALL SortedDynamicResultSet::addEventListener(
     mpDisposeEventListeners->addInterface( Listener );
 }
 
-
 void SAL_CALL SortedDynamicResultSet::removeEventListener(
                             const Reference< XEventListener >& Listener )
     throw( RuntimeException, std::exception )
@@ -236,8 +216,7 @@ SortedDynamicResultSet::setListener( const Reference< XDynamicResultSetListener
 
 
 void SAL_CALL
-SortedDynamicResultSet::connectToCache(
-        const Reference< XDynamicResultSet > & xCache )
+SortedDynamicResultSet::connectToCache( const Reference< XDynamicResultSet > & xCache )
         throw( ListenerAlreadySetException,
                AlreadyInitializedException,
                ServiceNotFoundException,
@@ -272,8 +251,7 @@ SortedDynamicResultSet::connectToCache(
 }
 
 
-sal_Int16 SAL_CALL
-SortedDynamicResultSet::getCapabilities()
+sal_Int16 SAL_CALL SortedDynamicResultSet::getCapabilities()
     throw( RuntimeException, std::exception )
 {
     osl::Guard< osl::Mutex > aGuard( maMutex );
@@ -307,8 +285,7 @@ SortedDynamicResultSet::getCapabilities()
  update call at once is, while he disposes his broadcaster or while he is
  removing himsef as listener (otherwise you deadlock)!!!
 */
-void SAL_CALL
-SortedDynamicResultSet::impl_notify( const ListEvent& Changes )
+void SAL_CALL SortedDynamicResultSet::impl_notify( const ListEvent& Changes )
     throw( RuntimeException )
 {
     osl::Guard< osl::Mutex > aGuard( maMutex );
@@ -436,18 +413,15 @@ SortedDynamicResultSet::impl_notify( const ListEvent& Changes )
     pCurSet->CheckProperties( nOldCount, bWasFinal );
 }
 
-
 // XEventListener
 
-void SAL_CALL
-SortedDynamicResultSet::impl_disposing( const EventObject& )
+void SAL_CALL SortedDynamicResultSet::impl_disposing( const EventObject& )
     throw( RuntimeException )
 {
     mxListener.clear();
     mxOriginal.clear();
 }
 
-
 // private methods
 
 void SortedDynamicResultSet::SendNotify()
@@ -474,11 +448,8 @@ void SortedDynamicResultSet::SendNotify()
     maActions.Clear();
 }
 
-
-
 // SortedDynamicResultSetFactory
 
-
 SortedDynamicResultSetFactory::SortedDynamicResultSetFactory(
                         const Reference< XComponentContext > & rxContext )
 {
@@ -491,52 +462,60 @@ SortedDynamicResultSetFactory::~SortedDynamicResultSetFactory()
 }
 
 
-// XInterface methods.
-void SAL_CALL SortedDynamicResultSetFactory::acquire()
-    throw()
+// XServiceInfo methods.
+
+OUString SAL_CALL SortedDynamicResultSetFactory::getImplementationName()
+    throw( css::uno::RuntimeException, std::exception )
 {
-    OWeakObject::acquire();
+    return getImplementationName_Static();
 }
 
-void SAL_CALL SortedDynamicResultSetFactory::release()
-    throw()
+OUString SortedDynamicResultSetFactory::getImplementationName_Static()
 {
-    OWeakObject::release();
+    return OUString( "com.sun.star.comp.ucb.SortedDynamicResultSetFactory" );
 }
 
-css::uno::Any SAL_CALL SortedDynamicResultSetFactory::queryInterface( const css::uno::Type & rType )
+sal_Bool SAL_CALL SortedDynamicResultSetFactory::supportsService( const OUString& ServiceName )
     throw( css::uno::RuntimeException, std::exception )
 {
-    css::uno::Any aRet = cppu::queryInterface( rType,
-                                               (static_cast< XTypeProvider* >(this)),
-                                               (static_cast< XServiceInfo* >(this)),
-                                               (static_cast< XSortedDynamicResultSetFactory* >(this))
-                                               );
-    return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
+    return cppu::supportsService( this, ServiceName );
 }
 
-// XTypeProvider methods.
-
-
-XTYPEPROVIDER_IMPL_3( SortedDynamicResultSetFactory,
-                      XTypeProvider,
-                         XServiceInfo,
-                      XSortedDynamicResultSetFactory );
-
-
-// XServiceInfo methods.
+css::uno::Sequence< OUString > SAL_CALL SortedDynamicResultSetFactory::getSupportedServiceNames()
+    throw( css::uno::RuntimeException, std::exception )
+{
+    return getSupportedServiceNames_Static();
+}
 
+static css::uno::Reference< css::uno::XInterface > SAL_CALL
+SortedDynamicResultSetFactory_CreateInstance( const css::uno::Reference<
+                                              css::lang::XMultiServiceFactory> & rSMgr )
+    throw( css::uno::Exception )
+{
+    css::lang::XServiceInfo* pX = (css::lang::XServiceInfo*)
+        new SortedDynamicResultSetFactory( ucbhelper::getComponentContext(rSMgr) );
+    return css::uno::Reference< css::uno::XInterface >::query( pX );
+}
 
-XSERVICEINFO_IMPL_1_CTX( SortedDynamicResultSetFactory,
-                         OUString( "com.sun.star.comp.ucb.SortedDynamicResultSetFactory" ),
-                         OUString( DYNAMIC_RESULTSET_FACTORY_NAME ) );
+css::uno::Sequence< OUString > SortedDynamicResultSetFactory::getSupportedServiceNames_Static()
+{
+    com::sun::star::uno::Sequence< OUString > aSNS( 1 );
+    aSNS.getArray()[ 0 ] =  OUString( DYNAMIC_RESULTSET_FACTORY_NAME );
+    return aSNS;
+}
 
 
 // Service factory implementation.
-
-
-ONE_INSTANCE_SERVICE_FACTORY_IMPL( SortedDynamicResultSetFactory );
-
+css::uno::Reference< css::lang::XSingleServiceFactory >
+SortedDynamicResultSetFactory::createServiceFactory( const css::uno::Reference< css::lang::XMultiServiceFactory >& rxServiceMgr )
+{
+    return css::uno::Reference< css::lang::XSingleServiceFactory >(
+            cppu::createOneInstanceFactory(
+                    rxServiceMgr,
+                    SortedDynamicResultSetFactory::getImplementationName_Static(),
+                    SortedDynamicResultSetFactory_CreateInstance,
+                    SortedDynamicResultSetFactory::getSupportedServiceNames_Static() ) );
+}
 
 // SortedDynamicResultSetFactory methods.
 
@@ -552,12 +531,8 @@ SortedDynamicResultSetFactory::createSortedDynamicResultSet(
     return xRet;
 }
 
-
-
 // EventList
 
-
-
 void EventList::Clear()
 {
     for ( std::deque< ListAction* >::size_type i = 0;
@@ -569,7 +544,6 @@ void EventList::Clear()
     maData.clear();
 }
 
-
 void EventList::AddEvent( sal_IntPtr nType, sal_IntPtr nPos, sal_IntPtr nCount )
 {
     ListAction *pAction = new ListAction;
@@ -580,12 +554,8 @@ void EventList::AddEvent( sal_IntPtr nType, sal_IntPtr nPos, sal_IntPtr nCount )
     Insert( pAction );
 }
 
-
-
 // SortedDynamicResultSetListener
 
-
-
 SortedDynamicResultSetListener::SortedDynamicResultSetListener(
                                 SortedDynamicResultSet *mOwner )
 {
@@ -597,31 +567,6 @@ SortedDynamicResultSetListener::~SortedDynamicResultSetListener()
 {
 }
 
-
-// XInterface methods.
-
-void SAL_CALL SortedDynamicResultSetListener::acquire()
-    throw()
-{
-    OWeakObject::acquire();
-}
-
-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 )
 
 void SAL_CALL
@@ -647,7 +592,6 @@ SortedDynamicResultSetListener::notify( const ListEvent& Changes )
         mpOwner->impl_notify( Changes );
 }
 
-
 // own methods:
 
 void SAL_CALL
diff --git a/ucb/source/sorter/sortdynres.hxx b/ucb/source/sorter/sortdynres.hxx
index dc459c3..0f70026 100644
--- a/ucb/source/sorter/sortdynres.hxx
+++ b/ucb/source/sorter/sortdynres.hxx
@@ -20,38 +20,29 @@
 #ifndef _SORTDYNRES_HXX
 #define _SORTDYNRES_HXX
 
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/lang/XTypeProvider.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XComponent.hpp>
 #include <com/sun/star/ucb/NumberedSortingInfo.hpp>
 #include <com/sun/star/sdbc/XResultSet.hpp>
 #include <com/sun/star/ucb/XDynamicResultSet.hpp>
 #include <com/sun/star/ucb/XDynamicResultSetListener.hpp>
 #include <com/sun/star/ucb/ListenerAlreadySetException.hpp>
 #include <com/sun/star/ucb/XSortedDynamicResultSetFactory.hpp>
-#include <cppuhelper/weak.hxx>
-#include <osl/mutex.hxx>
-#include <ucbhelper/macros.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <cppuhelper/implbase2.hxx>
 #include "sortresult.hxx"
 
+
 namespace cppu {
     class OInterfaceContainerHelper;
 }
 
-
-
 #define DYNAMIC_RESULTSET_SERVICE_NAME  "com.sun.star.ucb.SortedDynamicResultSet"
 #define DYNAMIC_RESULTSET_FACTORY_NAME  "com.sun.star.ucb.SortedDynamicResultSetFactory"
 
-
 class SortedDynamicResultSetListener;
 
-class SortedDynamicResultSet:
-                public cppu::OWeakObject,
-                public css::lang::XTypeProvider,
-                public css::lang::XServiceInfo,
-                public css::ucb::XDynamicResultSet
+class SortedDynamicResultSet: public cppu::WeakImplHelper2 <
+    css::lang::XServiceInfo,
+    css::ucb::XDynamicResultSet >
 {
     cppu::OInterfaceContainerHelper *mpDisposeEventListeners;
 
@@ -71,12 +62,11 @@ class SortedDynamicResultSet:
 
     EventList                           maActions;
     osl::Mutex                          maMutex;
-    sal_Bool                            mbGotWelcome    :1;
-    sal_Bool                            mbUseOne        :1;
-    sal_Bool                            mbStatic        :1;
+    sal_Bool                            mbGotWelcome:1;
+    sal_Bool                            mbUseOne:1;
+    sal_Bool                            mbStatic:1;
 
 private:
-
     void                SendNotify();
 
 public:
@@ -88,28 +78,20 @@ public:
     ~SortedDynamicResultSet();
 
 
-    // XInterface
-    virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType )
-        throw( css::uno::RuntimeException, std::exception );
-    virtual void SAL_CALL acquire()
-        throw();
-    virtual void SAL_CALL release()
-        throw();
-
-    // XTypeProvider
-
-    XTYPEPROVIDER_DECL()
-
-
     // XServiceInfo
 
-    XSERVICEINFO_NOFACTORY_DECL()
-
+    virtual OUString SAL_CALL getImplementationName()
+        throw( css::uno::RuntimeException, std::exception );
+    virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
+        throw( css::uno::RuntimeException, std::exception );
+    virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
+        throw( css::uno::RuntimeException, std::exception );
+    static OUString getImplementationName_Static();
+    static css::uno::Sequence< OUString > getSupportedServiceNames_Static();
 
     // XComponent
 
-    virtual void SAL_CALL
-    dispose() throw( css::uno::RuntimeException, std::exception );
+    virtual void SAL_CALL dispose() throw( css::uno::RuntimeException, std::exception );
 
     virtual void SAL_CALL
     addEventListener( const css::uno::Reference< css::lang::XEventListener >& Listener )
@@ -122,8 +104,7 @@ public:
 
     // XDynamicResultSet
 
-    virtual css::uno::Reference< css::sdbc::XResultSet > SAL_CALL
-    getStaticResultSet(  )
+    virtual css::uno::Reference< css::sdbc::XResultSet > SAL_CALL getStaticResultSet()
         throw( css::ucb::ListenerAlreadySetException, css::uno::RuntimeException, std::exception );
 
     virtual void SAL_CALL
@@ -144,20 +125,15 @@ public:
 
     // own methods:
 
-    virtual void SAL_CALL
-    impl_disposing( const css::lang::EventObject& Source )
+    virtual void SAL_CALL impl_disposing( const css::lang::EventObject& Source )
         throw( css::uno::RuntimeException );
 
-    virtual void SAL_CALL
-    impl_notify( const css::ucb::ListEvent& Changes )
+    virtual void SAL_CALL impl_notify( const css::ucb::ListEvent& Changes )
         throw( css::uno::RuntimeException );
 };
 
-
-
-class SortedDynamicResultSetListener:
-                public cppu::OWeakObject,
-                public css::ucb::XDynamicResultSetListener
+class SortedDynamicResultSetListener: public cppu::WeakImplHelper1 <
+    css::ucb::XDynamicResultSetListener >
 {
     SortedDynamicResultSet  *mpOwner;
     osl::Mutex              maMutex;
@@ -166,29 +142,17 @@ public:
      SortedDynamicResultSetListener( SortedDynamicResultSet *mOwner );
     ~SortedDynamicResultSetListener();
 
-
-    // XInterface
-    virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType )
-        throw( css::uno::RuntimeException, std::exception );
-    virtual void SAL_CALL acquire()
-        throw();
-    virtual void SAL_CALL release()
-        throw();
-
     // XEventListener ( base of XDynamicResultSetListener )
 
     virtual void SAL_CALL
     disposing( const css::lang::EventObject& Source )
         throw( css::uno::RuntimeException, std::exception );
 
-
     // XDynamicResultSetListener
 
-    virtual void SAL_CALL
-    notify( const css::ucb::ListEvent& Changes )
+    virtual void SAL_CALL notify( const css::ucb::ListEvent& Changes )
         throw( css::uno::RuntimeException, std::exception );
 
-
     // own methods:
 
     void SAL_CALL impl_OwnerDies();
@@ -196,43 +160,36 @@ public:
 
 
 
-class SortedDynamicResultSetFactory:
-                public cppu::OWeakObject,
-                public css::lang::XTypeProvider,
-                public css::lang::XServiceInfo,
-                public css::ucb::XSortedDynamicResultSetFactory
+class SortedDynamicResultSetFactory: public cppu::WeakImplHelper2 <
+    css::lang::XServiceInfo,
+    css::ucb::XSortedDynamicResultSetFactory >
 {
 
     css::uno::Reference< css::uno::XComponentContext >   m_xContext;
 
 public:
-
     SortedDynamicResultSetFactory(
         const css::uno::Reference< css::uno::XComponentContext > & rxContext);
 
     ~SortedDynamicResultSetFactory();
 
 
-    // XInterface
-    virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType )
-        throw( css::uno::RuntimeException, std::exception );
-    virtual void SAL_CALL acquire()
-        throw();
-    virtual void SAL_CALL release()
-        throw();
-
-    // XTypeProvider
-
-    XTYPEPROVIDER_DECL()
-
-
     // XServiceInfo
 
-    XSERVICEINFO_DECL()
-
+    static css::uno::Reference< css::lang::XSingleServiceFactory > createServiceFactory(
+            const css::uno::Reference< css::lang::XMultiServiceFactory >& rxServiceMgr );
 
     // XSortedDynamicResultSetFactory
 
+    virtual OUString SAL_CALL getImplementationName()
+        throw( css::uno::RuntimeException, std::exception );
+    virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
+        throw( css::uno::RuntimeException, std::exception );
+    virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
+        throw( css::uno::RuntimeException, std::exception );
+    static OUString getImplementationName_Static();
+    static css::uno::Sequence< OUString > getSupportedServiceNames_Static();
+
     virtual css::uno::Reference< css::ucb::XDynamicResultSet > SAL_CALL
     createSortedDynamicResultSet(
                 const css::uno::Reference< css::ucb::XDynamicResultSet > & Source,
commit 864afb34d6e3ed8c4033dc395931874881f7571d
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Thu Mar 6 22:16:32 2014 -0600

    use WeakImplhelper1 for ContentIdentifier
    
    Change-Id: I830d2642bde6affbc400fbaab11955ac082b7bc5

diff --git a/ucb/source/core/identify.cxx b/ucb/source/core/identify.cxx
index 7da0d47..e36442c 100644
--- a/ucb/source/core/identify.cxx
+++ b/ucb/source/core/identify.cxx
@@ -31,15 +31,9 @@ using namespace com::sun::star::lang;
 using namespace com::sun::star::ucb;
 
 
-
-
 // ContentIdentifier Implementation.
-
-
-
-ContentIdentifier::ContentIdentifier(
-                        const OUString& ContentId )
-: m_aContentId( ContentId )
+ContentIdentifier::ContentIdentifier( const OUString& ContentId )
+    : m_aContentId( ContentId )
 {
 }
 
@@ -50,46 +44,7 @@ ContentIdentifier::~ContentIdentifier()
 }
 
 
-
-// XInterface methods.
-
-void SAL_CALL ContentIdentifier::acquire()
-    throw()
-{
-    OWeakObject::acquire();
-}
-
-void SAL_CALL ContentIdentifier::release()
-    throw()
-{
-    OWeakObject::release();
-}
-
-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.
-
-
-
-XTYPEPROVIDER_IMPL_2( ContentIdentifier,
-                      XTypeProvider,
-                      XContentIdentifier );
-
-
-
 // XContentIdentifier methods.
-
-
-
 // virtual
 OUString SAL_CALL ContentIdentifier::getContentIdentifier()
     throw( RuntimeException, std::exception )
diff --git a/ucb/source/core/identify.hxx b/ucb/source/core/identify.hxx
index dae7402..deb7cdc 100644
--- a/ucb/source/core/identify.hxx
+++ b/ucb/source/core/identify.hxx
@@ -21,39 +21,22 @@
 #define _IDENTIFY_HXX
 
 #include <com/sun/star/ucb/XContentIdentifier.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/lang/XTypeProvider.hpp>
 #include <rtl/ustrbuf.hxx>
-#include <cppuhelper/weak.hxx>
-#include <ucbhelper/macros.hxx>
+#include <cppuhelper/implbase1.hxx>
 
 
-
-class ContentIdentifier :
-                public cppu::OWeakObject,
-                public com::sun::star::lang::XTypeProvider,
-                  public com::sun::star::ucb::XContentIdentifier
+class ContentIdentifier : public cppu::WeakImplHelper1 <
+    css::ucb::XContentIdentifier >
 {
 public:
     ContentIdentifier( const OUString& ContentId );
     virtual ~ContentIdentifier();
 
-    // XInterface
-    virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType )
-        throw( css::uno::RuntimeException, std::exception );
-    virtual void SAL_CALL acquire()
-        throw();
-    virtual void SAL_CALL release()
-        throw();
-
-    // XTypeProvider
-    XTYPEPROVIDER_DECL()
-
     // XContentIdentifier
     virtual OUString SAL_CALL getContentIdentifier()
-        throw( com::sun::star::uno::RuntimeException, std::exception );
+        throw( css::uno::RuntimeException, std::exception );
     virtual OUString SAL_CALL getContentProviderScheme()
-        throw( com::sun::star::uno::RuntimeException, std::exception );
+        throw( css::uno::RuntimeException, std::exception );
 
 private:
     OUString m_aContentId;


More information about the Libreoffice-commits mailing list