diff options
author | kripton <yeliztaneroglu@gmail.com> | 2016-01-19 23:42:38 +0200 |
---|---|---|
committer | jan iversen <jani@documentfoundation.org> | 2016-01-21 07:16:55 +0000 |
commit | ea6fdbaeeb51ad695f1c3754b796b7273eb4baad (patch) | |
tree | 871034bea41811f082c6c29036b96bd8153c0d5c /lotuswordpro | |
parent | dda3fc05a2900539836f9748d418dc56247a2ddc (diff) |
tdf#74608 lotuswordpro: Constructor feature for LotusWordProImportFilter
Change-Id: I51aba68e1a220f7cf953978a10b6b62a922c989b
Reviewed-on: https://gerrit.libreoffice.org/21614
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
Tested-by: jan iversen <jani@documentfoundation.org>
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/LotusWordProImportFilter.cxx | 7 | ||||
-rw-r--r-- | lotuswordpro/source/filter/genericfilter.cxx | 25 | ||||
-rw-r--r-- | lotuswordpro/util/lwpfilter.component | 3 |
3 files changed, 9 insertions, 26 deletions
diff --git a/lotuswordpro/source/filter/LotusWordProImportFilter.cxx b/lotuswordpro/source/filter/LotusWordProImportFilter.cxx index ce185d29a7fd..3f7cab528f41 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 862f332dc5f2..837ba1a282a8 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 5ead1c817443..bd007fb135e9 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> |