[Libreoffice-commits] core.git: oox/inc oox/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Sep 21 07:29:03 UTC 2018


 oox/inc/services.hxx         |    7 -------
 oox/source/core/services.cxx |    1 -
 oox/source/ppt/dgmlayout.cxx |   26 ++++++++------------------
 3 files changed, 8 insertions(+), 26 deletions(-)

New commits:
commit ec3c4775a52bc2bb498f67c5937545fc40c65daa
Author:     Miklos Vajna <vmiklos at collabora.co.uk>
AuthorDate: Thu Sep 20 21:58:27 2018 +0200
Commit:     Miklos Vajna <vmiklos at collabora.co.uk>
CommitDate: Fri Sep 21 09:28:36 2018 +0200

    oox: create QuickDiagrammingLayout 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: Ibfee57202f0a3b02847b1298ce8895c8cf312322
    Reviewed-on: https://gerrit.libreoffice.org/60840
    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 e4becd9f6d4f..f790ce525a6b 100644
--- a/oox/inc/services.hxx
+++ b/oox/inc/services.hxx
@@ -23,13 +23,6 @@
 #include <sal/config.h>
 
 namespace oox {
-    namespace ppt {
-        extern OUString QuickDiagrammingLayout_getImplementationName();
-        extern css::uno::Sequence< OUString > QuickDiagrammingLayout_getSupportedServiceNames();
-        /// @throws css::uno::Exception
-        extern css::uno::Reference< css::uno::XInterface > QuickDiagrammingLayout_createInstance(
-            const css::uno::Reference< css::uno::XComponentContext >& rxContext );
-    }
     namespace shape {
         extern OUString ShapeContextHandler_getImplementationName();
         extern css::uno::Sequence< OUString > ShapeContextHandler_getSupportedServiceNames();
diff --git a/oox/source/core/services.cxx b/oox/source/core/services.cxx
index 4f4f4b76528e..5c18b9544767 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::QuickDiagrammingLayout ),
     IMPLEMENTATION_ENTRY( ::oox::shape::ShapeContextHandler ),
     { nullptr, nullptr, nullptr, nullptr, nullptr, 0 }
 };
diff --git a/oox/source/ppt/dgmlayout.cxx b/oox/source/ppt/dgmlayout.cxx
index c4ff54bcf492..6d941dee0f4d 100644
--- a/oox/source/ppt/dgmlayout.cxx
+++ b/oox/source/ppt/dgmlayout.cxx
@@ -43,23 +43,6 @@ using namespace ::oox::drawingml;
 
 namespace oox { namespace ppt {
 
-OUString QuickDiagrammingLayout_getImplementationName()
-{
-    return OUString( "com.sun.star.comp.Impress.oox.QuickDiagrammingLayout" );
-}
-
-uno::Sequence< OUString > QuickDiagrammingLayout_getSupportedServiceNames()
-{
-    const OUString aServiceName = "com.sun.star.comp.ooxpptx.dgm.layout";
-    const Sequence< OUString > aSeq( &aServiceName, 1 );
-    return aSeq;
-}
-
-uno::Reference< uno::XInterface > QuickDiagrammingLayout_createInstance( const Reference< XComponentContext >& rxContext )
-{
-    return static_cast<cppu::OWeakObject*>(new QuickDiagrammingLayout( rxContext ));
-}
-
 QuickDiagrammingLayout::QuickDiagrammingLayout( const Reference< XComponentContext >& rxContext )
     : XmlFilterBase( rxContext ),
     mpThemePtr(new drawingml::Theme())
@@ -159,7 +142,7 @@ const oox::drawingml::table::TableStyleListPtr QuickDiagrammingLayout::getTableS
 
 OUString QuickDiagrammingLayout::getImplementationName()
 {
-    return QuickDiagrammingLayout_getImplementationName();
+    return OUString( "com.sun.star.comp.Impress.oox.QuickDiagrammingLayout" );
 }
 
 ::oox::ole::VbaProject* QuickDiagrammingLayout::implCreateVbaProject() const
@@ -169,4 +152,11 @@ OUString QuickDiagrammingLayout::getImplementationName()
 
 }}
 
+extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
+com_sun_star_comp_oox_ppt_QuickDiagrammingLayout_get_implementation(
+    uno::XComponentContext* pCtx, uno::Sequence<uno::Any> const& /*rSeq*/)
+{
+    return cppu::acquire(new oox::ppt::QuickDiagrammingLayout(pCtx));
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list