diff --git a/comphelper/source/streaming/memorystream.cxx b/comphelper/source/streaming/memorystream.cxx index 7b378964f81f..4e7601211224 100644 --- a/comphelper/source/streaming/memorystream.cxx +++ b/comphelper/source/streaming/memorystream.cxx @@ -19,15 +19,13 @@ #include -#include "comphelper_module.hxx" -#include "comphelper_services.hxx" - #include #include #include #include #include #include +#include #include #include @@ -43,12 +41,17 @@ using namespace ::osl; namespace comphelper { -class UNOMemoryStream : public WeakImplHelper< XStream, XSeekableInputStream, XOutputStream, XTruncate > +class UNOMemoryStream : public WeakImplHelper { public: UNOMemoryStream(); virtual ~UNOMemoryStream(); + // XServiceInfo + virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw (css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override; + // XStream virtual Reference< XInputStream > SAL_CALL getInputStream( ) throw (RuntimeException, std::exception) override; virtual Reference< XOutputStream > SAL_CALL getOutputStream( ) throw (RuntimeException, std::exception) override; @@ -87,6 +90,22 @@ UNOMemoryStream::~UNOMemoryStream() { } +// XServiceInfo +OUString SAL_CALL UNOMemoryStream::getImplementationName() throw (css::uno::RuntimeException, std::exception) +{ + return OUString("com.sun.star.comp.MemoryStream"); +} + +sal_Bool SAL_CALL UNOMemoryStream::supportsService(const OUString& ServiceName) throw (css::uno::RuntimeException, std::exception) +{ + return cppu::supportsService(this, ServiceName); +} + +css::uno::Sequence SAL_CALL UNOMemoryStream::getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) +{ + return { "com.sun.star.comp.MemoryStream" }; +} + // XStream Reference< XInputStream > SAL_CALL UNOMemoryStream::getInputStream( ) throw (RuntimeException, std::exception) {