[Libreoffice-commits] core.git: canvas/source cppcanvas/source include/comphelper shell/source slideshow/source

Noel Grandin noel at peralex.com
Mon Jun 15 00:46:45 PDT 2015


 canvas/source/cairo/cairo_services.cxx                                 |    7 +
 canvas/source/directx/dx_canvas.cxx                                    |    9 +
 canvas/source/directx/dx_spritecanvas.cxx                              |    7 +
 canvas/source/opengl/ogl_spritecanvas.cxx                              |    7 +
 canvas/source/simplecanvas/simplecanvasimpl.cxx                        |    6 -
 canvas/source/vcl/services.cxx                                         |    7 +
 cppcanvas/source/uno/uno_mtfrenderer.cxx                               |    7 +
 include/comphelper/servicedecl.hxx                                     |   53 ----------
 shell/source/sessioninstall/services.cxx                               |   12 +-
 slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx |    7 +
 slideshow/source/engine/slideshowimpl.cxx                              |    7 +
 11 files changed, 62 insertions(+), 67 deletions(-)

New commits:
commit 1afb790a118f07e888f7a1a94a8fd06d0d8713dd
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Jun 12 16:04:07 2015 +0200

    inline COMPHELPER_SERVICEDECL_ macro
    
    it was not adding any value
    
    Change-Id: I6a911aac81e883f9155ed0cf24bfb7904efb3f92

diff --git a/canvas/source/cairo/cairo_services.cxx b/canvas/source/cairo/cairo_services.cxx
index 936fc98..39a1afd 100644
--- a/canvas/source/cairo/cairo_services.cxx
+++ b/canvas/source/cairo/cairo_services.cxx
@@ -73,6 +73,11 @@ namespace cairocanvas
 }
 
 // The C shared lib entry points
-COMPHELPER_SERVICEDECL_EXPORTS2(cairocanvas, cairocanvas::cairoCanvasDecl, cairocanvas::cairoSpriteCanvasDecl)
+extern "C"
+SAL_DLLPUBLIC_EXPORT void* SAL_CALL cairocanvas_component_getFactory( sal_Char const* pImplName,
+                                         void*, void* )
+{
+    return component_getFactoryHelper( pImplName, cairocanvas::cairoCanvasDecl, cairocanvas::cairoSpriteCanvasDecl );
+}
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_canvas.cxx b/canvas/source/directx/dx_canvas.cxx
index 0cfb542..727d909 100644
--- a/canvas/source/directx/dx_canvas.cxx
+++ b/canvas/source/directx/dx_canvas.cxx
@@ -240,8 +240,11 @@ namespace dxcanvas
 }
 
 // The C shared lib entry points
-COMPHELPER_SERVICEDECL_EXPORTS2(gdipluscanvas,
-                                dxcanvas::dxCanvasDecl,
-                                dxcanvas::dxBitmapCanvasDecl)
+extern "C"
+SAL_DLLPUBLIC_EXPORT void* SAL_CALL gdipluscanvas_component_getFactory( sal_Char const* pImplName,
+                                         void*, void* )
+{
+    return component_getFactoryHelper( pImplName, dxcanvas::dxCanvasDecl, dxcanvas::dxBitmapCanvasDecl );
+}
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/directx/dx_spritecanvas.cxx b/canvas/source/directx/dx_spritecanvas.cxx
index ab76e77..3ec2214 100644
--- a/canvas/source/directx/dx_spritecanvas.cxx
+++ b/canvas/source/directx/dx_spritecanvas.cxx
@@ -191,6 +191,11 @@ namespace dxcanvas
 }
 
 // The C shared lib entry points
-COMPHELPER_SERVICEDECL_EXPORTS1(directx9canvas, dxcanvas::dxSpriteCanvasDecl)
+extern "C"
+SAL_DLLPUBLIC_EXPORT void* SAL_CALL directx9canvas_component_getFactory( sal_Char const* pImplName,
+                                         void*, void* )
+{
+    return component_getFactoryHelper( pImplName, dxcanvas::dxSpriteCanvasDecl );
+}
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/opengl/ogl_spritecanvas.cxx b/canvas/source/opengl/ogl_spritecanvas.cxx
index 75d96b1..3e56c5c 100644
--- a/canvas/source/opengl/ogl_spritecanvas.cxx
+++ b/canvas/source/opengl/ogl_spritecanvas.cxx
@@ -186,6 +186,11 @@ namespace oglcanvas
 }
 
 // The C shared lib entry points
-COMPHELPER_SERVICEDECL_EXPORTS1(oglcanvas, oglcanvas::oglSpriteCanvasDecl);
+extern "C"
+SAL_DLLPUBLIC_EXPORT void* SAL_CALL oglcanvas_component_getFactory( sal_Char const* pImplName,
+                                         void*, void* )
+{
+    return component_getFactoryHelper( pImplName, oglcanvas::oglSpriteCanvasDecl );
+}
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/simplecanvas/simplecanvasimpl.cxx b/canvas/source/simplecanvas/simplecanvasimpl.cxx
index 79578d4..a503a2f 100644
--- a/canvas/source/simplecanvas/simplecanvasimpl.cxx
+++ b/canvas/source/simplecanvas/simplecanvasimpl.cxx
@@ -383,6 +383,10 @@ namespace
 }
 
 // The C shared lib entry points
-COMPHELPER_SERVICEDECL_EXPORTS1(simplecanvas, simpleCanvasDecl)
+extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL simplecanvas_component_getFactory( sal_Char const* pImplName,
+                                         void*, void* )
+{
+    return component_getFactoryHelper( pImplName, simpleCanvasDecl );
+}
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/services.cxx b/canvas/source/vcl/services.cxx
index 95ba8cb..c22cf77 100644
--- a/canvas/source/vcl/services.cxx
+++ b/canvas/source/vcl/services.cxx
@@ -77,6 +77,11 @@ namespace vclcanvas
 }
 
 // The C shared lib entry points
-COMPHELPER_SERVICEDECL_EXPORTS2(vclcanvas, vclcanvas::vclCanvasDecl, vclcanvas::vclSpriteCanvasDecl)
+extern "C"
+SAL_DLLPUBLIC_EXPORT void* SAL_CALL vclcanvas_component_getFactory( sal_Char const* pImplName,
+                                         void*, void* )
+{
+    return component_getFactoryHelper( pImplName, vclcanvas::vclCanvasDecl, vclcanvas::vclSpriteCanvasDecl );
+}
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cppcanvas/source/uno/uno_mtfrenderer.cxx b/cppcanvas/source/uno/uno_mtfrenderer.cxx
index ba220ab..5360c61 100644
--- a/cppcanvas/source/uno/uno_mtfrenderer.cxx
+++ b/cppcanvas/source/uno/uno_mtfrenderer.cxx
@@ -52,6 +52,11 @@ namespace sdecl = comphelper::service_decl;
     "com.sun.star.rendering.MtfRenderer" );
 
 // The C shared lib entry points
-COMPHELPER_SERVICEDECL_EXPORTS1(mtfrenderer, MtfRendererDecl)
+extern "C"
+SAL_DLLPUBLIC_EXPORT void* SAL_CALL mtfrenderer_component_getFactory( sal_Char const* pImplName,
+                                         void*, void* )
+{
+    return component_getFactoryHelper( pImplName, MtfRendererDecl );
+}
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/comphelper/servicedecl.hxx b/include/comphelper/servicedecl.hxx
index 0e3fef2..f91ee5c 100644
--- a/include/comphelper/servicedecl.hxx
+++ b/include/comphelper/servicedecl.hxx
@@ -377,59 +377,6 @@ BOOST_PP_REPEAT_FROM_TO(1, COMPHELPER_SERVICEDECL_COMPONENT_HELPER_MAX_ARGS,
 } // namespace service_decl
 } // namespace comphelper
 
-/** The following preprocessor macro generates the C access functions,
-    that are used to initialize and register the components of a
-    shared library object.
-
-    If you have, say, written a lib that contains three distinct
-    components, each with its own ServiceDecl object, you might want
-    to employ the following code:
-
-    <pre>
-        // must reside outside _any_ namespace
-        COMPHELPER_SERVICEDECL_EXPORTS3(yourServiceDecl1,
-                                       yourServiceDecl2,
-                                       yourServiceDecl3);
-    </pre>
-
-    For your convenience, the COMPHELPER_SERVICEDECL_EXPORTS<N> macro
-    comes pre-defined up to N=8, if you should need more arguments,
-    call COMPHELPER_SERVICEDECL_make_exports directly, like this:
-
-    <pre>
-        // must reside outside _any_ namespace
-        COMPHELPER_SERVICEDECL_make_exports((yourServiceDecl1)(yourServiceDecl2)...(yourServiceDeclN));
-    </pre>
-
-    Note the missing colons between the bracketed arguments.
- */
-#define COMPHELPER_SERVICEDECL_make_exports(compName, varargs_ ) \
-extern "C" \
-{ \
-    SAL_DLLPUBLIC_EXPORT void* SAL_CALL compName##_component_getFactory( sal_Char const* pImplName, \
-                                         void*, void* ) \
-    { \
-        return component_getFactoryHelper( pImplName, \
-                                           BOOST_PP_SEQ_ENUM(varargs_) ); \
-    } \
-}
-
-#define COMPHELPER_SERVICEDECL_EXPORTS1(compName,comp0_)    \
-    COMPHELPER_SERVICEDECL_make_exports(compName,(comp0_))
-#define COMPHELPER_SERVICEDECL_EXPORTS2(compName,comp0_,comp1_) \
-    COMPHELPER_SERVICEDECL_make_exports(compName,(comp0_)(comp1_))
-#define COMPHELPER_SERVICEDECL_EXPORTS3(compName,comp0_,comp1_,comp2_) \
-    COMPHELPER_SERVICEDECL_make_exports(compName,(comp0_)(comp1_)(comp2_))
-#define COMPHELPER_SERVICEDECL_EXPORTS4(compName,comp0_,comp1_,comp2_,comp3_) \
-    COMPHELPER_SERVICEDECL_make_exports(compName,(comp0_)(comp1_)(comp2_)(comp3_))
-#define COMPHELPER_SERVICEDECL_EXPORTS5(compName,comp0_,comp1_,comp2_,comp3_,comp4_) \
-    COMPHELPER_SERVICEDECL_make_exports(compName,(comp0_)(comp1_)(comp2_)(comp3_)(comp4_))
-#define COMPHELPER_SERVICEDECL_EXPORTS6(compName,comp0_,comp1_,comp2_,comp3_,comp4_,comp5_) \
-    COMPHELPER_SERVICEDECL_make_exports(compName,(comp0_)(comp1_)(comp2_)(comp3_)(comp4_)(comp5_))
-#define COMPHELPER_SERVICEDECL_EXPORTS7(compName,comp0_,comp1_,comp2_,comp3_,comp4_,comp5_,comp6_) \
-    COMPHELPER_SERVICEDECL_make_exports(compName,(comp0_)(comp1_)(comp2_)(comp3_)(comp4_)(comp5_)(comp6_))
-#define COMPHELPER_SERVICEDECL_EXPORTS8(compName,comp0_,comp1_,comp2_,comp3_,comp4_,comp5_,comp6_,comp7_) \
-    COMPHELPER_SERVICEDECL_make_exports(compName,(comp0_)(comp1_)(comp2_)(comp3_)(comp4_)(comp5_)(comp6_)(comp7_))
 
 #endif //  ! defined( INCLUDED_COMPHELPER_SERVICEDECL_HXX)
 
