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>
This commit is contained in:
parent
dda3fc05a2
commit
ea6fdbaeeb
@ -97,6 +97,13 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportLWP(const OUString &rURL
|
|||||||
return ( ReadWordproFile(aFileStream, xHandler) == 0 );
|
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 )
|
sal_Bool SAL_CALL LotusWordProImportFilter::filter( const Sequence< css::beans::PropertyValue >& aDescriptor )
|
||||||
throw (RuntimeException, std::exception)
|
throw (RuntimeException, std::exception)
|
||||||
{
|
{
|
||||||
|
@ -11,30 +11,5 @@ using namespace ::com::sun::star::uno;
|
|||||||
using namespace ::com::sun::star::lang;
|
using namespace ::com::sun::star::lang;
|
||||||
using namespace ::com::sun::star::registry;
|
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: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
|
<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
|
||||||
prefix="lotuswordpro" xmlns="http://openoffice.org/2010/uno-components">
|
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.ImportFilter"/>
|
||||||
<service name="com.sun.star.document.ExtendedTypeDetection"/>
|
<service name="com.sun.star.document.ExtendedTypeDetection"/>
|
||||||
</implementation>
|
</implementation>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user