summaryrefslogtreecommitdiff
path: root/canvas
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-07-10 15:50:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-07-11 08:56:04 +0200
commit6dea1afe95aafe1a147e9b933b5cf89530f708b1 (patch)
tree8e22e8e95249982798031f23990304501cc448c7 /canvas
parent2356f36927dc326060a42803b763d3cf768dbbf0 (diff)
tdf#134647 crash going to next slide on slideshow
regression from commit 1cd0e02cdf7fc5b5903320ffd24865d11465d14b cairo/canvas: create instances with uno constructors Change-Id: I4d09f8d68a24b0efa47d12df1c542f2953efed3d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98530 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'canvas')
-rw-r--r--canvas/source/cairo/cairo_canvas.cxx16
-rw-r--r--canvas/source/cairo/cairo_canvas.hxx9
-rw-r--r--canvas/source/cairo/cairo_spritecanvas.cxx16
-rw-r--r--canvas/source/cairo/cairo_spritecanvas.hxx9
4 files changed, 48 insertions, 2 deletions
diff --git a/canvas/source/cairo/cairo_canvas.cxx b/canvas/source/cairo/cairo_canvas.cxx
index 0b7790e7b94b..02ab55419d5b 100644
--- a/canvas/source/cairo/cairo_canvas.cxx
+++ b/canvas/source/cairo/cairo_canvas.cxx
@@ -27,6 +27,7 @@
#include <vcl/sysdata.hxx>
#include <vcl/opengl/OpenGLWrapper.hxx>
#include <vcl/skia/SkiaHelper.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include "cairo_canvas.hxx"
@@ -116,6 +117,21 @@ namespace cairocanvas
return "com.sun.star.rendering.Canvas.Cairo";
}
+ // XServiceInfo
+ sal_Bool Canvas::supportsService(const OUString& sServiceName)
+ {
+ return cppu::supportsService(this, sServiceName);
+
+ }
+ OUString Canvas::getImplementationName()
+ {
+ return "com.sun.star.comp.rendering.Canvas.Cairo";
+ }
+ css::uno::Sequence< OUString > Canvas::getSupportedServiceNames()
+ {
+ return { getServiceName() };
+ }
+
bool Canvas::repaint( const SurfaceSharedPtr& pSurface,
const rendering::ViewState& viewState,
const rendering::RenderState& renderState )
diff --git a/canvas/source/cairo/cairo_canvas.hxx b/canvas/source/cairo/cairo_canvas.hxx
index 9c672d453fde..0c41a8a5c0d3 100644
--- a/canvas/source/cairo/cairo_canvas.hxx
+++ b/canvas/source/cairo/cairo_canvas.hxx
@@ -22,6 +22,7 @@
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/lang/XServiceName.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/util/XUpdatable.hpp>
#include <com/sun/star/rendering/XIntegerBitmap.hpp>
#include <com/sun/star/rendering/XGraphicDevice.hpp>
@@ -48,7 +49,8 @@ namespace cairocanvas
css::lang::XMultiServiceFactory,
css::util::XUpdatable,
css::beans::XPropertySet,
- css::lang::XServiceName > GraphicDeviceBase_Base;
+ css::lang::XServiceName,
+ css::lang::XServiceInfo > GraphicDeviceBase_Base;
typedef ::canvas::GraphicDeviceBase< ::canvas::BaseMutexHelper< GraphicDeviceBase_Base >,
DeviceHelper,
::osl::MutexGuard,
@@ -115,6 +117,11 @@ namespace cairocanvas
// XServiceName
virtual OUString SAL_CALL getServiceName( ) override;
+ // XServiceInfo
+ virtual sal_Bool SAL_CALL supportsService(const OUString& sServiceName) override;
+ virtual OUString SAL_CALL getImplementationName() override;
+ virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
+
// RepaintTarget
virtual bool repaint( const ::cairo::SurfaceSharedPtr& pSurface,
const css::rendering::ViewState& viewState,
diff --git a/canvas/source/cairo/cairo_spritecanvas.cxx b/canvas/source/cairo/cairo_spritecanvas.cxx
index 1f446642cc11..ddb4491afdf2 100644
--- a/canvas/source/cairo/cairo_spritecanvas.cxx
+++ b/canvas/source/cairo/cairo_spritecanvas.cxx
@@ -28,6 +28,7 @@
#include <osl/mutex.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <tools/diagnose_ex.h>
+#include <cppuhelper/supportsservice.hxx>
#include "cairo_spritecanvas.hxx"
@@ -135,6 +136,21 @@ namespace cairocanvas
return "com.sun.star.rendering.SpriteCanvas.Cairo";
}
+ // XServiceInfo
+ sal_Bool SpriteCanvas::supportsService(const OUString& sServiceName)
+ {
+ return cppu::supportsService(this, sServiceName);
+
+ }
+ OUString SpriteCanvas::getImplementationName()
+ {
+ return "com.sun.star.comp.rendering.Canvas.Cairo";
+ }
+ css::uno::Sequence< OUString > SpriteCanvas::getSupportedServiceNames()
+ {
+ return { getServiceName() };
+ }
+
SurfaceSharedPtr SpriteCanvas::getSurface()
{
return maDeviceHelper.getBufferSurface();
diff --git a/canvas/source/cairo/cairo_spritecanvas.hxx b/canvas/source/cairo/cairo_spritecanvas.hxx
index fde88d040389..5fb9db2c47e9 100644
--- a/canvas/source/cairo/cairo_spritecanvas.hxx
+++ b/canvas/source/cairo/cairo_spritecanvas.hxx
@@ -23,6 +23,7 @@
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/lang/XServiceName.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/awt/XWindowListener.hpp>
#include <com/sun/star/util/XUpdatable.hpp>
#include <com/sun/star/rendering/XSpriteCanvas.hpp>
@@ -53,7 +54,8 @@ namespace cairocanvas
css::awt::XWindowListener,
css::util::XUpdatable,
css::beans::XPropertySet,
- css::lang::XServiceName > WindowGraphicDeviceBase_Base;
+ css::lang::XServiceName,
+ css::lang::XServiceInfo > WindowGraphicDeviceBase_Base;
typedef ::canvas::BufferedGraphicDeviceBase< ::canvas::DisambiguationHelper< WindowGraphicDeviceBase_Base >,
SpriteDeviceHelper,
::osl::MutexGuard,
@@ -124,6 +126,11 @@ namespace cairocanvas
// XServiceName
virtual OUString SAL_CALL getServiceName( ) override;
+ // XServiceInfo
+ virtual sal_Bool SAL_CALL supportsService(const OUString& sServiceName) override;
+ virtual OUString SAL_CALL getImplementationName() override;
+ virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
+
// SurfaceProvider
virtual ::cairo::SurfaceSharedPtr getSurface() override;
virtual ::cairo::SurfaceSharedPtr createSurface( const ::basegfx::B2ISize& rSize, int aContent ) override;