sw/source/ui/dbui/createaddresslistdialog.cxx | 4 ++-- sw/source/ui/dbui/mmaddressblockpage.cxx | 6 +++--- sw/source/ui/dbui/mmgreetingspage.cxx | 4 ++-- sw/source/uibase/app/apphdl.cxx | 2 +- sw/source/uibase/dbui/mmconfigitem.cxx | 3 ++- sw/source/uibase/utlui/unotools.cxx | 4 +++- 6 files changed, 13 insertions(+), 10 deletions(-)
New commits: commit cc5899ff62dd4e9c76aa456fe845c5812bb8d93a Author: Oliver Specht <oliver.spe...@cib.de> Date: Wed Dec 9 07:48:01 2015 +0100 tdf#94816: fixed some problems in the mail merge wizard Some disposeAndClear have been added as calling dialogs in the wizard like select address list, new address list, match fields crashed in dbg build in shutdown because the dialogs were still alive. The wizard is now deleted on Cancel which didn't work anymore. The timeout of the preview control of page 5 has been changed as the preview didn't even appear on Windows in a debug build The timeout handler was called after the wizard has been closed and lead to a crash. Change-Id: I9cd01f39347744bda31a312f695d27eefa077721 Reviewed-on: https://gerrit.libreoffice.org/20489 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Oliver Specht <oliver.spe...@cib.de> Tested-by: Oliver Specht <oliver.spe...@cib.de> diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx index d85bac5..d1ef267 100644 --- a/sw/source/ui/dbui/createaddresslistdialog.cxx +++ b/sw/source/ui/dbui/createaddresslistdialog.cxx @@ -126,8 +126,8 @@ void SwAddressControl_Impl::dispose() for(auto aEditIter = m_aEdits.begin(); aEditIter != m_aEdits.end(); ++aEditIter) aEditIter->disposeAndClear(); m_aEdits.clear(); - m_pScrollBar.clear(); - m_pWindow.clear(); + m_pScrollBar.disposeAndClear(); + m_pWindow.disposeAndClear(); Control::dispose(); } diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx index 84a7564..02014b3 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.cxx +++ b/sw/source/ui/dbui/mmaddressblockpage.cxx @@ -163,7 +163,7 @@ IMPL_LINK_NOARG_TYPED(SwMailMergeAddressBlockPage, AddressListHdl_Impl, Button*, { try { - VclPtrInstance< SwAddressListDialog > xAddrDialog(this); + ScopedVclPtrInstance< SwAddressListDialog > xAddrDialog(this); if(RET_OK == xAddrDialog->Execute()) { SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem(); @@ -188,7 +188,7 @@ IMPL_LINK_NOARG_TYPED(SwMailMergeAddressBlockPage, AddressListHdl_Impl, Button*, IMPL_LINK_TYPED(SwMailMergeAddressBlockPage, SettingsHdl_Impl, Button*, pButton, void) { - VclPtr<SwSelectAddressBlockDialog> pDlg( + ScopedVclPtr<SwSelectAddressBlockDialog> pDlg( VclPtr<SwSelectAddressBlockDialog>::Create(pButton, m_pWizard->GetConfigItem())); SwMailMergeConfigItem& rConfig = m_pWizard->GetConfigItem(); pDlg->SetAddressBlocks(rConfig.GetAddressBlocks(), m_pSettingsWIN->GetSelectedAddress()); @@ -207,7 +207,7 @@ IMPL_LINK_TYPED(SwMailMergeAddressBlockPage, SettingsHdl_Impl, Button*, pButton, rConfig.SetCountrySettings(pDlg->IsIncludeCountry(), pDlg->GetCountry()); InsertDataHdl_Impl(nullptr); } - pDlg.reset(); + pDlg.disposeAndClear(); GetWizard()->UpdateRoadmap(); GetWizard()->enableButtons(WizardButtonFlags::NEXT, GetWizard()->isStateEnabled(MM_GREETINGSPAGE)); } diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx index 40c4307..105bb6e 100644 --- a/sw/source/ui/dbui/mmgreetingspage.cxx +++ b/sw/source/ui/dbui/mmgreetingspage.cxx @@ -103,7 +103,7 @@ IMPL_LINK_NOARG_TYPED(SwGreetingsHandler, IndividualHdl_Impl, Button*, void) IMPL_LINK_TYPED(SwGreetingsHandler, GreetingHdl_Impl, Button*, pButton, void) { - VclPtr<SwCustomizeAddressBlockDialog> pDlg( + ScopedVclPtr<SwCustomizeAddressBlockDialog> pDlg( VclPtr<SwCustomizeAddressBlockDialog>::Create(pButton, m_pWizard->GetConfigItem(), pButton == m_pMalePB ? SwCustomizeAddressBlockDialog::GREETING_MALE : @@ -129,7 +129,7 @@ void SwGreetingsHandler::UpdatePreview() IMPL_LINK_TYPED(SwMailMergeGreetingsPage, AssignHdl_Impl, Button*, pButton, void) { const OUString sPreview(m_pFemaleLB->GetSelectEntry() + "\n" + m_pMaleLB->GetSelectEntry()); - VclPtr<SwAssignFieldsDialog> pDlg( + ScopedVclPtr<SwAssignFieldsDialog> pDlg( VclPtr<SwAssignFieldsDialog>::Create(pButton, m_pWizard->GetConfigItem(), sPreview, false)); if(RET_OK == pDlg->Execute()) { diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx index 39ed273..bd18537 100644 --- a/sw/source/uibase/app/apphdl.cxx +++ b/sw/source/uibase/app/apphdl.cxx @@ -594,7 +594,7 @@ IMPL_LINK_NOARG_TYPED(SwMailMergeWizardExecutor, CancelHdl, void*, void) m_pMMConfig->Commit(); delete m_pMMConfig; m_pMMConfig = nullptr; - // m_pWizard already deleted by closing the target view + delete m_pWizard; m_pWizard = nullptr; release(); } diff --git a/sw/source/uibase/dbui/mmconfigitem.cxx b/sw/source/uibase/dbui/mmconfigitem.cxx index f78a85b..b576da3 100644 --- a/sw/source/uibase/dbui/mmconfigitem.cxx +++ b/sw/source/uibase/dbui/mmconfigitem.cxx @@ -734,7 +734,8 @@ SwMailMergeConfigItem::SwMailMergeConfigItem() : {} SwMailMergeConfigItem::~SwMailMergeConfigItem() -{} +{ +} void SwMailMergeConfigItem::Commit() { diff --git a/sw/source/uibase/utlui/unotools.cxx b/sw/source/uibase/utlui/unotools.cxx index 1a2c22e..5ed25c4 100644 --- a/sw/source/uibase/utlui/unotools.cxx +++ b/sw/source/uibase/utlui/unotools.cxx @@ -83,7 +83,7 @@ SwOneExampleFrame::SwOneExampleFrame( vcl::Window& rWin, // the controller is asynchronously set aLoadedIdle.SetIdleHdl(LINK(this, SwOneExampleFrame, TimeoutHdl)); - aLoadedIdle.SetPriority(SchedulerPriority::LOWER); + aLoadedIdle.SetPriority(SchedulerPriority::HIGH); CreateControl(); @@ -159,6 +159,8 @@ void SwOneExampleFrame::CreateControl() void SwOneExampleFrame::DisposeControl() { + aLoadedIdle.Stop(); + aTopWindow.clear(); _xCursor = nullptr; if(_xControl.is()) _xControl->dispose(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits