From 421add5ae745b6bdf9bfb502f25ce7730db51784 Mon Sep 17 00:00:00 2001 From: shlok3640 Date: Sat, 6 Dec 2025 15:51:21 +0000 Subject: [PATCH] tdf#165233 Use lambda instead of std::bind in ScDocShell Replaces the legacy std::bind usage with a modern C++ lambda in SetNotifyUndoActionHdl. This improves readability and ensures std::unique_ptr arguments are moved correctly using std::move. Change-Id: I96d1fe48563a80057fdac64007f729552c5411bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195172 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- sc/source/ui/docshell/docsh2.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sc/source/ui/docshell/docsh2.cxx b/sc/source/ui/docshell/docsh2.cxx index 6823327284db..631ff84fa659 100644 --- a/sc/source/ui/docshell/docsh2.cxx +++ b/sc/source/ui/docshell/docsh2.cxx @@ -109,7 +109,7 @@ void ScDocShell::InitItems() PutItem( SvxLineEndListItem ( pDrawLayer->GetLineEndList(), SID_LINEEND_LIST ) ); // Other modifications after creation of the DrawLayer - pDrawLayer->SetNotifyUndoActionHdl( std::bind( &ScDocFunc::NotifyDrawUndo, m_pDocFunc.get(), std::placeholders::_1 ) ); + pDrawLayer->SetNotifyUndoActionHdl( [this](auto pUndo) { m_pDocFunc->NotifyDrawUndo(std::move(pUndo)); } ); } else if (!comphelper::IsFuzzing()) {