summaryrefslogtreecommitdiff
path: root/canvas
diff options
context:
space:
mode:
Diffstat (limited to 'canvas')
-rw-r--r--canvas/source/cairo/cairo_canvasbitmap.cxx8
-rw-r--r--canvas/source/cairo/cairo_canvasbitmap.hxx2
-rw-r--r--canvas/source/cairo/cairo_canvashelper.cxx3
3 files changed, 10 insertions, 3 deletions
diff --git a/canvas/source/cairo/cairo_canvasbitmap.cxx b/canvas/source/cairo/cairo_canvasbitmap.cxx
index a4f172088a17..3e0bcae618f6 100644
--- a/canvas/source/cairo/cairo_canvasbitmap.cxx
+++ b/canvas/source/cairo/cairo_canvasbitmap.cxx
@@ -144,7 +144,13 @@ namespace cairocanvas
}
sal_Int64 CanvasBitmap::getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) {
- return RepaintTarget::getSomething(aIdentifier);
+ return comphelper::getSomethingImpl(
+ aIdentifier, this, comphelper::FallbackToGetSomethingOf<RepaintTarget>{});
+ }
+
+ css::uno::Sequence<sal_Int8> const & CanvasBitmap::getUnoTunnelId() {
+ static comphelper::UnoIdInit const id;
+ return id.getSeq();
}
OUString SAL_CALL CanvasBitmap::getImplementationName( )
diff --git a/canvas/source/cairo/cairo_canvasbitmap.hxx b/canvas/source/cairo/cairo_canvasbitmap.hxx
index cc32408c26a1..21479b387069 100644
--- a/canvas/source/cairo/cairo_canvasbitmap.hxx
+++ b/canvas/source/cairo/cairo_canvasbitmap.hxx
@@ -115,8 +115,8 @@ namespace cairocanvas
virtual css::uno::Any SAL_CALL getFastPropertyValue(sal_Int32 nHandle) override;
virtual void SAL_CALL setFastPropertyValue(sal_Int32, const css::uno::Any&) override {}
- // XUnoTunnel
sal_Int64 SAL_CALL getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) override;
+ static css::uno::Sequence<sal_Int8> const & getUnoTunnelId();
private:
SurfaceProviderRef mpSurfaceProvider;
diff --git a/canvas/source/cairo/cairo_canvashelper.cxx b/canvas/source/cairo/cairo_canvashelper.cxx
index 14113e89361f..9279a4c0781b 100644
--- a/canvas/source/cairo/cairo_canvashelper.cxx
+++ b/canvas/source/cairo/cairo_canvashelper.cxx
@@ -40,6 +40,7 @@
#include <com/sun/star/rendering/XIntegerBitmapColorSpace.hpp>
#include <com/sun/star/util/Endianness.hpp>
#include <comphelper/sequence.hxx>
+#include <comphelper/servicehelper.hxx>
#include <cppuhelper/implbase.hxx>
#include <rtl/math.hxx>
#include <comphelper/diagnose_ex.hxx>
@@ -294,7 +295,7 @@ constexpr OUStringLiteral PARAMETRICPOLYPOLYGON_IMPLEMENTATION_NAME = u"Canvas::
**/
static SurfaceSharedPtr surfaceFromXBitmap( const uno::Reference< rendering::XBitmap >& xBitmap )
{
- CanvasBitmap* pBitmapImpl = dynamic_cast< CanvasBitmap* >( xBitmap.get() );
+ CanvasBitmap* pBitmapImpl = comphelper::getFromUnoTunnel< CanvasBitmap >( xBitmap );
if( pBitmapImpl )
return pBitmapImpl->getSurface();