toolkit/inc/awt/vclxbitmap.hxx         |    5 -----
 toolkit/inc/awt/vclxgraphics.hxx       |    7 +------
 toolkit/source/awt/vclxbitmap.cxx      |    3 ---
 toolkit/source/awt/vclxgraphics.cxx    |    3 ---
 toolkit/source/helper/vclunohelper.cxx |    2 +-
 5 files changed, 2 insertions(+), 18 deletions(-)

New commits:
commit d21260708b67c18cde3531ae565af833688d6f6a
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Fri Jan 13 18:25:07 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon Jan 16 08:41:00 2023 +0000

    XUnoTunnel->dynamic_cast in VCLXGraphics
    
    Change-Id: Ia401542ec8249809ad16dadd79c51aa025044b42
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145534
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/toolkit/inc/awt/vclxgraphics.hxx b/toolkit/inc/awt/vclxgraphics.hxx
index ff697ead31b4..acf03dd17874 100644
--- a/toolkit/inc/awt/vclxgraphics.hxx
+++ b/toolkit/inc/awt/vclxgraphics.hxx
@@ -28,7 +28,6 @@
 #include <vcl/vclptr.hxx>
 
 #include <com/sun/star/awt/XGraphics2.hpp>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
 
 #include <memory>
 
@@ -52,8 +51,7 @@ namespace o3tl
 
 
 class VCLXGraphics final : public cppu::WeakImplHelper<
-                        css::awt::XGraphics2,
-                        css::lang::XUnoTunnel>
+                        css::awt::XGraphics2>
 {
 private:
     // used to return same reference on each call to getDevice()
@@ -80,9 +78,6 @@ public:
     void            SetOutputDevice( OutputDevice* pOutDev );
     OutputDevice*   GetOutputDevice() const { return mpOutputDevice; }
 
-    // css::lang::XUnoTunnel
-    UNO3_GETIMPLEMENTATION_DECL(VCLXGraphics)
-
     // css::awt::XGraphics Attributes
     virtual css::uno::Reference< css::awt::XDevice > SAL_CALL getDevice() 
override;
     virtual void SAL_CALL setTextColor( ::sal_Int32 _textcolor ) override;
diff --git a/toolkit/source/awt/vclxgraphics.cxx 
b/toolkit/source/awt/vclxgraphics.cxx
index bbbb75e0545d..b89a67f49506 100644
--- a/toolkit/source/awt/vclxgraphics.cxx
+++ b/toolkit/source/awt/vclxgraphics.cxx
@@ -35,9 +35,6 @@ using namespace com::sun::star;
 
 
 
-// lang::XUnoTunnel
-UNO3_GETIMPLEMENTATION_IMPL( VCLXGraphics );
-
 VCLXGraphics::VCLXGraphics()
     : mpOutputDevice(nullptr)
     , meRasterOp(RasterOp::OverPaint)
commit 8081533f7c35939b64f11894470c3e033057a887
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Fri Jan 13 18:26:58 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon Jan 16 08:40:47 2023 +0000

    XUnoTunnel->dynamic_cast in VCLXBitmap
    
    Change-Id: I2cf42ac720184bc2b8b89ced5564dbb95e7dc1ba
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145535
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/toolkit/inc/awt/vclxbitmap.hxx b/toolkit/inc/awt/vclxbitmap.hxx
index 6cf8928e06c4..9edf562c1db8 100644
--- a/toolkit/inc/awt/vclxbitmap.hxx
+++ b/toolkit/inc/awt/vclxbitmap.hxx
@@ -21,7 +21,6 @@
 
 #include <com/sun/star/awt/XBitmap.hpp>
 #include <com/sun/star/awt/XDisplayBitmap.hpp>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
 #include <com/sun/star/util/XAccounting.hpp>
 #include <comphelper/servicehelper.hxx>
 #include <cppuhelper/implbase.hxx>
@@ -34,7 +33,6 @@
 class VCLXBitmap final : public cppu::WeakImplHelper<
                             css::awt::XBitmap,
                             css::awt::XDisplayBitmap,
-                            css::lang::XUnoTunnel,
                             css::util::XAccounting>
 {
     std::mutex    maMutex;
@@ -51,9 +49,6 @@ public:
     void            SetBitmap( const BitmapEx& rBmp )   { maBitmap = rBmp; }
     const BitmapEx& GetBitmap() const                   { return maBitmap; }
 
-    // css::lang::XUnoTunnel
-    UNO3_GETIMPLEMENTATION_DECL(VCLXBitmap)
-
     // css::awt::XBitmap
     css::awt::Size                 SAL_CALL getSize() override;
     css::uno::Sequence< sal_Int8 > SAL_CALL getDIB() override;
diff --git a/toolkit/source/awt/vclxbitmap.cxx 
b/toolkit/source/awt/vclxbitmap.cxx
index 17111311dfbb..1faedb623550 100644
--- a/toolkit/source/awt/vclxbitmap.cxx
+++ b/toolkit/source/awt/vclxbitmap.cxx
@@ -25,9 +25,6 @@
 
 
 
-// css::lang::XUnoTunnel
-UNO3_GETIMPLEMENTATION_IMPL( VCLXBitmap );
-
 // css::awt::XBitmap
 css::awt::Size VCLXBitmap::getSize()
 {
diff --git a/toolkit/source/helper/vclunohelper.cxx 
b/toolkit/source/helper/vclunohelper.cxx
index c0f93ca5d756..45580c37cac8 100644
--- a/toolkit/source/helper/vclunohelper.cxx
+++ b/toolkit/source/helper/vclunohelper.cxx
@@ -73,7 +73,7 @@ BitmapEx VCLUnoHelper::GetBitmap( const css::uno::Reference< 
css::awt::XBitmap>&
     }
     else if ( rxBitmap.is() )
     {
-        VCLXBitmap* pVCLBitmap = comphelper::getFromUnoTunnel<VCLXBitmap>( 
rxBitmap );
+        VCLXBitmap* pVCLBitmap = dynamic_cast<VCLXBitmap*>( rxBitmap.get() );
         if ( pVCLBitmap )
             aBmp = pVCLBitmap->GetBitmap();
         else

Reply via email to