[Libreoffice-commits] core.git: include/vcl sc/source sd/source sw/source
Noel Grandin
noel.grandin at collabora.co.uk
Mon Jan 22 13:05:26 UTC 2018
include/vcl/abstdlg.hxx | 4 ++--
include/vcl/dialog.hxx | 5 ++---
sc/source/ui/view/tabvwsha.cxx | 2 +-
sd/source/ui/func/fuarea.cxx | 2 +-
sd/source/ui/func/fuline.cxx | 2 +-
sd/source/ui/func/futransf.cxx | 2 +-
sw/source/uibase/app/docst.cxx | 2 +-
sw/source/uibase/shells/textsh1.cxx | 4 ++--
sw/source/uibase/shells/txtnum.cxx | 2 +-
9 files changed, 12 insertions(+), 13 deletions(-)
New commits:
commit 70c15946ac5b2f481fed3c6e79f496196feb1b22
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Mon Jan 22 10:44:20 2018 +0200
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 at collabora.com>
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Tested-by: Jenkins <ci at libreoffice.org>
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;
More information about the Libreoffice-commits
mailing list