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 @@
#ifndef INCLUDED_UCBHELPER_ACTIVEDATASTREAMER_HXX
#define INCLUDED_UCBHELPER_ACTIVEDATASTREAMER_HXX
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/io/XActiveDataStreamer.hpp>
#include <cppuhelper/weak.hxx>
#include <ucbhelper/macros.hxx>
#include <cppuhelper/implbase1.hxx>
namespace ucbhelper
{
......@@ -36,30 +34,19 @@ namespace ucbhelper
* "open" command.
*/
class ActiveDataStreamer : public cppu::OWeakObject,
public com::sun::star::lang::XTypeProvider,
public com::sun::star::io::XActiveDataStreamer
class ActiveDataStreamer :
public cppu::WeakImplHelper1< css::io::XActiveDataStreamer >
{
com::sun::star::uno::Reference<
com::sun::star::io::XStream > m_xStream;
css::uno::Reference< css::io::XStream > m_xStream;
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.
virtual void SAL_CALL setStream( const com::sun::star::uno::Reference< com::sun::star::io::XStream >& xStream )
throw( com::sun::star::uno::RuntimeException, std::exception );
virtual com::sun::star::uno::Reference< com::sun::star::io::XStream > SAL_CALL getStream()
throw( com::sun::star::uno::RuntimeException, std::exception );
virtual void SAL_CALL setStream( const css::uno::Reference< css::io::XStream >& xStream )
throw( css::uno::RuntimeException,
std::exception );
virtual css::uno::Reference< css::io::XStream > SAL_CALL getStream()
throw( css::uno::RuntimeException,
std::exception );
};
} /* namespace ucbhelper */
......
......@@ -29,66 +29,22 @@ using namespace com::sun::star;
namespace ucbhelper
{
// 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.
// virtual
void SAL_CALL ActiveDataStreamer::setStream( const uno::Reference< io::XStream >& xStream )
throw( uno::RuntimeException, std::exception )
throw( uno::RuntimeException,
std::exception )
{
m_xStream = xStream;
}
// virtual
uno::Reference< io::XStream > SAL_CALL ActiveDataStreamer::getStream()
throw( uno::RuntimeException, std::exception )
throw( uno::RuntimeException,
std::exception )
{
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