[Libreoffice-commits] core.git: sfx2/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Mar 1 07:30:48 UTC 2019
sfx2/source/doc/sfxbasemodel.cxx | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
New commits:
commit 517b8037f8c9be93c578befd5b2c3458b3306bc6
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Feb 28 10:46:41 2019 +0100
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Fri Mar 1 08:30:21 2019 +0100
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 at redhat.com>
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 );
More information about the Libreoffice-commits
mailing list