Kaydet (Commit) 70c15946 authored tarafından Noel Grandin's avatar Noel Grandin

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/48294Reviewed-by: 's avatarMichael Meeks <michael.meeks@collabora.com>
Reviewed-by: 's avatarJan Holesovsky <kendy@collabora.com>
Tested-by: 's avatarJenkins <ci@libreoffice.org>
üst b6c0356a
...@@ -49,10 +49,10 @@ public: ...@@ -49,10 +49,10 @@ public:
bool isSet() { return !!maEndDialogFn; } 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; AsyncContext aCtx;
aCtx.mxOwner = xOwner; aCtx.mxOwner = this;
aCtx.maEndDialogFn = rEndDialogFn; aCtx.maEndDialogFn = rEndDialogFn;
return StartExecuteAsync(aCtx); return StartExecuteAsync(aCtx);
} }
......
...@@ -142,11 +142,10 @@ public: ...@@ -142,11 +142,10 @@ public:
// FIXME: Need to remove old StartExecuteModal in favour of this one. // FIXME: Need to remove old StartExecuteModal in favour of this one.
/// Returns true of the dialog successfully starts /// Returns true of the dialog successfully starts
bool StartExecuteAsync(const std::function<void(sal_Int32)> &rEndDialogFn, bool StartExecuteAsync(const std::function<void(sal_Int32)> &rEndDialogFn)
VclPtr<VclReferenceBase> xOwner = VclPtr<VclReferenceBase>())
{ {
VclAbstractDialog::AsyncContext aCtx; VclAbstractDialog::AsyncContext aCtx;
aCtx.mxOwner = xOwner; aCtx.mxOwner = this;
aCtx.maEndDialogFn = rEndDialogFn; aCtx.maEndDialogFn = rEndDialogFn;
return StartExecuteAsync(aCtx); return StartExecuteAsync(aCtx);
} }
......
...@@ -561,7 +561,7 @@ void ScTabViewShell::ExecuteCellFormatDlg(SfxRequest& rReq, const OString &rName ...@@ -561,7 +561,7 @@ void ScTabViewShell::ExecuteCellFormatDlg(SfxRequest& rReq, const OString &rName
pRequest->Done(*pOutSet); pRequest->Done(*pOutSet);
} }
}, pDlg); });
} }
bool ScTabViewShell::IsRefInputMode() const bool ScTabViewShell::IsRefInputMode() const
......
...@@ -90,7 +90,7 @@ void FuArea::DoExecute( SfxRequest& rReq ) ...@@ -90,7 +90,7 @@ void FuArea::DoExecute( SfxRequest& rReq )
mpViewShell->GetViewFrame()->GetBindings().Invalidate( SidArray ); mpViewShell->GetViewFrame()->GetBindings().Invalidate( SidArray );
} }
}, pDlg); });
} }
void FuArea::Activate() void FuArea::Activate()
......
...@@ -107,7 +107,7 @@ void FuLine::DoExecute( SfxRequest& rReq ) ...@@ -107,7 +107,7 @@ void FuLine::DoExecute( SfxRequest& rReq )
mpViewShell->GetViewFrame()->GetBindings().Invalidate( SidArray ); mpViewShell->GetViewFrame()->GetBindings().Invalidate( SidArray );
} }
mpViewShell->Cancel(); mpViewShell->Cancel();
}, pDlg); });
} }
void FuLine::Activate() void FuLine::Activate()
......
...@@ -152,7 +152,7 @@ void FuTransform::DoExecute( SfxRequest& rReq ) ...@@ -152,7 +152,7 @@ void FuTransform::DoExecute( SfxRequest& rReq )
mpViewShell->Invalidate(SID_RULER_OBJECT); mpViewShell->Invalidate(SID_RULER_OBJECT);
mpViewShell->Cancel(); mpViewShell->Cancel();
}, pDlg); });
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -868,7 +868,7 @@ void SwDocShell::Edit( ...@@ -868,7 +868,7 @@ void SwDocShell::Edit(
if (pRequest) if (pRequest)
pRequest->Done(); pRequest->Done();
}, pDlg); });
} }
else else
{ {
......
...@@ -210,7 +210,7 @@ void sw_CharDialog(SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot, const ...@@ -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()); sw_CharDialogResult(pDlg->GetOutputItemSet(), rWrtSh, pCoreSet, bSel, bSelectionPut, pRequest.get());
} }
}, pDlg); });
} }
else if (pArgs) else if (pArgs)
{ {
...@@ -1125,7 +1125,7 @@ void SwTextShell::Execute(SfxRequest &rReq) ...@@ -1125,7 +1125,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
sw_ParagraphDialogResult(pSet, rWrtSh, *pRequest, pPaM); sw_ParagraphDialogResult(pSet, rWrtSh, *pRequest, pPaM);
} }
}, pDlg); });
} }
} }
break; break;
......
...@@ -237,7 +237,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq) ...@@ -237,7 +237,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
} }
else if (RET_USER == nResult) else if (RET_USER == nResult)
GetShell().DelNumRules(); GetShell().DelNumRules();
}, pDlg); });
} }
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment