sfx2/source/control/thumbnailviewacc.cxx |   20 +-------------------
 sfx2/source/control/thumbnailviewacc.hxx |    7 +------
 2 files changed, 2 insertions(+), 25 deletions(-)

New commits:
commit 74600e794903daf0e9be5ba20df1680c715f63c9
Author:     Noel Grandin <[email protected]>
AuthorDate: Tue Jan 17 09:40:54 2023 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Tue Jan 17 18:17:57 2023 +0000

    XUnoTunnel->dynamic_cast in ThumbnailViewItemAcc
    
    Change-Id: Iba0a4a002b261e7b75e20e25d676a6a846b73647
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145669
    Tested-by: Noel Grandin <[email protected]>
    Reviewed-by: Noel Grandin <[email protected]>

diff --git a/sfx2/source/control/thumbnailviewacc.cxx 
b/sfx2/source/control/thumbnailviewacc.cxx
index 70b898e9dacb..f157b155cddd 100644
--- a/sfx2/source/control/thumbnailviewacc.cxx
+++ b/sfx2/source/control/thumbnailviewacc.cxx
@@ -539,23 +539,10 @@ void ThumbnailViewAcc::FireAccessibleEvent( short 
nEventId, const uno::Any& rOld
     }
 }
 
-const uno::Sequence< sal_Int8 >& ThumbnailViewItemAcc::getUnoTunnelId()
-{
-    static const comphelper::UnoIdInit theValueItemAccUnoTunnelId;
-    return theValueItemAccUnoTunnelId.getSeq();
-}
-
 ThumbnailViewItemAcc* ThumbnailViewItemAcc::getImplementation( const 
uno::Reference< uno::XInterface >& rxData )
     noexcept
 {
-    try
-    {
-        return comphelper::getFromUnoTunnel<ThumbnailViewItemAcc>(rxData);
-    }
-    catch(const css::uno::Exception&)
-    {
-        return nullptr;
-    }
+    return dynamic_cast<ThumbnailViewItemAcc*>(rxData.get());
 }
 
 void ThumbnailViewAcc::GetFocus()
@@ -862,9 +849,4 @@ sal_Int32 SAL_CALL ThumbnailViewItemAcc::getBackground(  )
     return 
static_cast<sal_Int32>(Application::GetSettings().GetStyleSettings().GetWindowColor());
 }
 
-sal_Int64 SAL_CALL ThumbnailViewItemAcc::getSomething( const uno::Sequence< 
sal_Int8 >& rId )
-{
-    return comphelper::getSomethingImpl(rId, this);
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/control/thumbnailviewacc.hxx 
b/sfx2/source/control/thumbnailviewacc.hxx
index 9a6abfb6bd09..1fcf9d3ac9a6 100644
--- a/sfx2/source/control/thumbnailviewacc.hxx
+++ b/sfx2/source/control/thumbnailviewacc.hxx
@@ -147,8 +147,7 @@ private:
 class ThumbnailViewItemAcc : public ::cppu::WeakImplHelper< 
css::accessibility::XAccessible,
                                                      
css::accessibility::XAccessibleEventBroadcaster,
                                                      
css::accessibility::XAccessibleContext,
-                                                     
css::accessibility::XAccessibleComponent,
-                                                     css::lang::XUnoTunnel >
+                                                     
css::accessibility::XAccessibleComponent>
 {
 private:
 
@@ -198,10 +197,6 @@ public:
     virtual void SAL_CALL grabFocus(  ) override;
     virtual sal_Int32 SAL_CALL getForeground(  ) override;
     virtual sal_Int32 SAL_CALL getBackground(  ) override;
-
-    // XUnoTunnel
-    static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId();
-    virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< 
sal_Int8 >& rId ) override;
 };
 
 #endif // INCLUDED_SFX2_SOURCE_CONTROL_THUMBNAILVIEWACC_HXX

Reply via email to