summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2018-09-07 08:41:44 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-09-07 11:58:02 +0200
commitc3c43c7966e0f4c7a3b76361559d29c9335487d9 (patch)
treec4cc73741d1fda978045345757767f6c67bae966 /oox
parentaef44b5a71d6d2bd8e399d2cb35bce6d6023fbf8 (diff)
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/60124 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins
Diffstat (limited to 'oox')
-rw-r--r--oox/inc/services.hxx7
-rw-r--r--oox/source/core/services.cxx1
-rw-r--r--oox/source/ppt/pptimport.cxx27
-rw-r--r--oox/util/oox.component3
4 files changed, 10 insertions, 28 deletions
diff --git a/oox/inc/services.hxx b/oox/inc/services.hxx
index 849c28a279bc..7140a5b87d80 100644
--- a/oox/inc/services.hxx
+++ b/oox/inc/services.hxx
@@ -24,13 +24,6 @@
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();
/// @throws css::uno::Exception
diff --git a/oox/source/core/services.cxx b/oox/source/core/services.cxx
index 9bf8e57466bf..c336022110a2 100644
--- a/oox/source/core/services.cxx
+++ b/oox/source/core/services.cxx
@@ -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 ),
diff --git a/oox/source/ppt/pptimport.cxx b/oox/source/ppt/pptimport.cxx
index 634cd877f66f..8d5a6aa03f67 100644
--- a/oox/source/ppt/pptimport.cxx
+++ b/oox/source/ppt/pptimport.cxx
@@ -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: */
diff --git a/oox/util/oox.component b/oox/util/oox.component
index 399348db905c..09952c7abdf4 100644
--- a/oox/util/oox.component
+++ b/oox/util/oox.component
@@ -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>