accessibility/inc/extended/accessiblelistbox.hxx                  |    8 
 accessibility/source/extended/accessiblelistbox.cxx               |    6 
 basegfx/source/tools/canvastools.cxx                              |    3 
 basegfx/source/tools/unopolypolygon.cxx                           |   12 -
 basic/source/basmgr/basicmanagerrepository.cxx                    |    3 
 basic/source/inc/scriptcont.hxx                                   |    8 
 basic/source/uno/scriptcont.cxx                                   |   11 -
 canvas/inc/parametricpolypolygon.hxx                              |    7 
 canvas/source/cairo/cairo_cachedbitmap.cxx                        |    3 
 canvas/source/cairo/cairo_canvas.cxx                              |    7 
 canvas/source/cairo/cairo_canvas.hxx                              |    6 
 canvas/source/cairo/cairo_canvasbitmap.cxx                        |   11 -
 canvas/source/cairo/cairo_canvasbitmap.hxx                        |    7 
 canvas/source/cairo/cairo_canvascustomsprite.cxx                  |    6 
 canvas/source/cairo/cairo_canvascustomsprite.hxx                  |    7 
 canvas/source/cairo/cairo_canvasfont.cxx                          |   10 -
 canvas/source/cairo/cairo_canvasfont.hxx                          |    7 
 canvas/source/cairo/cairo_canvashelper.cxx                        |   26 --
 canvas/source/cairo/cairo_canvashelper_text.cxx                   |    7 
 canvas/source/cairo/cairo_repainttarget.hxx                       |   14 -
 canvas/source/cairo/cairo_spritecanvas.cxx                        |    6 
 canvas/source/cairo/cairo_spritecanvas.hxx                        |    7 
 canvas/source/cairo/cairo_surfaceprovider.hxx                     |   14 -
 canvas/source/cairo/cairo_textlayout.cxx                          |   10 -
 canvas/source/cairo/cairo_textlayout.hxx                          |    7 
 canvas/source/opengl/ogl_canvashelper.cxx                         |    3 
 canvas/source/tools/canvastools.cxx                               |   36 ----
 canvas/source/tools/parametricpolypolygon.cxx                     |   11 -
 canvas/source/vcl/cachedbitmap.cxx                                |    3 
 canvas/source/vcl/canvas.cxx                                      |    4 
 canvas/source/vcl/canvas.hxx                                      |    7 
 canvas/source/vcl/canvasbitmap.cxx                                |    6 
 canvas/source/vcl/canvasbitmap.hxx                                |    7 
 canvas/source/vcl/canvascustomsprite.cxx                          |    4 
 canvas/source/vcl/canvascustomsprite.hxx                          |    7 
 canvas/source/vcl/canvasfont.cxx                                  |   10 -
 canvas/source/vcl/canvasfont.hxx                                  |    7 
 canvas/source/vcl/canvashelper.cxx                                |    5 
 canvas/source/vcl/canvashelper_texturefill.cxx                    |    3 
 canvas/source/vcl/impltools.cxx                                   |    3 
 canvas/source/vcl/repainttarget.hxx                               |   15 -
 canvas/source/vcl/spritecanvas.cxx                                |    4 
 canvas/source/vcl/spritecanvas.hxx                                |    7 
 canvas/source/vcl/textlayout.cxx                                  |   10 -
 canvas/source/vcl/textlayout.hxx                                  |    7 
 chart2/source/controller/main/ChartController.cxx                 |    4 
 chart2/source/controller/sidebar/Chart2PanelFactory.cxx           |    3 
 chart2/source/controller/sidebar/ChartLinePanel.cxx               |    3 
 embeddedobj/source/commonembedding/miscobj.cxx                    |    7 
 embeddedobj/source/inc/commonembobj.hxx                           |    7 
 extensions/source/propctrlr/browserline.cxx                       |    3 
 extensions/source/propctrlr/commoncontrol.hxx                     |   14 -
 extensions/source/propctrlr/eformshelper.cxx                      |    3 
 extensions/source/propctrlr/formcomponenthandler.cxx              |    5 
 extensions/source/propctrlr/handlerhelper.cxx                     |    7 
 extensions/source/propctrlr/propcontroller.cxx                    |    5 
 extensions/source/propctrlr/propeventtranslation.cxx              |   13 -
 extensions/source/propctrlr/propeventtranslation.hxx              |    6 
 extensions/source/propctrlr/standardcontrol.hxx                   |   20 +-
 extensions/source/propctrlr/usercontrol.cxx                       |   12 -
 extensions/source/propctrlr/usercontrol.hxx                       |   10 -
 forms/source/inc/InterfaceContainer.hxx                           |    9 -
 forms/source/misc/InterfaceContainer.cxx                          |   13 -
 framework/inc/uielement/addonstoolbarwrapper.hxx                  |    8 
 framework/source/layoutmanager/toolbarlayoutmanager.cxx           |    3 
 framework/source/services/desktop.cxx                             |   10 -
 framework/source/services/sessionlistener.cxx                     |    3 
 framework/source/uielement/addonstoolbarwrapper.cxx               |   12 -
 framework/source/uielement/toolbarwrapper.cxx                     |    3 
 i18npool/inc/calendar_gregorian.hxx                               |    7 
 i18npool/source/calendar/calendarImpl.cxx                         |    3 
 i18npool/source/calendar/calendar_gregorian.cxx                   |   10 -
 include/basegfx/utils/unopolypolygon.hxx                          |    8 
 include/comphelper/servicehelper.hxx                              |   87 
