Implement XServiceInfo for com.sun.star.comp.MemoryStream
Change-Id: Ie5499d2ac4aac67dc73fdc58958443b8060c4139
This commit is contained in:
@@ -19,15 +19,13 @@
|
|||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include "comphelper_module.hxx"
|
|
||||||
#include "comphelper_services.hxx"
|
|
||||||
|
|
||||||
#include <com/sun/star/lang/XServiceInfo.hpp>
|
#include <com/sun/star/lang/XServiceInfo.hpp>
|
||||||
#include <com/sun/star/io/XStream.hpp>
|
#include <com/sun/star/io/XStream.hpp>
|
||||||
#include <com/sun/star/io/XSeekableInputStream.hpp>
|
#include <com/sun/star/io/XSeekableInputStream.hpp>
|
||||||
#include <com/sun/star/io/XTruncate.hpp>
|
#include <com/sun/star/io/XTruncate.hpp>
|
||||||
#include <com/sun/star/uno/XComponentContext.hpp>
|
#include <com/sun/star/uno/XComponentContext.hpp>
|
||||||
#include <cppuhelper/implbase.hxx>
|
#include <cppuhelper/implbase.hxx>
|
||||||
|
#include <cppuhelper/supportsservice.hxx>
|
||||||
#include <osl/diagnose.h>
|
#include <osl/diagnose.h>
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -43,12 +41,17 @@ using namespace ::osl;
|
|||||||
namespace comphelper
|
namespace comphelper
|
||||||
{
|
{
|
||||||
|
|
||||||
class UNOMemoryStream : public WeakImplHelper< XStream, XSeekableInputStream, XOutputStream, XTruncate >
|
class UNOMemoryStream : public WeakImplHelper<XServiceInfo, XStream, XSeekableInputStream, XOutputStream, XTruncate>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
UNOMemoryStream();
|
UNOMemoryStream();
|
||||||
virtual ~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<OUString> SAL_CALL getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception) override;
|
||||||
|
|
||||||
// XStream
|
// XStream
|
||||||
virtual Reference< XInputStream > SAL_CALL getInputStream( ) throw (RuntimeException, std::exception) override;
|
virtual Reference< XInputStream > SAL_CALL getInputStream( ) throw (RuntimeException, std::exception) override;
|
||||||
virtual Reference< XOutputStream > SAL_CALL getOutputStream( ) 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<OUString> SAL_CALL UNOMemoryStream::getSupportedServiceNames() throw (css::uno::RuntimeException, std::exception)
|
||||||
|
{
|
||||||
|
return { "com.sun.star.comp.MemoryStream" };
|
||||||
|
}
|
||||||
|
|
||||||
// XStream
|
// XStream
|
||||||
Reference< XInputStream > SAL_CALL UNOMemoryStream::getInputStream( ) throw (RuntimeException, std::exception)
|
Reference< XInputStream > SAL_CALL UNOMemoryStream::getInputStream( ) throw (RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user