sc/source/ui/view/tabvwsh4.cxx | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-)
New commits: commit 9030ffb1a1b282eb2c6d1773930b0de0d42df447 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sat Apr 13 14:20:23 2019 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Sat Apr 13 18:02:14 2019 +0200 Resolves: tdf#124693 Crash modifying chart data range with mouse selection Change-Id: I95c621615c197687552147b8328c769fdd47befa Reviewed-on: https://gerrit.libreoffice.org/70711 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx index e9d46a3a76ae..18bf7326a1b4 100644 --- a/sc/source/ui/view/tabvwsh4.cxx +++ b/sc/source/ui/view/tabvwsh4.cxx @@ -206,9 +206,9 @@ void ScTabViewShell::Activate(bool bMDI) if (pRefDlg) pRefDlg->ViewShellChanged(); } - if (pChildWnd->GetController()) + if (auto pController = pChildWnd->GetController()) { - IAnyRefDialog* pRefDlg = dynamic_cast<IAnyRefDialog*>(pChildWnd->GetController().get()); + IAnyRefDialog* pRefDlg = dynamic_cast<IAnyRefDialog*>(pController.get()); if (pRefDlg) pRefDlg->ViewShellChanged(); } @@ -1153,8 +1153,10 @@ void ScTabViewShell::StartSimpleRefDialog( pWnd->SetRefString( rInitVal ); pWnd->SetFlags( bCloseOnButtonUp, bSingleCell, bMultiSelection ); ScSimpleRefDlgWrapper::SetAutoReOpen( false ); - vcl::Window* pWin = pWnd->GetWindow(); - pWin->SetText( rTitle ); + if (vcl::Window* pWin = pWnd->GetWindow()) + pWin->SetText( rTitle ); + if (auto pWin = pWnd->GetController()) + pWin->set_title(rTitle); pWnd->StartRefInput(); } } @@ -1167,9 +1169,13 @@ void ScTabViewShell::StopSimpleRefDialog() ScSimpleRefDlgWrapper* pWnd = static_cast<ScSimpleRefDlgWrapper*>(pViewFrm->GetChildWindow( nId )); if (pWnd) { - vcl::Window* pWin = pWnd->GetWindow(); - if (pWin && pWin->IsSystemWindow()) - static_cast<SystemWindow*>(pWin)->Close(); // calls abort handler + if (vcl::Window* pWin = pWnd->GetWindow()) + { + if (pWin->IsSystemWindow()) + static_cast<SystemWindow*>(pWin)->Close(); // calls abort handler + } + if (auto pWin = pWnd->GetController()) + pWin->response(RET_CLOSE); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits