sc/source/ui/inc/tabvwsh.hxx | 6 +++--- sc/source/ui/view/reffact.cxx | 2 +- sc/source/ui/view/tabvwshc.cxx | 11 +++++------ 3 files changed, 9 insertions(+), 10 deletions(-)
New commits: commit 11b8a74d78e018c67217c05d83bd4947869e535a Author: Katarina Behrens <katarina.behr...@cib.de> Date: Fri Aug 21 11:53:57 2015 +0200 tdf#93437: Calc RefDialogs were never actually destructed as ScTabViewShell::CreateRefDialog was still holding VclPtr reference to them and never released it -- regression from commit 087f7fe50b03307e2d9202365886e8c37bd7e6e3 which is hereby reverted. Now it is *DlgWrapper holding the reference (via SfxChildWindow::pWindow) and dialogs get properly destructed when SfxChildWindow dies in SfxViewFrame::SetChildWindow(0, false) Re tdf#91125, it turns out that the follow-up commit 06ecf7d2aebe64226142ee27c2512351960f8bb1 is actually enough to prevent the crash. Change-Id: I895825da59aabc7c0de530ecb528b9bf5acde562 Reviewed-on: https://gerrit.libreoffice.org/17899 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx index df4ba48..9820553 100644 --- a/sc/source/ui/inc/tabvwsh.hxx +++ b/sc/source/ui/inc/tabvwsh.hxx @@ -341,9 +341,9 @@ public: void DeactivateOle(); SC_DLLPUBLIC static ScTabViewShell* GetActiveViewShell(); - VclPtr<SfxModelessDialog> CreateRefDialog( SfxBindings* pB, SfxChildWindow* pCW, - SfxChildWinInfo* pInfo, - vcl::Window* pParent, sal_uInt16 nSlotId ); + SfxModelessDialog* CreateRefDialog( SfxBindings* pB, SfxChildWindow* pCW, + SfxChildWinInfo* pInfo, + vcl::Window* pParent, sal_uInt16 nSlotId ); void UpdateOleZoom(); diff --git a/sc/source/ui/view/reffact.cxx b/sc/source/ui/view/reffact.cxx index 75c69b1..660a877 100644 --- a/sc/source/ui/view/reffact.cxx +++ b/sc/source/ui/view/reffact.cxx @@ -91,7 +91,7 @@ namespace pViewShell = PTR_CAST( ScTabViewShell, SfxViewShell::Current() ); \ OSL_ENSURE( pViewShell, "missing view shell :-(" ); \ pWindow = pViewShell ? \ - pViewShell->CreateRefDialog( p, this, pInfo, pParentP, sid ) : nullptr; \ + pViewShell->CreateRefDialog( p, this, pInfo, pParentP, sid ) : NULL; \ if (pViewShell && !pWindow) \ pViewShell->GetViewFrame()->SetChildWindow( nId, false ); \ } diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx index 38502d2..8a85b22 100644 --- a/sc/source/ui/view/tabvwshc.cxx +++ b/sc/source/ui/view/tabvwshc.cxx @@ -113,10 +113,9 @@ void ScTabViewShell::SwitchBetweenRefDialogs(SfxModelessDialog* pDialog) } } -VclPtr<SfxModelessDialog> ScTabViewShell::CreateRefDialog( - SfxBindings* pB, SfxChildWindow* pCW, - SfxChildWinInfo* pInfo, - vcl::Window* pParent, sal_uInt16 nSlotId ) +SfxModelessDialog* ScTabViewShell::CreateRefDialog( + SfxBindings* pB, SfxChildWindow* pCW, SfxChildWinInfo* pInfo, + vcl::Window* pParent, sal_uInt16 nSlotId ) { // Dialog nur aufmachen, wenn ueber ScModule::SetRefDialog gerufen, damit // z.B. nach einem Absturz offene Ref-Dialoge nicht wiederkommen (#42341#). @@ -133,7 +132,7 @@ VclPtr<SfxModelessDialog> ScTabViewShell::CreateRefDialog( return NULL; } - VclPtr<SfxModelessDialog> pResult; + SfxModelessDialog* pResult = 0; if(pCW) pCW->SetHideNotDelete(true); @@ -157,7 +156,7 @@ VclPtr<SfxModelessDialog> ScTabViewShell::CreateRefDialog( ScAddress( GetViewData().GetCurX(), GetViewData().GetCurY(), GetViewData().GetTabNo() ), &maRangeMap); - static_cast<ScNameDlg*>(pResult.get())->SetEntry( maName, maScope); + static_cast<ScNameDlg*>(pResult)->SetEntry( maName, maScope); mbInSwitch = false; } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits