Kaydet (Commit) c3c43c79 authored tarafından Miklos Vajna's avatar Miklos Vajna

oox: create PowerPointImport instances with an uno constructor

PowerPointImport_getSupportedServiceNames() was copy&pasted from
oox::core::FilterBase::getSupportedServiceNames(), so it can go away entirely.

Change-Id: Ia6352cea1c2d65ba94cae66b500de951d82f455a
Reviewed-on: https://gerrit.libreoffice.org/60124Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins
üst aef44b5a
......@@ -23,13 +23,6 @@
#include <sal/config.h>
namespace oox {
namespace ppt {
extern OUString PowerPointImport_getImplementationName();
extern css::uno::Sequence< OUString > PowerPointImport_getSupportedServiceNames();
/// @throws css::uno::Exception
extern css::uno::Reference< css::uno::XInterface > PowerPointImport_createInstance(
const css::uno::Reference< css::uno::XComponentContext >& rxContext );
}
namespace ppt {
extern OUString QuickDiagrammingImport_getImplementationName();
extern css::uno::Sequence< OUString > QuickDiagrammingImport_getSupportedServiceNames();
......
......@@ -35,7 +35,6 @@ namespace {
// Impress" would actually want to make use of them:
static ::cppu::ImplementationEntry const spServices[] =
{
IMPLEMENTATION_ENTRY( ::oox::ppt::PowerPointImport ),
IMPLEMENTATION_ENTRY( ::oox::ppt::QuickDiagrammingImport ),
IMPLEMENTATION_ENTRY( ::oox::ppt::QuickDiagrammingLayout ),
IMPLEMENTATION_ENTRY( ::oox::shape::ShapeContextHandler ),
......
......@@ -54,24 +54,6 @@ using ::com::sun::star::lang::XComponent;
namespace oox { namespace ppt {
OUString PowerPointImport_getImplementationName()
{
return OUString( "com.sun.star.comp.oox.ppt.PowerPointImport" );
}
uno::Sequence< OUString > PowerPointImport_getSupportedServiceNames()
{
Sequence< OUString > aSeq( 2 );
aSeq[ 0 ] = "com.sun.star.document.ImportFilter";
aSeq[ 1 ] = "com.sun.star.document.ExportFilter";
return aSeq;
}
uno::Reference< uno::XInterface > PowerPointImport_createInstance( const Reference< XComponentContext >& rxContext )
{
return static_cast< ::cppu::OWeakObject* >( new PowerPointImport( rxContext ) );
}
#if OSL_DEBUG_LEVEL > 0
XmlFilterBase* PowerPointImport::mpDebugFilterBase = nullptr;
#endif
......@@ -321,9 +303,16 @@ GraphicHelper* PowerPointImport::implCreateGraphicHelper() const
OUString PowerPointImport::getImplementationName()
{
return PowerPointImport_getImplementationName();
return OUString( "com.sun.star.comp.oox.ppt.PowerPointImport" );
}
}}
extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
com_sun_star_comp_oox_ppt_PowerPointImport_get_implementation(
uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
{
return cppu::acquire(new oox::ppt::PowerPointImport(pCtx));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -31,7 +31,8 @@
constructor="com_sun_star_comp_oox_docprop_DocumentPropertiesImporter_get_implementation">
<service name="com.sun.star.document.OOXMLDocumentPropertiesImporter"/>
</implementation>
<implementation name="com.sun.star.comp.oox.ppt.PowerPointImport">
<implementation name="com.sun.star.comp.oox.ppt.PowerPointImport"
constructor="com_sun_star_comp_oox_ppt_PowerPointImport_get_implementation">
<service name="com.sun.star.document.ImportFilter"/>
<service name="com.sun.star.document.ExportFilter"/>
</implementation>
......
......@@ -256,6 +256,7 @@ core_constructor_list = [
"com_sun_star_comp_oox_core_FastTokenHandler_get_implementation",
"com_sun_star_comp_oox_FormatDetector_get_implementation",
"com_sun_star_comp_oox_docprop_DocumentPropertiesImporter_get_implementation",
"com_sun_star_comp_oox_ppt_PowerPointImport_get_implementation",
]
# edit group for apps, where you can edit documents
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment