[Libreoffice-commits] core.git: 2 commits - sw/source vcl/unx

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri Sep 27 10:14:20 UTC 2019


 sw/source/uibase/uno/SwXDocumentSettings.cxx |   20 ++++++++++----------
 vcl/unx/gtk3/gtk3gtkinst.cxx                 |    1 +
 2 files changed, 11 insertions(+), 10 deletions(-)

New commits:
commit fb6a7f553ecbfcd921bca65fff9d9536ab97c781
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Sep 27 09:04:55 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Sep 27 12:12:43 2019 +0200

    cid#1454001 silence Unchecked dynamic_cast
    
    Change-Id: Idc17c90d6cf0f843ab6b9bf2ace4199102aaf29a
    Reviewed-on: https://gerrit.libreoffice.org/79673
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 96107c011cb2..9ab4bae06a09 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -2741,6 +2741,7 @@ public:
         auto xEmbedWindow = VclPtr<ChildFrame>::Create(ImplGetDefaultWindow(), WB_SYSTEMCHILDWINDOW | WB_DIALOGCONTROL | WB_CHILDDLGCTRL);
         SalFrame* pFrame = xEmbedWindow->ImplGetFrame();
         GtkSalFrame* pGtkFrame = dynamic_cast<GtkSalFrame*>(pFrame);
+        assert(pGtkFrame);
 
         // relocate that toplevel GtkEventBox into this widget
         GtkWidget* pWindow = pGtkFrame->getWindow();
commit 87ee3dd90d789b22f3861da5682c5d3b56d464fb
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Sep 27 09:24:04 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Sep 27 12:12:02 2019 +0200

    cid#1448369 silence Unchecked dynamic_cast
    
    Change-Id: I578eac509805b2d363b09026899f2b2d60dc368e
    Reviewed-on: https://gerrit.libreoffice.org/79678
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/uibase/uno/SwXDocumentSettings.cxx b/sw/source/uibase/uno/SwXDocumentSettings.cxx
index 1d5cc277b1b5..d4bb9a0c69fe 100644
--- a/sw/source/uibase/uno/SwXDocumentSettings.cxx
+++ b/sw/source/uibase/uno/SwXDocumentSettings.cxx
@@ -275,16 +275,16 @@ SwXDocumentSettings::~SwXDocumentSettings()
 
 Any SAL_CALL SwXDocumentSettings::queryInterface( const Type& rType )
 {
-        return ::cppu::queryInterface ( rType,
-                                        // OWeakObject interfaces
-                                        dynamic_cast< XInterface* > ( dynamic_cast< OWeakObject*  >(this) ),
-                                        dynamic_cast< XWeak* > ( this ),
-                                        // my own interfaces
-                                        dynamic_cast< XPropertySet*  > ( this ),
-                                        dynamic_cast< XPropertyState* > ( this ),
-                                        dynamic_cast< XMultiPropertySet* > ( this ),
-                                        dynamic_cast< XServiceInfo* > ( this ),
-                                        dynamic_cast< XTypeProvider* > ( this ) );
+        return ::cppu::queryInterface(rType,
+                                      // OWeakObject interfaces
+                                      &dynamic_cast<XInterface&>(dynamic_cast<OWeakObject&>(*this)),
+                                      &dynamic_cast<XWeak&>(*this),
+                                      // my own interfaces
+                                      &dynamic_cast<XPropertySet&>(*this),
+                                      &dynamic_cast<XPropertyState&>(*this),
+                                      &dynamic_cast<XMultiPropertySet&>(*this),
+                                      &dynamic_cast<XServiceInfo&>(*this),
+                                      &dynamic_cast<XTypeProvider&>(*this));
 }
 void SwXDocumentSettings::acquire ()
     throw ()


More information about the Libreoffice-commits mailing list