xmloff/source/transform/OOo2Oasis.cxx | 12 ------------ xmloff/source/transform/OOo2Oasis.hxx | 4 ---- xmloff/source/transform/Oasis2OOo.cxx | 12 ------------ xmloff/source/transform/Oasis2OOo.hxx | 4 ---- xmloff/source/transform/Transformer.hxx | 4 +--- xmlsecurity/source/gpg/SecurityEnvironment.cxx | 17 ----------------- xmlsecurity/source/gpg/SecurityEnvironment.hxx | 9 +-------- xmlsecurity/source/gpg/xmlsignature_gpgimpl.cxx | 4 ++-- 8 files changed, 4 insertions(+), 62 deletions(-)
New commits: commit 79c7620c5e6f38959356ebf547c367bbc8a245ae Author: Noel Grandin <[email protected]> AuthorDate: Fri Jan 13 09:18:55 2023 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Sat Jan 14 17:25:02 2023 +0000 XUnoTunnel->dynamic_cast in SecurityEnvironmentGpg Change-Id: I8535b32de2c7cb71a5108211af0e896029ff5608 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145501 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/xmlsecurity/source/gpg/SecurityEnvironment.cxx b/xmlsecurity/source/gpg/SecurityEnvironment.cxx index 38d0563b161e..e6813228a457 100644 --- a/xmlsecurity/source/gpg/SecurityEnvironment.cxx +++ b/xmlsecurity/source/gpg/SecurityEnvironment.cxx @@ -90,23 +90,6 @@ SecurityEnvironmentGpg::~SecurityEnvironmentGpg() { } -/* XUnoTunnel */ -sal_Int64 SAL_CALL SecurityEnvironmentGpg::getSomething( const Sequence< sal_Int8 >& aIdentifier ) -{ - return comphelper::getSomethingImpl(aIdentifier, this); -} - -/* XUnoTunnel extension */ - -namespace -{ -} - -const Sequence< sal_Int8>& SecurityEnvironmentGpg::getUnoTunnelId() { - static const comphelper::UnoIdInit theSecurityEnvironmentUnoTunnelId; - return theSecurityEnvironmentUnoTunnelId.getSeq(); -} - OUString SecurityEnvironmentGpg::getSecurityEnvironmentInformation() { return OUString(); diff --git a/xmlsecurity/source/gpg/SecurityEnvironment.hxx b/xmlsecurity/source/gpg/SecurityEnvironment.hxx index 262578682274..0c530c671596 100644 --- a/xmlsecurity/source/gpg/SecurityEnvironment.hxx +++ b/xmlsecurity/source/gpg/SecurityEnvironment.hxx @@ -18,13 +18,11 @@ #include <com/sun/star/uno/Reference.hxx> #include <com/sun/star/xml/crypto/XSecurityEnvironment.hpp> -#include <com/sun/star/lang/XUnoTunnel.hpp> namespace com::sun::star::security { class XCertificate; } namespace GpgME { class Context; } -class SecurityEnvironmentGpg : public cppu::WeakImplHelper< css::xml::crypto::XSecurityEnvironment, - css::lang::XUnoTunnel > +class SecurityEnvironmentGpg : public cppu::WeakImplHelper< css::xml::crypto::XSecurityEnvironment > { std::unique_ptr<GpgME::Context> m_ctx; @@ -44,11 +42,6 @@ public: virtual OUString SAL_CALL getSecurityEnvironmentInformation() override; - //Methods from XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override; - - static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId() ; - virtual css::uno::Sequence< css::uno::Reference< css::security::XCertificate > > SAL_CALL getPersonalCertificates() override; /** We reinterpret the first parameter (originally issuerName) as keyId. We have no other way to identify a gpg key. */ diff --git a/xmlsecurity/source/gpg/xmlsignature_gpgimpl.cxx b/xmlsecurity/source/gpg/xmlsignature_gpgimpl.cxx index ee28084b1bcb..22488144f7c7 100644 --- a/xmlsecurity/source/gpg/xmlsignature_gpgimpl.cxx +++ b/xmlsecurity/source/gpg/xmlsignature_gpgimpl.cxx @@ -95,7 +95,7 @@ SAL_CALL XMLSignature_GpgImpl::generate( //Get Keys Manager SecurityEnvironmentGpg* pSecEnv = - comphelper::getFromUnoTunnel<SecurityEnvironmentGpg>(aEnvironment); + dynamic_cast<SecurityEnvironmentGpg*>(aEnvironment.get()); if( pSecEnv == nullptr ) throw RuntimeException() ; @@ -306,7 +306,7 @@ SAL_CALL XMLSignature_GpgImpl::validate( Reference< XSecurityEnvironment > aEnvironment = aSecurityCtx->getSecurityEnvironmentByIndex(i); SecurityEnvironmentGpg* pSecEnv = - comphelper::getFromUnoTunnel<SecurityEnvironmentGpg>(aEnvironment); + dynamic_cast<SecurityEnvironmentGpg*>(aEnvironment.get()); if( pSecEnv == nullptr ) throw RuntimeException() ; commit 79752f9a37a002871806a8ca85488b9eda0302af Author: Noel Grandin <[email protected]> AuthorDate: Fri Jan 13 09:22:33 2023 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Sat Jan 14 17:24:48 2023 +0000 XUnoTunnel->dynamic_cast in Transformer Change-Id: Ief186ab88bfe6f952e2e09351fdaa8e0e8a2b6be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145503 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/xmloff/source/transform/OOo2Oasis.cxx b/xmloff/source/transform/OOo2Oasis.cxx index 38ff3384a40b..a11baa98a8e9 100644 --- a/xmloff/source/transform/OOo2Oasis.cxx +++ b/xmloff/source/transform/OOo2Oasis.cxx @@ -1950,18 +1950,6 @@ void OOo2OasisTransformer::Initialize( } } -const css::uno::Sequence<sal_Int8>& OOo2OasisTransformer::getUnoTunnelId() noexcept -{ - static const comphelper::UnoIdInit theOOo2OasisTransformerUnoTunnelId; - return theOOo2OasisTransformerUnoTunnelId.getSeq(); -} - -// XUnoTunnel -sal_Int64 SAL_CALL OOo2OasisTransformer::getSomething( const Sequence< sal_Int8 >& rId ) -{ - return comphelper::getSomethingImpl(rId, this); -} - // XServiceInfo OUString SAL_CALL OOo2OasisTransformer::getImplementationName() { diff --git a/xmloff/source/transform/OOo2Oasis.hxx b/xmloff/source/transform/OOo2Oasis.hxx index 01c5d72b38c3..3d7fb89c524c 100644 --- a/xmloff/source/transform/OOo2Oasis.hxx +++ b/xmloff/source/transform/OOo2Oasis.hxx @@ -77,10 +77,6 @@ public: // XTypeProvider virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override; - // XUnoTunnel - static const css::uno::Sequence<sal_Int8>& getUnoTunnelId() noexcept; - virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override; - // XImporter virtual void SAL_CALL setTargetDocument( const css::uno::Reference< css::lang::XComponent >& xDoc ) override; diff --git a/xmloff/source/transform/Oasis2OOo.cxx b/xmloff/source/transform/Oasis2OOo.cxx index 7a74d2ab4f61..4f32bf894137 100644 --- a/xmloff/source/transform/Oasis2OOo.cxx +++ b/xmloff/source/transform/Oasis2OOo.cxx @@ -1943,18 +1943,6 @@ Oasis2OOoTransformer::~Oasis2OOoTransformer() noexcept XMLEventOASISTransformerContext::FlushEventMap( m_pFormEventMap ); } -const css::uno::Sequence<sal_Int8>& Oasis2OOoTransformer::getUnoTunnelId() noexcept -{ - static const class comphelper::UnoIdInit theOasis2OOoTransformerUnoTunnelId; - return theOasis2OOoTransformerUnoTunnelId.getSeq(); -} - -// XUnoTunnel -sal_Int64 SAL_CALL Oasis2OOoTransformer::getSomething( const Sequence< sal_Int8 >& rId ) -{ - return comphelper::getSomethingImpl(rId, this); -} - // XServiceInfo OUString SAL_CALL Oasis2OOoTransformer::getImplementationName() { diff --git a/xmloff/source/transform/Oasis2OOo.hxx b/xmloff/source/transform/Oasis2OOo.hxx index fe3db7ceafa8..fe41b427b6d6 100644 --- a/xmloff/source/transform/Oasis2OOo.hxx +++ b/xmloff/source/transform/Oasis2OOo.hxx @@ -48,10 +48,6 @@ public: virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override; virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override; - // XUnoTunnel - static const css::uno::Sequence<sal_Int8>& getUnoTunnelId() noexcept; - virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override; - virtual OUString GetEventName( const OUString& rName, bool bForm = false ) override; }; diff --git a/xmloff/source/transform/Transformer.hxx b/xmloff/source/transform/Transformer.hxx index 84647a5b49db..1c7569350c8f 100644 --- a/xmloff/source/transform/Transformer.hxx +++ b/xmloff/source/transform/Transformer.hxx @@ -20,7 +20,6 @@ #pragma once #include <com/sun/star/xml/sax/XExtendedDocumentHandler.hpp> -#include <com/sun/star/lang/XUnoTunnel.hpp> #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> #include <cppuhelper/implbase.hxx> @@ -28,8 +27,7 @@ class XMLTransformer : public ::cppu::WeakImplHelper< css::xml::sax::XExtendedDocumentHandler, css::lang::XServiceInfo, - css::lang::XInitialization, - css::lang::XUnoTunnel> + css::lang::XInitialization> { };