----------
 include/embeddedobj/embeddedupdate.hxx                            |    8 
 include/framework/desktop.hxx                                     |    7 
 include/oox/mathml/imexport.hxx                                   |    5 
 include/sfx2/digitalsignatures.hxx                                |   11 -
 include/sfx2/sidebar/SidebarController.hxx                        |    7 
 include/svx/linectrl.hxx                                          |    8 
 include/toolkit/awt/vclxaccessiblecomponent.hxx                   |   10 -
 include/vbahelper/vbashaperange.hxx                               |    7 
 include/vbahelper/vbashapes.hxx                                   |    6 
 include/vcl/weldutils.hxx                                         |   12 -
 include/xmloff/settingsstore.hxx                                  |   12 -
 include/xmloff/xmlimp.hxx                                         |    2 
 linguistic/source/gciterator.cxx                                  |   11 -
 linguistic/source/gciterator.hxx                                  |    7 
 linguistic/source/lngsvcmgr.cxx                                   |    3 
 oox/source/drawingml/shape.cxx                                    |    3 
 oox/source/export/shapes.cxx                                      |    3 
 oox/source/mathml/imexport.cxx                                    |   10 -
 reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx       |    3 
 sc/source/ui/sidebar/ScPanelFactory.cxx                           |    3 
 sc/source/ui/vba/vbapagebreaks.cxx                                |   20 --
 sd/Library_sd.mk                                                  |    1 
 sd/inc/Annotation.hxx                                             |   11 -
 sd/inc/textapi.hxx                                                |    3 
 sd/source/core/annotations/Annotation.cxx                         |   22 --
 sd/source/core/text/textapi.cxx                                   |   15 -
 sd/source/ui/annotations/annotationtag.cxx                        |    3 
 sd/source/ui/annotations/annotationwindow.cxx                     |    3 
 sd/source/ui/sidebar/PanelFactory.cxx                             |    2 
 sd/source/ui/unoidl/UnoDocumentSettings.cxx                       |   13 -
 sdext/source/pdfimport/sax/emitcontext.cxx                        |    3 
 sdext/source/presenter/PresenterAccessibility.cxx                 |    3 
 sdext/source/presenter/PresenterNotesView.cxx                     |   11 -
 sdext/source/presenter/PresenterNotesView.hxx                     |    7 
 sdext/source/presenter/PresenterProtocolHandler.cxx               |    3 
 sdext/source/presenter/PresenterSlideShowView.cxx                 |    4 
 sdext/source/presenter/PresenterSlideShowView.hxx                 |    8 
 sdext/source/presenter/PresenterSlideSorter.cxx                   |    5 
 sdext/source/presenter/PresenterSlideSorter.hxx                   |    8 
 sdext/source/presenter/PresenterToolBar.cxx                       |    5 
 sdext/source/presenter/PresenterToolBar.hxx                       |    8 
 sdext/source/presenter/PresenterViewFactory.cxx                   |   16 -
 sdext/source/presenter/PresenterViewFactory.hxx                   |    5 
 sfx2/Library_sfx.mk                                               |    1 
 sfx2/source/devtools/DevelopmentToolDockingWindow.cxx             |    3 
 sfx2/source/devtools/SelectionChangeHandler.hxx                   |   16 -
 sfx2/source/doc/digitalsignatures.cxx                             |   30 ---
 sfx2/source/doc/docfile.cxx                                       |    3 
 sfx2/source/sidebar/SidebarController.cxx                         |   16 -
 starmath/source/SmPanelFactory.cxx                                |    3 
 starmath/source/unomodel.cxx                                      |    1 
 svtools/Library_svt.mk                                            |    1 
 svtools/source/misc/embeddedupdate.cxx                            |   22 --
 svtools/source/misc/embedhlp.cxx                                  |    5 
 svtools/source/uno/toolboxcontroller.cxx                          |    3 
 svx/source/sidebar/PanelFactory.cxx                               |    3 
 svx/source/sidebar/line/LinePropertyPanelBase.cxx                 |    3 
 svx/source/tbxctrls/linectrl.cxx                                  |   13 -
 sw/source/filter/ww8/docxattributeoutput.cxx                      |    3 
 sw/source/filter/ww8/rtfattributeoutput.cxx                       |    3 
 sw/source/uibase/docvw/SidebarWinAcc.cxx                          |    3 
 sw/source/uibase/sidebar/SwPanelFactory.cxx                       |    3 
 toolkit/inc/awt/vclxwindows.hxx                                   |    9 -
 toolkit/source/awt/vclxaccessiblecomponent.cxx                    |   14 -
 toolkit/source/awt/vclxtoolkit.cxx                                |    3 
 toolkit/source/awt/vclxwindows.cxx                                |   32 ---
 toolkit/source/controls/dialogcontrol.cxx                         |    5 
 toolkit/source/controls/tree/treedatamodel.cxx                    |   31 ---
 toolkit/source/helper/unowrapper.cxx                              |    3 
 ucb/source/ucp/ext/ucpext_content.cxx                             |   11 -
 ucb/source/ucp/ext/ucpext_content.hxx                             |    8 
 ucb/source/ucp/ext/ucpext_datasupplier.cxx                        |    3 
 vbahelper/source/vbahelper/vbashaperange.cxx                      |   12 -
 vbahelper/source/vbahelper/vbashapes.cxx                          |   12 -
 vcl/Library_vcl.mk                                                |    1 
 vcl/inc/canvasbitmap.hxx                                          |    8 
 vcl/inc/unx/gtk/gtkinst.hxx                                       |    7 
 vcl/source/helper/canvasbitmap.cxx                                |   14 -
 vcl/source/helper/canvastools.cxx                                 |    4 
 vcl/source/window/weldutils.cxx                                   |   21 --
 vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx                         |    3 
 vcl/unx/gtk3/gtkinst.cxx                                          |    3 
 winaccessibility/source/service/AccTopWindowListener.cxx          |    4 
 writerfilter/source/dmapper/DomainMapper_Impl.cxx                 |    3 
 writerfilter/source/ooxml/OOXMLFastContextHandler.cxx             |    3 
 writerfilter/source/rtftok/rtfdocumentimpl.cxx                    |    3 
 writerperfect/source/common/DocumentHandler.cxx                   |    3 
 xmloff/Library_xo.mk                                              |    1 
 xmloff/source/draw/sdxmlexp.cxx                                   |    4 
 xmloff/source/draw/sdxmlimp.cxx                                   |    3 
 xmloff/source/draw/settingsstore.cxx                              |   28 ---
 xmlsecurity/Library_xsec_xmlsec.mk                                |    1 
 xmlsecurity/inc/certificate.hxx                                   |   15 -
 xmlsecurity/inc/framework/signatureverifierimpl.hxx               |    7 
 xmlsecurity/qa/unit/signing/signing.cxx                           |    3 
 xmlsecurity/source/component/documentdigitalsignatures.cxx        |   11 -
 xmlsecurity/source/framework/signatureverifierimpl.cxx            |   10 -
 xmlsecurity/source/gpg/CertificateImpl.cxx                        |    3 
 xmlsecurity/source/gpg/CertificateImpl.hxx                        |    9 -
 xmlsecurity/source/helper/documentsignaturemanager.cxx            |    5 
 xmlsecurity/source/helper/xsecverify.cxx                          |    5 
 xmlsecurity/source/xmlsec/certificate.cxx                         |   27 ---
 xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx |    2 
 xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.hxx |    9 -
 xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx         |    3 
 xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.hxx         |    9 -
 180 files changed, 242 insertions(+), 1255 deletions(-)

New commits:
commit 19691c3b6878c1ea09f8bcd53224341c40c9847b
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Wed Jan 4 16:43:40 2023 +0100
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Thu Jan 5 11:45:51 2023 +0000

    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 <sberg...@redhat.com>

diff --git a/accessibility/inc/extended/accessiblelistbox.hxx 
b/accessibility/inc/extended/accessiblelistbox.hxx
index 7138820123ad..339e32f3b0b7 100644
--- a/accessibility/inc/extended/accessiblelistbox.hxx
+++ b/accessibility/inc/extended/accessiblelistbox.hxx
@@ -35,14 +35,12 @@ namespace accessibility
 {
     class AccessibleListBoxEntry;
 
-    using AccessibleListBox_Base = cppu::ImplHelper2<
-            css::accessibility::XAccessible,
-            css::accessibility::XAccessibleSelection>;
-
     /** the class OAccessibleListBoxEntry represents the base class for an 
accessible object of a listbox entry
     */
     class AccessibleListBox :
-        public AccessibleListBox_Base,
+        public cppu::ImplHelper2<
+            css::accessibility::XAccessible,
+            css::accessibility::XAccessibleSelection>,
         public VCLXAccessibleComponent
     {
 
diff --git a/accessibility/source/extended/accessiblelistbox.cxx 
b/accessibility/source/extended/accessiblelistbox.cxx
index bb1131d0ab4f..df4a9a759c0f 100644
--- a/accessibility/source/extended/accessiblelistbox.cxx
+++ b/accessibility/source/extended/accessiblelistbox.cxx
@@ -58,10 +58,8 @@ namespace accessibility
             dispose();
         }
     }
