summaryrefslogtreecommitdiff
path: root/sw/source/uibase/wrtsh/wrtsh1.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/wrtsh/wrtsh1.cxx')
-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 )