sw/source/core/inc/unolinebreak.hxx | 8 +------- sw/source/core/inc/unometa.hxx | 8 -------- sw/source/core/unocore/unolinebreak.cxx | 11 ----------- sw/source/core/unocore/unorefmk.cxx | 13 ------------- sw/source/core/unocore/unotext.cxx | 3 +-- 5 files changed, 2 insertions(+), 41 deletions(-)
New commits: commit f14640a60344452d31edfe246aaad73f91116e57 Author: Noel Grandin <[email protected]> AuthorDate: Fri Jan 20 10:26:14 2023 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Fri Jan 20 16:34:39 2023 +0000 XUnoTunnel->dynamic_cast in SwXMeta Change-Id: I0111fb210b65d102304708729af4cf543c2eb2ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145883 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/sw/source/core/inc/unometa.hxx b/sw/source/core/inc/unometa.hxx index d662c1adba36..e0ebf444ccdb 100644 --- a/sw/source/core/inc/unometa.hxx +++ b/sw/source/core/inc/unometa.hxx @@ -24,7 +24,6 @@ #include <deque> #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/XChild.hpp> #include <com/sun/star/container/XEnumerationAccess.hpp> @@ -50,7 +49,6 @@ namespace sw { typedef ::cppu::ImplInheritanceHelper < ::sfx2::MetadatableMixin -, css::lang::XUnoTunnel , css::lang::XServiceInfo , css::container::XChild , css::container::XEnumerationAccess @@ -112,12 +110,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 >& Identifier ) override; - // XServiceInfo virtual OUString SAL_CALL getImplementationName() override; virtual sal_Bool SAL_CALL supportsService( diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx index d2af2e8eaf3f..f01d1f90e6aa 100644 --- a/sw/source/core/unocore/unorefmk.cxx +++ b/sw/source/core/unocore/unorefmk.cxx @@ -830,19 +830,6 @@ bool SwXMeta::CheckForOwnMemberMeta(const SwPaM & rPam, const bool bAbsorb) return bForceExpandHints; } -const uno::Sequence< sal_Int8 > & SwXMeta::getUnoTunnelId() -{ - static const comphelper::UnoIdInit theSwXMetaUnoTunnelId; - return theSwXMetaUnoTunnelId.getSeq(); -} - -// XUnoTunnel -sal_Int64 SAL_CALL -SwXMeta::getSomething( const uno::Sequence< sal_Int8 > & i_rId ) -{ - return comphelper::getSomethingImpl<SwXMeta>(i_rId, this); -} - // XServiceInfo OUString SAL_CALL SwXMeta::getImplementationName() diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index d6c75f01efea..f7e9451efba8 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -576,8 +576,7 @@ SwXText::insertTextContent( dynamic_cast<SwXBookmark*>(xContent.get()); SwXReferenceMark *const pReferenceMark = comphelper::getFromUnoTunnel<SwXReferenceMark>(xContentTunnel); - SwXMeta *const pMeta = - comphelper::getFromUnoTunnel<SwXMeta>(xContentTunnel); + SwXMeta *const pMeta = dynamic_cast<SwXMeta*>(xContent.get()); auto* pContentControl = dynamic_cast<SwXContentControl*>(xContent.get()); SwXTextField* pTextField = dynamic_cast<SwXTextField*>(xContent.get()); if (pTextField && pTextField->GetServiceId() != SwServiceType::FieldTypeAnnotation) commit 00e38f77443253f574be66bfa696400353995155 Author: Noel Grandin <[email protected]> AuthorDate: Fri Jan 20 10:24:51 2023 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Fri Jan 20 16:34:28 2023 +0000 XUnoTunnel->dynamic_cast in SwXLineBreak Change-Id: Ic9d3683d33436658ff2360ca259c1e26d522122c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145882 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/sw/source/core/inc/unolinebreak.hxx b/sw/source/core/inc/unolinebreak.hxx index b1a26e604ad0..700f35e3fff3 100644 --- a/sw/source/core/inc/unolinebreak.hxx +++ b/sw/source/core/inc/unolinebreak.hxx @@ -23,7 +23,6 @@ #include <cppuhelper/implbase.hxx> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> -#include <com/sun/star/lang/XUnoTunnel.hpp> #include <com/sun/star/text/XTextContent.hpp> #include <unobaseclass.hxx> @@ -34,7 +33,7 @@ class SwFormatLineBreak; /// UNO API wrapper around an SwFormatLineBreak, exposed as the com.sun.star.text.LineBreak service. class SwXLineBreak final : public cppu::WeakImplHelper<css::beans::XPropertySet, css::lang::XServiceInfo, - css::text::XTextContent, css::lang::XUnoTunnel> + css::text::XTextContent> { class Impl; ::sw::UnoImplPtr<Impl> m_pImpl; @@ -80,11 +79,6 @@ public: addEventListener(const css::uno::Reference<css::lang::XEventListener>& xListener) override; void SAL_CALL removeEventListener(const css::uno::Reference<css::lang::XEventListener>& xListener) override; - - // XUnoTunnel - sal_Int64 SAL_CALL getSomething(const css::uno::Sequence<sal_Int8>& rIdentifier) override; - - static const css::uno::Sequence<sal_Int8>& getUnoTunnelId(); }; #endif // INCLUDED_SW_SOURCE_CORE_INC_UNOLINEBREAK_HXX diff --git a/sw/source/core/unocore/unolinebreak.cxx b/sw/source/core/unocore/unolinebreak.cxx index 0079a992ec97..156af6f7ca88 100644 --- a/sw/source/core/unocore/unolinebreak.cxx +++ b/sw/source/core/unocore/unolinebreak.cxx @@ -283,15 +283,4 @@ void SAL_CALL SwXLineBreak::removeVetoableChangeListener( SAL_WARN("sw.uno", "SwXLineBreak::removeVetoableChangeListener: not implemented"); } -sal_Int64 SAL_CALL SwXLineBreak::getSomething(const css::uno::Sequence<sal_Int8>& rIdentifier) -{ - return comphelper::getSomethingImpl<SwXLineBreak>(rIdentifier, this); -} - -const uno::Sequence<sal_Int8>& SwXLineBreak::getUnoTunnelId() -{ - static const comphelper::UnoIdInit theSwXLineBreakUnoTunnelId; - return theSwXLineBreakUnoTunnelId.getSeq(); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
