[Libreoffice-commits] core.git: sw/source

Philippe Jung phil.jung at free.fr
Tue May 26 05:55:44 PDT 2015


 sw/source/uibase/wrtsh/wrtsh1.cxx |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

New commits:
commit 8790303b4c220d0c5dcf78a4c438a385ffe3f030
Author: Philippe Jung <phil.jung at free.fr>
Date:   Tue May 26 13:48:18 2015 +0200

    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 at collabora.com>
    Tested-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 99da1d4..5c04c7f 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 )


More information about the Libreoffice-commits mailing list