summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-02-28 10:46:41 +0100
committerStephan Bergmann <sbergman@redhat.com>2019-03-01 08:30:21 +0100
commit517b8037f8c9be93c578befd5b2c3458b3306bc6 (patch)
treeed74790f10651453d03efb1c826598ef85471c31
parentf58359f8c561b6a377044bba6c0e76eec2db91e7 (diff)
Use lambda instead of std::bind + wrapper function
Change-Id: Id8912b8b1b454fbc6ef58ce4fc18a15e096e5cea Reviewed-on: https://gerrit.libreoffice.org/68494 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx12
1 files changed, 1 insertions, 11 deletions
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 1bc11c4f00e1..efa1cc3695aa 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -1496,16 +1496,6 @@ sal_Bool SAL_CALL SfxBaseModel::isReadonly()
return !m_pData->m_pObjectShell.is() || m_pData->m_pObjectShell->IsReadOnly();
}
-/**
- * Proxy around SfxObjectShell::Save_Impl(), as vcl::solarthread::syncExecute()
- * does not seem to accept lambdas.
- */
-static bool SaveImplStatic(SfxObjectShell* pThis, const SfxItemSet* pParams)
-{
- return pThis->Save_Impl(pParams);
-}
-
-
// XStorable2
@@ -1596,7 +1586,7 @@ void SAL_CALL SfxBaseModel::storeSelf( const Sequence< beans::PropertyValue >
m_pData->m_pObjectShell->GetMedium( )->SetInCheckIn( nSlotId == SID_CHECKIN );
if (bOnMainThread)
bRet = vcl::solarthread::syncExecute(
- std::bind(&SaveImplStatic, m_pData->m_pObjectShell.get(), pParams.get()));
+ [this, &pParams] { return m_pData->m_pObjectShell->Save_Impl(pParams.get()); });
else
bRet = m_pData->m_pObjectShell->Save_Impl(pParams.get());
m_pData->m_pObjectShell->GetMedium( )->SetInCheckIn( nSlotId != SID_CHECKIN );