summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2014-03-05 19:47:58 -0600
committerStephan Bergmann <sbergman@redhat.com>2014-03-06 10:04:33 +0100
commita6e19ea7a8885dcbdb1d8b2f56586373595ba8aa (patch)
treebb05bf857759210591f5a1e6824ad63a096b0310
parent8556cd881270823865662e9a7700da58d11c2785 (diff)
use WeakImplHelper for ActivaDataSink
Change-Id: Ife32157ff876a0860b3920cadc24b7888200796b Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r--include/ucbhelper/activedatasink.hxx36
-rw-r--r--ucbhelper/source/client/activedatasink.cxx49
2 files changed, 9 insertions, 76 deletions
diff --git a/include/ucbhelper/activedatasink.hxx b/include/ucbhelper/activedatasink.hxx
index 5adf7be58fe0..3a8470f769ed 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 d83643f63f5b..604801f4983a 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;