xmlscript/source/inc/unoservices.hxx             |   15 ---------
 xmlscript/source/misc/unoservices.cxx            |   10 ------
 xmlscript/source/xmlflat_imexp/xmlbas_export.cxx |   35 +++++++----------------
 xmlscript/source/xmlflat_imexp/xmlbas_import.cxx |   34 +++++++---------------
 xmlscript/util/xmlscript.component               |    6 ++-
 5 files changed, 26 insertions(+), 74 deletions(-)

New commits:
commit d46bfe13675735caf6d7fbf11ed2d1f5d30a49cd
Author: Yeliz Taneroğlu <yeliztanero...@gmail.com>
Date:   Sun May 1 13:46:53 2016 +0300

    tdf#74608 Constructor function for XMLBasicExporter
    
    Change-Id: Ib4721b3f67956a8da48851841ef86bb7b79df1e7
    Reviewed-on: https://gerrit.libreoffice.org/24553
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/xmlscript/source/inc/unoservices.hxx 
b/xmlscript/source/inc/unoservices.hxx
index 5a8be08..de330a7 100644
--- a/xmlscript/source/inc/unoservices.hxx
+++ b/xmlscript/source/inc/unoservices.hxx
@@ -42,14 +42,6 @@ OUString SAL_CALL 
getImplementationName_DocumentHandlerImpl();
 css::uno::Reference<css::uno::XInterface> SAL_CALL create_DocumentHandlerImpl(
     css::uno::Reference<css::uno::XComponentContext> const & xContext);
 
-css::uno::Sequence<OUString> SAL_CALL
-getSupportedServiceNames_XMLBasicExporter();
-
-OUString SAL_CALL getImplementationName_XMLBasicExporter();
-
-css::uno::Reference<css::uno::XInterface> SAL_CALL create_XMLBasicExporter(
-    css::uno::Reference<css::uno::XComponentContext> const & xContext);
-
 }
 
 #endif
diff --git a/xmlscript/source/misc/unoservices.cxx 
b/xmlscript/source/misc/unoservices.cxx
index 0773fa4..00ca4d0 100644
--- a/xmlscript/source/misc/unoservices.cxx
+++ b/xmlscript/source/misc/unoservices.cxx
@@ -32,11 +32,6 @@ namespace xmlscript
             getSupportedServiceNames_DocumentHandlerImpl, 
::cppu::createSingleComponentFactory,
             nullptr, 0
         },
-        {
-            create_XMLBasicExporter, getImplementationName_XMLBasicExporter,
-            getSupportedServiceNames_XMLBasicExporter, 
::cppu::createSingleComponentFactory,
-            nullptr, 0
-        },
         { nullptr, nullptr, nullptr, nullptr, nullptr, 0 }
     };
 }
