diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-04-13 14:20:23 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-04-13 18:02:14 +0200 |
commit | 9030ffb1a1b282eb2c6d1773930b0de0d42df447 (patch) | |
tree | 2e20975aeb4c6f12a79ca236b2f336f3ba8d511f /sc | |
parent | d7e6c898f5ec8fbd142f9d3e1c46dfcf90edfc27 (diff) |
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 <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/view/tabvwsh4.cxx | 20 |
1 files changed, 13 insertions, 7 deletions
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); } } |