[Libreoffice-commits] core.git: extensions/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Thu Sep 30 13:55:12 UTC 2021


 extensions/source/ole/unoobjw.cxx     |    4 ++--
 extensions/source/scanner/scanwin.cxx |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit a247d574fa32770b19875e8ca967a32a32ef0f36
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Sep 30 12:43:39 2021 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Sep 30 15:54:35 2021 +0200

    Extended loplugin:referencecasting/redundantcast (clang-cl): extensions
    
    Change-Id: Ifd431845dc9bb53b87be400a3f5635c8fdc4b2fa
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122885
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/extensions/source/ole/unoobjw.cxx b/extensions/source/ole/unoobjw.cxx
index a6cd0677d6ae..21debd9f54cc 100644
--- a/extensions/source/ole/unoobjw.cxx
+++ b/extensions/source/ole/unoobjw.cxx
@@ -1502,7 +1502,7 @@ Any SAL_CALL InterfaceOleWrapper::createBridge(const Any& modelDepObject,
                 if( pVar)
                 {
                     pVar->vt= VT_DISPATCH;
-                    pVar->pdispVal= static_cast<IDispatch*>( this);
+                    pVar->pdispVal= this;
                     AddRef();
 
                     retAny<<= reinterpret_cast< sal_uIntPtr >( pVar);
@@ -2763,7 +2763,7 @@ HRESULT InterfaceOleWrapper::InvokeGeneral( DISPID dispidMember, unsigned short
             if( m_defaultValueType == VT_DISPATCH)
             {
                 pvarResult->vt= VT_DISPATCH;
-                pvarResult->pdispVal= static_cast<IDispatch*>( this);
+                pvarResult->pdispVal= this;
                 AddRef();
                 ret= S_OK;
             }
diff --git a/extensions/source/scanner/scanwin.cxx b/extensions/source/scanner/scanwin.cxx
index bfe4c3c37006..109f2944a3b5 100644
--- a/extensions/source/scanner/scanwin.cxx
+++ b/extensions/source/scanner/scanwin.cxx
@@ -342,7 +342,7 @@ bool Twain::InitializeNewShim(ScannerManager& rMgr, const VclPtr<vcl::Window>& x
         return false; // Have a shim for another task already!
 
     // hold reference to ScannerManager, to prevent premature death
-    mxMgr.set(static_cast<OWeakObject*>(mpCurMgr = &rMgr), css::uno::UNO_QUERY);
+    mxMgr = mpCurMgr = &rMgr;
 
     mpThread.set(new ShimListenerThread(xTopWindow));
     mpThread->launch();


More information about the Libreoffice-commits mailing list