summaryrefslogtreecommitdiff
path: root/canvas
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-20 13:39:52 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-20 13:39:52 +0100
commitb8793748b0eaaa3fe405587fcb2a3021adab833b (patch)
tree39b683691a8b8089831939a3a84ba1d62d614cb5 /canvas
parente3990370f832c8a69d1b6b22ec315dc0616d5535 (diff)
Seems more natural to pass a homogenous list by initializer_list
...than by template parameter pack (even if that requires using ServiceDecl*, as initializer_list cannot take reference types) Change-Id: Ia986201b52d8daedfe925f132ebc79bc2c0ba378
Diffstat (limited to 'canvas')
-rw-r--r--canvas/source/cairo/cairo_services.cxx5
-rw-r--r--canvas/source/opengl/ogl_spritecanvas.cxx5
-rw-r--r--canvas/source/simplecanvas/simplecanvasimpl.cxx2
-rw-r--r--canvas/source/vcl/services.cxx6
4 files changed, 10 insertions, 8 deletions
diff --git a/canvas/source/cairo/cairo_services.cxx b/canvas/source/cairo/cairo_services.cxx
index 2503531daf94..9cd28b11418e 100644
--- a/canvas/source/cairo/cairo_services.cxx
+++ b/canvas/source/cairo/cairo_services.cxx
@@ -40,6 +40,8 @@ using namespace ::com::sun::star;
# error "The cairo canvas should not be enabled on Windows or Mac cf fdo#46901"
#endif
+namespace sdecl = comphelper::service_decl;
+
namespace cairocanvas
{
static uno::Reference<uno::XInterface> initCanvas( Canvas* pCanvas )
@@ -49,7 +51,6 @@ namespace cairocanvas
return xRet;
}
- namespace sdecl = comphelper::service_decl;
sdecl::class_< Canvas, sdecl::with_args<true> > serviceImpl1(&initCanvas);
const sdecl::ServiceDecl cairoCanvasDecl(
serviceImpl1,
@@ -76,7 +77,7 @@ 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 );
+ return sdecl::component_getFactoryHelper( pImplName, {&cairocanvas::cairoCanvasDecl, &cairocanvas::cairoSpriteCanvasDecl} );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/opengl/ogl_spritecanvas.cxx b/canvas/source/opengl/ogl_spritecanvas.cxx
index ed4d3144ee68..7e6bc04c7204 100644
--- a/canvas/source/opengl/ogl_spritecanvas.cxx
+++ b/canvas/source/opengl/ogl_spritecanvas.cxx
@@ -29,6 +29,8 @@
using namespace ::com::sun::star;
+namespace sdecl = comphelper::service_decl;
+
namespace oglcanvas
{
SpriteCanvas::SpriteCanvas( const uno::Sequence< uno::Any >& aArguments,
@@ -173,7 +175,6 @@ namespace oglcanvas
return xRet;
}
- namespace sdecl = comphelper::service_decl;
sdecl::class_<SpriteCanvas, sdecl::with_args<true> > serviceImpl(&initCanvas);
const sdecl::ServiceDecl oglSpriteCanvasDecl(
serviceImpl,
@@ -186,7 +187,7 @@ extern "C"
SAL_DLLPUBLIC_EXPORT void* SAL_CALL oglcanvas_component_getFactory( sal_Char const* pImplName,
void*, void* )
{
- return component_getFactoryHelper( pImplName, oglcanvas::oglSpriteCanvasDecl );
+ return sdecl::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 e6308a8accb4..6ff146b43b0c 100644
--- a/canvas/source/simplecanvas/simplecanvasimpl.cxx
+++ b/canvas/source/simplecanvas/simplecanvasimpl.cxx
@@ -381,7 +381,7 @@ namespace
extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL simplecanvas_component_getFactory( sal_Char const* pImplName,
void*, void* )
{
- return component_getFactoryHelper( pImplName, simpleCanvasDecl );
+ return sdecl::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 283b1a9b35ad..001160c90f48 100644
--- a/canvas/source/vcl/services.cxx
+++ b/canvas/source/vcl/services.cxx
@@ -41,10 +41,10 @@
using namespace ::com::sun::star;
+namespace sdecl = comphelper::service_decl;
+
namespace vclcanvas
{
- namespace sdecl = comphelper::service_decl;
-
static uno::Reference<uno::XInterface> initCanvas( Canvas* pCanvas )
{
uno::Reference<uno::XInterface> xRet(static_cast<cppu::OWeakObject*>(pCanvas));
@@ -77,7 +77,7 @@ 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 );
+ return sdecl::component_getFactoryHelper( pImplName, {&vclcanvas::vclCanvasDecl, &vclcanvas::vclSpriteCanvasDecl} );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */