summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/uibase/shells/textsh1.cxx5
1 files changed, 3 insertions, 2 deletions
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();
});