[Libreoffice-commits] core.git: include/ucbhelper ucbhelper/source

Norbert Thiebaud nthiebaud at gmail.com
Thu Mar 6 01:05:04 PST 2014


 include/ucbhelper/activedatasink.hxx       |   36 ++++-----------------
 ucbhelper/source/client/activedatasink.cxx |   49 -----------------------------
 2 files changed, 9 insertions(+), 76 deletions(-)

New commits:
commit a6e19ea7a8885dcbdb1d8b2f56586373595ba8aa
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Wed Mar 5 19:47:58 2014 -0600

    use WeakImplHelper for ActivaDataSink
    
    Change-Id: Ife32157ff876a0860b3920cadc24b7888200796b
    Signed-off-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/include/ucbhelper/activedatasink.hxx b/include/ucbhelper/activedatasink.hxx
index 5adf7be..3a8470f 100644
--- a/include/ucbhelper/activedatasink.hxx
+++ b/include/ucbhelper/activedatasink.hxx
@@ -20,51 +20,31 @@
 #ifndef INCLUDED_UCBHELPER_ACTIVEDATASINK_HXX
 #define INCLUDED_UCBHELPER_ACTIVEDATASINK_HXX
 
-#include <com/sun/star/lang/XTypeProvider.hpp>
 #include <com/sun/star/io/XActiveDataSink.hpp>
-#include <cppuhelper/weak.hxx>
-#include <ucbhelper/macros.hxx>
 #include <ucbhelper/ucbhelperdllapi.h>
+#include <cppuhelper/implbase1.hxx>
 
 namespace ucbhelper
 {
 
-
-
 /**
   * This class implements the interface com::sun::star::io::XActiveDataSink.
   * Instances of this class can be passed with the parameters of an
   * "open" command.
   */
 
-class UCBHELPER_DLLPUBLIC ActiveDataSink : public cppu::OWeakObject,
-                       public com::sun::star::lang::XTypeProvider,
-                       public com::sun::star::io::XActiveDataSink
+class UCBHELPER_DLLPUBLIC ActiveDataSink :
+        public cppu::WeakImplHelper1< css::io::XActiveDataSink >
 {
-    com::sun::star::uno::Reference<
-        com::sun::star::io::XInputStream > m_xStream;
+    css::uno::Reference< css::io::XInputStream > m_xStream;
 
 public:
-    // XInterface
-    virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType )
+    // XActiveDataSink methods.
+    virtual void SAL_CALL setInputStream( const css::uno::Reference< css::io::XInputStream >& aStream )
         throw( css::uno::RuntimeException, std::exception );
-    virtual void SAL_CALL acquire()
-        throw();
-    virtual void SAL_CALL release()
-        throw();
 
-    // XTypeProvider
-    XTYPEPROVIDER_DECL()
-
-    // XActiveDataSink methods.
-    virtual void SAL_CALL
-    setInputStream( const com::sun::star::uno::Reference<
-                            com::sun::star::io::XInputStream >& aStream )
-        throw( com::sun::star::uno::RuntimeException, std::exception );
-    virtual com::sun::star::uno::Reference<
-        com::sun::star::io::XInputStream > SAL_CALL
-    getInputStream()
-        throw( com::sun::star::uno::RuntimeException, std::exception );
+    virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getInputStream()
+        throw( css::uno::RuntimeException, std::exception );
 };
 
 } /* namespace ucbhelper */
diff --git a/ucbhelper/source/client/activedatasink.cxx b/ucbhelper/source/client/activedatasink.cxx
index d83643f..604801f 100644
--- a/ucbhelper/source/client/activedatasink.cxx
+++ b/ucbhelper/source/client/activedatasink.cxx
@@ -29,58 +29,11 @@ using namespace com::sun::star;
 
 namespace ucbhelper
 {
-
-
-
-
 // ActiveDataSink Implementation.
-
-
-
-
-
-
-// XInterface methods
-
-void SAL_CALL ActiveDataSink::acquire()
-    throw()
-{
-    OWeakObject::acquire();
-}
-
-void SAL_CALL ActiveDataSink::release()
-    throw()
-{
-    OWeakObject::release();
-}
-
-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
-
-
-
-XTYPEPROVIDER_IMPL_2( ActiveDataSink,
-                      lang::XTypeProvider,
-                      io::XActiveDataSink );
-
-
-
 // XActiveDataSink methods.
 
-
-
 // virtual
-void SAL_CALL ActiveDataSink::setInputStream(
-                        const uno::Reference< io::XInputStream >& aStream )
+void SAL_CALL ActiveDataSink::setInputStream( const uno::Reference< io::XInputStream >& aStream )
     throw( uno::RuntimeException, std::exception )
 {
     m_xStream = aStream;


More information about the Libreoffice-commits mailing list