diff options
-rw-r--r-- | comphelper/source/inc/comphelper_services.hxx | 1 | ||||
-rw-r--r-- | comphelper/source/misc/comphelper_services.cxx | 1 | ||||
-rw-r--r-- | comphelper/source/streaming/memorystream.cxx | 30 | ||||
-rw-r--r-- | comphelper/util/comphelp.component | 3 | ||||
-rwxr-xr-x | solenv/bin/native-code.py | 1 |
5 files changed, 9 insertions, 27 deletions
diff --git a/comphelper/source/inc/comphelper_services.hxx b/comphelper/source/inc/comphelper_services.hxx index 9d356c17af2d..cfb720119d89 100644 --- a/comphelper/source/inc/comphelper_services.hxx +++ b/comphelper/source/inc/comphelper_services.hxx @@ -23,7 +23,6 @@ #include <sal/config.h> void createRegistryInfo_Map(); -void createRegistryInfo_UNOMemoryStream(); #endif diff --git a/comphelper/source/misc/comphelper_services.cxx b/comphelper/source/misc/comphelper_services.cxx index 23d8e7f77ed5..cd5fa8dce72c 100644 --- a/comphelper/source/misc/comphelper_services.cxx +++ b/comphelper/source/misc/comphelper_services.cxx @@ -34,7 +34,6 @@ namespace comphelper { namespace module public: doInitialize() { - createRegistryInfo_UNOMemoryStream(); createRegistryInfo_Map(); } }; 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: */ diff --git a/comphelper/util/comphelp.component b/comphelper/util/comphelp.component index 0fbf81a09898..c953f52fe044 100644 --- a/comphelper/util/comphelp.component +++ b/comphelper/util/comphelp.component @@ -31,7 +31,8 @@ constructor="NamedPropertyValuesContainer_get_implementation"> <service name="com.sun.star.document.NamedPropertyValues"/> </implementation> - <implementation name="com.sun.star.comp.MemoryStream"> + <implementation name="com.sun.star.comp.MemoryStream" + constructor="com_sun_star_comp_MemoryStream"> <service name="com.sun.star.comp.MemoryStream"/> </implementation> <implementation name="com.sun.star.comp.SequenceInputStreamService" diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py index 738537ff7a8e..ef527e7c4c96 100755 --- a/solenv/bin/native-code.py +++ b/solenv/bin/native-code.py @@ -101,6 +101,7 @@ core_constructor_list = [ "com_sun_star_comp_chart2_ChartDocumentWrapper_get_implementation", "com_sun_star_comp_chart2_ChartFrameLoader_get_implementation", # comphelper/util/comphelp.component + "com_sun_star_comp_MemoryStream", "com_sun_star_comp_logging_SimpleLogRing", "com_sun_star_comp_task_OfficeRestartManager", "IndexedPropertyValuesContainer_get_implementation", |