diff --git a/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx 
b/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx
index 4250644..c6fa807 100644
--- a/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx
+++ b/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx
@@ -38,20 +38,6 @@ using namespace ::com::sun::star::uno;
 
 namespace xmlscript
 {
-
-    // component operations
-
-    OUString getImplementationName_XMLBasicExporter()
-    {
-        return OUString( "com.sun.star.comp.xmlscript.XMLBasicExporter" );
-    }
-
-    Sequence< OUString > getSupportedServiceNames_XMLBasicExporter()
-    {
-        Sequence< OUString > aNames { "com.sun.star.document.XMLBasicExporter" 
};
-        return aNames;
-    }
-
     // XMLBasicExporterBase
 
     XMLBasicExporterBase::XMLBasicExporterBase( bool bOasis )
@@ -365,12 +351,13 @@ sal_Bool XMLBasicExporterBase::filter( const Sequence< 
beans::PropertyValue >& /
 
     OUString XMLBasicExporter::getImplementationName(  ) throw 
(RuntimeException, std::exception)
     {
-        return getImplementationName_XMLBasicExporter();
+        return OUString( "com.sun.star.comp.xmlscript.XMLBasicExporter" );
     }
 
     Sequence< OUString > XMLBasicExporter::getSupportedServiceNames(  ) throw 
(RuntimeException, std::exception)
     {
-        return getSupportedServiceNames_XMLBasicExporter();
+        Sequence< OUString > aNames { "com.sun.star.document.XMLBasicExporter" 
};
+        return aNames;
     }
 
     // XMLOasisBasicExporter
@@ -397,17 +384,17 @@ sal_Bool XMLBasicExporterBase::filter( const Sequence< 
beans::PropertyValue >& /
         return aNames;
     }
 
-    // component operations
-
-    Reference< XInterface > SAL_CALL create_XMLBasicExporter(
-        Reference< XComponentContext > const &  )
-    {
-        return static_cast< lang::XTypeProvider * >( new XMLBasicExporter );
-    }
-
 }   // namespace xmlscript
 
 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+com_sun_star_comp_xmlscript_XMLBasicExporter(
+    css::uno::XComponentContext *,
+    css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new xmlscript::XMLBasicExporter());
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
 com_sun_star_comp_xmlscript_XMLOasisBasicExporter(
     css::uno::XComponentContext *,
     css::uno::Sequence<css::uno::Any> const &)
diff --git a/xmlscript/util/xmlscript.component 
b/xmlscript/util/xmlscript.component
index 23748a0..a9bfffb 100644
--- a/xmlscript/util/xmlscript.component
+++ b/xmlscript/util/xmlscript.component
@@ -22,7 +22,8 @@
   <implementation name="com.sun.star.comp.xml.input.SaxDocumentHandler">
     <service name="com.sun.star.xml.input.SaxDocumentHandler"/>
   </implementation>
-  <implementation name="com.sun.star.comp.xmlscript.XMLBasicExporter">
+  <implementation name="com.sun.star.comp.xmlscript.XMLBasicExporter"
+      constructor="com_sun_star_comp_xmlscript_XMLBasicExporter">
     <service name="com.sun.star.document.XMLBasicExporter"/>
   </implementation>
   <implementation name="com.sun.star.comp.xmlscript.XMLBasicImporter"
commit 955ca134fd62f809efdf1ce87c8646586871597a
Author: Yeliz Taneroğlu <yeliztanero...@gmail.com>
Date:   Sun May 1 15:45:45 2016 +0300

    tdf#74608 Constructor function for XMLBasicImporter
    
    Change-Id: I0a2c74c71d1633427598e793d7c211e5283c7a33
    Reviewed-on: https://gerrit.libreoffice.org/24559
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/xmlscript/source/inc/unoservices.hxx 
b/xmlscript/source/inc/unoservices.hxx
index bdeea6a..5a8be08 100644
--- a/xmlscript/source/inc/unoservices.hxx
+++ b/xmlscript/source/inc/unoservices.hxx
@@ -50,13 +50,6 @@ OUString SAL_CALL getImplementationName_XMLBasicExporter();
 css::uno::Reference<css::uno::XInterface> SAL_CALL create_XMLBasicExporter(
     css::uno::Reference<css::uno::XComponentContext> const & xContext);
 
-css::uno::Sequence<OUString> SAL_CALL
-getSupportedServiceNames_XMLBasicImporter();
-
-OUString SAL_CALL getImplementationName_XMLBasicImporter();
-
-css::uno::Reference<css::uno::XInterface> SAL_CALL create_XMLBasicImporter(
-    css::uno::Reference<css::uno::XComponentContext> const & xContext);
 }
 
 #endif
diff --git a/xmlscript/source/misc/unoservices.cxx 
b/xmlscript/source/misc/unoservices.cxx
index 204d4de..0773fa4 100644
--- a/xmlscript/source/misc/unoservices.cxx
+++ b/xmlscript/source/misc/unoservices.cxx
@@ -37,11 +37,6 @@ namespace xmlscript
             getSupportedServiceNames_XMLBasicExporter, 
