comphelper/source/inc/comphelper_services.hxx      |    1 
 comphelper/source/misc/comphelper_services.cxx     |    1 
 comphelper/source/streaming/seqinputstreamserv.cxx |   30 ++++-----------------
 comphelper/util/comphelp.component                 |    3 +-
 4 files changed, 8 insertions(+), 27 deletions(-)

New commits:
commit e81ad8c8ed960cf0765a4c3896b5ee449c973cd0
Author: Steven Guo <[email protected]>
Date:   Sun Mar 27 23:56:20 2016 -0700

    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 <[email protected]>
    Reviewed-by: Stephan Bergmann <[email protected]>

diff --git a/comphelper/source/inc/comphelper_services.hxx 
b/comphelper/source/inc/comphelper_services.hxx
index d588e391..10f3770 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 776f869..c21e354 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 f5b5f3b..9cd3d62 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 a60912b..3e742b7 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">
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to