summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2018-08-30 21:58:14 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-08-31 09:08:47 +0200
commit4ccac77652d61b823160cac073e3c1bf725352f1 (patch)
treeb28ac5aeb794f7be1e1408fa0508a484a43f6219 /oox
parentba259064a0301a1b2fc17064be2724f61bd12f9b (diff)
oox: create DocumentPropertiesImporter instances with an uno constructor
Change-Id: I2600a59e4eac7375882aff0491ecf16bad449520 Reviewed-on: https://gerrit.libreoffice.org/59841 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'oox')
-rw-r--r--oox/inc/services.hxx7
-rw-r--r--oox/source/core/services.cxx1
-rw-r--r--oox/source/docprop/ooxmldocpropimport.cxx30
-rw-r--r--oox/util/oox.component3
4 files changed, 14 insertions, 27 deletions
diff --git a/oox/inc/services.hxx b/oox/inc/services.hxx
index 9fd9ddd46b70..849c28a279bc 100644
--- a/oox/inc/services.hxx
+++ b/oox/inc/services.hxx
@@ -23,13 +23,6 @@
#include <sal/config.h>
namespace oox {
- namespace docprop {
- extern OUString DocumentPropertiesImport_getImplementationName();
- extern css::uno::Sequence< OUString > DocumentPropertiesImport_getSupportedServiceNames();
- /// @throws css::uno::Exception
- extern css::uno::Reference< css::uno::XInterface > DocumentPropertiesImport_createInstance(
- const css::uno::Reference< css::uno::XComponentContext >& rxContext );
- }
namespace ppt {
extern OUString PowerPointImport_getImplementationName();
extern css::uno::Sequence< OUString > PowerPointImport_getSupportedServiceNames();
diff --git a/oox/source/core/services.cxx b/oox/source/core/services.cxx
index 2c9412ea2640..9bf8e57466bf 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::docprop::DocumentPropertiesImport ),
IMPLEMENTATION_ENTRY( ::oox::ppt::PowerPointImport ),
IMPLEMENTATION_ENTRY( ::oox::ppt::QuickDiagrammingImport ),
IMPLEMENTATION_ENTRY( ::oox::ppt::QuickDiagrammingLayout ),
diff --git a/oox/source/docprop/ooxmldocpropimport.cxx b/oox/source/docprop/ooxmldocpropimport.cxx
index a15518b2eb75..6129030f7c4e 100644
--- a/oox/source/docprop/ooxmldocpropimport.cxx
+++ b/oox/source/docprop/ooxmldocpropimport.cxx
@@ -33,6 +33,8 @@
#include <cppuhelper/supportsservice.hxx>
+using namespace ::com::sun::star;
+
namespace oox {
namespace docprop {
@@ -44,22 +46,6 @@ using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::xml::sax;
-OUString DocumentPropertiesImport_getImplementationName()
-{
- return OUString( "com.sun.star.comp.oox.docprop.DocumentPropertiesImporter" );
-}
-
-Sequence< OUString > DocumentPropertiesImport_getSupportedServiceNames()
-{
- Sequence<OUString> aServices { "com.sun.star.document.OOXMLDocumentPropertiesImporter" };
- return aServices;
-}
-
-Reference< XInterface > DocumentPropertiesImport_createInstance( const Reference< XComponentContext >& rxContext )
-{
- return static_cast< ::cppu::OWeakObject* >( new DocumentPropertiesImport( rxContext ) );
-}
-
namespace {
/// @throws RuntimeException
@@ -113,7 +99,7 @@ DocumentPropertiesImport::DocumentPropertiesImport( const Reference< XComponentC
// XServiceInfo
OUString SAL_CALL DocumentPropertiesImport::getImplementationName()
{
- return DocumentPropertiesImport_getImplementationName();
+ return OUString( "com.sun.star.comp.oox.docprop.DocumentPropertiesImporter" );
}
sal_Bool SAL_CALL DocumentPropertiesImport::supportsService( const OUString& rServiceName )
@@ -123,7 +109,8 @@ sal_Bool SAL_CALL DocumentPropertiesImport::supportsService( const OUString& rSe
Sequence< OUString > SAL_CALL DocumentPropertiesImport::getSupportedServiceNames()
{
- return DocumentPropertiesImport_getSupportedServiceNames();
+ Sequence<OUString> aServices { "com.sun.star.document.OOXMLDocumentPropertiesImporter" };
+ return aServices;
}
// XOOXMLDocumentPropertiesImporter
@@ -179,4 +166,11 @@ void SAL_CALL DocumentPropertiesImport::importProperties(
} // namespace docprop
} // namespace oox
+extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
+com_sun_star_comp_oox_docprop_DocumentPropertiesImporter_get_implementation(
+ uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
+{
+ return cppu::acquire(new oox::docprop::DocumentPropertiesImport(pCtx));
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/util/oox.component b/oox/util/oox.component
index 5d235e1485cf..399348db905c 100644
--- a/oox/util/oox.component
+++ b/oox/util/oox.component
@@ -27,7 +27,8 @@
constructor="com_sun_star_comp_oox_FormatDetector_get_implementation">
<service name="com.sun.star.frame.ExtendedTypeDetection"/>
</implementation>
- <implementation name="com.sun.star.comp.oox.docprop.DocumentPropertiesImporter">
+ <implementation name="com.sun.star.comp.oox.docprop.DocumentPropertiesImporter"
+ 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">