diff options
author | Philippe Jung <phil.jung@free.fr> | 2015-05-26 13:48:18 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-05-26 12:55:16 +0000 |
commit | 8790303b4c220d0c5dcf78a4c438a385ffe3f030 (patch) | |
tree | 311466d4942b596c3088b6f164d0863540ec6855 | |
parent | cd2ba3124602ad9ee8f5927c385936cc5319808d (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.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index 99da1d4aa075..5c04c7fdea9e 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 ) |