Kaydet (Commit) 5f37f560 authored tarafından Yeliz Taneroğlu's avatar Yeliz Taneroğlu Kaydeden (comit) Matúš Kukan

tdf#74608 Constructor function for MemoryStream

Change-Id: I5b0667c4c2808913cde686afa7315ef2319b4d49
üst 5a6ab816
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include <sal/config.h> #include <sal/config.h>
void createRegistryInfo_Map(); void createRegistryInfo_Map();
void createRegistryInfo_UNOMemoryStream();
#endif #endif
......
...@@ -34,7 +34,6 @@ namespace comphelper { namespace module ...@@ -34,7 +34,6 @@ namespace comphelper { namespace module
public: public:
doInitialize() doInitialize()
{ {
createRegistryInfo_UNOMemoryStream();
createRegistryInfo_Map(); createRegistryInfo_Map();
} }
}; };
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include "comphelper_module.hxx" #include "comphelper_module.hxx"
#include "comphelper_services.hxx" #include "comphelper_services.hxx"
#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>
...@@ -72,11 +73,6 @@ public: ...@@ -72,11 +73,6 @@ public:
// XTruncate // XTruncate
virtual void SAL_CALL truncate() throw (css::io::IOException, css::uno::RuntimeException, std::exception) override; 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: private:
std::vector< sal_Int8 > maData; std::vector< sal_Int8 > maData;
sal_Int32 mnCursor; sal_Int32 mnCursor;
...@@ -212,28 +208,14 @@ void SAL_CALL UNOMemoryStream::truncate() throw (IOException, RuntimeException, ...@@ -212,28 +208,14 @@ void SAL_CALL UNOMemoryStream::truncate() throw (IOException, RuntimeException,
mnCursor = 0; 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 } // 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: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -31,7 +31,8 @@ ...@@ -31,7 +31,8 @@
constructor="NamedPropertyValuesContainer_get_implementation"> constructor="NamedPropertyValuesContainer_get_implementation">
<service name="com.sun.star.document.NamedPropertyValues"/> <service name="com.sun.star.document.NamedPropertyValues"/>
</implementation> </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"/> <service name="com.sun.star.comp.MemoryStream"/>
</implementation> </implementation>
<implementation name="com.sun.star.comp.SequenceInputStreamService" <implementation name="com.sun.star.comp.SequenceInputStreamService"
......
...@@ -101,6 +101,7 @@ core_constructor_list = [ ...@@ -101,6 +101,7 @@ core_constructor_list = [
"com_sun_star_comp_chart2_ChartDocumentWrapper_get_implementation", "com_sun_star_comp_chart2_ChartDocumentWrapper_get_implementation",
"com_sun_star_comp_chart2_ChartFrameLoader_get_implementation", "com_sun_star_comp_chart2_ChartFrameLoader_get_implementation",
# comphelper/util/comphelp.component # comphelper/util/comphelp.component
"com_sun_star_comp_MemoryStream",
"com_sun_star_comp_logging_SimpleLogRing", "com_sun_star_comp_logging_SimpleLogRing",
"com_sun_star_comp_task_OfficeRestartManager", "com_sun_star_comp_task_OfficeRestartManager",
"IndexedPropertyValuesContainer_get_implementation", "IndexedPropertyValuesContainer_get_implementation",
......
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