summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.cxx4
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.cxx6
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.cxx4
-rw-r--r--sw/source/uibase/app/apphdl.cxx2
-rw-r--r--sw/source/uibase/dbui/mmconfigitem.cxx3
-rw-r--r--sw/source/uibase/utlui/unotools.cxx4
6 files changed, 13 insertions, 10 deletions
diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx
index d85bac57b4fe..d1ef267898a2 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 84a7564ade1f..02014b3e25b9 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 40c4307adbc6..105bb6e8e925 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 39ed27367a19..bd18537a5e39 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 f78a85bc67e3..b576da35dde1 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 1a2c22e66ca2..5ed25c464adf 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();