[Libreoffice-commits] core.git: comphelper/source comphelper/util

Yeliz Taneroğlu yeliztaneroglu at gmail.com
Tue Apr 5 10:25:22 UTC 2016


 comphelper/source/inc/comphelper_services.hxx       |    1 
 comphelper/source/misc/comphelper_services.cxx      |    1 
 comphelper/source/streaming/seqoutputstreamserv.cxx |   28 +++-----------------
 comphelper/util/comphelp.component                  |    3 +-
 4 files changed, 7 insertions(+), 26 deletions(-)

New commits:
commit 0ea748be9cc2db67dd72f9989f495c5f7cbd8071
Author: Yeliz Taneroğlu <yeliztaneroglu at gmail.com>
Date:   Wed Mar 30 01:31:35 2016 +0300

    tdf#74608 Constructor function for SequenceOutputStreamService
    
    Change-Id: I0f162bd0ec61262a182ebab8cea1cfe27419a54e
    Reviewed-on: https://gerrit.libreoffice.org/23610
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/comphelper/source/inc/comphelper_services.hxx b/comphelper/source/inc/comphelper_services.hxx
index 10f3770..63f2394 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_SequenceOutputStream();
 void createRegistryInfo_UNOMemoryStream();
 
 #endif
diff --git a/comphelper/source/misc/comphelper_services.cxx b/comphelper/source/misc/comphelper_services.cxx
index c21e354..af1df82 100644
--- a/comphelper/source/misc/comphelper_services.cxx
+++ b/comphelper/source/misc/comphelper_services.cxx
@@ -35,7 +35,6 @@ namespace comphelper { namespace module
             doInitialize()
             {
                 createRegistryInfo_OPropertyBag();
-                createRegistryInfo_SequenceOutputStream();
                 createRegistryInfo_UNOMemoryStream();
                 createRegistryInfo_Map();
             }
diff --git a/comphelper/source/streaming/seqoutputstreamserv.cxx b/comphelper/source/streaming/seqoutputstreamserv.cxx
index 7340b58..cacc29a 100644
--- a/comphelper/source/streaming/seqoutputstreamserv.cxx
+++ b/comphelper/source/streaming/seqoutputstreamserv.cxx
@@ -50,11 +50,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::XOutputStream:
     virtual void SAL_CALL writeBytes( const uno::Sequence< ::sal_Int8 > & aData ) throw ( io::NotConnectedException, io::BufferSizeExceededException, io::IOException, uno::RuntimeException, std::exception ) override;
     virtual void SAL_CALL flush() throw ( uno::RuntimeException, io::NotConnectedException, io::BufferSizeExceededException, io::IOException, std::exception ) override;
@@ -79,11 +74,6 @@ SequenceOutputStreamService::SequenceOutputStreamService()
 // com.sun.star.uno.XServiceInfo:
 OUString SAL_CALL SequenceOutputStreamService::getImplementationName() throw ( uno::RuntimeException, std::exception )
 {
-    return getImplementationName_static();
-}
-
-OUString SAL_CALL SequenceOutputStreamService::getImplementationName_static()
-{
     return OUString("com.sun.star.comp.SequenceOutputStreamService");
 }
 
@@ -94,21 +84,10 @@ sal_Bool SAL_CALL SequenceOutputStreamService::supportsService( OUString const &
 
 uno::Sequence< OUString > SAL_CALL SequenceOutputStreamService::getSupportedServiceNames() throw ( uno::RuntimeException, std::exception )
 {
-    return getSupportedServiceNames_static();
-}
-
-uno::Sequence< OUString > SAL_CALL SequenceOutputStreamService::getSupportedServiceNames_static()
-{
     uno::Sequence<OUString> s { "com.sun.star.io.SequenceOutputStream" };
     return s;
 }
 
-uno::Reference< uno::XInterface > SAL_CALL SequenceOutputStreamService::Create(
-    SAL_UNUSED_PARAMETER const uno::Reference< uno::XComponentContext >& )
-{
-    return static_cast< ::cppu::OWeakObject * >( new SequenceOutputStreamService());
-}
-
 // css::io::XOutputStream:
 void SAL_CALL SequenceOutputStreamService::writeBytes( const uno::Sequence< ::sal_Int8 > & aData ) throw ( uno::RuntimeException, io::NotConnectedException, io::BufferSizeExceededException, io::IOException, std::exception )
 {
@@ -152,9 +131,12 @@ uno::Sequence< ::sal_Int8 > SAL_CALL SequenceOutputStreamService::getWrittenByte
 
 } // anonymous namespace
 
-void createRegistryInfo_SequenceOutputStream()
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+com_sun_star_comp_SequenceOutputStreamService(
+    css::uno::XComponentContext *,
+    css::uno::Sequence<css::uno::Any> const &)
 {
-    static ::comphelper::module::OAutoRegistration< SequenceOutputStreamService > aAutoRegistration;
+    return cppu::acquire(new SequenceOutputStreamService());
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/comphelper/util/comphelp.component b/comphelper/util/comphelp.component
index 3e742b7..c6fc2f3 100644
--- a/comphelper/util/comphelp.component
+++ b/comphelper/util/comphelp.component
@@ -38,7 +38,8 @@
       constructor="com_sun_star_comp_SequenceInputStreamService">
     <service name="com.sun.star.io.SequenceInputStream"/>
   </implementation>
-  <implementation name="com.sun.star.comp.SequenceOutputStreamService">
+  <implementation name="com.sun.star.comp.SequenceOutputStreamService"
+      constructor="com_sun_star_comp_SequenceOutputStreamService">
     <service name="com.sun.star.io.SequenceOutputStream"/>
   </implementation>
   <implementation name="com.sun.star.comp.comphelper.OPropertyBag">


More information about the Libreoffice-commits mailing list