[Libreoffice-commits] core.git: sfx2/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Feb 28 09:12:47 UTC 2019


 sfx2/source/doc/sfxbasemodel.cxx |   12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

New commits:
commit bf75515989a5dfda613b1047977648288d941a85
Author:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Wed Feb 27 15:06:45 2019 +0100
Commit:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Thu Feb 28 10:12:21 2019 +0100

    Use lambda instead of std::bind + wrapper function
    
    Change-Id: I7d51d09b78297442d07dd4ecbab7b5ce38d8ffee
    Reviewed-on: https://gerrit.libreoffice.org/68447
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>

diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 7740b5c1a41a..1bc11c4f00e1 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -1505,16 +1505,6 @@ static bool SaveImplStatic(SfxObjectShell* pThis, const SfxItemSet* pParams)
     return pThis->Save_Impl(pParams);
 }
 
-/**
- * Proxy around SfxBaseModel::impl_store(), as vcl::solarthread::syncExecute()
- * does not seem to accept lambdas or void functions.
- */
-static bool ImplStoreStatic(SfxBaseModel* pThis, const OUString& rURL,
-                            const uno::Sequence<beans::PropertyValue>& rArgs, bool bSaveTo)
-{
-    pThis->impl_store(rURL, rArgs, bSaveTo);
-    return true;
-}
 
 //  XStorable2
 
@@ -1704,7 +1694,7 @@ void SAL_CALL SfxBaseModel::storeToURL( const   OUString&                   rURL
         utl::MediaDescriptor aDescriptor(rArgs);
         bool bOnMainThread = aDescriptor.getUnpackedValueOrDefault("OnMainThread", false);
         if (bOnMainThread)
-            vcl::solarthread::syncExecute(std::bind(&ImplStoreStatic, this, rURL, rArgs, true));
+            vcl::solarthread::syncExecute([this, rURL, rArgs]() { impl_store(rURL, rArgs, true); });
         else
             impl_store(rURL, rArgs, true);
     }


More information about the Libreoffice-commits mailing list