::cppu::createSingleComponentFactory,
             nullptr, 0
         },
-        {
-            create_XMLBasicImporter, getImplementationName_XMLBasicImporter,
-            getSupportedServiceNames_XMLBasicImporter, 
::cppu::createSingleComponentFactory,
-            nullptr, 0
-        },
         { nullptr, nullptr, nullptr, nullptr, nullptr, 0 }
     };
 }
diff --git a/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx 
b/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx
index 35cdec0..095267b 100644
--- a/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx
+++ b/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx
@@ -497,19 +497,6 @@ void BasicImport::setDocumentLocator( const Reference< 
xml::sax::XLocator >& /*x
         return xElement;
     }
 
-    // component operations
-
-    OUString getImplementationName_XMLBasicImporter()
-    {
-        return OUString( "com.sun.star.comp.xmlscript.XMLBasicImporter" );
-    }
-
-    Sequence< OUString > getSupportedServiceNames_XMLBasicImporter()
-    {
-        Sequence< OUString > aNames { "com.sun.star.document.XMLBasicImporter" 
};
-        return aNames;
-    }
-
     // XMLBasicImporterBase
 
     XMLBasicImporterBase::XMLBasicImporterBase( const Reference< 
XComponentContext >& rxContext, bool bOasis )
@@ -645,12 +632,13 @@ void BasicImport::setDocumentLocator( const Reference< 
xml::sax::XLocator >& /*x
 
     OUString XMLBasicImporter::getImplementationName(  ) throw 
(RuntimeException, std::exception)
     {
-        return getImplementationName_XMLBasicImporter();
+        return OUString( "com.sun.star.comp.xmlscript.XMLBasicImporter" );
     }
 
     Sequence< OUString > XMLBasicImporter::getSupportedServiceNames(  ) throw 
(RuntimeException, std::exception)
     {
-        return getSupportedServiceNames_XMLBasicImporter();
+        Sequence< OUString > aNames { "com.sun.star.document.XMLBasicImporter" 
};
+        return aNames;
     }
 
     // XMLOasisBasicImporter
@@ -677,17 +665,17 @@ void BasicImport::setDocumentLocator( const Reference< 
xml::sax::XLocator >& /*x
         return aNames;
     }
 
-    // component operations
-
-    Reference< XInterface > SAL_CALL create_XMLBasicImporter(
-        Reference< XComponentContext > const & xContext )
-    {
-        return static_cast< lang::XTypeProvider * >( new XMLBasicImporter( 
xContext ) );
-    }
-
 }   // namespace xmlscript
 
 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+com_sun_star_comp_xmlscript_XMLBasicImporter(
+    css::uno::XComponentContext *context,
+    css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new xmlscript::XMLBasicImporter(context));
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
 com_sun_star_comp_xmlscript_XMLOasisBasicImporter(
     css::uno::XComponentContext *context,
     css::uno::Sequence<css::uno::Any> const &)
diff --git a/xmlscript/util/xmlscript.component 
b/xmlscript/util/xmlscript.component
index e212b9b..23748a0 100644
--- a/xmlscript/util/xmlscript.component
+++ b/xmlscript/util/xmlscript.component
@@ -25,7 +25,8 @@
   <implementation name="com.sun.star.comp.xmlscript.XMLBasicExporter">
     <service name="com.sun.star.document.XMLBasicExporter"/>
   </implementation>
-  <implementation name="com.sun.star.comp.xmlscript.XMLBasicImporter">
+  <implementation name="com.sun.star.comp.xmlscript.XMLBasicImporter"
+     constructor="com_sun_star_comp_xmlscript_XMLBasicImporter">
     <service name="com.sun.star.document.XMLBasicImporter"/>
   </implementation>
   <implementation name="com.sun.star.comp.xmlscript.XMLOasisBasicExporter"
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to