summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Jung <phil.jung@free.fr>2015-05-26 13:48:18 +0200
committerMichael Meeks <michael.meeks@collabora.com>2015-05-26 14:07:34 +0100
commit6e4922b0def9d3bebe04b48bc9055a16bb4965bf (patch)
tree88306adabbfc22dfde34d8c7ccf2c561884454f9
parent7dc00c7372a334bce7373cbdcd5a888cc4b37cd3 (diff)
tdf#91389 EDITING: Crash when deleting header
Replaced MyDlg(pParent).Execute by VclPtr equivalent Change-Id: I7e03913665f770d694f53949e08425ba60adc6ad Reviewed-on: https://gerrit.libreoffice.org/15908 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
-rw-r--r--sw/source/uibase/wrtsh/wrtsh1.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 08422c796ab2..37f0553ab2a0 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -1771,12 +1771,13 @@ void SwWrtShell::ChangeHeaderOrFooter(
vcl::Window* pParent = &GetView().GetViewFrame()->GetWindow();
short nResult;
- if (bHeader)
- nResult = DeleteHeaderDialog(pParent).Execute();
- else
- nResult = DeleteFooterDialog(pParent).Execute();
- bExecute = nResult == RET_YES;
+ if (bHeader) {
+ nResult = ScopedVclPtrInstance<DeleteHeaderDialog>::Create(pParent)->Execute();
+ } else {
+ nResult = ScopedVclPtrInstance<DeleteFooterDialog>::Create(pParent)->Execute();
+ }
+ bExecute = nResult == RET_YES;
StartAllAction();
}
if( bExecute )