diff options
author | Steven Guo <steventimothyguo@gmail.com> | 2016-03-27 23:56:20 -0700 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-03-29 08:51:59 +0000 |
commit | e81ad8c8ed960cf0765a4c3896b5ee449c973cd0 (patch) | |
tree | e6989767b8912e0a99a21651989966ec39cad07a /comphelper | |
parent | Updated core (diff) | |
download | core-e81ad8c8ed960cf0765a4c3896b5ee449c973cd0.tar.gz core-e81ad8c8ed960cf0765a4c3896b5ee449c973cd0.zip |
tdf#74608 Constructor function for SequenceInputStreamService
Added ctor funtion for SequenceInputStream(Service) in comphelper.
Change-Id: I043e46aa283709f316e7ad794e15438f6b2d955f
Reviewed-on: https://gerrit.libreoffice.org/23564
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'comphelper')
-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/seqinputstreamserv.cxx | 30 | ||||
-rw-r--r-- | comphelper/util/comphelp.component | 3 |
4 files changed, 8 insertions, 27 deletions
diff --git a/comphelper/source/inc/comphelper_services.hxx b/comphelper/source/inc/comphelper_services.hxx index d588e39192f0..10f377045548 100644 --- a/comphelper/source/inc/comphelper_services.hxx +++ b/comphelper/source/inc/comphelper_services.hxx @@ -24,7 +24,6 @@ void createRegistryInfo_Map(); void createRegistryInfo_OPropertyBag(); -void createRegistryInfo_SequenceInputStream(); void createRegistryInfo_SequenceOutputStream(); void createRegistryInfo_UNOMemoryStream(); diff --git a/comphelper/source/misc/comphelper_services.cxx b/comphelper/source/misc/comphelper_services.cxx index 776f86982737..c21e3549ced0 100644 --- a/comphelper/source/misc/comphelper_services.cxx +++ b/comphelper/source/misc/comphelper_services.cxx @@ -36,7 +36,6 @@ namespace comphelper { namespace module { createRegistryInfo_OPropertyBag(); createRegistryInfo_SequenceOutputStream(); - createRegistryInfo_SequenceInputStream(); createRegistryInfo_UNOMemoryStream(); createRegistryInfo_Map(); } diff --git a/comphelper/source/streaming/seqinputstreamserv.cxx b/comphelper/source/streaming/seqinputstreamserv.cxx index f5b5f3bcb0d5..9cd3d62c0c83 100644 --- a/comphelper/source/streaming/seqinputstreamserv.cxx +++ b/comphelper/source/streaming/seqinputstreamserv.cxx @@ -55,11 +55,6 @@ public: virtual sal_Bool SAL_CALL supportsService( const OUString & ServiceName ) throw ( uno::RuntimeException, std::exception ) override; virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw ( uno::RuntimeException, std::exception ) override; - // XServiceInfo - static versions (used for component registration) - static OUString SAL_CALL getImplementationName_static(); - static uno::Sequence< OUString > SAL_CALL getSupportedServiceNames_static(); - static uno::Reference< uno::XInterface > SAL_CALL Create( const uno::Reference< uno::XComponentContext >& ); - // css::io::XInputStream: virtual ::sal_Int32 SAL_CALL readBytes( uno::Sequence< ::sal_Int8 > & aData, ::sal_Int32 nBytesToRead ) throw ( uno::RuntimeException, io::NotConnectedException, io::BufferSizeExceededException, io::IOException, std::exception ) override; virtual ::sal_Int32 SAL_CALL readSomeBytes( uno::Sequence< ::sal_Int8 > & aData, ::sal_Int32 nMaxBytesToRead ) throw ( uno::RuntimeException, io::NotConnectedException, io::BufferSizeExceededException, io::IOException, std::exception ) override; @@ -92,12 +87,7 @@ SequenceInputStreamService::SequenceInputStreamService() // com.sun.star.uno.XServiceInfo: OUString SAL_CALL SequenceInputStreamService::getImplementationName() throw ( uno::RuntimeException, std::exception ) { - return getImplementationName_static(); -} - -OUString SAL_CALL SequenceInputStreamService::getImplementationName_static() -{ - return OUString( "com.sun.star.comp.SequenceInputStreamService" ); + return OUString ( "com.sun.star.comp.SequenceInputStreamService" ); } sal_Bool SAL_CALL SequenceInputStreamService::supportsService( OUString const & serviceName ) throw ( uno::RuntimeException, std::exception ) @@ -107,21 +97,10 @@ sal_Bool SAL_CALL SequenceInputStreamService::supportsService( OUString const & uno::Sequence< OUString > SAL_CALL SequenceInputStreamService::getSupportedServiceNames() throw ( uno::RuntimeException, std::exception ) { - return getSupportedServiceNames_static(); -} - -uno::Sequence< OUString > SAL_CALL SequenceInputStreamService::getSupportedServiceNames_static() -{ uno::Sequence<OUString> s { "com.sun.star.io.SequenceInputStream" }; return s; } -uno::Reference< uno::XInterface > SAL_CALL SequenceInputStreamService::Create( - SAL_UNUSED_PARAMETER const uno::Reference< uno::XComponentContext >& ) -{ - return static_cast< ::cppu::OWeakObject * >( new SequenceInputStreamService() ); -} - // css::io::XInputStream: ::sal_Int32 SAL_CALL SequenceInputStreamService::readBytes( uno::Sequence< ::sal_Int8 > & aData, ::sal_Int32 nBytesToRead ) throw ( uno::RuntimeException, io::NotConnectedException, io::BufferSizeExceededException, io::IOException, std::exception ) { @@ -229,9 +208,12 @@ void SAL_CALL SequenceInputStreamService::initialize( const uno::Sequence< css:: } // anonymous namespace -void createRegistryInfo_SequenceInputStream() +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL +com_sun_star_comp_SequenceInputStreamService( + css::uno::XComponentContext *, + css::uno::Sequence<css::uno::Any> const &) { - static ::comphelper::module::OAutoRegistration< SequenceInputStreamService > aAutoRegistration; + return cppu::acquire(new SequenceInputStreamService()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/comphelper/util/comphelp.component b/comphelper/util/comphelp.component index a60912bf5160..3e742b7f2833 100644 --- a/comphelper/util/comphelp.component +++ b/comphelper/util/comphelp.component @@ -34,7 +34,8 @@ <implementation name="com.sun.star.comp.MemoryStream"> <service name="com.sun.star.comp.MemoryStream"/> </implementation> - <implementation name="com.sun.star.comp.SequenceInputStreamService"> + <implementation name="com.sun.star.comp.SequenceInputStreamService" + constructor="com_sun_star_comp_SequenceInputStreamService"> <service name="com.sun.star.io.SequenceInputStream"/> </implementation> <implementation name="com.sun.star.comp.SequenceOutputStreamService"> |