summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2018-09-13 22:38:57 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-09-14 09:05:07 +0200
commit515f97e3dd279ca8487f6f6038045511f0e1db51 (patch)
tree3a10f2d64e75ab068b08001de4cc23c93a8be7a6 /oox
parent7fb70e419d8f6ce5b0821cb0476cc37483791180 (diff)
oox: create QuickDiagrammingImport instances with an uno constructor
This is effectively dead code as commit 547217ecf2348cf511b1f058ecbab6f15f2bceff (Document seemingly dead QuickDiagrammingImport, QuickDiagrammingLayout, 2013-06-03) found, so the primary motivation is to just get this out of oox_component_getFactory(). Change-Id: If0a585c2fc4b87ceb00e6f772fef2ac65d10dc67 Reviewed-on: https://gerrit.libreoffice.org/60470 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/ppt/dgmimport.cxx26
3 files changed, 8 insertions, 26 deletions
diff --git a/oox/inc/services.hxx b/oox/inc/services.hxx
index 7140a5b87d80..e4becd9f6d4f 100644
--- a/oox/inc/services.hxx
+++ b/oox/inc/services.hxx
@@ -24,13 +24,6 @@
namespace oox {
namespace ppt {
- extern OUString QuickDiagrammingImport_getImplementationName();
- extern css::uno::Sequence< OUString > QuickDiagrammingImport_getSupportedServiceNames();
- /// @throws css::uno::Exception
- extern css::uno::Reference< css::uno::XInterface > QuickDiagrammingImport_createInstance(
- const css::uno::Reference< css::uno::XComponentContext >& rxContext );
- }
- namespace ppt {
extern OUString QuickDiagrammingLayout_getImplementationName();
extern css::uno::Sequence< OUString > QuickDiagrammingLayout_getSupportedServiceNames();
/// @throws css::uno::Exception
diff --git a/oox/source/core/services.cxx b/oox/source/core/services.cxx
index c336022110a2..4f4f4b76528e 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::QuickDiagrammingImport ),
IMPLEMENTATION_ENTRY( ::oox::ppt::QuickDiagrammingLayout ),
IMPLEMENTATION_ENTRY( ::oox::shape::ShapeContextHandler ),
{ nullptr, nullptr, nullptr, nullptr, nullptr, 0 }
diff --git a/oox/source/ppt/dgmimport.cxx b/oox/source/ppt/dgmimport.cxx
index c10dc48a72ef..2439ca6daa72 100644
--- a/oox/source/ppt/dgmimport.cxx
+++ b/oox/source/ppt/dgmimport.cxx
@@ -36,23 +36,6 @@ using namespace oox::core;
namespace oox { namespace ppt {
-OUString QuickDiagrammingImport_getImplementationName()
-{
- return OUString( "com.sun.star.comp.Impress.oox.QuickDiagrammingImport" );
-}
-
-uno::Sequence< OUString > QuickDiagrammingImport_getSupportedServiceNames()
-{
- const OUString aServiceName = "com.sun.star.comp.ooxpptx.dgm.import";
- const Sequence< OUString > aSeq( &aServiceName, 1 );
- return aSeq;
-}
-
-uno::Reference< uno::XInterface > QuickDiagrammingImport_createInstance( const Reference< XComponentContext >& rxContext )
-{
- return static_cast<cppu::OWeakObject*>(new QuickDiagrammingImport( rxContext ));
-}
-
QuickDiagrammingImport::QuickDiagrammingImport( const css::uno::Reference< css::uno::XComponentContext >& rxContext )
: XmlFilterBase( rxContext )
{}
@@ -115,7 +98,7 @@ oox::drawingml::chart::ChartConverter* QuickDiagrammingImport::getChartConverter
OUString QuickDiagrammingImport::getImplementationName()
{
- return QuickDiagrammingImport_getImplementationName();
+ return OUString( "com.sun.star.comp.Impress.oox.QuickDiagrammingImport" );
}
::oox::ole::VbaProject* QuickDiagrammingImport::implCreateVbaProject() const
@@ -125,4 +108,11 @@ OUString QuickDiagrammingImport::getImplementationName()
}}
+extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
+com_sun_star_comp_oox_ppt_QuickDiagrammingImport_get_implementation(
+ uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
+{
+ return cppu::acquire(new oox::ppt::QuickDiagrammingImport(pCtx));
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */