From 5776d219db28b795acb952e9728cc9502403bcb8 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 19 Jan 2018 15:44:12 +0200 Subject: more ScopedVclPtr for dialogs Change-Id: I0f19a0c1e312843bee0ee5c9939831918ddc2da7 Reviewed-on: https://gerrit.libreoffice.org/48198 Tested-by: Jenkins Reviewed-by: Julien Nabet --- sw/source/ui/dbui/addresslistdialog.cxx | 4 ++-- sw/source/ui/dbui/mmaddressblockpage.cxx | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'sw/source/ui/dbui') diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx index 77890e3b27fc..ef79ead501c6 100644 --- a/sw/source/ui/dbui/addresslistdialog.cxx +++ b/sw/source/ui/dbui/addresslistdialog.cxx @@ -357,8 +357,8 @@ IMPL_LINK_NOARG(SwAddressListDialog, LoadHdl_Impl, Button*, void) IMPL_LINK(SwAddressListDialog, CreateHdl_Impl, Button*, pButton, void) { OUString sInputURL; - VclPtr pDlg( - VclPtr::Create( + ScopedVclPtr pDlg( + VclPtr::Create( pButton, sInputURL, m_pAddressPage->GetWizard()->GetConfigItem())); diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx index 68b6adde88f7..945e72c93382 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.cxx +++ b/sw/source/ui/dbui/mmaddressblockpage.cxx @@ -218,8 +218,9 @@ IMPL_LINK(SwMailMergeAddressBlockPage, AssignHdl_Impl, Button*, pButton, void) SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem(); const sal_uInt16 nSel = m_pSettingsWIN->GetSelectedAddress(); const uno::Sequence< OUString> aBlocks = rConfigItem.GetAddressBlocks(); - VclPtr pDlg( - VclPtr::Create(pButton, m_pWizard->GetConfigItem(), aBlocks[nSel], true)); + ScopedVclPtr pDlg( + VclPtr::Create( + pButton, m_pWizard->GetConfigItem(), aBlocks[nSel], true)); if(RET_OK == pDlg->Execute()) { //preview update @@ -447,8 +448,9 @@ IMPL_LINK(SwSelectAddressBlockDialog, NewCustomizeHdl_Impl, Button*, pButton, vo SwCustomizeAddressBlockDialog::DialogType nType = bCustomize ? SwCustomizeAddressBlockDialog::ADDRESSBLOCK_EDIT : SwCustomizeAddressBlockDialog::ADDRESSBLOCK_NEW; - VclPtr pDlg( - VclPtr::Create(pButton,m_rConfig,nType)); + ScopedVclPtr pDlg( + VclPtr::Create( + pButton,m_rConfig,nType)); if(bCustomize) { pDlg->SetAddress(m_aAddressBlocks[m_pPreview->GetSelectedAddress()]); -- cgit v1.2.3