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 <mike.kaganski@collabora.com>
This commit is contained in:
shlok3640
2025-12-13 09:11:59 +01:00
committed by Mike Kaganski
parent f80fc21dc5
commit 421add5ae7
+1 -1
View File
@@ -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())
{