diff --git a/emfio/Library_emfio.mk b/emfio/Library_emfio.mk
index 52fde14885b3..281f077130f1 100644
--- a/emfio/Library_emfio.mk
+++ b/emfio/Library_emfio.mk
@@ -55,7 +55,6 @@ $(eval $(call gb_Library_use_libraries,emfio,\
))
$(eval $(call gb_Library_add_exception_objects,emfio,\
- emfio/source/emfuno/emfuno \
emfio/source/emfuno/xemfparser \
emfio/source/reader/mtftools \
emfio/source/reader/wmfreader \
diff --git a/emfio/emfio.component b/emfio/emfio.component
index a0ea552950cd..80e242792bee 100644
--- a/emfio/emfio.component
+++ b/emfio/emfio.component
@@ -18,8 +18,9 @@
-->
-
+ xmlns="http://openoffice.org/2010/uno-components">
+
diff --git a/emfio/source/emfuno/emfuno.cxx b/emfio/source/emfuno/emfuno.cxx
deleted file mode 100644
index 4b55eb6c54fb..000000000000
--- a/emfio/source/emfuno/emfuno.cxx
+++ /dev/null
@@ -1,46 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include
-
-#include
-#include
-#include
-
-#include "xemfparser.hxx"
-
-namespace {
-
-cppu::ImplementationEntry const services[] = {
- { &emfio::emfreader::XEmfParser_createInstance,
- &emfio::emfreader::XEmfParser_getImplementationName,
- &emfio::emfreader::XEmfParser_getSupportedServiceNames,
- &cppu::createSingleComponentFactory, nullptr, 0 },
- { nullptr, nullptr, nullptr, nullptr, nullptr, 0 } };
-
-}
-
-extern "C" SAL_DLLPUBLIC_EXPORT void * emfio_component_getFactory(
- char const * pImplName, void * pServiceManager, void * pRegistryKey)
-{
- return cppu::component_getFactoryHelper(
- pImplName, pServiceManager, pRegistryKey, services);
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/emfio/source/emfuno/xemfparser.cxx b/emfio/source/emfuno/xemfparser.cxx
index 3297dea8f30a..717f2dad7cfb 100644
--- a/emfio/source/emfuno/xemfparser.cxx
+++ b/emfio/source/emfuno/xemfparser.cxx
@@ -36,8 +36,6 @@
#include
#include
-#include "xemfparser.hxx"
-
using namespace ::com::sun::star;
namespace emfio::emfreader
@@ -49,7 +47,6 @@ namespace emfio::emfreader
private:
uno::Reference< uno::XComponentContext > context_;
- protected:
public:
explicit XEmfParser(
uno::Reference< uno::XComponentContext > const & context);
@@ -69,29 +66,7 @@ namespace emfio::emfreader
};
}
-} // end of namespace emfio::emfreader
-// uno functions
-namespace emfio::emfreader
-{
- uno::Sequence< OUString > XEmfParser_getSupportedServiceNames()
- {
- return uno::Sequence< OUString > { "com.sun.star.graphic.EmfTools" };
- }
-
- OUString XEmfParser_getImplementationName()
- {
- return "emfio::emfreader::XEmfParser";
- }
-
- uno::Reference< uno::XInterface > XEmfParser_createInstance(const uno::Reference< uno::XComponentContext >& context)
- {
- return static_cast< ::cppu::OWeakObject* >(new XEmfParser(context));
- }
-} // end of namespace emfio::emfreader
-
-namespace emfio::emfreader
-{
XEmfParser::XEmfParser(
uno::Reference< uno::XComponentContext > const & context):
context_(context)
@@ -208,7 +183,7 @@ namespace emfio::emfreader
OUString SAL_CALL XEmfParser::getImplementationName()
{
- return XEmfParser_getImplementationName();
+ return "emfio::emfreader::XEmfParser";
}
sal_Bool SAL_CALL XEmfParser::supportsService(const OUString& rServiceName)
@@ -218,9 +193,18 @@ namespace emfio::emfreader
uno::Sequence< OUString > SAL_CALL XEmfParser::getSupportedServiceNames()
{
- return XEmfParser_getSupportedServiceNames();
+ return { "com.sun.star.graphic.EmfTools" };
}
} // end of namespace emfio::emfreader
+
+
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
+emfio_emfreader_XEmfParser_get_implementation(
+ css::uno::XComponentContext* context, css::uno::Sequence const& )
+{
+ return cppu::acquire(new emfio::emfreader::XEmfParser(context));
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/emfio/source/emfuno/xemfparser.hxx b/emfio/source/emfuno/xemfparser.hxx
deleted file mode 100644
index 426231d362fc..000000000000
--- a/emfio/source/emfuno/xemfparser.hxx
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_EMFIO_SOURCE_EMFUNO_XEMFARSER_HXX
-#define INCLUDED_EMFIO_SOURCE_EMFUNO_XEMFARSER_HXX
-
-#include
-
-#include
-#include
-
-namespace com::sun::star {
- namespace uno {
- class XComponentContext;
- class XInterface;
- }
-}
-
-namespace emfio::emfreader {
-
-css::uno::Reference< css::uno::XInterface >
-XEmfParser_createInstance( css::uno::Reference< css::uno::XComponentContext > const &);
-
-OUString XEmfParser_getImplementationName();
-
-css::uno::Sequence< OUString >
-XEmfParser_getSupportedServiceNames();
-
-}
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index 93157dcec0e9..d6748918a7b2 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -23,7 +23,6 @@ core_factory_list = [
("libembobj.a", "embobj_component_getFactory"),
("libevtattlo.a", "evtatt_component_getFactory"),
("libdrawinglayerlo.a", "drawinglayer_component_getFactory"),
- ("libemfiolo.a", "emfio_component_getFactory"),
("libfilterconfiglo.a", "filterconfig1_component_getFactory"),
("libfsstoragelo.a", "fsstorage_component_getFactory"),
("libhyphenlo.a", "hyphen_component_getFactory"),
@@ -149,6 +148,8 @@ core_constructor_list = [
"com_sun_star_cui_ColorPicker_get_implementation",
# dbaccess/util/dba.component
"com_sun_star_comp_dba_ORowSet_get_implementation",
+# emfio/emfio.component
+ "emfio_emfreader_XEmfParser_get_implementation",
# extensions/source/logging/log.component
("com_sun_star_comp_extensions_FileHandler", "#ifdef ANDROID"),
("com_sun_star_comp_extensions_LoggerPool", "#ifdef ANDROID"),