summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-12-17 08:53:07 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-05-02 12:32:01 +0200
commit4def21a89a90c642a4bf516c171564b0b578734f (patch)
tree0ffa2cc835f8b0f3746a8650bddb6e1fd9a08d21
parenttdf#124241 let dialog be resizable (diff)
downloadcore-4def21a89a90c642a4bf516c171564b0b578734f.tar.gz
core-4def21a89a90c642a4bf516c171564b0b578734f.zip
Resolve deprecated implicit capture of *this by reference in C++20
...as flagged with -Werror=deprecated by trunk GCC in -std=c++2a mode. But C++17 forbids "this" in combination with a capture-default of "=", so in such cases list any entities explicitly that shall be captured by value. Change-Id: Ic228cd20682277a0f93e3e75798356d0fbbb80d4 Reviewed-on: https://gerrit.libreoffice.org/65241 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit c56a8280bdd605f77f0075a7f2bfa474aa2a26e5) Reviewed-on: https://gerrit.libreoffice.org/71661 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--cui/source/dialogs/cuigaldlg.cxx2
-rw-r--r--fpicker/source/office/OfficeFilePicker.cxx2
-rw-r--r--fpicker/source/office/OfficeFolderPicker.cxx2
-rw-r--r--sc/source/ui/view/tabvwsha.cxx2
-rw-r--r--sd/source/ui/animations/CustomAnimationPane.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--sfx2/source/appl/childwin.cxx2
-rw-r--r--svx/source/gallery2/galbrws1.cxx4
-rw-r--r--sw/source/uibase/app/apphdl.cxx2
-rw-r--r--sw/source/uibase/app/docst.cxx2
-rw-r--r--sw/source/uibase/shells/txtnum.cxx2
-rw-r--r--sw/source/uibase/uiview/viewling.cxx2
-rw-r--r--vcl/source/window/dialog.cxx2
15 files changed, 16 insertions, 16 deletions
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index 20034936de80..a272d3d54590 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -817,7 +817,7 @@ void TPGalleryThemeProperties::SearchFiles()
xProgress->SetDirectory( INetURLObject() );
xProgress->LaunchThread();
- weld::DialogController::runAsync(xProgress, [=](sal_Int32 nResult) {
+ weld::DialogController::runAsync(xProgress, [this](sal_Int32 nResult) {
EndSearchProgressHdl(nResult);
});
}
diff --git a/fpicker/source/office/OfficeFilePicker.cxx b/fpicker/source/office/OfficeFilePicker.cxx
index 6f22961fdf8d..3397aa0e7b3c 100644
--- a/fpicker/source/office/OfficeFilePicker.cxx
+++ b/fpicker/source/office/OfficeFilePicker.cxx
@@ -503,7 +503,7 @@ void SAL_CALL SvtFilePicker::startExecuteModal( const Reference< css::ui::dialog
prepareExecute();
SvtFileDialog_Base* pDialog = getDialog();
pDialog->EnableAutocompletion();
- pDialog->StartExecuteAsync([=](sal_Int32 nResult){
+ pDialog->StartExecuteAsync([this](sal_Int32 nResult){
DialogClosedHdl(nResult);
});
}
diff --git a/fpicker/source/office/OfficeFolderPicker.cxx b/fpicker/source/office/OfficeFolderPicker.cxx
index 06703055fb4b..b95f0f972980 100644
--- a/fpicker/source/office/OfficeFolderPicker.cxx
+++ b/fpicker/source/office/OfficeFolderPicker.cxx
@@ -65,7 +65,7 @@ void SAL_CALL SvtFolderPicker::startExecuteModal( const Reference< css::ui::dial
prepareExecute();
SvtFileDialog_Base* pDialog = getDialog();
pDialog->EnableAutocompletion();
- pDialog->StartExecuteAsync([=](sal_Int32 nResult){
+ pDialog->StartExecuteAsync([this](sal_Int32 nResult){
DialogClosedHdl(nResult);
});
}
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index 2785c8097dcf..d8d8c22a6615 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -547,7 +547,7 @@ void ScTabViewShell::ExecuteCellFormatDlg(SfxRequest& rReq, const OString &rName
std::shared_ptr<SfxRequest> pRequest(new SfxRequest(rReq));
rReq.Ignore(); // the 'old' request is not relevant any more
- pDlg->StartExecuteAsync([=](sal_Int32 nResult){
+ pDlg->StartExecuteAsync([pDlg, pOldSet, pRequest, this](sal_Int32 nResult){
bInFormatDialog = false;
if ( nResult == RET_OK )
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index ab695076ddc2..99675714021b 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -1667,7 +1667,7 @@ void CustomAnimationPane::showOptions(const OString& rPage)
std::shared_ptr<CustomAnimationDialog> xDlg(new CustomAnimationDialog(GetFrameWeld(), std::move(xSet), rPage));
- weld::DialogController::runAsync(xDlg, [=](sal_Int32 nResult){
+ weld::DialogController::runAsync(xDlg, [xDlg, this](sal_Int32 nResult){
if (nResult )
{
addUndo();
diff --git a/sd/source/ui/func/fuarea.cxx b/sd/source/ui/func/fuarea.cxx
index 85eaef244991..a7cfa3fef87f 100644
--- a/sd/source/ui/func/fuarea.cxx
+++ b/sd/source/ui/func/fuarea.cxx
@@ -63,7 +63,7 @@ void FuArea::DoExecute( SfxRequest& rReq )
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
VclPtr<AbstractSvxAreaTabDialog> pDlg(pFact->CreateSvxAreaTabDialog(mpViewShell->GetFrameWeld(), &aNewAttr, mpDoc, true));
- pDlg->StartExecuteAsync([=](sal_Int32 nResult){
+ pDlg->StartExecuteAsync([pDlg, this](sal_Int32 nResult){
if (nResult == RET_OK)
{
mpView->SetAttributes (*(pDlg->GetOutputItemSet ()));
diff --git a/sd/source/ui/func/fuline.cxx b/sd/source/ui/func/fuline.cxx
index 819995a99d59..5ddefa8b5cc6 100644
--- a/sd/source/ui/func/fuline.cxx
+++ b/sd/source/ui/func/fuline.cxx
@@ -77,7 +77,7 @@ void FuLine::DoExecute( SfxRequest& rReq )
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
VclPtr<SfxAbstractTabDialog> pDlg( pFact->CreateSvxLineTabDialog(mpViewShell->GetFrameWeld(), pNewAttr.get(), mpDoc, pObj, bHasMarked) );
- pDlg->StartExecuteAsync([=](sal_Int32 nResult){
+ pDlg->StartExecuteAsync([pDlg, this](sal_Int32 nResult){
if (nResult == RET_OK)
{
mpView->SetAttributes (*(pDlg->GetOutputItemSet ()));
diff --git a/sd/source/ui/func/futransf.cxx b/sd/source/ui/func/futransf.cxx
index d0ffd8366055..ca14213fcf01 100644
--- a/sd/source/ui/func/futransf.cxx
+++ b/sd/source/ui/func/futransf.cxx
@@ -114,7 +114,7 @@ void FuTransform::DoExecute( SfxRequest& rReq )
std::shared_ptr<SfxRequest> pRequest(new SfxRequest(rReq));
rReq.Ignore(); // the 'old' request is not relevant any more
- pDlg->StartExecuteAsync([=](sal_Int32 nResult){
+ pDlg->StartExecuteAsync([bWelded, pDlg, pRequest, this](sal_Int32 nResult){
if (nResult == RET_OK)
{
pRequest->Done(*(pDlg->GetOutputItemSet()));
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index 65f06344079c..ee22739efc33 100644
--- a/sfx2/source/appl/childwin.cxx
+++ b/sfx2/source/appl/childwin.cxx
@@ -636,7 +636,7 @@ void SfxChildWindow::Show( ShowFlags nFlags )
if (!xController->getDialog()->get_visible())
{
weld::DialogController::runAsync(xController,
- [=](sal_Int32 /*nResult*/){ xController->Close(); });
+ [this](sal_Int32 /*nResult*/){ xController->Close(); });
}
}
else
diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx
index 69964a31bbf4..416fa67f48e7 100644
--- a/svx/source/gallery2/galbrws1.cxx
+++ b/svx/source/gallery2/galbrws1.cxx
@@ -268,13 +268,13 @@ void GalleryBrowser1::ImplGalleryThemeProperties( const OUString & rThemeName, b
if ( bCreateNew )
{
- mpThemePropertiesDialog->StartExecuteAsync([=](sal_Int32 nResult){
+ mpThemePropertiesDialog->StartExecuteAsync([this](sal_Int32 nResult){
EndNewThemePropertiesDlgHdl(nResult);
});
}
else
{
- mpThemePropertiesDialog->StartExecuteAsync([=](sal_Int32 nResult){
+ mpThemePropertiesDialog->StartExecuteAsync([this](sal_Int32 nResult){
EndThemePropertiesDlgHdl(nResult);
});
}
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index c0b0c1dc4ef6..a7a9ae2fd96c 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -479,7 +479,7 @@ void SwMailMergeWizardExecutor::ExecutionFinished()
void SwMailMergeWizardExecutor::ExecuteWizard()
{
- m_pWizard->StartExecuteAsync([=](sal_Int32 nResult){
+ m_pWizard->StartExecuteAsync([this](sal_Int32 nResult){
EndDialogHdl(nResult);
});
}
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index d9bc6d2f0cd9..806c38b64bf2 100644
--- a/sw/source/uibase/app/docst.cxx
+++ b/sw/source/uibase/app/docst.cxx
@@ -830,7 +830,7 @@ void SwDocShell::Edit(
pReq->Ignore(); // the 'old' request is not relevant any more
}
- pDlg->StartExecuteAsync([=](sal_Int32 nResult){
+ pDlg->StartExecuteAsync([bModified, bNew, nFamily, nSlot, nNewStyleUndoId, pApplyStyleHelper, pRequest, xTmp, this](sal_Int32 nResult){
if (RET_OK == nResult)
pApplyStyleHelper->apply();
diff --git a/sw/source/uibase/shells/txtnum.cxx b/sw/source/uibase/shells/txtnum.cxx
index daaab629bcd9..b95a9dcf1a47 100644
--- a/sw/source/uibase/shells/txtnum.cxx
+++ b/sw/source/uibase/shells/txtnum.cxx
@@ -191,7 +191,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
std::shared_ptr<SfxRequest> pRequest(new SfxRequest(rReq));
rReq.Ignore(); // the 'old' request is not relevant any more
- pDlg->StartExecuteAsync([=](sal_Int32 nResult){
+ pDlg->StartExecuteAsync([aSet, pDlg, pNumRuleAtCurrentSelection, pRequest, this](sal_Int32 nResult){
if (RET_OK == nResult)
{
const SfxPoolItem* pItem;
diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx
index 1cb076a471d3..935f974ce75a 100644
--- a/sw/source/uibase/uiview/viewling.cxx
+++ b/sw/source/uibase/uiview/viewling.cxx
@@ -578,7 +578,7 @@ void SwView::StartThesaurus()
{
guard.dismiss(); // ignore, we'll call SetIdle() explicitly after the dialog ends
- pDlg->StartExecuteAsync([=](sal_Int32 nResult){
+ pDlg->StartExecuteAsync([aTmp, bSelection, bOldIdle, pDlg, pVOpt, this](sal_Int32 nResult){
if (nResult == RET_OK )
InsertThesaurusSynonym(pDlg->GetWord(), aTmp, bSelection);
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 168816392a30..9378f71cf0a5 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -1087,7 +1087,7 @@ void Dialog::RemoveFromDlgList()
auto& rExecuteDialogs = pSVData->maWinData.mpExecuteDialogs;
// remove dialog from the list of dialogs which are being executed
- rExecuteDialogs.erase(std::remove_if(rExecuteDialogs.begin(), rExecuteDialogs.end(), [=](VclPtr<Dialog>& dialog){ return dialog.get() == this; }), rExecuteDialogs.end());
+ rExecuteDialogs.erase(std::remove_if(rExecuteDialogs.begin(), rExecuteDialogs.end(), [this](VclPtr<Dialog>& dialog){ return dialog.get() == this; }), rExecuteDialogs.end());
}
void Dialog::EndDialog( long nResult )