summaryrefslogtreecommitdiff
path: root/canvas
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2023-01-04 16:43:40 +0100
committerStephan Bergmann <sbergman@redhat.com>2023-01-05 11:45:51 +0000
commit19691c3b6878c1ea09f8bcd53224341c40c9847b (patch)
treeee077b70b44586786c5ee8759edba14c1a23f64c /canvas
parent00b62877fa2f900d1c2dcf7b721f7a956408f8a0 (diff)
Revert all the recent loplugin:unocast changes
...as obsoleted by ef533553559fe09b4afab651fc692885d1acf4ed "Rudimentary support for dynamic_cast on UNO proxy objects". This reverts all of: 4cfcc9ac37b90ce64c8402a41eb4638adb185b5c "loplugin:unocast (framework::Desktop)" 03efbf72f4ddf7a84aa8aabef348331bd4b75e8a "loplugin:unocast (vclcanvas::TextLayout)" 80099fdd51a69eaa6c36ca88ef772810e4a777fa "loplugin:unocast (SalGtkXWindow)" cc147f576d8687fb79c77d47d41dc4ba1678a469 "loplugin:unocast (sdext::presenter::CachablePresenterView)" 40db42be1d8fd0f9c6c8c5ba3767ddb9ee2034c2 "loplugin:unocast (vclcanvas::CanvasFont)" 2d1e7995eae29e2826449eb5179f5fae181794a5 "loplugin:unocast (CairoColorSpace)" 4c0bbe4bd97636207cf71a6aa120c67698891da9 "loplugin:unocast (canvas::ParametricPolyPolygon)" 89803666621c07d1b1ac9d3bd883f0ca192a91a0 "loplugin:unocast (vclcanas::CanvasBitmap)" d5e0c2c8db71878d21c2a7255af08cf5f9a6dd04 "loplugin:unocast (sfx2::DigitalSignatures)" c0c4519e0d5b555f59bbc04cc616454edfd1f4ce "loplugin:unocast (VCLXAccessibleComponent)" feb8b833a6245d42400f42a0bc789dc84594ee6f "loplugin:unocast (VCLXDialog)" 1fa58cc6cc9c3849753342a5d9a6ddfa461b5e66 "loplugin:unocast (VCLXMultiPage)" f481f036deb1b1b46f3038074c4659f3a91b9c6c "loplugin:unocast (DocumentSettingsSerializer)" 73df933f5fa5932f94e5a1b338a3eda00a9ce354 "loplugin:unocast (css::embed::EmbeddedUpdate)" 420165ab0ef03c0467f9d17f504de2d2fc78f0e6 "loplugin:unocast (canvas::tools' StandardColorSpace, StandardNoAlphaColorSpace)" 9abe8ee067e6c00f19d8a13346d53c4641c27166 "loplugin:unocast (MutableTreeNode)" 9f3022ceb036f23b4b0994c3e2fbd1001bff225a "loplugin:unocast (VCLXTabPage)" 1be70dda02c12a60778b7607cff2520ae1aa611e "loplugin:unocast (vcl::unotools::VclCanvasBitmap)" d6a70bb641b96e8e5616448c2378131ed62658b4 "loplugin:unocast (basegfx::unotools::UnoPolyPolygon)" 5a14f009e6782c077463c8cbb8e9cea3d7950107 "loplugin:unocast (xmlsecurity::Certificate)" 99009c9535dfa3e0d838989ccc7d84bfa2320ff4 "loplugin:unocast (sd::Annotation)" 0c7585c5fa78887e5459885ed744e8044fd76137 "loplugin:unocast (sd::TextApiObject)" 24e14afd1bfcaed6c200ab081973fba7e47267ca "loplugin:unocast (SignatureVerifierImpl)" 1a7ad0c10d286ce9ae2700ceb2fd50eed1fb43a4 "loplugin:unocast (pcr::PropertyEventTranslation)" a97e2d2702d9a6f37775ccee2c08c4f3b2479c4b "loplugin:unocast (RangePageBreaks)" 19dfdf86ad1f5b08041d8b7a9f196caf881231ab "iloplugin:unocast (pcr::OFormattedNumericControl)" f9785ea595fd8e911f6370e836fa579225b9e571 "loplugin:unocast (frm::OInterfaceContainer)" 5e5f40a4a92a31b0932c690219d002fcf18598cf "loplugin:unocast (ScVbaShapes)" 27b35b2c215b4832d4378ec3a7ecbba926552d06 "loplugin:unocast (ScVbaShapeRange)" cb3108f860065928552a86cf8acc4b3a95718ecf "cid#1517812 Dereference null return value" feba0ddb1521d1142560fe54b7d7696ee910237f "loplugin:unocast (weld::TransportAsXWindow)" 4d6c23216559eb48f9943bb49d6e475a6d64ba15 "loplugin:unocast (oox::ForumlaImExportBase)" 4844c096a8ab6a9a620c410a0949d4499f12a504 "loplugin:unocast (cairocanvas::SurfaceProvider)" 9a0b523e0a84d403b9092176ccec4b3e3efe42d0 "loplugin:unocast (cairocanvas::CanvasBitmap)" 8a5648d8e59b4b007dbbf3824777c19a21efc61e "loplugin:unocast (cairocanvas::TextLayout)" 28c27a0623bc78a0590858f97d03b620985bc84c "loplugin:unocast (cairocanvas::CanvasFont)" 53bc223cb3288e32a417696ee61c29e5f01f209d "loplugin:unocast (cairocanvas::RepaintTarget)" 5f70b0b9f6bc4ab145ddbd9155590ed4a3b1b9ec "loplugin:unocast (SvXMLImport)" 068187a898cdd2e26e9b16c348ecc1ed2dee3f29 "loplugin:unocast (VCLXWindow)" 88b4f966202717cd4ad38a30a8eda22c3e69ed35 "loplugin:unocast (sfx2::sidebar::SidebarController)" f1b7a69b280aefe2f1b3b0f32193494fd765f2bd "loplugin:unocast (SvxLineStyleToolBoxControl)" ba76f0ba7e8de4d2953739c952004b7d9af47197 "loplugin:unocast (i18npool::Calendar_gregorian)" 840154daf934d8df52ead1cb7acd798c4d30f007 "loplugin:unocast (framework::AddonsToolBarWrapper)" b0e9c4c5f063cefa9557810e3349bdb9c7493091 "loplugin:unocast (GrammarCheckingIterator)" 8ee6cfc9655ce9de4617cea1a0d9cb9d7a4fbfac "loplugin:unocast (ucb::ucp::ext::Content)" 5b8cd77c112bc8c0e92b8fec215c3c8e802bbc0a "loplugin:unocast (basic::SfxScriptLibraryContainer)" 9e73ff9fce12e102bb3c3cea8d8bb96c88f2c9ad "loplugin:unocast (sdext::presenter::PresenterNotesView)" a98acca8fbc38d3fd5600ae5056a8e42b6d8a40d "loplugin:unocast (SelectionChangeHandler)" c0b59ad6e35b0cb0dea0821e95f95569739078c1 "Consistently use comphelper::getSomethingImpl<I>(aIdentifier, this)" 276e3ccbdd3259ec3daf8a1a98fa7f406b14e21c "loplugin:unocast (vclcanvas::RepaintTarget)" Change-Id: I37c73e3422a5154bf6cb647640d2d3f23db8bc34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145063 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'canvas')
-rw-r--r--canvas/inc/parametricpolypolygon.hxx7
-rw-r--r--canvas/source/cairo/cairo_cachedbitmap.cxx3
-rw-r--r--canvas/source/cairo/cairo_canvas.cxx7
-rw-r--r--canvas/source/cairo/cairo_canvas.hxx6
-rw-r--r--canvas/source/cairo/cairo_canvasbitmap.cxx11
-rw-r--r--canvas/source/cairo/cairo_canvasbitmap.hxx7
-rw-r--r--canvas/source/cairo/cairo_canvascustomsprite.cxx6
-rw-r--r--canvas/source/cairo/cairo_canvascustomsprite.hxx7
-rw-r--r--canvas/source/cairo/cairo_canvasfont.cxx10
-rw-r--r--canvas/source/cairo/cairo_canvasfont.hxx7
-rw-r--r--canvas/source/cairo/cairo_canvashelper.cxx26
-rw-r--r--canvas/source/cairo/cairo_canvashelper_text.cxx7
-rw-r--r--canvas/source/cairo/cairo_repainttarget.hxx14
-rw-r--r--canvas/source/cairo/cairo_spritecanvas.cxx6
-rw-r--r--canvas/source/cairo/cairo_spritecanvas.hxx7
-rw-r--r--canvas/source/cairo/cairo_surfaceprovider.hxx14
-rw-r--r--canvas/source/cairo/cairo_textlayout.cxx10
-rw-r--r--canvas/source/cairo/cairo_textlayout.hxx7
-rw-r--r--canvas/source/opengl/ogl_canvashelper.cxx3
-rw-r--r--canvas/source/tools/canvastools.cxx36
-rw-r--r--canvas/source/tools/parametricpolypolygon.cxx11
-rw-r--r--canvas/source/vcl/cachedbitmap.cxx3
-rw-r--r--canvas/source/vcl/canvas.cxx4
-rw-r--r--canvas/source/vcl/canvas.hxx7
-rw-r--r--canvas/source/vcl/canvasbitmap.cxx6
-rw-r--r--canvas/source/vcl/canvasbitmap.hxx7
-rw-r--r--canvas/source/vcl/canvascustomsprite.cxx4
-rw-r--r--canvas/source/vcl/canvascustomsprite.hxx7
-rw-r--r--canvas/source/vcl/canvasfont.cxx10
-rw-r--r--canvas/source/vcl/canvasfont.hxx7
-rw-r--r--canvas/source/vcl/canvashelper.cxx5
-rw-r--r--canvas/source/vcl/canvashelper_texturefill.cxx3
-rw-r--r--canvas/source/vcl/impltools.cxx3
-rw-r--r--canvas/source/vcl/repainttarget.hxx15
-rw-r--r--canvas/source/vcl/spritecanvas.cxx4
-rw-r--r--canvas/source/vcl/spritecanvas.hxx7
-rw-r--r--canvas/source/vcl/textlayout.cxx10
-rw-r--r--canvas/source/vcl/textlayout.hxx7
38 files changed, 38 insertions, 283 deletions
diff --git a/canvas/inc/parametricpolypolygon.hxx b/canvas/inc/parametricpolypolygon.hxx
index ca2e1cda348e..474bd5da247a 100644
--- a/canvas/inc/parametricpolypolygon.hxx
+++ b/canvas/inc/parametricpolypolygon.hxx
@@ -20,7 +20,6 @@
#pragma once
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/rendering/XParametricPolyPolygon2D.hpp>
#include <comphelper/compbase.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
@@ -37,8 +36,7 @@ namespace com::sun::star::rendering { class XGraphicDevice; }
namespace canvas
{
typedef comphelper::WeakComponentImplHelper< css::rendering::XParametricPolyPolygon2D,
- css::lang::XServiceInfo,
- css::lang::XUnoTunnel > ParametricPolyPolygon_Base;
+ css::lang::XServiceInfo > ParametricPolyPolygon_Base;
class CANVASTOOLS_DLLPUBLIC ParametricPolyPolygon final : public ParametricPolyPolygon_Base
{
@@ -106,9 +104,6 @@ namespace canvas
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
- sal_Int64 SAL_CALL getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) override;
- static css::uno::Sequence<sal_Int8> const & getUnoTunnelId();
-
/// Query all defining values of this object atomically
Values getValues() const;
diff --git a/canvas/source/cairo/cairo_cachedbitmap.cxx b/canvas/source/cairo/cairo_cachedbitmap.cxx
index 56ca57c913bc..d829e27ac3b5 100644
--- a/canvas/source/cairo/cairo_cachedbitmap.cxx
+++ b/canvas/source/cairo/cairo_cachedbitmap.cxx
@@ -23,7 +23,6 @@
#include <com/sun/star/rendering/RepaintResult.hpp>
#include <utility>
#include <comphelper/diagnose_ex.hxx>
-#include <comphelper/servicehelper.hxx>
#include "cairo_cachedbitmap.hxx"
#include "cairo_repainttarget.hxx"
@@ -60,7 +59,7 @@ namespace cairocanvas
"CachedBitmap::doRedraw(): base called with changed view transform "
"(told otherwise during construction)" );
- RepaintTarget* pTarget = comphelper::getFromUnoTunnel< RepaintTarget >(rTargetCanvas);
+ RepaintTarget* pTarget = dynamic_cast< RepaintTarget* >(rTargetCanvas.get());
ENSURE_OR_THROW( pTarget,
"CachedBitmap::redraw(): cannot cast target to RepaintTarget" );
diff --git a/canvas/source/cairo/cairo_canvas.cxx b/canvas/source/cairo/cairo_canvas.cxx
index 255b8d84d80c..60b807e8196b 100644
--- a/canvas/source/cairo/cairo_canvas.cxx
+++ b/canvas/source/cairo/cairo_canvas.cxx
@@ -24,7 +24,6 @@
#include <com/sun/star/lang/NoSupportException.hpp>
#include <osl/mutex.hxx>
#include <comphelper/diagnose_ex.hxx>
-#include <comphelper/servicehelper.hxx>
#include <vcl/sysdata.hxx>
#include <vcl/skia/SkiaHelper.hxx>
#include <cppuhelper/supportsservice.hxx>
@@ -129,12 +128,6 @@ namespace cairocanvas
return { getServiceName() };
}
- sal_Int64 Canvas::getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) {
- return comphelper::getSomethingImpl_skipDerived(
- aIdentifier, this, comphelper::MixinToGetSomethingOf<SurfaceProvider>{},
- comphelper::FallbackToGetSomethingOf<RepaintTarget>{});
- }
-
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 e9b7863b1741..0c41a8a5c0d3 100644
--- a/canvas/source/cairo/cairo_canvas.hxx
+++ b/canvas/source/cairo/cairo_canvas.hxx
@@ -50,8 +50,7 @@ namespace cairocanvas
css::util::XUpdatable,
css::beans::XPropertySet,
css::lang::XServiceName,
- css::lang::XServiceInfo,
- css::lang::XUnoTunnel > GraphicDeviceBase_Base;
+ css::lang::XServiceInfo > GraphicDeviceBase_Base;
typedef ::canvas::GraphicDeviceBase< ::canvas::BaseMutexHelper< GraphicDeviceBase_Base >,
DeviceHelper,
::osl::MutexGuard,
@@ -123,9 +122,6 @@ namespace cairocanvas
virtual OUString SAL_CALL getImplementationName() override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
- // XUnoTunnel
- sal_Int64 SAL_CALL getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) override;
-
// RepaintTarget
virtual bool repaint( const ::cairo::SurfaceSharedPtr& pSurface,
const css::rendering::ViewState& viewState,
diff --git a/canvas/source/cairo/cairo_canvasbitmap.cxx b/canvas/source/cairo/cairo_canvasbitmap.cxx
index 30ccb2cda8e8..ebf4f26c5321 100644
--- a/canvas/source/cairo/cairo_canvasbitmap.cxx
+++ b/canvas/source/cairo/cairo_canvasbitmap.cxx
@@ -143,17 +143,6 @@ namespace cairocanvas
return aRV;
}
- sal_Int64 CanvasBitmap::getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) {
- return comphelper::getSomethingImpl(
- aIdentifier, this, comphelper::MixinToGetSomethingOf<SurfaceProvider>{},
- comphelper::FallbackToGetSomethingOf<RepaintTarget>{});
- }
-
- css::uno::Sequence<sal_Int8> const & CanvasBitmap::getUnoTunnelId() {
- static comphelper::UnoIdInit const id;
- return id.getSeq();
- }
-
OUString SAL_CALL CanvasBitmap::getImplementationName( )
{
return "CairoCanvas.CanvasBitmap";
diff --git a/canvas/source/cairo/cairo_canvasbitmap.hxx b/canvas/source/cairo/cairo_canvasbitmap.hxx
index 21479b387069..8826bc82ebe2 100644
--- a/canvas/source/cairo/cairo_canvasbitmap.hxx
+++ b/canvas/source/cairo/cairo_canvasbitmap.hxx
@@ -22,7 +22,6 @@
#include <cppuhelper/compbase.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/rendering/XBitmapCanvas.hpp>
#include <com/sun/star/rendering/XIntegerBitmap.hpp>
#include <com/sun/star/beans/XFastPropertySet.hpp>
@@ -43,8 +42,7 @@ namespace cairocanvas
typedef ::cppu::WeakComponentImplHelper< css::rendering::XBitmapCanvas,
css::rendering::XIntegerBitmap,
css::lang::XServiceInfo,
- css::beans::XFastPropertySet,
- css::lang::XUnoTunnel> CanvasBitmapBase_Base;
+ css::beans::XFastPropertySet > CanvasBitmapBase_Base;
class CanvasBitmapSpriteSurface_Base :
public ::canvas::BaseMutexHelper<CanvasBitmapBase_Base>,
public SurfaceProvider
@@ -115,9 +113,6 @@ 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 {}
- sal_Int64 SAL_CALL getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) override;
- static css::uno::Sequence<sal_Int8> const & getUnoTunnelId();
-
private:
SurfaceProviderRef mpSurfaceProvider;
::cairo::SurfaceSharedPtr mpBufferSurface;
diff --git a/canvas/source/cairo/cairo_canvascustomsprite.cxx b/canvas/source/cairo/cairo_canvascustomsprite.cxx
index e5f22e9c4a9c..f7fffb6e50be 100644
--- a/canvas/source/cairo/cairo_canvascustomsprite.cxx
+++ b/canvas/source/cairo/cairo_canvascustomsprite.cxx
@@ -146,12 +146,6 @@ namespace cairocanvas
{
return { "com.sun.star.rendering.CanvasCustomSprite" };
}
-
- sal_Int64 CanvasCustomSprite::getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) {
- return comphelper::getSomethingImpl_skipDerived(
- aIdentifier, this, comphelper::MixinToGetSomethingOf<SurfaceProvider>{},
- comphelper::FallbackToGetSomethingOf<RepaintTarget>{});
- }
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/cairo/cairo_canvascustomsprite.hxx b/canvas/source/cairo/cairo_canvascustomsprite.hxx
index 03890bf1985d..ffe766ab0966 100644
--- a/canvas/source/cairo/cairo_canvascustomsprite.hxx
+++ b/canvas/source/cairo/cairo_canvascustomsprite.hxx
@@ -23,7 +23,6 @@
#include <comphelper/uno3.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/rendering/XBitmapCanvas.hpp>
#include <com/sun/star/rendering/XCustomSprite.hpp>
#include <com/sun/star/rendering/XIntegerBitmap.hpp>
@@ -47,8 +46,7 @@ namespace cairocanvas
typedef ::cppu::WeakComponentImplHelper< css::rendering::XCustomSprite,
css::rendering::XBitmapCanvas,
css::rendering::XIntegerBitmap,
- css::lang::XServiceInfo,
- css::lang::XUnoTunnel > CanvasCustomSpriteBase_Base;
+ css::lang::XServiceInfo > CanvasCustomSpriteBase_Base;
/** Mixin Sprite
Have to mixin the Sprite interface before deriving from
@@ -115,9 +113,6 @@ namespace cairocanvas
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
- // XUnoTunnel
- sal_Int64 SAL_CALL getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) override;
-
// Sprite
virtual void redraw( const ::cairo::CairoSharedPtr& pCairo,
bool bBufferedUpdate ) const override;
diff --git a/canvas/source/cairo/cairo_canvasfont.cxx b/canvas/source/cairo/cairo_canvasfont.cxx
index 9c660a5c4c6e..36c1733ef62a 100644
--- a/canvas/source/cairo/cairo_canvasfont.cxx
+++ b/canvas/source/cairo/cairo_canvasfont.cxx
@@ -21,7 +21,6 @@
#include <basegfx/numeric/ftools.hxx>
#include <com/sun/star/rendering/PanoseProportion.hpp>
-#include <comphelper/servicehelper.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <i18nlangtag/languagetag.hxx>
#include <rtl/math.hxx>
@@ -148,15 +147,6 @@ namespace cairocanvas
return { "com.sun.star.rendering.CanvasFont" };
}
- sal_Int64 CanvasFont::getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) {
- return comphelper::getSomethingImpl(aIdentifier, this);
- }
-
- css::uno::Sequence<sal_Int8> const & CanvasFont::getUnoTunnelId() {
- static comphelper::UnoIdInit const id;
- return id.getSeq();
- }
-
vcl::Font const & CanvasFont::getVCLFont() const
{
return *maFont;
diff --git a/canvas/source/cairo/cairo_canvasfont.hxx b/canvas/source/cairo/cairo_canvasfont.hxx
index 3bb03847c3ce..0ebe9acd81ce 100644
--- a/canvas/source/cairo/cairo_canvasfont.hxx
+++ b/canvas/source/cairo/cairo_canvasfont.hxx
@@ -23,7 +23,6 @@
#include <cppuhelper/basemutex.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/geometry/Matrix2D.hpp>
#include <com/sun/star/rendering/FontRequest.hpp>
#include <com/sun/star/rendering/XCanvasFont.hpp>
@@ -40,8 +39,7 @@
namespace cairocanvas
{
typedef ::cppu::WeakComponentImplHelper< css::rendering::XCanvasFont,
- css::lang::XServiceInfo,
- css::lang::XUnoTunnel > CanvasFont_Base;
+ css::lang::XServiceInfo > CanvasFont_Base;
class CanvasFont : public ::cppu::BaseMutex,
public CanvasFont_Base
@@ -72,9 +70,6 @@ namespace cairocanvas
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
- sal_Int64 SAL_CALL getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) override;
- static css::uno::Sequence<sal_Int8> const & getUnoTunnelId();
-
vcl::Font const & getVCLFont() const;
private:
diff --git a/canvas/source/cairo/cairo_canvashelper.cxx b/canvas/source/cairo/cairo_canvashelper.cxx
index 89a7ac65fd07..14113e89361f 100644
--- a/canvas/source/cairo/cairo_canvashelper.cxx
+++ b/canvas/source/cairo/cairo_canvashelper.cxx
@@ -29,7 +29,6 @@
#include <basegfx/utils/canvastools.hxx>
#include <basegfx/utils/keystoplerp.hxx>
#include <basegfx/utils/lerp.hxx>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/rendering/ColorComponentTag.hpp>
#include <com/sun/star/rendering/ColorSpaceType.hpp>
#include <com/sun/star/rendering/CompositeOperation.hpp>
@@ -41,7 +40,6 @@
#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>
@@ -296,12 +294,11 @@ constexpr OUStringLiteral PARAMETRICPOLYPOLYGON_IMPLEMENTATION_NAME = u"Canvas::
**/
static SurfaceSharedPtr surfaceFromXBitmap( const uno::Reference< rendering::XBitmap >& xBitmap )
{
- CanvasBitmap* pBitmapImpl = comphelper::getFromUnoTunnel< CanvasBitmap >( xBitmap );
+ CanvasBitmap* pBitmapImpl = dynamic_cast< CanvasBitmap* >( xBitmap.get() );
if( pBitmapImpl )
return pBitmapImpl->getSurface();
- SurfaceProvider* pSurfaceProvider
- = comphelper::getFromUnoTunnel<SurfaceProvider>( xBitmap );
+ SurfaceProvider* pSurfaceProvider = dynamic_cast<SurfaceProvider*>( xBitmap.get() );
if( pSurfaceProvider )
return pSurfaceProvider->getSurface();
@@ -1342,7 +1339,7 @@ constexpr OUStringLiteral PARAMETRICPOLYPOLYGON_IMPLEMENTATION_NAME = u"Canvas::
namespace
{
- class CairoColorSpace : public cppu::WeakImplHelper< css::rendering::XIntegerBitmapColorSpace, css::lang::XUnoTunnel >
+ class CairoColorSpace : public cppu::WeakImplHelper< css::rendering::XIntegerBitmapColorSpace >
{
private:
uno::Sequence< sal_Int8 > maComponentTags;
@@ -1500,7 +1497,7 @@ constexpr OUStringLiteral PARAMETRICPOLYPOLYGON_IMPLEMENTATION_NAME = u"Canvas::
virtual uno::Sequence<double> SAL_CALL convertFromIntegerColorSpace( const uno::Sequence< ::sal_Int8 >& deviceColor,
const uno::Reference< rendering::XColorSpace >& targetColorSpace ) override
{
- if( comphelper::getFromUnoTunnel<CairoColorSpace>(targetColorSpace) )
+ if( dynamic_cast<CairoColorSpace*>(targetColorSpace.get()) )
{
const sal_Int8* pIn( deviceColor.getConstArray() );
const std::size_t nLen( deviceColor.getLength() );
@@ -1531,7 +1528,7 @@ constexpr OUStringLiteral PARAMETRICPOLYPOLYGON_IMPLEMENTATION_NAME = u"Canvas::
virtual uno::Sequence< ::sal_Int8 > SAL_CALL convertToIntegerColorSpace( const uno::Sequence< ::sal_Int8 >& deviceColor,
const uno::Reference< rendering::XIntegerBitmapColorSpace >& targetColorSpace ) override
{
- if( comphelper::getFromUnoTunnel<CairoColorSpace>(targetColorSpace) )
+ if( dynamic_cast<CairoColorSpace*>(targetColorSpace.get()) )
{
// it's us, so simply pass-through the data
return deviceColor;
@@ -1688,17 +1685,6 @@ constexpr OUStringLiteral PARAMETRICPOLYPOLYGON_IMPLEMENTATION_NAME = u"Canvas::
pBitCounts[2] =
pBitCounts[3] = 8;
}
-
- sal_Int64 SAL_CALL getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier)
- override
- {
- return comphelper::getSomethingImpl(aIdentifier, this);
- }
-
- static css::uno::Sequence<sal_Int8> const & getUnoTunnelId() {
- static comphelper::UnoIdInit const id;
- return id.getSeq();
- }
};
class CairoNoAlphaColorSpace : public cppu::WeakImplHelper< css::rendering::XIntegerBitmapColorSpace >
@@ -1833,7 +1819,7 @@ constexpr OUStringLiteral PARAMETRICPOLYPOLYGON_IMPLEMENTATION_NAME = u"Canvas::
virtual uno::Sequence<double> SAL_CALL convertFromIntegerColorSpace( const uno::Sequence< ::sal_Int8 >& deviceColor,
const uno::Reference< rendering::XColorSpace >& targetColorSpace ) override
{
- if( comphelper::getFromUnoTunnel<CairoColorSpace>(targetColorSpace) )
+ if( dynamic_cast<CairoColorSpace*>(targetColorSpace.get()) )
{
const sal_Int8* pIn( deviceColor.getConstArray() );
const std::size_t nLen( deviceColor.getLength() );
diff --git a/canvas/source/cairo/cairo_canvashelper_text.cxx b/canvas/source/cairo/cairo_canvashelper_text.cxx
index 982c16c24377..6973607d4824 100644
--- a/canvas/source/cairo/cairo_canvashelper_text.cxx
+++ b/canvas/source/cairo/cairo_canvashelper_text.cxx
@@ -24,7 +24,6 @@
#include <rtl/math.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <comphelper/diagnose_ex.hxx>
-#include <comphelper/servicehelper.hxx>
#include <vcl/canvastools.hxx>
#include <vcl/metric.hxx>
#include <vcl/virdev.hxx>
@@ -173,7 +172,7 @@ namespace cairocanvas
{
setupOutDevState( rOutDev, pOwner, viewState, renderState );
- CanvasFont* pFont = comphelper::getFromUnoTunnel< CanvasFont >( xFont );
+ CanvasFont* pFont = dynamic_cast< CanvasFont* >( xFont.get() );
ENSURE_ARG_OR_THROW( pFont,
"CanvasHelper::setupTextOutput(): Font not compatible with this canvas" );
@@ -248,7 +247,7 @@ namespace cairocanvas
// TODO(F2): alpha
mpVirtualDevice->SetLayoutMode( nLayoutMode );
- rtl::Reference pTextLayout( new TextLayout(text, textDirection, 0, CanvasFont::Reference(comphelper::getFromUnoTunnel< CanvasFont >( xFont )), mpSurfaceProvider) );
+ rtl::Reference pTextLayout( new TextLayout(text, textDirection, 0, CanvasFont::Reference(dynamic_cast< CanvasFont* >( xFont.get() )), mpSurfaceProvider) );
pTextLayout->draw(*mpVirtualDevice, aOutpos, viewState, renderState);
}
@@ -263,7 +262,7 @@ namespace cairocanvas
ENSURE_ARG_OR_THROW( xLayoutedText.is(),
"CanvasHelper::drawTextLayout(): layout is NULL");
- TextLayout* pTextLayout = comphelper::getFromUnoTunnel< TextLayout >( xLayoutedText );
+ TextLayout* pTextLayout = dynamic_cast< TextLayout* >( xLayoutedText.get() );
if( pTextLayout )
{
diff --git a/canvas/source/cairo/cairo_repainttarget.hxx b/canvas/source/cairo/cairo_repainttarget.hxx
index 3fab51dbc3bb..94d3d3845b3e 100644
--- a/canvas/source/cairo/cairo_repainttarget.hxx
+++ b/canvas/source/cairo/cairo_repainttarget.hxx
@@ -21,9 +21,6 @@
#include <com/sun/star/rendering/RenderState.hpp>
#include <com/sun/star/rendering/ViewState.hpp>
-#include <com/sun/star/uno/Sequence.hxx>
-#include <comphelper/servicehelper.hxx>
-#include <sal/types.h>
#include <vcl/cairo.hxx>
@@ -36,7 +33,7 @@ namespace cairocanvas
This interface must be implemented on all canvas
implementations that hand out XCachedPrimitives
*/
- class RepaintTarget
+ class SAL_LOPLUGIN_ANNOTATE("crosscast") RepaintTarget
{
public:
virtual ~RepaintTarget() {}
@@ -45,15 +42,6 @@ namespace cairocanvas
virtual bool repaint( const ::cairo::SurfaceSharedPtr& pSurface,
const css::rendering::ViewState& viewState,
const css::rendering::RenderState& renderState ) = 0;
-
- sal_Int64 getSomething(css::uno::Sequence<sal_Int8> const & id) {
- return comphelper::getSomethingImpl(id, this);
- }
-
- static css::uno::Sequence<sal_Int8> const & getUnoTunnelId() {
- static comphelper::UnoIdInit const id;
- return id.getSeq();
- }
};
}
diff --git a/canvas/source/cairo/cairo_spritecanvas.cxx b/canvas/source/cairo/cairo_spritecanvas.cxx
index 2d33d4a14c7a..5a394d2718aa 100644
--- a/canvas/source/cairo/cairo_spritecanvas.cxx
+++ b/canvas/source/cairo/cairo_spritecanvas.cxx
@@ -151,12 +151,6 @@ namespace cairocanvas
return { getServiceName() };
}
- sal_Int64 SpriteCanvas::getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) {
- return comphelper::getSomethingImpl_skipDerived(
- aIdentifier, this, comphelper::MixinToGetSomethingOf<SurfaceProvider>{},
- comphelper::FallbackToGetSomethingOf<RepaintTarget>{});
- }
-
SurfaceSharedPtr SpriteCanvas::getSurface()
{
return maDeviceHelper.getBufferSurface();
diff --git a/canvas/source/cairo/cairo_spritecanvas.hxx b/canvas/source/cairo/cairo_spritecanvas.hxx
index 41a1c5cb24d5..7790e68904b0 100644
--- a/canvas/source/cairo/cairo_spritecanvas.hxx
+++ b/canvas/source/cairo/cairo_spritecanvas.hxx
@@ -23,7 +23,6 @@
#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/lang/XUnoTunnel.hpp>
#include <com/sun/star/awt/XWindowListener.hpp>
#include <com/sun/star/util/XUpdatable.hpp>
#include <com/sun/star/rendering/XSpriteCanvas.hpp>
@@ -55,8 +54,7 @@ namespace cairocanvas
css::util::XUpdatable,
css::beans::XPropertySet,
css::lang::XServiceName,
- css::lang::XServiceInfo,
- css::lang::XUnoTunnel > WindowGraphicDeviceBase_Base;
+ css::lang::XServiceInfo > WindowGraphicDeviceBase_Base;
typedef ::canvas::BufferedGraphicDeviceBase< ::canvas::DisambiguationHelper< WindowGraphicDeviceBase_Base >,
SpriteDeviceHelper,
::osl::MutexGuard,
@@ -132,9 +130,6 @@ namespace cairocanvas
virtual OUString SAL_CALL getImplementationName() override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
- // XUnoTunnel
- sal_Int64 SAL_CALL getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) override;
-
// SurfaceProvider
virtual ::cairo::SurfaceSharedPtr getSurface() override;
virtual ::cairo::SurfaceSharedPtr createSurface( const ::basegfx::B2ISize& rSize, int aContent ) override;
diff --git a/canvas/source/cairo/cairo_surfaceprovider.hxx b/canvas/source/cairo/cairo_surfaceprovider.hxx
index e0293373451f..1ff6f2aa7d3f 100644
--- a/canvas/source/cairo/cairo_surfaceprovider.hxx
+++ b/canvas/source/cairo/cairo_surfaceprovider.hxx
@@ -20,10 +20,7 @@
#pragma once
#include <rtl/ref.hxx>
-#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/uno/XInterface.hpp>
-#include <comphelper/servicehelper.hxx>
-#include <sal/types.h>
#include <basegfx/vector/b2isize.hxx>
#include <vcl/cairo.hxx>
@@ -40,7 +37,7 @@ namespace cairocanvas
This interface must be implemented on all canvas
implementations that hand out XCachedPrimitives
*/
- class SurfaceProvider : public css::uno::XInterface
+ class SAL_LOPLUGIN_ANNOTATE("crosscast") SurfaceProvider : public css::uno::XInterface
{
public:
virtual ~SurfaceProvider() {}
@@ -65,15 +62,6 @@ namespace cairocanvas
/** Provides the underlying vcl outputdevice this surface renders on
*/
virtual OutputDevice* getOutputDevice() = 0;
-
- sal_Int64 getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) {
- return comphelper::getSomethingImpl(aIdentifier, this);
- }
-
- static css::uno::Sequence<sal_Int8> const & getUnoTunnelId() {
- static comphelper::UnoIdInit const id;
- return id.getSeq();
- }
};
typedef ::rtl::Reference< SurfaceProvider > SurfaceProviderRef;
diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx
index 4324aad832bb..1a6f0143a60a 100644
--- a/canvas/source/cairo/cairo_textlayout.cxx
+++ b/canvas/source/cairo/cairo_textlayout.cxx
@@ -28,7 +28,6 @@
#include <basegfx/numeric/ftools.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <comphelper/diagnose_ex.hxx>
-#include <comphelper/servicehelper.hxx>
#include <utility>
#include <vcl/kernarray.hxx>
#include <vcl/metric.hxx>
@@ -345,15 +344,6 @@ namespace cairocanvas
{
return { "com.sun.star.rendering.TextLayout" };
}
-
- sal_Int64 TextLayout::getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) {
- return comphelper::getSomethingImpl(aIdentifier, this);
- }
-
- css::uno::Sequence<sal_Int8> const & TextLayout::getUnoTunnelId() {
- static comphelper::UnoIdInit const id;
- return id.getSeq();
- }
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/cairo/cairo_textlayout.hxx b/canvas/source/cairo/cairo_textlayout.hxx
index c2a85ceab72a..bec692e75707 100644
--- a/canvas/source/cairo/cairo_textlayout.hxx
+++ b/canvas/source/cairo/cairo_textlayout.hxx
@@ -23,7 +23,6 @@
#include <cppuhelper/basemutex.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/rendering/RenderState.hpp>
#include <com/sun/star/rendering/ViewState.hpp>
#include <com/sun/star/rendering/XTextLayout.hpp>
@@ -38,8 +37,7 @@
namespace cairocanvas
{
typedef ::cppu::WeakComponentImplHelper< css::rendering::XTextLayout,
- css::lang::XServiceInfo,
- css::lang::XUnoTunnel > TextLayout_Base;
+ css::lang::XServiceInfo > TextLayout_Base;
class TextLayout : public ::cppu::BaseMutex,
public TextLayout_Base
@@ -82,9 +80,6 @@ namespace cairocanvas
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
- sal_Int64 SAL_CALL getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) override;
- static css::uno::Sequence<sal_Int8> const & getUnoTunnelId();
-
void draw( OutputDevice& rOutDev,
const Point& rOutpos,
const css::rendering::ViewState& viewState,
diff --git a/canvas/source/opengl/ogl_canvashelper.cxx b/canvas/source/opengl/ogl_canvashelper.cxx
index 28337013e965..1b84879b005c 100644
--- a/canvas/source/opengl/ogl_canvashelper.cxx
+++ b/canvas/source/opengl/ogl_canvashelper.cxx
@@ -21,7 +21,6 @@
#include <rtl/crc.h>
#include <rtl/math.hxx>
#include <comphelper/diagnose_ex.hxx>
-#include <comphelper/servicehelper.hxx>
#include <vcl/font.hxx>
#include <vcl/kernarray.hxx>
#include <vcl/metric.hxx>
@@ -554,7 +553,7 @@ namespace oglcanvas
// try to cast XParametricPolyPolygon2D reference to
// our implementation class.
::canvas::ParametricPolyPolygon* pGradient =
- comphelper::getFromUnoTunnel< ::canvas::ParametricPolyPolygon >( textures[0].Gradient );
+ dynamic_cast< ::canvas::ParametricPolyPolygon* >( textures[0].Gradient.get() );
if( pGradient )
{
diff --git a/canvas/source/tools/canvastools.cxx b/canvas/source/tools/canvastools.cxx
index aa9e7ac6ab97..1ff393005758 100644
--- a/canvas/source/tools/canvastools.cxx
+++ b/canvas/source/tools/canvastools.cxx
@@ -39,7 +39,6 @@
#include <com/sun/star/geometry/AffineMatrix2D.hpp>
#include <com/sun/star/geometry/Matrix2D.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/rendering/ColorComponentTag.hpp>
#include <com/sun/star/rendering/ColorSpaceType.hpp>
#include <com/sun/star/rendering/CompositeOperation.hpp>
@@ -55,7 +54,6 @@
#include <sal/log.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <comphelper/diagnose_ex.hxx>
-#include <comphelper/servicehelper.hxx>
#include <vcl/canvastools.hxx>
#include <vcl/window.hxx>
@@ -178,7 +176,7 @@ namespace canvas::tools
namespace
{
- class StandardColorSpace : public cppu::WeakImplHelper< css::rendering::XIntegerBitmapColorSpace, css::lang::XUnoTunnel >
+ class StandardColorSpace : public cppu::WeakImplHelper< css::rendering::XIntegerBitmapColorSpace >
{
private:
uno::Sequence< sal_Int8 > maComponentTags;
@@ -329,7 +327,7 @@ namespace canvas::tools
virtual uno::Sequence<double> SAL_CALL convertFromIntegerColorSpace( const uno::Sequence< ::sal_Int8 >& deviceColor,
const uno::Reference< rendering::XColorSpace >& targetColorSpace ) override
{
- if( comphelper::getFromUnoTunnel<StandardColorSpace>(targetColorSpace) )
+ if( dynamic_cast<StandardColorSpace*>(targetColorSpace.get()) )
{
const sal_Int8* pIn( deviceColor.getConstArray() );
const std::size_t nLen( deviceColor.getLength() );
@@ -360,7 +358,7 @@ namespace canvas::tools
virtual uno::Sequence< ::sal_Int8 > SAL_CALL convertToIntegerColorSpace( const uno::Sequence< ::sal_Int8 >& deviceColor,
const uno::Reference< rendering::XIntegerBitmapColorSpace >& targetColorSpace ) override
{
- if( comphelper::getFromUnoTunnel<StandardColorSpace>(targetColorSpace) )
+ if( dynamic_cast<StandardColorSpace*>(targetColorSpace.get()) )
{
// it's us, so simply pass-through the data
return deviceColor;
@@ -511,20 +509,9 @@ namespace canvas::tools
pBitCounts[2] =
pBitCounts[3] = 8;
}
-
- sal_Int64 SAL_CALL getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier)
- override
- {
- return comphelper::getSomethingImpl(aIdentifier, this);
- }
-
- static css::uno::Sequence<sal_Int8> const & getUnoTunnelId() {
- static comphelper::UnoIdInit const id;
- return id.getSeq();
- }
};
- class StandardNoAlphaColorSpace : public cppu::WeakImplHelper< css::rendering::XIntegerBitmapColorSpace, css::lang::XUnoTunnel >
+ class StandardNoAlphaColorSpace : public cppu::WeakImplHelper< css::rendering::XIntegerBitmapColorSpace >
{
private:
uno::Sequence< sal_Int8 > maComponentTags;
@@ -674,7 +661,7 @@ namespace canvas::tools
virtual uno::Sequence<double> SAL_CALL convertFromIntegerColorSpace( const uno::Sequence< ::sal_Int8 >& deviceColor,
const uno::Reference< rendering::XColorSpace >& targetColorSpace ) override
{
- if( comphelper::getFromUnoTunnel<StandardNoAlphaColorSpace>(targetColorSpace) )
+ if( dynamic_cast<StandardNoAlphaColorSpace*>(targetColorSpace.get()) )
{
const sal_Int8* pIn( deviceColor.getConstArray() );
const std::size_t nLen( deviceColor.getLength() );
@@ -705,7 +692,7 @@ namespace canvas::tools
virtual uno::Sequence< ::sal_Int8 > SAL_CALL convertToIntegerColorSpace( const uno::Sequence< ::sal_Int8 >& deviceColor,
const uno::Reference< rendering::XIntegerBitmapColorSpace >& targetColorSpace ) override
{
- if( comphelper::getFromUnoTunnel<StandardNoAlphaColorSpace>(targetColorSpace) )
+ if( dynamic_cast<StandardNoAlphaColorSpace*>(targetColorSpace.get()) )
{
// it's us, so simply pass-through the data
return deviceColor;
@@ -853,17 +840,6 @@ namespace canvas::tools
pBitCounts[1] =
pBitCounts[2] = 8;
}
-
- sal_Int64 SAL_CALL getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier)
- override
- {
- return comphelper::getSomethingImpl(aIdentifier, this);
- }
-
- static css::uno::Sequence<sal_Int8> const & getUnoTunnelId() {
- static comphelper::UnoIdInit const id;
- return id.getSeq();
- }
};
}
diff --git a/canvas/source/tools/parametricpolypolygon.cxx b/canvas/source/tools/parametricpolypolygon.cxx
index 00b6c4da2850..acad3b58b7d6 100644
--- a/canvas/source/tools/parametricpolypolygon.cxx
+++ b/canvas/source/tools/parametricpolypolygon.cxx
@@ -22,7 +22,6 @@
#include <basegfx/point/b2dpoint.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <basegfx/range/b2drectangle.hxx>
-#include <comphelper/servicehelper.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/rendering/XGraphicDevice.hpp>
@@ -195,16 +194,6 @@ namespace canvas
return { "com.sun.star.rendering.ParametricPolyPolygon" };
}
- sal_Int64 ParametricPolyPolygon::getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier)
- {
- return comphelper::getSomethingImpl(aIdentifier, this);
- }
-
- css::uno::Sequence<sal_Int8> const & ParametricPolyPolygon::getUnoTunnelId() {
- static comphelper::UnoIdInit const id;
- return id.getSeq();
- }
-
ParametricPolyPolygon::~ParametricPolyPolygon()
{
}
diff --git a/canvas/source/vcl/cachedbitmap.cxx b/canvas/source/vcl/cachedbitmap.cxx
index 2364c073e1fa..60b5f7986c55 100644
--- a/canvas/source/vcl/cachedbitmap.cxx
+++ b/canvas/source/vcl/cachedbitmap.cxx
@@ -23,7 +23,6 @@
#include <com/sun/star/rendering/RepaintResult.hpp>
#include <utility>
#include <comphelper/diagnose_ex.hxx>
-#include <comphelper/servicehelper.hxx>
#include "cachedbitmap.hxx"
#include "repainttarget.hxx"
@@ -71,7 +70,7 @@ namespace vclcanvas
if( rNewState.Clip != rOldState.Clip )
return rendering::RepaintResult::FAILED;
- RepaintTarget* pTarget = comphelper::getFromUnoTunnel< RepaintTarget >(rTargetCanvas);
+ RepaintTarget* pTarget = dynamic_cast< RepaintTarget* >(rTargetCanvas.get());
ENSURE_OR_THROW( pTarget,
"CachedBitmap::redraw(): cannot cast target to RepaintTarget" );
diff --git a/canvas/source/vcl/canvas.cxx b/canvas/source/vcl/canvas.cxx
index 2f6b513f35a0..7e38276e06d3 100644
--- a/canvas/source/vcl/canvas.cxx
+++ b/canvas/source/vcl/canvas.cxx
@@ -96,10 +96,6 @@ namespace vclcanvas
return "com.sun.star.rendering.Canvas.VCL";
}
- sal_Int64 Canvas::getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) {
- return RepaintTarget::getSomething(aIdentifier);
- }
-
bool Canvas::repaint( const GraphicObjectSharedPtr& rGrf,
const rendering::ViewState& viewState,
const rendering::RenderState& renderState,
diff --git a/canvas/source/vcl/canvas.hxx b/canvas/source/vcl/canvas.hxx
index c01b8ccfcca4..be7d7858e3ad 100644
--- a/canvas/source/vcl/canvas.hxx
+++ b/canvas/source/vcl/canvas.hxx
@@ -22,7 +22,6 @@
#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/XUnoTunnel.hpp>
#include <com/sun/star/util/XUpdatable.hpp>
#include <com/sun/star/rendering/XBitmapCanvas.hpp>
#include <com/sun/star/rendering/XIntegerBitmap.hpp>
@@ -49,8 +48,7 @@ namespace vclcanvas
css::lang::XMultiServiceFactory,
css::util::XUpdatable,
css::beans::XPropertySet,
- css::lang::XServiceName,
- css::lang::XUnoTunnel> GraphicDeviceBase_Base;
+ css::lang::XServiceName > GraphicDeviceBase_Base;
typedef ::canvas::GraphicDeviceBase< ::canvas::BaseMutexHelper< GraphicDeviceBase_Base >,
DeviceHelper,
tools::LocalGuard,
@@ -98,9 +96,6 @@ namespace vclcanvas
// XServiceName
virtual OUString SAL_CALL getServiceName( ) override;
- // XUnoTunnel
- sal_Int64 SAL_CALL getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) override;
-
// RepaintTarget
virtual bool repaint( const GraphicObjectSharedPtr& rGrf,
const css::rendering::ViewState& viewState,
diff --git a/canvas/source/vcl/canvasbitmap.cxx b/canvas/source/vcl/canvasbitmap.cxx
index 5a913836ebe7..9ae37c2c495a 100644
--- a/canvas/source/vcl/canvasbitmap.cxx
+++ b/canvas/source/vcl/canvasbitmap.cxx
@@ -19,7 +19,6 @@
#include <sal/config.h>
-#include <comphelper/servicehelper.hxx>
#include <cppuhelper/supportsservice.hxx>
#include "canvasbitmap.hxx"
@@ -85,11 +84,6 @@ namespace vclcanvas
return { "com.sun.star.rendering.CanvasBitmap" };
}
- sal_Int64 CanvasBitmap::getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) {
- return comphelper::getSomethingImpl(
- aIdentifier, this, comphelper::FallbackToGetSomethingOf<RepaintTarget>{});
- }
-
BitmapEx CanvasBitmap::getBitmap() const
{
SolarMutexGuard aGuard;
diff --git a/canvas/source/vcl/canvasbitmap.hxx b/canvas/source/vcl/canvasbitmap.hxx
index 4e64c8b2b6c6..1a95ce8c632c 100644
--- a/canvas/source/vcl/canvasbitmap.hxx
+++ b/canvas/source/vcl/canvasbitmap.hxx
@@ -22,7 +22,6 @@
#include <cppuhelper/compbase.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/rendering/XBitmapCanvas.hpp>
#include <com/sun/star/rendering/XIntegerBitmap.hpp>
#include <com/sun/star/beans/XFastPropertySet.hpp>
@@ -45,8 +44,7 @@ namespace vclcanvas
typedef ::cppu::WeakComponentImplHelper< css::rendering::XBitmapCanvas,
css::rendering::XIntegerBitmap,
css::lang::XServiceInfo,
- css::beans::XFastPropertySet,
- css::lang::XUnoTunnel> CanvasBitmapBase_Base;
+ css::beans::XFastPropertySet > CanvasBitmapBase_Base;
typedef ::canvas::IntegerBitmapBase<
canvas::BitmapCanvasBase2<
::canvas::BaseMutexHelper< CanvasBitmapBase_Base >,
@@ -84,9 +82,6 @@ namespace vclcanvas
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
- // XUnoTunnel
- sal_Int64 SAL_CALL getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) override;
-
// RepaintTarget interface
virtual bool repaint( const GraphicObjectSharedPtr& rGrf,
const css::rendering::ViewState& viewState,
diff --git a/canvas/source/vcl/canvascustomsprite.cxx b/canvas/source/vcl/canvascustomsprite.cxx
index 58112d1955a3..02e9b47fb233 100644
--- a/canvas/source/vcl/canvascustomsprite.cxx
+++ b/canvas/source/vcl/canvascustomsprite.cxx
@@ -116,10 +116,6 @@ namespace vclcanvas
return { "com.sun.star.rendering.CanvasCustomSprite" };
}
- sal_Int64 CanvasCustomSprite::getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) {
- return RepaintTarget::getSomething(aIdentifier);
- }
-
// Sprite
void CanvasCustomSprite::redraw( OutputDevice& rOutDev,
bool bBufferedUpdate ) const
diff --git a/canvas/source/vcl/canvascustomsprite.hxx b/canvas/source/vcl/canvascustomsprite.hxx
index 6fca0800f0c1..1a7d3ccfb69e 100644
--- a/canvas/source/vcl/canvascustomsprite.hxx
+++ b/canvas/source/vcl/canvascustomsprite.hxx
@@ -23,7 +23,6 @@
#include <comphelper/uno3.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/rendering/XBitmapCanvas.hpp>
#include <com/sun/star/rendering/XCustomSprite.hpp>
#include <com/sun/star/rendering/XIntegerBitmap.hpp>
@@ -44,8 +43,7 @@ namespace vclcanvas
typedef ::cppu::WeakComponentImplHelper< css::rendering::XCustomSprite,
css::rendering::XBitmapCanvas,
css::rendering::XIntegerBitmap,
- css::lang::XServiceInfo,
- css::lang::XUnoTunnel> CanvasCustomSpriteBase_Base;
+ css::lang::XServiceInfo > CanvasCustomSpriteBase_Base;
/** Mixin Sprite
Have to mixin the Sprite interface before deriving from
@@ -98,9 +96,6 @@ namespace vclcanvas
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
- // XUnoTunnel
- sal_Int64 SAL_CALL getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) override;
-
// Sprite
virtual void redraw( OutputDevice& rOutDev,
bool bBufferedUpdate ) const override;
diff --git a/canvas/source/vcl/canvasfont.cxx b/canvas/source/vcl/canvasfont.cxx
index 0f342de0785a..e7fab0492549 100644
--- a/canvas/source/vcl/canvasfont.cxx
+++ b/canvas/source/vcl/canvasfont.cxx
@@ -22,7 +22,6 @@
#include <basegfx/numeric/ftools.hxx>
#include <canvas/canvastools.hxx>
#include <com/sun/star/rendering/PanoseProportion.hpp>
-#include <comphelper/servicehelper.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <i18nlangtag/languagetag.hxx>
#include <rtl/math.hxx>
@@ -169,15 +168,6 @@ namespace vclcanvas
return { "com.sun.star.rendering.CanvasFont" };
}
- sal_Int64 CanvasFont::getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) {
- return comphelper::getSomethingImpl(aIdentifier, this);
- }
-
- css::uno::Sequence<sal_Int8> const & CanvasFont::getUnoTunnelId() {
- static comphelper::UnoIdInit const id;
- return id.getSeq();
- }
-
vcl::Font const & CanvasFont::getVCLFont() const
{
return *maFont;
diff --git a/canvas/source/vcl/canvasfont.hxx b/canvas/source/vcl/canvasfont.hxx
index a4fd9fb0bc3e..fdfa870f5ed3 100644
--- a/canvas/source/vcl/canvasfont.hxx
+++ b/canvas/source/vcl/canvasfont.hxx
@@ -23,7 +23,6 @@
#include <cppuhelper/basemutex.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/geometry/Matrix2D.hpp>
#include <com/sun/star/rendering/FontRequest.hpp>
#include <com/sun/star/rendering/XCanvasFont.hpp>
@@ -41,8 +40,7 @@
namespace vclcanvas
{
typedef ::cppu::WeakComponentImplHelper< css::rendering::XCanvasFont,
- css::lang::XServiceInfo,
- css::lang::XUnoTunnel > CanvasFont_Base;
+ css::lang::XServiceInfo > CanvasFont_Base;
class CanvasFont : public ::cppu::BaseMutex,
public CanvasFont_Base
@@ -75,9 +73,6 @@ namespace vclcanvas
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
- sal_Int64 SAL_CALL getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) override;
- static css::uno::Sequence<sal_Int8> const & getUnoTunnelId();
-
vcl::Font const & getVCLFont() const;
private:
diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx
index 9ad9716dde1d..cbbd18a376d9 100644
--- a/canvas/source/vcl/canvashelper.cxx
+++ b/canvas/source/vcl/canvashelper.cxx
@@ -34,7 +34,6 @@
#include <com/sun/star/rendering/PathJoinType.hpp>
#include <com/sun/star/rendering/TextDirection.hpp>
#include <comphelper/sequence.hxx>
-#include <comphelper/servicehelper.hxx>
#include <rtl/math.hxx>
#include <comphelper/diagnose_ex.hxx>
#include <tools/poly.hxx>
@@ -613,7 +612,7 @@ namespace vclcanvas
ENSURE_ARG_OR_THROW( xLayoutedText.is(),
"layout is NULL");
- TextLayout* pTextLayout = comphelper::getFromUnoTunnel< TextLayout >( xLayoutedText );
+ TextLayout* pTextLayout = dynamic_cast< TextLayout* >( xLayoutedText.get() );
if( pTextLayout )
{
@@ -1112,7 +1111,7 @@ namespace vclcanvas
setupOutDevState( viewState, renderState, TEXT_COLOR );
- CanvasFont* pFont = comphelper::getFromUnoTunnel< CanvasFont >( xFont );
+ CanvasFont* pFont = dynamic_cast< CanvasFont* >( xFont.get() );
ENSURE_ARG_OR_THROW( pFont,
"Font not compatible with this canvas" );
diff --git a/canvas/source/vcl/canvashelper_texturefill.cxx b/canvas/source/vcl/canvashelper_texturefill.cxx
index 02f9f733bdd3..211592685204 100644
--- a/canvas/source/vcl/canvashelper_texturefill.cxx
+++ b/canvas/source/vcl/canvashelper_texturefill.cxx
@@ -35,7 +35,6 @@
#include <com/sun/star/rendering/TexturingMode.hpp>
#include <rtl/math.hxx>
#include <comphelper/diagnose_ex.hxx>
-#include <comphelper/servicehelper.hxx>
#include <tools/poly.hxx>
#include <vcl/bitmapex.hxx>
#include <vcl/canvastools.hxx>
@@ -638,7 +637,7 @@ namespace vclcanvas
// try to cast XParametricPolyPolygon2D reference to
// our implementation class.
::canvas::ParametricPolyPolygon* pGradient =
- comphelper::getFromUnoTunnel< ::canvas::ParametricPolyPolygon >( textures[0].Gradient );
+ dynamic_cast< ::canvas::ParametricPolyPolygon* >( textures[0].Gradient.get() );
if( pGradient && pGradient->getValues().maColors.hasElements() )
{
diff --git a/canvas/source/vcl/impltools.cxx b/canvas/source/vcl/impltools.cxx
index 04209f94ac47..5539a92d1734 100644
--- a/canvas/source/vcl/impltools.cxx
+++ b/canvas/source/vcl/impltools.cxx
@@ -28,7 +28,6 @@
#include <basegfx/tuple/b2dtuple.hxx>
#include <rtl/math.hxx>
#include <comphelper/diagnose_ex.hxx>
-#include <comphelper/servicehelper.hxx>
#include <sal/log.hxx>
#include <vcl/bitmapex.hxx>
#include <vcl/canvastools.hxx>
@@ -51,7 +50,7 @@ namespace vclcanvas::tools
{
// TODO(F3): CanvasCustomSprite should also be tunnelled
// through (also implements XIntegerBitmap interface)
- CanvasBitmap* pBitmapImpl = comphelper::getFromUnoTunnel< CanvasBitmap >( xBitmap );
+ CanvasBitmap* pBitmapImpl = dynamic_cast< CanvasBitmap* >( xBitmap.get() );
if( pBitmapImpl )
{
diff --git a/canvas/source/vcl/repainttarget.hxx b/canvas/source/vcl/repainttarget.hxx
index 3ef832fb3426..b8bac4ab9210 100644
--- a/canvas/source/vcl/repainttarget.hxx
+++ b/canvas/source/vcl/repainttarget.hxx
@@ -19,10 +19,6 @@
#pragma once
-#include <com/sun/star/uno/Sequence.hxx>
-#include <comphelper/servicehelper.hxx>
-#include <sal/types.h>
-
#include "cachedbitmap.hxx"
class Point;
@@ -38,7 +34,7 @@ namespace vclcanvas
This interface must be implemented on all canvas
implementations that hand out XCachedPrimitives
*/
- class RepaintTarget
+ class SAL_LOPLUGIN_ANNOTATE("crosscast") RepaintTarget
{
public:
virtual ~RepaintTarget() {}
@@ -50,15 +46,6 @@ namespace vclcanvas
const ::Point& rPt,
const ::Size& rSz,
const GraphicAttr& rAttr ) const = 0;
-
- sal_Int64 getSomething(css::uno::Sequence<sal_Int8> const & id) {
- return comphelper::getSomethingImpl(id, this);
- }
-
- static css::uno::Sequence<sal_Int8> const & getUnoTunnelId() {
- static comphelper::UnoIdInit const id;
- return id.getSeq();
- }
};
}
diff --git a/canvas/source/vcl/spritecanvas.cxx b/canvas/source/vcl/spritecanvas.cxx
index b7984e70ddce..f67783681417 100644
--- a/canvas/source/vcl/spritecanvas.cxx
+++ b/canvas/source/vcl/spritecanvas.cxx
@@ -161,10 +161,6 @@ namespace vclcanvas
return cppu::supportsService(this, sServiceName);
}
- sal_Int64 SpriteCanvas::getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) {
- return RepaintTarget::getSomething(aIdentifier);
- }
-
bool SpriteCanvas::repaint( const GraphicObjectSharedPtr& rGrf,
const rendering::ViewState& viewState,
const rendering::RenderState& renderState,
diff --git a/canvas/source/vcl/spritecanvas.hxx b/canvas/source/vcl/spritecanvas.hxx
index 335d8dcce3e3..8f7c76880f51 100644
--- a/canvas/source/vcl/spritecanvas.hxx
+++ b/canvas/source/vcl/spritecanvas.hxx
@@ -25,7 +25,6 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XServiceName.hpp>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/awt/XWindowListener.hpp>
#include <com/sun/star/util/XUpdatable.hpp>
#include <com/sun/star/rendering/XSpriteCanvas.hpp>
@@ -58,8 +57,7 @@ namespace vclcanvas
css::util::XUpdatable,
css::beans::XPropertySet,
css::lang::XServiceName,
- css::lang::XServiceInfo,
- css::lang::XUnoTunnel > WindowGraphicDeviceBase_Base;
+ css::lang::XServiceInfo > WindowGraphicDeviceBase_Base;
typedef ::canvas::BufferedGraphicDeviceBase< ::canvas::DisambiguationHelper< WindowGraphicDeviceBase_Base >,
SpriteDeviceHelper,
tools::LocalGuard,
@@ -140,9 +138,6 @@ namespace vclcanvas
virtual OUString SAL_CALL getImplementationName() override;
virtual sal_Bool SAL_CALL supportsService(const OUString&) override;
- // XUnoTunnel
- sal_Int64 SAL_CALL getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) override;
-
// RepaintTarget
virtual bool repaint( const GraphicObjectSharedPtr& rGrf,
const css::rendering::ViewState& viewState,
diff --git a/canvas/source/vcl/textlayout.cxx b/canvas/source/vcl/textlayout.cxx
index 6131cce0e380..689720e4570a 100644
--- a/canvas/source/vcl/textlayout.cxx
+++ b/canvas/source/vcl/textlayout.cxx
@@ -29,7 +29,6 @@
#include <com/sun/star/rendering/TextDirection.hpp>
#include <com/sun/star/rendering/ViewState.hpp>
#include <comphelper/sequence.hxx>
-#include <comphelper/servicehelper.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <utility>
#include <vcl/kernarray.hxx>
@@ -421,15 +420,6 @@ namespace vclcanvas
{
return { "com.sun.star.rendering.TextLayout" };
}
-
- sal_Int64 TextLayout::getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) {
- return comphelper::getSomethingImpl(aIdentifier, this);
- }
-
- css::uno::Sequence<sal_Int8> const & TextLayout::getUnoTunnelId() {
- static comphelper::UnoIdInit const id;
- return id.getSeq();
- }
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/canvas/source/vcl/textlayout.hxx b/canvas/source/vcl/textlayout.hxx
index 53f3f73033ac..be8603d812f1 100644
--- a/canvas/source/vcl/textlayout.hxx
+++ b/canvas/source/vcl/textlayout.hxx
@@ -23,7 +23,6 @@
#include <cppuhelper/basemutex.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/rendering/StringContext.hpp>
#include <com/sun/star/rendering/XTextLayout.hpp>
@@ -35,8 +34,7 @@
namespace vclcanvas
{
typedef ::cppu::WeakComponentImplHelper< css::rendering::XTextLayout,
- css::lang::XServiceInfo,
- css::lang::XUnoTunnel > TextLayout_Base;
+ css::lang::XServiceInfo > TextLayout_Base;
class TextLayout : public ::cppu::BaseMutex,
public TextLayout_Base
@@ -80,9 +78,6 @@ namespace vclcanvas
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
- sal_Int64 SAL_CALL getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) override;
- static css::uno::Sequence<sal_Int8> const & getUnoTunnelId();
-
void draw( OutputDevice& rOutDev,
const Point& rOutpos,
const css::rendering::ViewState& viewState,