diff --git a/shell/source/sessioninstall/services.cxx b/shell/source/sessioninstall/services.cxx
index 9372e63..bc27deb 100644
--- a/shell/source/sessioninstall/services.cxx
+++ b/shell/source/sessioninstall/services.cxx
@@ -20,11 +20,17 @@ const sdecl::ServiceDecl SyncDbusSessionHelperServiceDecl(
     "org.libreoffice.comp.shell.sessioninstall.SyncDbusSessionHelper",
     "org.freedesktop.PackageKit.SyncDbusSessionHelper");
 
-COMPHELPER_SERVICEDECL_EXPORTS1(losessioninstall, SyncDbusSessionHelperServiceDecl);
 extern "C"
+SAL_DLLPUBLIC_EXPORT void* SAL_CALL losessioninstall_component_getFactory( sal_Char const* pImplName,
+                                         void*, void* )
 {
-    SAL_DLLPUBLIC_EXPORT void* SAL_CALL sessioninstall_component_getFactory( sal_Char const* pImplName, void* pServiceManager, void* pRegistryKey )
-        { return losessioninstall_component_getFactory(pImplName, pServiceManager, pRegistryKey); }
+    return component_getFactoryHelper( pImplName, SyncDbusSessionHelperServiceDecl );
+}
+
+extern "C"
+SAL_DLLPUBLIC_EXPORT void* SAL_CALL sessioninstall_component_getFactory( sal_Char const* pImplName, void* pServiceManager, void* pRegistryKey )
+{
+    return losessioninstall_component_getFactory(pImplName, pServiceManager, pRegistryKey);
 }
 
 
diff --git a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx
index 50a8906..b981619 100644
--- a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx
+++ b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx
@@ -1538,6 +1538,11 @@ namespace sdecl = comphelper::service_decl;
     "com.sun.star.presentation.TransitionFactory" );
 
 // The C shared lib entry points
-COMPHELPER_SERVICEDECL_EXPORTS1(ogltrans, OGLTransitionFactoryDecl)
+extern "C"
+SAL_DLLPUBLIC_EXPORT void* SAL_CALL ogltrans_component_getFactory( sal_Char const* pImplName,
+                                         void*, void* )
+{
+    return component_getFactoryHelper( pImplName, OGLTransitionFactoryDecl );
+}
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx
index 98d7414..9b4dd4a 100644
--- a/slideshow/source/engine/slideshowimpl.cxx
+++ b/slideshow/source/engine/slideshowimpl.cxx
@@ -2470,6 +2470,11 @@ const sdecl::ServiceDecl slideShowDecl(
     "com.sun.star.presentation.SlideShow" );
 
 // The C shared lib entry points
-COMPHELPER_SERVICEDECL_EXPORTS1(slideshow, slideShowDecl)
+extern "C"
+SAL_DLLPUBLIC_EXPORT void* SAL_CALL slideshow_component_getFactory( sal_Char const* pImplName,
+                                         void*, void* )
+{
+    return component_getFactoryHelper( pImplName, slideShowDecl );
+}
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list