-    IMPLEMENT_FORWARD_XINTERFACE2(
-        AccessibleListBox, VCLXAccessibleComponent, AccessibleListBox_Base);
-    IMPLEMENT_FORWARD_XTYPEPROVIDER2(
-        AccessibleListBox, VCLXAccessibleComponent, AccessibleListBox_Base);
+    IMPLEMENT_FORWARD_XINTERFACE2(AccessibleListBox, VCLXAccessibleComponent, 
ImplHelper2)
+    IMPLEMENT_FORWARD_XTYPEPROVIDER2(AccessibleListBox, 
VCLXAccessibleComponent, ImplHelper2)
 
     void AccessibleListBox::ProcessWindowEvent( const VclWindowEvent& 
rVclWindowEvent )
     {
diff --git a/basegfx/source/tools/canvastools.cxx 
b/basegfx/source/tools/canvastools.cxx
index 1f65e89b182b..d388356199a2 100644
--- a/basegfx/source/tools/canvastools.cxx
+++ b/basegfx/source/tools/canvastools.cxx
@@ -30,7 +30,6 @@
 #include <com/sun/star/rendering/XPolyPolygon2D.hpp>
 #include <com/sun/star/rendering/XGraphicDevice.hpp>
 #include <com/sun/star/awt/Rectangle.hpp>
-#include <comphelper/servicehelper.hxx>
 #include <basegfx/utils/unopolypolygon.hxx>
 #include <basegfx/matrix/b2dhommatrix.hxx>
 #include <basegfx/matrix/b3dhommatrix.hxx>
@@ -252,7 +251,7 @@ namespace basegfx::unotools
         ::basegfx::B2DPolyPolygon b2DPolyPolygonFromXPolyPolygon2D( const 
uno::Reference< rendering::XPolyPolygon2D >& xPoly )
         {
             ::basegfx::unotools::UnoPolyPolygon* pPolyImpl =
-                comphelper::getFromUnoTunnel< 
::basegfx::unotools::UnoPolyPolygon >( xPoly );
+                dynamic_cast< ::basegfx::unotools::UnoPolyPolygon* >( 
xPoly.get() );
 
             if( pPolyImpl )
             {
diff --git a/basegfx/source/tools/unopolypolygon.cxx 
b/basegfx/source/tools/unopolypolygon.cxx
index 099cbee5eb75..0c3b59abac9b 100644
--- a/basegfx/source/tools/unopolypolygon.cxx
+++ b/basegfx/source/tools/unopolypolygon.cxx
@@ -27,7 +27,6 @@
 #include <basegfx/polygon/b2dpolypolygontools.hxx>
 #include <basegfx/utils/unopolypolygon.hxx>
 #include <basegfx/matrix/b2dhommatrixtools.hxx>
-#include <comphelper/servicehelper.hxx>
 #include <cppuhelper/supportsservice.hxx>
 #include <utility>
 
@@ -61,7 +60,7 @@ namespace basegfx::unotools
         }
 
         B2DPolyPolygon        aSrcPoly;
-        const UnoPolyPolygon* pSrc( comphelper::getFromUnoTunnel< 
UnoPolyPolygon >(polyPolygon) );
+        const UnoPolyPolygon* pSrc( dynamic_cast< UnoPolyPolygon* 
>(polyPolygon.get()) );
 
         // try to extract polygon data from interface. First,
         // check whether it's the same implementation object,
@@ -435,15 +434,6 @@ namespace basegfx::unotools
         return { "com.sun.star.rendering.PolyPolygon2D" };
     }
 
-    sal_Int64 UnoPolyPolygon::getSomething(css::uno::Sequence<sal_Int8> const 
& aIdentifier) {
-        return comphelper::getSomethingImpl(aIdentifier, this);
-    }
-
-    css::uno::Sequence<sal_Int8> const & UnoPolyPolygon::getUnoTunnelId() {
-        static comphelper::UnoIdInit const id;
-        return id.getSeq();
-    }
-
     B2DPolyPolygon UnoPolyPolygon::getPolyPolygon() const
     {
         std::unique_lock const guard( m_aMutex );
diff --git a/basic/source/basmgr/basicmanagerrepository.cxx 
b/basic/source/basmgr/basicmanagerrepository.cxx
index 803d8ed4caa0..7a2ed5efd20a 100644
--- a/basic/source/basmgr/basicmanagerrepository.cxx
+++ b/basic/source/basmgr/basicmanagerrepository.cxx
@@ -35,7 +35,6 @@
 #include <vcl/svapp.hxx>
 #include <tools/debug.hxx>
 #include <comphelper/diagnose_ex.hxx>
-#include <comphelper/servicehelper.hxx>
 #include <tools/urlobj.hxx>
 #include <comphelper/processfactory.hxx>
 #include <comphelper/documentinfo.hxx>
@@ -463,7 +462,7 @@ namespace basic
         }
 
         // knit the containers with the BasicManager
-        LibraryContainerInfo aInfo( xBasicLibs, xDialogLibs, 
comphelper::getFromUnoTunnel< SfxScriptLibraryContainer >( xBasicLibs ) );
+        LibraryContainerInfo aInfo( xBasicLibs, xDialogLibs, dynamic_cast< 
SfxScriptLibraryContainer* >( xBasicLibs.get() ) );
         OSL_ENSURE( aInfo.mpOldBasicPassword, 
"ImplRepository::impl_createManagerForModel: wrong BasicLibraries 
implementation!" );
         _out_rpBasicManager->SetLibraryContainerInfo( aInfo );
 
diff --git a/basic/source/inc/scriptcont.hxx b/basic/source/inc/scriptcont.hxx
index f4886d216fad..2d0e8bcf3232 100644
--- a/basic/source/inc/scriptcont.hxx
+++ b/basic/source/inc/scriptcont.hxx
@@ -21,18 +21,15 @@
 
 #include "namecont.hxx"
 #include <basic/basmgr.hxx>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
 #include <com/sun/star/script/vba/XVBAModuleInfo.hpp>
 #include <comphelper/uno3.hxx>
-#include <cppuhelper/implbase.hxx>
 #include <cppuhelper/implbase1.hxx>
 
 namespace basic
 {
 
 
-class SfxScriptLibraryContainer final :
-    public cppu::ImplInheritanceHelper<SfxLibraryContainer, 
css::lang::XUnoTunnel>
+class SfxScriptLibraryContainer final : public SfxLibraryContainer
 {
     css::uno::Reference< css::container::XNameAccess > mxCodeNameAccess;
 
@@ -102,9 +99,6 @@ public:
 
     // Library password handling for 5.0 documents
     void setLibraryPassword( const OUString& rLibraryName, const OUString& 
rPassword );
-
-    sal_Int64 SAL_CALL getSomething(css::uno::Sequence<sal_Int8> const & 
aIdentifier) override;
-    static css::uno::Sequence<sal_Int8> const & getUnoTunnelId();
 };
 
 
diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx
index ea69032aa795..eea449ac47fc 100644
--- a/basic/source/uno/scriptcont.cxx
+++ b/basic/source/uno/scriptcont.cxx
@@ -30,7 +30,6 @@
 #include <com/sun/star/task/ErrorCodeIOException.hpp>
 #include <com/sun/star/script/ModuleType.hpp>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <comphelper/servicehelper.hxx>
 #include <comphelper/storagehelper.hxx>
 #include <unotools/ucbstreamhelper.hxx>
 #include <sal/log.hxx>
@@ -108,16 +107,6 @@ void SfxScriptLibraryContainer::setLibraryPassword( const 
OUString& rLibraryName
     catch(const NoSuchElementException& ) {}
 }
 
-sal_Int64 SfxScriptLibraryContainer::getSomething(css::uno::Sequence<sal_Int8> 
const & aIdentifier)
-{
-    return comphelper::getSomethingImpl(aIdentifier, this);
-}
-
-css::uno::Sequence<sal_Int8> const & 
SfxScriptLibraryContainer::getUnoTunnelId() {
-    static comphelper::UnoIdInit const id;
-    return id.getSeq();
-}
-
 // Ctor for service
 SfxScriptLibraryContainer::SfxScriptLibraryContainer()
 {
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,
diff --git a/chart2/source/controller/main/ChartController.cxx 
b/chart2/source/controller/main/ChartController.cxx
index 2ba57aa45d33..1a59bb161ec3 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -377,7 +377,7 @@ void SAL_CALL ChartController::attachFrame(
     uno::Reference<ui::XSidebar> xSidebar = 
getSidebarFromModel(getChartModel());
     if (xSidebar.is())
     {
-        auto pSidebar = 
comphelper::getFromUnoTunnel<sfx2::sidebar::SidebarController>(xSidebar);
+        auto pSidebar = 
dynamic_cast<sfx2::sidebar::SidebarController*>(xSidebar.get());
         assert(pSidebar);
         pSidebar->registerSidebarForFrame(this);
         pSidebar->updateModel(getChartModel());
@@ -761,7 +761,7 @@ void SAL_CALL ChartController::dispose()
     if (getModel().is())
     {
         uno::Reference<ui::XSidebar> xSidebar = 
getSidebarFromModel(getChartModel());
-        if (sfx2::sidebar::SidebarController* pSidebar = 
comphelper::getFromUnoTunnel<sfx2::sidebar::SidebarController>(xSidebar))
+        if (sfx2::sidebar::SidebarController* pSidebar = 
dynamic_cast<sfx2::sidebar::SidebarController*>(xSidebar.get()))
         {
             pSidebar->unregisterSidebarForFrame(this);
         }
diff --git a/chart2/source/controller/sidebar/Chart2PanelFactory.cxx 
b/chart2/source/controller/sidebar/Chart2PanelFactory.cxx
index 4d0208fbc450..081322b09408 100644
--- a/chart2/source/controller/sidebar/Chart2PanelFactory.cxx
+++ b/chart2/source/controller/sidebar/Chart2PanelFactory.cxx
@@ -23,7 +23,6 @@
 #include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
 #include <cppuhelper/exc_hlp.hxx>
 #include <comphelper/namedvaluecollection.hxx>
-#include <comphelper/servicehelper.hxx>
 #include <cppuhelper/supportsservice.hxx>
 #include <vcl/weldutils.hxx>
 
@@ -62,7 +61,7 @@ Reference<css::ui::XUIElement> SAL_CALL 
ChartPanelFactory::createUIElement (
         Reference<css::frame::XController> xController 
(aArguments.getOrDefault("Controller", Reference<css::frame::XController>()));
 
         weld::Widget* pParent(nullptr);
-        if (weld::TransportAsXWindow* pTunnel = 
comphelper::getFromUnoTunnel<weld::TransportAsXWindow>(xParentWindow))
+        if (weld::TransportAsXWindow* pTunnel = 
dynamic_cast<weld::TransportAsXWindow*>(xParentWindow.get()))
             pParent = pTunnel->getWidget();
 
         if (!pParent)
diff --git a/chart2/source/controller/sidebar/ChartLinePanel.cxx 
b/chart2/source/controller/sidebar/ChartLinePanel.cxx
index bc905c9d9900..d9da9a2985ef 100644
--- a/chart2/source/controller/sidebar/ChartLinePanel.cxx
+++ b/chart2/source/controller/sidebar/ChartLinePanel.cxx
@@ -25,7 +25,6 @@
 #include <com/sun/star/chart2/XDiagram.hpp>
 
 #include <comphelper/lok.hxx>
-#include <comphelper/servicehelper.hxx>
 #include <sfx2/viewsh.hxx>
 #include <LibreOfficeKit/LibreOfficeKitEnums.h>
 
@@ -36,7 +35,7 @@ namespace {
 SvxLineStyleToolBoxControl* getLineStyleToolBoxControl(const 
ToolbarUnoDispatcher& rToolBoxColor)
 {
     css::uno::Reference<css::frame::XToolbarController> xController = 
rToolBoxColor.GetControllerForCommand(".uno:XLineStyle");
-    SvxLineStyleToolBoxControl* pToolBoxLineStyleControl = 
comphelper::getFromUnoTunnel<SvxLineStyleToolBoxControl>(xController);
+    SvxLineStyleToolBoxControl* pToolBoxLineStyleControl = 
dynamic_cast<SvxLineStyleToolBoxControl*>(xController.get());
     return pToolBoxLineStyleControl;
 }
 
diff --git a/embeddedobj/source/commonembedding/miscobj.cxx 
b/embeddedobj/source/commonembedding/miscobj.cxx
index a0cce3c6f34b..ecd149b8bb17 100644
--- a/embeddedobj/source/commonembedding/miscobj.cxx
+++ b/embeddedobj/source/commonembedding/miscobj.cxx
@@ -25,13 +25,11 @@
 #include <com/sun/star/embed/XInplaceClient.hpp>
 #include <com/sun/star/lang/DisposedException.hpp>
 #include <com/sun/star/lang/NoSupportException.hpp>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
 #include <com/sun/star/beans/NamedValue.hpp>
 
 #include <com/sun/star/ucb/SimpleFileAccess.hpp>
 #include <com/sun/star/io/TempFile.hpp>
 #include <comphelper/multicontainer2.hxx>
-#include <comphelper/servicehelper.hxx>
 #include <comphelper/storagehelper.hxx>
 
 #include <cppuhelper/queryinterface.hxx>
@@ -764,7 +762,6 @@ uno::Sequence<uno::Type> SAL_CALL 
OCommonEmbeddedObject::getTypes()
         cppu::UnoType<lang::XServiceInfo>::get(),
         cppu::UnoType<lang::XInitialization>::get(),
         cppu::UnoType<lang::XTypeProvider>::get(),
-        cppu::UnoType<lang::XUnoTunnel>::get(),
     };
     return aTypes;
 }
@@ -774,10 +771,6 @@ uno::Sequence<sal_Int8> SAL_CALL 
OCommonEmbeddedObject::getImplementationId()
     return uno::Sequence<sal_Int8>();
 }
 
-sal_Int64 OCommonEmbeddedObject::getSomething(css::uno::Sequence<sal_Int8> 
const & aIdentifier) {
-    return comphelper::getSomethingImpl(aIdentifier, 
static_cast<EmbeddedUpdate *>(this));
-}
-
 void SAL_CALL OCommonEmbeddedObject::initialize(const uno::Sequence<uno::Any>& 
rArguments)
 {
     if (!rArguments.hasElements())
diff --git a/embeddedobj/source/inc/commonembobj.hxx 
b/embeddedobj/source/inc/commonembobj.hxx
index 330dbe7ad829..8f0a685c22c3 100644
--- a/embeddedobj/source/inc/commonembobj.hxx
+++ b/embeddedobj/source/inc/commonembobj.hxx
@@ -35,12 +35,11 @@
 #include <com/sun/star/io/XTempFile.hpp>
 #include <com/sun/star/lang/XServiceInfo.hpp>
 #include <com/sun/star/lang/XInitialization.hpp>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
 #include <cppuhelper/weak.hxx>
+#include <embeddedobj/embeddedupdate.hxx>
 #include <rtl/ref.hxx>
 #include <map>
 #include <memory>
-#include <svtools/embeddedupdate.hxx>
 #include <svtools/filechangedchecker.hxx>
 
 namespace com::sun::star {
@@ -88,7 +87,6 @@ class OCommonEmbeddedObject : public 
css::embed::XEmbeddedObject
                             , public css::lang::XServiceInfo
                             , public css::lang::XInitialization
                             , public css::lang::XTypeProvider
-                            , public css::lang::XUnoTunnel
                             , public ::cppu::OWeakObject
 {
 protected:
@@ -436,9 +434,6 @@ public:
     // XTypeProvider
     css::uno::Sequence<css::uno::Type> SAL_CALL getTypes() override;
     css::uno::Sequence<sal_Int8> SAL_CALL getImplementationId() override;
-
-    // XUnoTunnel
-    sal_Int64 SAL_CALL getSomething(css::uno::Sequence<sal_Int8> const & 
aIdentifier) override;
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/propctrlr/browserline.cxx 
b/extensions/source/propctrlr/browserline.cxx
index c77d211314a0..53a58966e25d 100644
--- a/extensions/source/propctrlr/browserline.cxx
+++ b/extensions/source/propctrlr/browserline.cxx
@@ -26,7 +26,6 @@
 
 #include <comphelper/processfactory.hxx>
 #include <comphelper/propertyvalue.hxx>
-#include <comphelper/servicehelper.hxx>
 #include <comphelper/string.hxx>
 #include <tools/debug.hxx>
 #include <comphelper/diagnose_ex.hxx>
@@ -111,7 +110,7 @@ namespace pcr
     {
         m_xControl = rxControl;
         auto xWindow = m_xControl->getControlWindow();
-        if (weld::TransportAsXWindow* pTunnel = 
comphelper::getFromUnoTunnel<weld::TransportAsXWindow>(xWindow))
+        if (weld::TransportAsXWindow* pTunnel = 
dynamic_cast<weld::TransportAsXWindow*>(xWindow.get()))
             m_pControlWindow = pTunnel->getWidget();
         else
             m_pControlWindow = nullptr;
diff --git a/extensions/source/propctrlr/commoncontrol.hxx 
b/extensions/source/propctrlr/commoncontrol.hxx
index eb92980eaff2..746f2f56f600 100644
--- a/extensions/source/propctrlr/commoncontrol.hxx
+++ b/extensions/source/propctrlr/commoncontrol.hxx
@@ -107,13 +107,13 @@ namespace pcr
         @param TControlWindow
             a class which is derived from weld::Widget
     */
-    template < class TControlWindow, class... TControlInterface >
+    template < class TControlInterface, class TControlWindow >
     class CommonBehaviourControl    :public ::cppu::BaseMutex
-                                    ,public ::cppu::WeakComponentImplHelper< 
TControlInterface... >
+                                    ,public ::cppu::WeakComponentImplHelper< 
TControlInterface >
                                     ,public CommonBehaviourControlHelper
     {
     protected:
-        typedef ::cppu::WeakComponentImplHelper< TControlInterface... >    
ComponentBaseClass;
+        typedef ::cppu::WeakComponentImplHelper< TControlInterface >    
ComponentBaseClass;
 
         inline CommonBehaviourControl(sal_Int16 nControlType,
                                       std::unique_ptr<weld::Builder> xBuilder,
@@ -179,8 +179,8 @@ namespace pcr
     };
 
     //= CommonBehaviourControl - implementation
-    template< class TControlWindow, class... TControlInterface >
-    inline CommonBehaviourControl< TControlWindow, TControlInterface... 
>::CommonBehaviourControl(sal_Int16 nControlType,
+    template< class TControlInterface, class TControlWindow >
+    inline CommonBehaviourControl< TControlInterface, TControlWindow 
>::CommonBehaviourControl(sal_Int16 nControlType,
                                                                                
                std::unique_ptr<weld::Builder> xBuilder,
                                                                                
                std::unique_ptr<TControlWindow> xWidget,
                                                                                
                bool bReadOnly)
@@ -196,8 +196,8 @@ namespace pcr
         }
     }
 
-    template< class TControlWindow, class... TControlInterface >
-    inline void CommonBehaviourControl< TControlWindow, TControlInterface... 
>::impl_checkDisposed_throw()
+    template< class TControlInterface, class TControlWindow >
+    inline void CommonBehaviourControl< TControlInterface, TControlWindow 
>::impl_checkDisposed_throw()
     {
         if ( ComponentBaseClass::rBHelper.bDisposed )
             throw css::lang::DisposedException( OUString(), *this );
diff --git a/extensions/source/propctrlr/eformshelper.cxx 
b/extensions/source/propctrlr/eformshelper.cxx
index c53b8eacc909..40aceed5dfe7 100644
--- a/extensions/source/propctrlr/eformshelper.cxx
+++ b/extensions/source/propctrlr/eformshelper.cxx
@@ -32,7 +32,6 @@
 #include <com/sun/star/xsd/DataTypeClass.hpp>
 #include <com/sun/star/form/binding/XListEntrySink.hpp>
 #include <comphelper/diagnose_ex.hxx>
-#include <comphelper/servicehelper.hxx>
 
 #include <algorithm>
 #include <o3tl/functional.hxx>
@@ -244,7 +243,7 @@ namespace pcr
             ::comphelper::OInterfaceIteratorHelper3 
aListenerIterator(m_aPropertyListeners);
             while ( aListenerIterator.hasMoreElements() )
             {
-                PropertyEventTranslation* pTranslator = 
comphelper::getFromUnoTunnel< PropertyEventTranslation >( 
aListenerIterator.next() );
+                PropertyEventTranslation* pTranslator = dynamic_cast< 
PropertyEventTranslation* >( aListenerIterator.next().get() );
                 OSL_ENSURE( pTranslator, 
"EFormsHelper::impl_toggleBindingPropertyListening_throw: invalid listener 
element in my container!" );
                 if ( !pTranslator )
                     continue;
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx 
b/extensions/source/propctrlr/formcomponenthandler.cxx
index a4e76388a413..dd4f1302fc31 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -77,7 +77,6 @@
 #include <com/sun/star/text/WritingMode2.hpp>
 
 #include <comphelper/extract.hxx>
-#include <comphelper/servicehelper.hxx>
 #include <comphelper/types.hxx>
 #include <connectivity/dbconversion.hxx>
 #include <connectivity/dbexception.hxx>
@@ -1709,7 +1708,7 @@ namespace pcr
                 catch( const UnknownPropertyException& ) {}
                 if ( xControl.is() )
                 {
-                    OFormattedNumericControl* pControl = 
comphelper::getFromUnoTunnel< OFormattedNumericControl >( xControl );
+                    OFormattedNumericControl* pControl = dynamic_cast< 
OFormattedNumericControl* >( xControl.get() );
                     DBG_ASSERT( pControl, 
"FormComponentPropertyHandler::actuatingPropertyChanged: invalid control!" );
                     if (pControl)
                     {
@@ -1755,7 +1754,7 @@ namespace pcr
                     catch( const UnknownPropertyException& ) {}
                     if ( xControl.is() )
                     {
-                        OFormattedNumericControl* pControl = 
comphelper::getFromUnoTunnel< OFormattedNumericControl >( xControl );
+                        OFormattedNumericControl* pControl = dynamic_cast< 
OFormattedNumericControl* >( xControl.get() );
                         DBG_ASSERT( pControl, 
"FormComponentPropertyHandler::actuatingPropertyChanged: invalid control!" );
                         if ( pControl )
                             pControl->SetFormatDescription( aNewDesc );
diff --git a/extensions/source/propctrlr/handlerhelper.cxx 
b/extensions/source/propctrlr/handlerhelper.cxx
index dfa83ff0c6e8..77743c622ad7 100644
--- a/extensions/source/propctrlr/handlerhelper.cxx
+++ b/extensions/source/propctrlr/handlerhelper.cxx
@@ -30,7 +30,6 @@
 #include <com/sun/star/inspection/XStringListControl.hpp>
 #include <com/sun/star/inspection/XNumericControl.hpp>
 #include <comphelper/diagnose_ex.hxx>
-#include <comphelper/servicehelper.hxx>
 #include <vcl/svapp.hxx>
 #include <vcl/weld.hxx>
 #include <vcl/weldutils.hxx>
@@ -292,10 +291,8 @@ namespace pcr
     std::unique_ptr<weld::Builder> PropertyHandlerHelper::makeBuilder(const 
OUString& rUIFile, const Reference<XComponentContext>& rContext)
     {
         Reference<XWindow> xWindow(rContext->getValueByName("BuilderParent"), 
UNO_QUERY_THROW);
-        weld::TransportAsXWindow* pTunnel
-            = comphelper::getFromUnoTunnel<weld::TransportAsXWindow>(xWindow);
-        assert(pTunnel && "must exist");
-        return Application::CreateBuilder(pTunnel->getWidget(), rUIFile);
+        weld::TransportAsXWindow& rTunnel = 
dynamic_cast<weld::TransportAsXWindow&>(*xWindow);
+        return Application::CreateBuilder(rTunnel.getWidget(), rUIFile);
     }
 
     void PropertyHandlerHelper::setBuilderParent(const 
css::uno::Reference<css::uno::XComponentContext>& rContext, weld::Widget* 
pParent)
diff --git a/extensions/source/propctrlr/propcontroller.cxx 
b/extensions/source/propctrlr/propcontroller.cxx
index 92556e1c05ad..b0516fd90903 100644
--- a/extensions/source/propctrlr/propcontroller.cxx
+++ b/extensions/source/propctrlr/propcontroller.cxx
@@ -38,7 +38,6 @@
 #include <com/sun/star/util/VetoException.hpp>
 #include <tools/debug.hxx>
 #include <comphelper/diagnose_ex.hxx>
-#include <comphelper/servicehelper.hxx>
 #include <toolkit/helper/vclunohelper.hxx>
 #include <vcl/svapp.hxx>
 #include <vcl/weld.hxx>
@@ -339,7 +338,7 @@ namespace pcr
         OUString sUIFile("modules/spropctrlr/ui/formproperties.ui");
         std::unique_ptr<weld::Builder> xBuilder;
 
-        if (weld::TransportAsXWindow* pTunnel = 
comphelper::getFromUnoTunnel<weld::TransportAsXWindow>(xContainerWindow))
+        if (weld::TransportAsXWindow* pTunnel = 
dynamic_cast<weld::TransportAsXWindow*>(xContainerWindow.get()))
         {
             xBuilder = Application::CreateBuilder(pTunnel->getWidget(), 
sUIFile);
         }
@@ -1108,7 +1107,7 @@ namespace pcr
 
             // for ui-testing try and distinguish different instances of the 
controls
             auto xWindow = _rDescriptor.Control->getControlWindow();
-            if (weld::TransportAsXWindow* pTunnel = 
comphelper::getFromUnoTunnel<weld::TransportAsXWindow>(xWindow))
+            if (weld::TransportAsXWindow* pTunnel = 
dynamic_cast<weld::TransportAsXWindow*>(xWindow.get()))
             {
                 weld::Widget* m_pControlWindow = pTunnel->getWidget();
                 if (m_pControlWindow)
diff --git a/extensions/source/propctrlr/propeventtranslation.cxx 
b/extensions/source/propctrlr/propeventtranslation.cxx
index ce8e794f2211..736c1e06fca2 100644
--- a/extensions/source/propctrlr/propeventtranslation.cxx
+++ b/extensions/source/propctrlr/propeventtranslation.cxx
@@ -20,7 +20,6 @@
 #include "propeventtranslation.hxx"
 
 #include <com/sun/star/lang/DisposedException.hpp>
-#include <comphelper/servicehelper.hxx>
 
 
 namespace pcr
@@ -49,18 +48,6 @@ namespace pcr
     }
 
 
-    sal_Int64 PropertyEventTranslation::getSomething(
-        css::uno::Sequence<sal_Int8> const & aIdentifier)
-    {
-        return comphelper::getSomethingImpl(aIdentifier, this);
-    }
-
-    css::uno::Sequence<sal_Int8> const & 
PropertyEventTranslation::getUnoTunnelId() {
-        static comphelper::UnoIdInit const id;
-        return id.getSeq();
-    }
-
-
     void SAL_CALL PropertyEventTranslation::propertyChange( const 
PropertyChangeEvent& evt )
     {
         if ( !m_xDelegator.is() )
diff --git a/extensions/source/propctrlr/propeventtranslation.hxx 
b/extensions/source/propctrlr/propeventtranslation.hxx
index 92e143dfbbc2..43155b8c67f9 100644
--- a/extensions/source/propctrlr/propeventtranslation.hxx
+++ b/extensions/source/propctrlr/propeventtranslation.hxx
@@ -20,7 +20,6 @@
 #pragma once
 
 #include <com/sun/star/beans/XPropertyChangeListener.hpp>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
 #include <cppuhelper/implbase.hxx>
 
 
@@ -30,7 +29,7 @@ namespace pcr
 
     //= PropertyEventTranslation
 
-    typedef ::cppu::WeakImplHelper <   css::beans::XPropertyChangeListener, 
css::lang::XUnoTunnel
+    typedef ::cppu::WeakImplHelper <   css::beans::XPropertyChangeListener
                                     >   PropertyEventTranslation_Base;
 
     class PropertyEventTranslation : public PropertyEventTranslation_Base
@@ -53,9 +52,6 @@ namespace pcr
         const css::uno::Reference< css::beans::XPropertyChangeListener >&
             getDelegator() const { return m_xDelegator; }
 
-        sal_Int64 SAL_CALL getSomething(css::uno::Sequence<sal_Int8> const & 
aIdentifier) override;
-        static css::uno::Sequence<sal_Int8> const & getUnoTunnelId();
-
     protected:
         // XPropertyChangeListener
         virtual void SAL_CALL propertyChange( const 
css::beans::PropertyChangeEvent& evt ) override;
diff --git a/extensions/source/propctrlr/standardcontrol.hxx 
b/extensions/source/propctrlr/standardcontrol.hxx
index df8924be806e..fcd194886a1a 100644
--- a/extensions/source/propctrlr/standardcontrol.hxx
+++ b/extensions/source/propctrlr/standardcontrol.hxx
@@ -33,7 +33,7 @@
 namespace pcr
 {
     //= OTimeControl
-    typedef CommonBehaviourControl<weld::FormattedSpinButton, 
css::inspection::XPropertyControl> OTimeControl_Base;
+    typedef CommonBehaviourControl<css::inspection::XPropertyControl, 
weld::FormattedSpinButton> OTimeControl_Base;
     class OTimeControl : public OTimeControl_Base
     {
         std::unique_ptr<weld::TimeFormatter> m_xFormatter;
@@ -61,7 +61,7 @@ namespace pcr
     };
 
     //= ODateControl
-    typedef CommonBehaviourControl<weld::Container, 
css::inspection::XPropertyControl> ODateControl_Base;
+    typedef CommonBehaviourControl<css::inspection::XPropertyControl, 
weld::Container> ODateControl_Base;
     class ODateControl : public ODateControl_Base
     {
         std::unique_ptr<weld::Entry> m_xEntry;
@@ -97,7 +97,7 @@ namespace pcr
     };
 
     //= OEditControl
-    typedef CommonBehaviourControl<weld::Entry, 
css::inspection::XPropertyControl> OEditControl_Base;
+    typedef CommonBehaviourControl<css::inspection::XPropertyControl, 
weld::Entry> OEditControl_Base;
     class OEditControl final : public OEditControl_Base
     {
         bool m_bIsPassword : 1;
@@ -123,7 +123,7 @@ namespace pcr
     };
 
     //= ODateTimeControl
-    typedef CommonBehaviourControl<weld::Container, 
css::inspection::XPropertyControl> ODateTimeControl_Base;
+    typedef CommonBehaviourControl<css::inspection::XPropertyControl, 
weld::Container> ODateTimeControl_Base;
     class ODateTimeControl : public ODateTimeControl_Base
     {
     private:
@@ -162,7 +162,7 @@ namespace pcr
     };
 
     //= OHyperlinkControl
-    typedef CommonBehaviourControl<weld::Container, 
css::inspection::XHyperlinkControl> OHyperlinkControl_Base;
+    typedef CommonBehaviourControl<css::inspection::XHyperlinkControl, 
weld::Container> OHyperlinkControl_Base;
     class OHyperlinkControl final : public OHyperlinkControl_Base
     {
     private:
@@ -203,7 +203,7 @@ namespace pcr
     };
 
     //= ONumericControl
-    typedef CommonBehaviourControl<weld::MetricSpinButton, 
css::inspection::XNumericControl> ONumericControl_Base;
+    typedef CommonBehaviourControl<css::inspection::XNumericControl, 
weld::MetricSpinButton> ONumericControl_Base;
     class ONumericControl : public ONumericControl_Base
     {
     private:
@@ -255,7 +255,7 @@ namespace pcr
     };
 
     //= OColorControl
-    typedef CommonBehaviourControl<ColorListBox, 
css::inspection::XPropertyControl> OColorControl_Base;
+    typedef CommonBehaviourControl<css::inspection::XPropertyControl, 
ColorListBox> OColorControl_Base;
     class OColorControl : public OColorControl_Base
     {
     public:
@@ -281,7 +281,7 @@ namespace pcr
     };
 
     //= OListboxControl
-    typedef CommonBehaviourControl<weld::ComboBox, 
css::inspection::XStringListControl> OListboxControl_Base;
+    typedef CommonBehaviourControl<css::inspection::XStringListControl, 
weld::ComboBox> OListboxControl_Base;
     class OListboxControl : public OListboxControl_Base
     {
     public:
@@ -311,7 +311,7 @@ namespace pcr
     };
 
     //= OComboboxControl
-    typedef CommonBehaviourControl< weld::ComboBox, 
css::inspection::XStringListControl > OComboboxControl_Base;
+    typedef CommonBehaviourControl< css::inspection::XStringListControl, 
weld::ComboBox > OComboboxControl_Base;
     class OComboboxControl final : public OComboboxControl_Base
     {
     public:
@@ -351,7 +351,7 @@ namespace pcr
     };
 
     //= OMultilineEditControl
-    typedef CommonBehaviourControl<weld::Container, 
css::inspection::XPropertyControl> OMultilineEditControl_Base;
+    typedef CommonBehaviourControl<css::inspection::XPropertyControl, 
weld::Container> OMultilineEditControl_Base;
     class OMultilineEditControl : public OMultilineEditControl_Base
     {
     private:
diff --git a/extensions/source/propctrlr/usercontrol.cxx 
b/extensions/source/propctrlr/usercontrol.cxx
index 854abfa72037..8cccb48e84b5 100644
--- a/extensions/source/propctrlr/usercontrol.cxx
+++ b/extensions/source/propctrlr/usercontrol.cxx
@@ -20,7 +20,6 @@
 #include "usercontrol.hxx"
 
 #include <com/sun/star/inspection/PropertyControlType.hpp>
-#include <comphelper/servicehelper.hxx>
 #include <svl/numuno.hxx>
 #include <vcl/GraphicObject.hxx>
 #include <vcl/event.hxx>
@@ -200,17 +199,6 @@ namespace pcr
         return ::cppu::UnoType<double>::get();
     }
 
-    sal_Int64 OFormattedNumericControl::getSomething(
-        css::uno::Sequence<sal_Int8> const & aIdentifier)
-    {
-        return comphelper::getSomethingImpl(aIdentifier, this);
-    }
-
-    css::uno::Sequence<sal_Int8> const & 
OFormattedNumericControl::getUnoTunnelId() {
-        static comphelper::UnoIdInit const id;
-        return id.getSeq();
-    }
-
     void OFormattedNumericControl::SetFormatDescription(const 
FormatDescription& rDesc)
     {
         bool bFallback = true;
diff --git a/extensions/source/propctrlr/usercontrol.hxx 
b/extensions/source/propctrlr/usercontrol.hxx
index bb7a622d7669..86b53e7f122e 100644
--- a/extensions/source/propctrlr/usercontrol.hxx
+++ b/extensions/source/propctrlr/usercontrol.hxx
@@ -20,7 +20,6 @@
 #pragma once
 
 #include "commoncontrol.hxx"
-#include <com/sun/star/lang/XUnoTunnel.hpp>
 #include <svtools/inettbc.hxx>
 #include <svl/zforlist.hxx>
 
@@ -29,7 +28,7 @@ class SvNumberFormatsSupplierObj;
 namespace pcr
 {
     //= OFormatSampleControl
-    typedef CommonBehaviourControl<weld::Container, 
css::inspection::XPropertyControl> OFormatSampleControl_Base;
+    typedef CommonBehaviourControl<css::inspection::XPropertyControl, 
weld::Container> OFormatSampleControl_Base;
     class OFormatSampleControl : public OFormatSampleControl_Base
     {
     private:
@@ -85,7 +84,7 @@ namespace pcr
     };
 
     //= OFormattedNumericControl
-    typedef CommonBehaviourControl<weld::FormattedSpinButton, 
css::inspection::XPropertyControl, css::lang::XUnoTunnel> 
OFormattedNumericControl_Base;
+    typedef CommonBehaviourControl<css::inspection::XPropertyControl, 
weld::FormattedSpinButton> OFormattedNumericControl_Base;
     class OFormattedNumericControl : public OFormattedNumericControl_Base
     {
     public:
@@ -96,9 +95,6 @@ namespace pcr
         virtual void SAL_CALL setValue( const css::uno::Any& _value ) override;
         virtual css::uno::Type SAL_CALL getValueType() override;
 
-        sal_Int64 SAL_CALL getSomething(css::uno::Sequence<sal_Int8> const & 
aIdentifier) override;
-        static css::uno::Sequence<sal_Int8> const & getUnoTunnelId();
-
         void SetFormatDescription( const FormatDescription& rDesc );
 
         // make some FormattedField methods available
@@ -119,7 +115,7 @@ namespace pcr
     };
 
     //= OFileUrlControl
-    typedef CommonBehaviourControl<SvtURLBox, 
css::inspection::XPropertyControl> OFileUrlControl_Base;
+    typedef CommonBehaviourControl<css::inspection::XPropertyControl, 
SvtURLBox> OFileUrlControl_Base;
     class OFileUrlControl : public OFileUrlControl_Base
     {
     private:
diff --git a/forms/source/inc/InterfaceContainer.hxx 
b/forms/source/inc/InterfaceContainer.hxx
index b42229ddc16c..66135a02e48e 100644
--- a/forms/source/inc/InterfaceContainer.hxx
+++ b/forms/source/inc/InterfaceContainer.hxx
@@ -22,7 +22,6 @@
 #include <comphelper/uno3.hxx>
 #include <com/sun/star/container/XNameContainer.hpp>
 #include <com/sun/star/lang/EventObject.hpp>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
 #include <com/sun/star/container/XEnumerationAccess.hpp>
 #include <com/sun/star/io/XPersistObject.hpp>
 #include <com/sun/star/beans/XPropertyChangeListener.hpp>
@@ -38,7 +37,7 @@
 #include <comphelper/interfacecontainer3.hxx>
 #include <cppuhelper/component.hxx>
 #include <cppuhelper/implbase1.hxx>
-#include <cppuhelper/implbase9.hxx>
+#include <cppuhelper/implbase8.hxx>
 #include <unordered_map>
 
 namespace com::sun::star::uno { class XComponentContext; }
@@ -73,7 +72,7 @@ typedef std::unordered_multimap< OUString, 
css::uno::Reference<css::uno::XInterf
 // OInterfaceContainer
 // implements a container for form components
 
-typedef ::cppu::ImplHelper9 <   css::container::XNameContainer
+typedef ::cppu::ImplHelper8 <   css::container::XNameContainer
                             ,   css::container::XIndexContainer
                             ,   css::container::XContainer
                             ,   css::container::XEnumerationAccess
@@ -81,7 +80,6 @@ typedef ::cppu::ImplHelper9 <   css::container::XNameContainer
                             ,   css::beans::XPropertyChangeListener
                             ,   css::io::XPersistObject
                             ,   css::util::XCloneable
-                            ,   css::lang::XUnoTunnel
                             > OInterfaceContainer_BASE;
 
 class OInterfaceContainer : public OInterfaceContainer_BASE
@@ -175,9 +173,6 @@ public:
     virtual void SAL_CALL addScriptListener( const css::uno::Reference< 
css::script::XScriptListener >& xListener ) override;
     virtual void SAL_CALL removeScriptListener( const css::uno::Reference< 
css::script::XScriptListener >& Listener ) override;
 
-    sal_Int64 SAL_CALL getSomething(css::uno::Sequence<sal_Int8> const & 
aIdentifier) override;
-    static css::uno::Sequence<sal_Int8> const & getUnoTunnelId();
-
 protected:
     // helper
     virtual void SAL_CALL disposing();
diff --git a/forms/source/misc/InterfaceContainer.cxx 
b/forms/source/misc/InterfaceContainer.cxx
index e7d7b43672c2..f7278117899c 100644
--- a/forms/source/misc/InterfaceContainer.cxx
+++ b/forms/source/misc/InterfaceContainer.cxx
@@ -41,7 +41,6 @@
 #include <comphelper/eventattachermgr.hxx>
 #include <comphelper/property.hxx>
 #include <comphelper/sequence.hxx>
-#include <comphelper/servicehelper.hxx>
 #include <comphelper/types.hxx>
 #include <cppuhelper/exc_hlp.hxx>
 #include <o3tl/safeint.hxx>
@@ -835,7 +834,7 @@ void OInterfaceContainer::implInsert(sal_Int32 _nIndex, 
const Reference< XProper
     if ( bHandleVbaEvents )
     {
         Reference< XEventAttacherManager > xMgr ( 
pElementMetaData->xInterface, UNO_QUERY );
-        OInterfaceContainer* pIfcMgr = xMgr.is() ? 
comphelper::getFromUnoTunnel<OInterfaceContainer>(xMgr) : nullptr;
+        OInterfaceContainer* pIfcMgr = xMgr.is() ? 
dynamic_cast<OInterfaceContainer*>(xMgr.get()) : nullptr;
         if (pIfcMgr)
         {
             sal_Int32 nLen = pIfcMgr->getCount();
@@ -1237,16 +1236,6 @@ void SAL_CALL OInterfaceContainer::removeScriptListener( 
const Reference< XScrip
 }
 
 
-sal_Int64 OInterfaceContainer::getSomething(css::uno::Sequence<sal_Int8> const 
& aIdentifier) {
-    return comphelper::getSomethingImpl(aIdentifier, this);
-}
-
-css::uno::Sequence<sal_Int8> const & OInterfaceContainer::getUnoTunnelId() {
-    static comphelper::UnoIdInit const id;
-    return id.getSeq();
-}
-
-
 //= OFormComponents
 
 
diff --git a/framework/inc/uielement/addonstoolbarwrapper.hxx 
b/framework/inc/uielement/addonstoolbarwrapper.hxx
index 1d189662feee..68cfc0ff31d0 100644
--- a/framework/inc/uielement/addonstoolbarwrapper.hxx
+++ b/framework/inc/uielement/addonstoolbarwrapper.hxx
@@ -22,15 +22,12 @@
 #include <helper/uielementwrapperbase.hxx>
 
 #include <com/sun/star/lang/XComponent.hpp>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
 #include <com/sun/star/uno/XComponentContext.hpp>
-#include <cppuhelper/implbase.hxx>
 
 namespace framework
 {
 
-class AddonsToolBarWrapper final :
-    public cppu::ImplInheritanceHelper<UIElementWrapperBase, 
css::lang::XUnoTunnel>
+class AddonsToolBarWrapper final : public UIElementWrapperBase
 {
     public:
         AddonsToolBarWrapper( const css::uno::Reference< 
css::uno::XComponentContext >& xContext );
@@ -48,9 +45,6 @@ class AddonsToolBarWrapper final :
         // cf. ToolbarLayoutManager
         void populateImages();
 
-        sal_Int64 SAL_CALL getSomething(css::uno::Sequence<sal_Int8> const & 
aIdentifier) override;
-        static css::uno::Sequence<sal_Int8> const & getUnoTunnelId();
-
     private:
         css::uno::Reference< css::uno::XComponentContext >                     
   m_xContext;
         css::uno::Reference< css::lang::XComponent >                           
   m_xToolBarManager;
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx 
b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index 9ec6bdbfe52b..cf444b5ab31d 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -34,7 +34,6 @@
 #include <com/sun/star/ui/XUIFunctionListener.hpp>
 
 #include <comphelper/propertyvalue.hxx>
-#include <comphelper/servicehelper.hxx>
 #include <cppuhelper/queryinterface.hxx>
 #include <o3tl/string_view.hxx>
 #include <unotools/cmdoptions.hxx>

... etc. - the rest is truncated

Reply via email to