sw/source/core/inc/unoidx.hxx | 17 +---------------- sw/source/core/unocore/unoidx.cxx | 24 ------------------------ sw/source/core/unocore/unotext.cxx | 2 +- 3 files changed, 2 insertions(+), 41 deletions(-)
New commits: commit 349844128c876041311d30ba0e7740e73fc89261 Author: Noel Grandin <[email protected]> AuthorDate: Fri Jan 20 10:23:46 2023 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Fri Jan 20 13:30:18 2023 +0000 XUnoTunnel->dynamic_cast in SwXDocumentIndex Change-Id: Ie1196623d345e20eaaaadf8bb8b4a4db72bf77e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145881 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/sw/source/core/inc/unoidx.hxx b/sw/source/core/inc/unoidx.hxx index b87dff47a919..30eca1011a1d 100644 --- a/sw/source/core/inc/unoidx.hxx +++ b/sw/source/core/inc/unoidx.hxx @@ -20,7 +20,6 @@ #define INCLUDED_SW_SOURCE_CORE_INC_UNOIDX_HXX #include <com/sun/star/lang/XServiceInfo.hpp> -#include <com/sun/star/lang/XUnoTunnel.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/container/XNamed.hpp> #include <com/sun/star/util/XRefreshable.hpp> @@ -41,7 +40,6 @@ class SwTOXType; typedef ::cppu::ImplInheritanceHelper < ::sfx2::MetadatableMixin -, css::lang::XUnoTunnel , css::lang::XServiceInfo , css::beans::XPropertySet , css::container::XNamed @@ -79,12 +77,6 @@ public: virtual css::uno::Reference< css::frame::XModel > GetModel() override; - static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId(); - - // XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( - const css::uno::Sequence< sal_Int8 >& rIdentifier) override; - // XServiceInfo virtual OUString SAL_CALL getImplementationName() override; virtual sal_Bool SAL_CALL supportsService( diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index 46218e70efdd..dd123d618267 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -424,18 +424,6 @@ SwXDocumentIndex::CreateXDocumentIndex( return xIndex; } -const uno::Sequence< sal_Int8 > & SwXDocumentIndex::getUnoTunnelId() -{ - static const comphelper::UnoIdInit theSwXDocumentIndexUnoTunnelId; - return theSwXDocumentIndexUnoTunnelId.getSeq(); -} - -sal_Int64 SAL_CALL -SwXDocumentIndex::getSomething(const uno::Sequence< sal_Int8 >& rId) -{ - return comphelper::getSomethingImpl<SwXDocumentIndex>(rId, this); -} - OUString SAL_CALL SwXDocumentIndex::getImplementationName() { commit 730ce18b6a25172a0a7a120b0aa3fd3e4f41319b Author: Noel Grandin <[email protected]> AuthorDate: Fri Jan 20 10:22:57 2023 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Fri Jan 20 13:30:10 2023 +0000 XUnoTunnel->dynamic_cast in SwXDocumentIndexMark Change-Id: I8453d08e0fc77019481b08fd508aa97790a06d8f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145880 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/sw/source/core/inc/unoidx.hxx b/sw/source/core/inc/unoidx.hxx index 8b1b67fc6771..b87dff47a919 100644 --- a/sw/source/core/inc/unoidx.hxx +++ b/sw/source/core/inc/unoidx.hxx @@ -143,8 +143,7 @@ public: }; typedef ::cppu::WeakImplHelper -< css::lang::XUnoTunnel -, css::lang::XServiceInfo +< css::lang::XServiceInfo , css::beans::XPropertySet , css::text::XDocumentIndexMark > SwXDocumentIndexMark_Base; @@ -172,12 +171,6 @@ public: CreateXDocumentIndexMark(SwDoc & rDoc, SwTOXMark * pMark, TOXTypes eType = TOX_INDEX); - static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId(); - - // XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( - const css::uno::Sequence< sal_Int8 >& rIdentifier) override; - // XServiceInfo virtual OUString SAL_CALL getImplementationName() override; virtual sal_Bool SAL_CALL supportsService( diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index 736f25200022..46218e70efdd 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -1639,18 +1639,6 @@ namespace { } -const uno::Sequence< sal_Int8 > & SwXDocumentIndexMark::getUnoTunnelId() -{ - static const comphelper::UnoIdInit theSwXDocumentIndexMarkUnoTunnelId; - return theSwXDocumentIndexMarkUnoTunnelId.getSeq(); -} - -sal_Int64 SAL_CALL -SwXDocumentIndexMark::getSomething(const uno::Sequence< sal_Int8 >& rId) -{ - return comphelper::getSomethingImpl<SwXDocumentIndexMark>(rId, this); -} - OUString SAL_CALL SwXDocumentIndexMark::getImplementationName() { diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 85b7caa92395..2e8587b80e38 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -569,7 +569,7 @@ SwXText::insertTextContent( const uno::Reference<lang::XUnoTunnel> xContentTunnel(xContent, uno::UNO_QUERY); SwXDocumentIndexMark *const pDocumentIndexMark = - comphelper::getFromUnoTunnel<SwXDocumentIndexMark>(xContentTunnel); + dynamic_cast<SwXDocumentIndexMark*>(xContent.get()); SwXTextSection *const pSection = comphelper::getFromUnoTunnel<SwXTextSection>(xContentTunnel); SwXBookmark *const pBookmark =
