sd/source/ui/inc/unosrch.hxx    |    5 +----
 sd/source/ui/unoidl/unosrch.cxx |    8 +++-----
 sfx2/IwyuFilter_sfx2.yaml       |    3 ---
 sfx2/source/inc/asyncfunc.hxx   |   36 ------------------------------------
 4 files changed, 4 insertions(+), 48 deletions(-)

New commits:
commit ff496c663904d97567f1876b2d9b758131f71be8
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Fri Jan 20 13:31:20 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sun Jan 22 13:25:40 2023 +0000

    XUnoTunnel->dynamic_cast in SdUnoSearchReplaceDescriptor
    
    Change-Id: I26038e7d57f30b8cca661a5b4d56b8bb685eedd0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145967
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sd/source/ui/inc/unosrch.hxx b/sd/source/ui/inc/unosrch.hxx
index 965e80278e8d..104fd27474a1 100644
--- a/sd/source/ui/inc/unosrch.hxx
+++ b/sd/source/ui/inc/unosrch.hxx
@@ -22,7 +22,6 @@
 #include <memory>
 #include <com/sun/star/util/XReplaceable.hpp>
 #include <com/sun/star/util/XReplaceDescriptor.hpp>
-#include <com/sun/star/lang/XUnoTunnel.hpp>
 
 #include <comphelper/servicehelper.hxx>
 #include <cppuhelper/implbase.hxx>
@@ -71,7 +70,7 @@ public:
 /** this class holds the parameters and status of a search or replace 
operation performed
     by class SdUnoSearchReplaceShape */
 
-class SdUnoSearchReplaceDescriptor final : public ::cppu::WeakImplHelper< 
css::lang::XUnoTunnel, css::util::XReplaceDescriptor > // public 
css::util::XSearchDescriptor, css::beans::XPropertySet
+class SdUnoSearchReplaceDescriptor final : public ::cppu::WeakImplHelper< 
css::util::XReplaceDescriptor > // public css::util::XSearchDescriptor, 
css::beans::XPropertySet
 {
     std::unique_ptr<SvxItemPropertySet> mpPropSet;
 
@@ -90,8 +89,6 @@ public:
     bool IsCaseSensitive() const { return mbCaseSensitive; }
     bool IsWords() const { return mbWords; }
 
-    UNO3_GETIMPLEMENTATION_DECL( SdUnoSearchReplaceDescriptor )
-
     // XSearchDescriptor
     virtual OUString SAL_CALL getSearchString(  ) override;
     virtual void SAL_CALL setSearchString( const OUString& aString ) override;
diff --git a/sd/source/ui/unoidl/unosrch.cxx b/sd/source/ui/unoidl/unosrch.cxx
index 80b5a2beb27c..2fa57012349d 100644
--- a/sd/source/ui/unoidl/unosrch.cxx
+++ b/sd/source/ui/unoidl/unosrch.cxx
@@ -106,7 +106,7 @@ uno::Reference< util::XReplaceDescriptor > SAL_CALL 
SdUnoSearchReplaceShape::cre
 
 sal_Int32 SAL_CALL SdUnoSearchReplaceShape::replaceAll( const uno::Reference< 
util::XSearchDescriptor >& xDesc )
 {
-    SdUnoSearchReplaceDescriptor* pDescr = 
comphelper::getFromUnoTunnel<SdUnoSearchReplaceDescriptor>( xDesc );
+    SdUnoSearchReplaceDescriptor* pDescr = 
dynamic_cast<SdUnoSearchReplaceDescriptor*>( xDesc.get() );
     if( pDescr == nullptr )
         return 0;
 
@@ -186,7 +186,7 @@ uno::Reference< css::util::XSearchDescriptor > SAL_CALL 
SdUnoSearchReplaceShape:
 
 uno::Reference< css::container::XIndexAccess > SAL_CALL 
SdUnoSearchReplaceShape::findAll( const css::uno::Reference< 
css::util::XSearchDescriptor >& xDesc )
 {
-    SdUnoSearchReplaceDescriptor* pDescr = 
comphelper::getFromUnoTunnel<SdUnoSearchReplaceDescriptor>( xDesc );
+    SdUnoSearchReplaceDescriptor* pDescr = 
dynamic_cast<SdUnoSearchReplaceDescriptor*>( xDesc.get() );
     if( pDescr == nullptr )
         return uno::Reference< container::XIndexAccess > ();
 
@@ -298,7 +298,7 @@ uno::Reference< drawing::XShape >  
SdUnoSearchReplaceShape::GetCurrentShape() co
 
 uno::Reference< css::uno::XInterface > SAL_CALL 
SdUnoSearchReplaceShape::findNext( const css::uno::Reference< 
css::uno::XInterface >& xStartAt, const css::uno::Reference< 
css::util::XSearchDescriptor >& xDesc )
 {
-    SdUnoSearchReplaceDescriptor* pDescr = 
comphelper::getFromUnoTunnel<SdUnoSearchReplaceDescriptor>( xDesc );
+    SdUnoSearchReplaceDescriptor* pDescr = 
dynamic_cast<SdUnoSearchReplaceDescriptor*>( xDesc.get() );
 
     uno::Reference< uno::XInterface > xFound;
 
@@ -635,8 +635,6 @@ uno::Reference< drawing::XShape >  
SdUnoSearchReplaceShape::GetShape( const uno:
     operation performed by class SdUnoSearchReplaceShape
   */
 
-UNO3_GETIMPLEMENTATION_IMPL( SdUnoSearchReplaceDescriptor );
-
 SdUnoSearchReplaceDescriptor::SdUnoSearchReplaceDescriptor()
 {
     mpPropSet.reset( new SvxItemPropertySet(ImplGetSearchPropertyMap(), 
SdrObject::GetGlobalDrawObjectItemPool()) );
commit bddbc496942948f94f4c9665ac6eea4b1b28da61
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Fri Jan 20 13:28:42 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sun Jan 22 13:25:30 2023 +0000

    AsyncFunc header is dead
    
    since
        commit 688489959e69994d455f36f3e9bb4c0ba3ee87aa
        Author: Caolán McNamara <caol...@redhat.com>
        Date:   Tue Nov 2 14:25:24 2021 +0000
        Revert "tdf#117895: "Edit document properties before saving"..."
    
    Change-Id: I65239b4d9ca96075701121edc32d07c91631c629
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145966
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sfx2/IwyuFilter_sfx2.yaml b/sfx2/IwyuFilter_sfx2.yaml
index f432ce5a3896..9d653c2ae023 100644
--- a/sfx2/IwyuFilter_sfx2.yaml
+++ b/sfx2/IwyuFilter_sfx2.yaml
@@ -131,9 +131,6 @@ excludelist:
     sfx2/source/doc/signaturestate.cxx:
     # Actually used
     - com/sun/star/security/DocumentSignatureInformation.hpp
-    sfx2/source/inc/asyncfunc.hxx:
-    # base class has to be a complete type
-    - com/sun/star/lang/XUnoTunnel.hpp
     sfx2/source/sidebar/ControllerFactory.cxx:
     # Actually used
     - com/sun/star/frame/XFrame.hpp
diff --git a/sfx2/source/inc/asyncfunc.hxx b/sfx2/source/inc/asyncfunc.hxx
deleted file mode 100644
index 708750baaf3b..000000000000
--- a/sfx2/source/inc/asyncfunc.hxx
+++ /dev/null
@@ -1,36 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-#ifndef INCLUDED_SFX2_ASYNCFUNC_HXX
-#define INCLUDED_SFX2_ASYNCFUNC_HXX
-
-#include <functional>
-
-#include <com/sun/star/lang/XUnoTunnel.hpp>
-#include <comphelper/servicehelper.hxx>
-#include <cppuhelper/implbase.hxx>
-
-class AsyncFunc final : public cppu::WeakImplHelper<css::lang::XUnoTunnel>
-{
-private:
-    std::function<void()> m_pAsyncFunc;
-
-public:
-    AsyncFunc(const std::function<void()>&);
-    virtual ~AsyncFunc() override;
-
-    void Execute();
-
-    //XUnoTunnel
-    UNO3_GETIMPLEMENTATION_DECL(AsyncFunc)
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Reply via email to