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:
@@ -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())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user