Kaydet (Commit) a14e1cb3 authored tarafından Norbert Thiebaud's avatar Norbert Thiebaud

de-macroize ucbhelper activedatastreamer

Change-Id: I55bbce1f8e3c0dcd92d0e2af03d7be5c7ac910c0
üst c8117c46
...@@ -20,10 +20,8 @@ ...@@ -20,10 +20,8 @@
#ifndef INCLUDED_UCBHELPER_ACTIVEDATASTREAMER_HXX #ifndef INCLUDED_UCBHELPER_ACTIVEDATASTREAMER_HXX
#define INCLUDED_UCBHELPER_ACTIVEDATASTREAMER_HXX #define INCLUDED_UCBHELPER_ACTIVEDATASTREAMER_HXX
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/io/XActiveDataStreamer.hpp> #include <com/sun/star/io/XActiveDataStreamer.hpp>
#include <cppuhelper/weak.hxx> #include <cppuhelper/implbase1.hxx>
#include <ucbhelper/macros.hxx>
namespace ucbhelper namespace ucbhelper
{ {
...@@ -36,30 +34,19 @@ namespace ucbhelper ...@@ -36,30 +34,19 @@ namespace ucbhelper
* "open" command. * "open" command.
*/ */
class ActiveDataStreamer : public cppu::OWeakObject, class ActiveDataStreamer :
public com::sun::star::lang::XTypeProvider, public cppu::WeakImplHelper1< css::io::XActiveDataStreamer >
public com::sun::star::io::XActiveDataStreamer
{ {
com::sun::star::uno::Reference< css::uno::Reference< css::io::XStream > m_xStream;
com::sun::star::io::XStream > m_xStream;
public: public:
// 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()
// XActiveDataStreamer methods. // XActiveDataStreamer methods.
virtual void SAL_CALL setStream( const com::sun::star::uno::Reference< com::sun::star::io::XStream >& xStream ) virtual void SAL_CALL setStream( const css::uno::Reference< css::io::XStream >& xStream )
throw( com::sun::star::uno::RuntimeException, std::exception ); throw( css::uno::RuntimeException,
virtual com::sun::star::uno::Reference< com::sun::star::io::XStream > SAL_CALL getStream() std::exception );
throw( com::sun::star::uno::RuntimeException, std::exception ); virtual css::uno::Reference< css::io::XStream > SAL_CALL getStream()
throw( css::uno::RuntimeException,
std::exception );
}; };
} /* namespace ucbhelper */ } /* namespace ucbhelper */
......
...@@ -29,66 +29,22 @@ using namespace com::sun::star; ...@@ -29,66 +29,22 @@ using namespace com::sun::star;
namespace ucbhelper namespace ucbhelper
{ {
// ActiveDataStreamer Implementation. // ActiveDataStreamer Implementation.
// XInterface methods
void SAL_CALL ActiveDataStreamer::acquire()
throw()
{
OWeakObject::acquire();
}
void SAL_CALL ActiveDataStreamer::release()
throw()
{
OWeakObject::release();
}
css::uno::Any SAL_CALL ActiveDataStreamer::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::XActiveDataStreamer* >(this))
);
return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
}
// XTypeProvider methods
XTYPEPROVIDER_IMPL_2( ActiveDataStreamer,
lang::XTypeProvider,
io::XActiveDataStreamer );
// XActiveDataStreamer methods. // XActiveDataStreamer methods.
// virtual // virtual
void SAL_CALL ActiveDataStreamer::setStream( const uno::Reference< io::XStream >& xStream ) void SAL_CALL ActiveDataStreamer::setStream( const uno::Reference< io::XStream >& xStream )
throw( uno::RuntimeException, std::exception ) throw( uno::RuntimeException,
std::exception )
{ {
m_xStream = xStream; m_xStream = xStream;
} }
// virtual // virtual
uno::Reference< io::XStream > SAL_CALL ActiveDataStreamer::getStream() uno::Reference< io::XStream > SAL_CALL ActiveDataStreamer::getStream()
throw( uno::RuntimeException, std::exception ) throw( uno::RuntimeException,
std::exception )
{ {
return m_xStream; return m_xStream;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment