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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri Jul 19 07:39:06 UTC 2019


 sw/source/core/doc/docbm.cxx        |    6 +++---
 sw/source/uibase/shells/textsh1.cxx |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 6d86d5ff4a3a90462980eb5b2d392af7ee78bfc4
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Jul 18 12:33:58 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Jul 19 09:38:40 2019 +0200

    cid#1451638 Unchecked dynamic_cast
    
    Change-Id: Ia0fc1ffdd5dbed4b7c32587741d59dcf2782ed61
    Reviewed-on: https://gerrit.libreoffice.org/75920
    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/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index 883be228142e..ecd9b2774937 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -1348,9 +1348,9 @@ namespace sw { namespace mark
         {
             if (m_pLastActiveFieldmark != pFieldBM)
             {
-                auto pFormField = dynamic_cast<FieldmarkWithDropDownButton*>(pFieldBM);
-                pFormField->ShowButton(&rEditWin);
-                pNewActiveFieldmark = pFormField;
+                FieldmarkWithDropDownButton& rFormField = dynamic_cast<FieldmarkWithDropDownButton&>(*pFieldBM);
+                rFormField.ShowButton(&rEditWin);
+                pNewActiveFieldmark = &rFormField;
             }
             else
             {
commit 0628e615f0c2471d58f3e61ca868eaff6f95711f
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Jul 18 12:26:15 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Jul 19 09:38:25 2019 +0200

    cid#1448363 Unchecked dynamic_cast
    
    Change-Id: Ibfa31b291f58c90f052f1d052b6294e8c544965c
    Reviewed-on: https://gerrit.libreoffice.org/75918
    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/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index 3cc3be15ed9e..b5acb1ee9ce2 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -1371,7 +1371,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
                 rWrtSh.InvalidateWindows( rWrtSh.GetView().GetVisArea() );
                 rWrtSh.UpdateCursor(); // cursor position might be invalid
                 // Hide the button here and make it visible later, to make transparent background work with SAL_USE_VCLPLUGIN=gen
-                dynamic_cast<::sw::mark::DropDownFieldmark*>(pFieldBM)->HideButton();
+                dynamic_cast<::sw::mark::DropDownFieldmark&>(*pFieldBM).HideButton();
             }
         }
         else if ( pFieldBM && pFieldBM->GetFieldname() == ODF_FORMDATE )


More information about the Libreoffice-commits mailing list