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>
This commit is contained in:
Stephan Bergmann
2018-12-17 14:44:14 +01:00
parent 0574f8241a
commit c56a8280bd
15 changed files with 16 additions and 16 deletions
+1 -1
View File
@@ -818,7 +818,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);
});
}
+1 -1
View File
@@ -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);
});
}
+1 -1
View File
@@ -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);
});
}
+1 -1
View File
@@ -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 )
@@ -1645,7 +1645,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();
+1 -1
View File
@@ -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 ()));
+1 -1
View File
@@ -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 ()));
+1 -1
View File
@@ -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()));
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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);
});
}
+1 -1
View File
@@ -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);
});
}
+1 -1
View File
@@ -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();
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -1086,7 +1086,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 )