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

kripton yeliztaneroglu at gmail.com
Wed Jan 20 23:17:29 PST 2016


 lotuswordpro/source/filter/LotusWordProImportFilter.cxx |    7 ++++
 lotuswordpro/source/filter/genericfilter.cxx            |   25 ----------------
 lotuswordpro/util/lwpfilter.component                   |    3 +
 3 files changed, 9 insertions(+), 26 deletions(-)

New commits:
commit ea6fdbaeeb51ad695f1c3754b796b7273eb4baad
Author: kripton <yeliztaneroglu at gmail.com>
Date:   Tue Jan 19 23:42:38 2016 +0200

    tdf#74608 lotuswordpro: Constructor feature for LotusWordProImportFilter
    
    Change-Id: I51aba68e1a220f7cf953978a10b6b62a922c989b
    Reviewed-on: https://gerrit.libreoffice.org/21614
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: jan iversen <jani at documentfoundation.org>
    Tested-by: jan iversen <jani at documentfoundation.org>

diff --git a/lotuswordpro/source/filter/LotusWordProImportFilter.cxx b/lotuswordpro/source/filter/LotusWordProImportFilter.cxx
index ce185d2..3f7cab5 100644
--- a/lotuswordpro/source/filter/LotusWordProImportFilter.cxx
+++ b/lotuswordpro/source/filter/LotusWordProImportFilter.cxx
@@ -97,6 +97,13 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportLWP(const OUString &rURL
     return ( ReadWordproFile(aFileStream, xHandler) == 0 );
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+LotusWordProImportFilter_get_implementation(
+    css::uno::XComponentContext *context)
+ {
+    return cppu::acquire(new LotusWordProImportFilter(context));
+ }
+
 sal_Bool SAL_CALL LotusWordProImportFilter::filter( const Sequence< css::beans::PropertyValue >& aDescriptor )
     throw (RuntimeException, std::exception)
 {
diff --git a/lotuswordpro/source/filter/genericfilter.cxx b/lotuswordpro/source/filter/genericfilter.cxx
index 862f332..837ba1a 100644
--- a/lotuswordpro/source/filter/genericfilter.cxx
+++ b/lotuswordpro/source/filter/genericfilter.cxx
@@ -11,30 +11,5 @@ using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::registry;
 
-extern "C"
-{
-SAL_DLLPUBLIC_EXPORT void * SAL_CALL lotuswordpro_component_getFactory(
-    const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
-{
-    void * pRet = nullptr;
-
-    OUString implName = OUString::createFromAscii( pImplName );
-    if ( pServiceManager && implName.equals(LotusWordProImportFilter_getImplementationName()) )
-    {
-        Reference< XSingleServiceFactory > xFactory( createSingleFactory(
-            static_cast< XMultiServiceFactory * >( pServiceManager ),
-            OUString::createFromAscii( pImplName ),
-            LotusWordProImportFilter_createInstance, LotusWordProImportFilter_getSupportedServiceNames() ) );
-
-        if (xFactory.is())
-        {
-            xFactory->acquire();
-            pRet = xFactory.get();
-        }
-    }
-
-    return pRet;
-}
-}
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/util/lwpfilter.component b/lotuswordpro/util/lwpfilter.component
index 5ead1c8..bd007fb 100644
--- a/lotuswordpro/util/lwpfilter.component
+++ b/lotuswordpro/util/lwpfilter.component
@@ -1,7 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
     prefix="lotuswordpro" xmlns="http://openoffice.org/2010/uno-components">
-  <implementation name="com.sun.star.comp.Writer.LotusWordProImportFilter">
+  <implementation name="com.sun.star.comp.Writer.LotusWordProImportFilter"
+      constructor="LotusWordProImportFilter_get_implementation">
     <service name="com.sun.star.document.ImportFilter"/>
     <service name="com.sun.star.document.ExtendedTypeDetection"/>
   </implementation>


More information about the Libreoffice-commits mailing list