sw/inc/unotextrange.hxx | 4 +--- sw/source/core/unocore/unocrsrhelper.cxx | 3 +-- sw/source/core/unocore/unoobj2.cxx | 15 --------------- 3 files changed, 2 insertions(+), 20 deletions(-)
New commits: commit 8d68c4e24ecf117f89d6af81cfbebc0cf6a6c039 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Wed Jan 18 15:34:40 2023 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Thu Jan 19 20:31:25 2023 +0000 XUnoTunnel->dynamic_cast in SwXTextRanges Change-Id: I12565dcdd1437c461762688ed3bf0e1adad828ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145827 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/inc/unotextrange.hxx b/sw/inc/unotextrange.hxx index 76e2621fd933..b64712b5ba5a 100644 --- a/sw/inc/unotextrange.hxx +++ b/sw/inc/unotextrange.hxx @@ -210,8 +210,7 @@ public: }; typedef ::cppu::WeakImplHelper -< css::lang::XUnoTunnel -, css::lang::XServiceInfo +< css::lang::XServiceInfo , css::container::XIndexAccess > SwXTextRanges_Base; @@ -219,7 +218,6 @@ struct SwXTextRanges : public SwXTextRanges_Base { virtual SwUnoCursor* GetCursor() =0; static rtl::Reference<SwXTextRanges> Create(SwPaM* const pCursor); - static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId(); }; #endif // INCLUDED_SW_INC_UNOTEXTRANGE_HXX diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index d41bf32e4ba9..df73ee184c04 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -177,8 +177,7 @@ void GetSelectableFromAny(uno::Reference<uno::XInterface> const& xIfc, return; } - SwXTextRanges* const pRanges( - comphelper::getFromUnoTunnel<SwXTextRanges>(xTunnel)); + SwXTextRanges* const pRanges = dynamic_cast<SwXTextRanges*>(xIfc.get()); if (pRanges) { SwUnoCursor const* pUnoCursor = pRanges->GetCursor(); diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index 87abdf72ffd1..75461d29f549 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -1550,9 +1550,6 @@ namespace { struct SwXTextRangesImpl final : public SwXTextRanges { - // XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& rIdentifier) override; - // XServiceInfo virtual OUString SAL_CALL getImplementationName() override { return "SwXTextRanges"; }; @@ -1614,18 +1611,6 @@ void SwXTextRangesImpl::MakeRanges() rtl::Reference<SwXTextRanges> SwXTextRanges::Create(SwPaM *const pPaM) { return new SwXTextRangesImpl(pPaM); } -const uno::Sequence< sal_Int8 > & SwXTextRanges::getUnoTunnelId() -{ - static const comphelper::UnoIdInit theSwXTextRangesUnoTunnelId; - return theSwXTextRangesUnoTunnelId.getSeq(); -} - -sal_Int64 SAL_CALL -SwXTextRangesImpl::getSomething(const uno::Sequence< sal_Int8 >& rId) -{ - return comphelper::getSomethingImpl<SwXTextRanges>(rId, this); -} - /* * Text positions * Up to the first access to a text position, only a SwCursor is stored.