summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-01-22 10:44:20 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-01-22 14:04:59 +0100
commit70c15946ac5b2f481fed3c6e79f496196feb1b22 (patch)
tree6c0babb9a0f5df1518c460dbeb9e7eef3246875e
parentb6c0356ac9d59a4599d15f8d2f001d39010b3e48 (diff)
StartExecuteAsync doesn't need a second param
we can just use this to store a keep-alive reference in AsyncContext Change-Id: I0152aef5386aa9753b48afdfc958790f10d13560 Reviewed-on: https://gerrit.libreoffice.org/48294 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jenkins <ci@libreoffice.org>
-rw-r--r--include/vcl/abstdlg.hxx4
-rw-r--r--include/vcl/dialog.hxx5
-rw-r--r--sc/source/ui/view/tabvwsha.cxx2
-rw-r--r--sd/source/ui/func/fuarea.cxx2
-rw-r--r--sd/source/ui/func/fuline.cxx2
-rw-r--r--sd/source/ui/func/futransf.cxx2
-rw-r--r--sw/source/uibase/app/docst.cxx2
-rw-r--r--sw/source/uibase/shells/textsh1.cxx4
-rw-r--r--sw/source/uibase/shells/txtnum.cxx2
9 files changed, 12 insertions, 13 deletions
diff --git a/include/vcl/abstdlg.hxx b/include/vcl/abstdlg.hxx
index 87336e0d5a5f..542930084e37 100644
--- a/include/vcl/abstdlg.hxx
+++ b/include/vcl/abstdlg.hxx
@@ -49,10 +49,10 @@ public:
bool isSet() { return !!maEndDialogFn; }
};
- bool StartExecuteAsync(const std::function<void(sal_Int32)> &rEndDialogFn, VclPtr<VclReferenceBase> xOwner)
+ bool StartExecuteAsync(const std::function<void(sal_Int32)> &rEndDialogFn)
{
AsyncContext aCtx;
- aCtx.mxOwner = xOwner;
+ aCtx.mxOwner = this;
aCtx.maEndDialogFn = rEndDialogFn;
return StartExecuteAsync(aCtx);
}
diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx
index eaf9bbe99960..979c62c199dc 100644
--- a/include/vcl/dialog.hxx
+++ b/include/vcl/dialog.hxx
@@ -142,11 +142,10 @@ public:
// FIXME: Need to remove old StartExecuteModal in favour of this one.
/// Returns true of the dialog successfully starts
- bool StartExecuteAsync(const std::function<void(sal_Int32)> &rEndDialogFn,
- VclPtr<VclReferenceBase> xOwner = VclPtr<VclReferenceBase>())
+ bool StartExecuteAsync(const std::function<void(sal_Int32)> &rEndDialogFn)
{
VclAbstractDialog::AsyncContext aCtx;
- aCtx.mxOwner = xOwner;
+ aCtx.mxOwner = this;
aCtx.maEndDialogFn = rEndDialogFn;
return StartExecuteAsync(aCtx);
}
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index 67911a29c91d..0a07e52d20f6 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -561,7 +561,7 @@ void ScTabViewShell::ExecuteCellFormatDlg(SfxRequest& rReq, const OString &rName
pRequest->Done(*pOutSet);
}
- }, pDlg);
+ });
}
bool ScTabViewShell::IsRefInputMode() const
diff --git a/sd/source/ui/func/fuarea.cxx b/sd/source/ui/func/fuarea.cxx
index 1d9197871071..042de7aa239f 100644
--- a/sd/source/ui/func/fuarea.cxx
+++ b/sd/source/ui/func/fuarea.cxx
@@ -90,7 +90,7 @@ void FuArea::DoExecute( SfxRequest& rReq )
mpViewShell->GetViewFrame()->GetBindings().Invalidate( SidArray );
}
- }, pDlg);
+ });
}
void FuArea::Activate()
diff --git a/sd/source/ui/func/fuline.cxx b/sd/source/ui/func/fuline.cxx
index 67ad104ecc31..9fa501ce52c4 100644
--- a/sd/source/ui/func/fuline.cxx
+++ b/sd/source/ui/func/fuline.cxx
@@ -107,7 +107,7 @@ void FuLine::DoExecute( SfxRequest& rReq )
mpViewShell->GetViewFrame()->GetBindings().Invalidate( SidArray );
}
mpViewShell->Cancel();
- }, pDlg);
+ });
}
void FuLine::Activate()
diff --git a/sd/source/ui/func/futransf.cxx b/sd/source/ui/func/futransf.cxx
index 0d0a7788d43a..f62c9788da8a 100644
--- a/sd/source/ui/func/futransf.cxx
+++ b/sd/source/ui/func/futransf.cxx
@@ -152,7 +152,7 @@ void FuTransform::DoExecute( SfxRequest& rReq )
mpViewShell->Invalidate(SID_RULER_OBJECT);
mpViewShell->Cancel();
- }, pDlg);
+ });
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index 4361dd18068c..8719f7444ece 100644
--- a/sw/source/uibase/app/docst.cxx
+++ b/sw/source/uibase/app/docst.cxx
@@ -868,7 +868,7 @@ void SwDocShell::Edit(
if (pRequest)
pRequest->Done();
- }, pDlg);
+ });
}
else
{
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index b7e001cbd769..2266877d68e0 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -210,7 +210,7 @@ void sw_CharDialog(SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot, const
{
sw_CharDialogResult(pDlg->GetOutputItemSet(), rWrtSh, pCoreSet, bSel, bSelectionPut, pRequest.get());
}
- }, pDlg);
+ });
}
else if (pArgs)
{
@@ -1125,7 +1125,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
sw_ParagraphDialogResult(pSet, rWrtSh, *pRequest, pPaM);
}
- }, pDlg);
+ });
}
}
break;
diff --git a/sw/source/uibase/shells/txtnum.cxx b/sw/source/uibase/shells/txtnum.cxx
index 866c439b8c6a..6a715a75ae94 100644
--- a/sw/source/uibase/shells/txtnum.cxx
+++ b/sw/source/uibase/shells/txtnum.cxx
@@ -237,7 +237,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
}
else if (RET_USER == nResult)
GetShell().DelNumRules();
- }, pDlg);
+ });
}
break;