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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Sun Aug 16 19:15:11 UTC 2020


 sw/source/uibase/shells/textsh1.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit d04c64d25929f08f9991535ecc8a33bdd31d395e
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Aug 13 15:48:16 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Aug 16 21:14:34 2020 +0200

    tdf#134439 honor FN_PARAM_PAM arguments
    
    which was dropped by
    
    commit bba8e5aa6d1968e5279b3fe368c0f81145513d04
    Date:   Thu Mar 1 21:00:24 2018 +0100
    
        tdf#116070: Use a valid PaM when confirming the dialog.
    
    when fixing
    
    commit 34527cec54ca634b831cfa5ac1098c4046818ac3
    Date:   Tue Jan 16 18:54:19 2018 +0100
    
        lokdialog: Convert the Format -> Paragraph... dialog to async exec.
    
    so, go back to using pPaM instead of rWrtSh.GetCursor but make a copy
    of pPaM to avoid the crash of tdf#116070
    
    Change-Id: I0aaaf5173c6be47dd306b77eacbb07d0e1c4eaf1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100670
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index 322209a71382..932eca2901ba 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -1078,7 +1078,8 @@ void SwTextShell::Execute(SfxRequest &rReq)
                 auto pRequest = std::make_shared<SfxRequest>(rReq);
                 rReq.Ignore(); // the 'old' request is not relevant any more
 
-                pDlg->StartExecuteAsync([pDlg, &rWrtSh, pRequest, nDefDist](sal_Int32 nResult){
+                auto xPaM(std::make_shared<SwPaM>(*pPaM, nullptr)); // tdf#134439 make a copy to use at later apply
+                pDlg->StartExecuteAsync([pDlg, &rWrtSh, pRequest, nDefDist, xPaM](sal_Int32 nResult){
                     if (nResult == RET_OK)
                     {
                         // Apply defaults if necessary.
@@ -1108,7 +1109,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
                             pSet->Put(SfxStringItem(FN_DROP_CHAR_STYLE_NAME, sCharStyleName));
                         }
 
-                        sw_ParagraphDialogResult(pSet, rWrtSh, *pRequest, rWrtSh.GetCursor());
+                        sw_ParagraphDialogResult(pSet, rWrtSh, *pRequest, xPaM.get());
                     }
                     pDlg->disposeOnce();
                 });


More information about the Libreoffice-commits mailing list