sw/source/uibase/shells/textsh1.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
New commits: commit 73b322a581b98a74c9d1868aca6d8ae05696697c Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sat Jul 20 15:51:02 2019 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Sat Jul 20 21:13:49 2019 +0200 cid#1448363 Unchecked dynamic_cast sw Change-Id: Id01e96db2df7fb5425b8ab86e66a9fd7577a107d Reviewed-on: https://gerrit.libreoffice.org/76022 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index b5acb1ee9ce2..9a92fc9f438b 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -1377,15 +1377,15 @@ void SwTextShell::Execute(SfxRequest &rReq) else if ( pFieldBM && pFieldBM->GetFieldname() == ODF_FORMDATE ) { SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - sw::mark::DateFieldmark* pDateField = dynamic_cast<sw::mark::DateFieldmark*>(pFieldBM); - ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateDateFormFieldDialog(rWrtSh.GetView().GetFrameWeld(), pDateField, GetView().GetDocShell()->GetDoc())); + sw::mark::DateFieldmark& rDateField = dynamic_cast<sw::mark::DateFieldmark&>(*pFieldBM); + ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateDateFormFieldDialog(rWrtSh.GetView().GetFrameWeld(), &rDateField, GetView().GetDocShell()->GetDoc())); if (pDlg->Execute() == RET_OK) { - pFieldBM->Invalidate(); + rDateField.Invalidate(); 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::DateFieldmark*>(pFieldBM)->HideButton(); + rDateField.HideButton(); } } else _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits