summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/uibase/app/apphdl.cxx17
1 files changed, 10 insertions, 7 deletions
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 8f93cdb42cc7..9bc5ec11cec6 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -592,16 +592,19 @@ IMPL_STATIC_LINK_TYPED(SwMailMergeWizardExecutor, DestroyWizardHdl, void*, pDial
IMPL_LINK_NOARG_TYPED(SwMailMergeWizardExecutor, CancelHdl, void*, void)
{
- SwMailMergeConfigItem* pMMConfig = m_pView->GetMailMergeConfigItem();
- if (pMMConfig->GetTargetView())
+ if (SwMailMergeConfigItem* pMMConfig = m_pView->GetMailMergeConfigItem())
{
- pMMConfig->GetTargetView()->GetViewFrame()->DoClose();
- pMMConfig->SetTargetView(nullptr);
+ if (pMMConfig->GetTargetView())
+ {
+ pMMConfig->GetTargetView()->GetViewFrame()->DoClose();
+ pMMConfig->SetTargetView(nullptr);
+ }
+ if (pMMConfig->GetSourceView())
+ pMMConfig->GetSourceView()->GetViewFrame()->GetFrame().AppearWithUpdate();
+
+ pMMConfig->Commit();
}
- if (pMMConfig->GetSourceView())
- pMMConfig->GetSourceView()->GetViewFrame()->GetFrame().AppearWithUpdate();
- pMMConfig->Commit();
delete m_pWizard;
m_pWizard = nullptr;
release();