[Libreoffice-commits] core.git: oox/inc oox/source oox/util solenv/bin
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Aug 31 07:09:13 UTC 2018
oox/inc/services.hxx | 7 -------
oox/source/core/services.cxx | 1 -
oox/source/docprop/ooxmldocpropimport.cxx | 30 ++++++++++++------------------
oox/util/oox.component | 3 ++-
solenv/bin/native-code.py | 1 +
5 files changed, 15 insertions(+), 27 deletions(-)
New commits:
commit 4ccac77652d61b823160cac073e3c1bf725352f1
Author: Miklos Vajna <vmiklos at collabora.co.uk>
AuthorDate: Thu Aug 30 21:58:14 2018 +0200
Commit: Miklos Vajna <vmiklos at collabora.co.uk>
CommitDate: Fri Aug 31 09:08:47 2018 +0200
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 at collabora.co.uk>
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">
diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index 0056fb1a6dc3..d297f93bba05 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -255,6 +255,7 @@ core_constructor_list = [
# oox/util/oox.component
"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",
]
# edit group for apps, where you can edit documents
More information about the Libreoffice-commits
mailing list