diff options
author | Yeliz Taneroğlu <yeliztaneroglu@gmail.com> | 2016-04-11 13:06:11 +0300 |
---|---|---|
committer | Matúš Kukan <matus.kukan@gmail.com> | 2016-07-09 12:15:50 +0200 |
commit | 5f37f56088eae48508336d68100b68cca407668a (patch) | |
tree | 0e7f0496869d4cc3e415426abba0bdb2976d74f7 /comphelper/source/streaming/memorystream.cxx | |
parent | 5a6ab81651a98dd726ab7d40101dc81f62895fd4 (diff) |
tdf#74608 Constructor function for MemoryStream
Change-Id: I5b0667c4c2808913cde686afa7315ef2319b4d49
Diffstat (limited to 'comphelper/source/streaming/memorystream.cxx')
-rw-r--r-- | comphelper/source/streaming/memorystream.cxx | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/comphelper/source/streaming/memorystream.cxx b/comphelper/source/streaming/memorystream.cxx index 4e9eb64c1479..7b378964f81f 100644 --- a/comphelper/source/streaming/memorystream.cxx +++ b/comphelper/source/streaming/memorystream.cxx @@ -22,6 +22,7 @@ #include "comphelper_module.hxx" #include "comphelper_services.hxx" +#include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/io/XStream.hpp> #include <com/sun/star/io/XSeekableInputStream.hpp> #include <com/sun/star/io/XTruncate.hpp> @@ -72,11 +73,6 @@ public: // XTruncate virtual void SAL_CALL truncate() throw (css::io::IOException, css::uno::RuntimeException, std::exception) override; - // XServiceInfo - static versions (used for component registration) - static OUString SAL_CALL getImplementationName_static(); - static Sequence< OUString > SAL_CALL getSupportedServiceNames_static(); - static Reference< XInterface > SAL_CALL Create( const Reference< css::uno::XComponentContext >& ); - private: std::vector< sal_Int8 > maData; sal_Int32 mnCursor; @@ -212,28 +208,14 @@ void SAL_CALL UNOMemoryStream::truncate() throw (IOException, RuntimeException, mnCursor = 0; } -OUString SAL_CALL UNOMemoryStream::getImplementationName_static() -{ - return OUString("com.sun.star.comp.MemoryStream"); -} - -Sequence< OUString > SAL_CALL UNOMemoryStream::getSupportedServiceNames_static() -{ - Sequence< OUString > aSeq { getImplementationName_static() }; - return aSeq; -} - -Reference< XInterface > SAL_CALL UNOMemoryStream::Create( - SAL_UNUSED_PARAMETER const Reference< XComponentContext >& ) -{ - return static_cast<OWeakObject*>(new UNOMemoryStream()); -} - } // namespace comphelper -void createRegistryInfo_UNOMemoryStream() +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL +com_sun_star_comp_MemoryStream( + css::uno::XComponentContext *, + css::uno::Sequence<css::uno::Any> const &) { - static ::comphelper::module::OAutoRegistration< ::comphelper::UNOMemoryStream > aAutoRegistration; + return cppu::acquire(new ::comphelper::UNOMemoryStream()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |