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

Timothée Isnard timotheecisnard at gmail.com
Tue Oct 20 14:11:06 PDT 2015


 sw/source/uibase/dbui/dbmgr.cxx |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 5b6e4a225cf39355f4b345cfe033c07d5c165c7e
Author: Timothée Isnard <timotheecisnard at gmail.com>
Date:   Sun Oct 11 22:48:31 2015 +0200

    Replace bind2nd/mem_fun by lambdas in sw/source/uibase/dbui/dbmgr.cxx
    
    Change-Id: Ibd4b88302a8791a62d612bd49641763d7b565021
    Reviewed-on: https://gerrit.libreoffice.org/19312
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 278fad0..0c763ab 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -1443,7 +1443,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
                 {
                     std::set<SwRootFrm*> aAllLayouts = pTargetShell->GetDoc()->GetAllLayouts();
                     std::for_each( aAllLayouts.begin(), aAllLayouts.end(),
-                        ::std::bind2nd(::std::mem_fun(&SwRootFrm::FreezeLayout), true));
+                        [](SwRootFrm* pLayout) { pLayout->FreezeLayout(true); });
                     bFreezedLayouts = true;
                 }
             } while( !bCancel &&
@@ -1484,9 +1484,11 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
             {
                 pTargetShell->CalcLayout();
                 std::set<SwRootFrm*> aAllLayouts = pTargetShell->GetDoc()->GetAllLayouts();
-                std::for_each( aAllLayouts.begin(), aAllLayouts.end(),
-                    ::std::bind2nd(::std::mem_fun(&SwRootFrm::FreezeLayout), false));
-                std::for_each( aAllLayouts.begin(), aAllLayouts.end(),std::mem_fun(&SwRootFrm::AllCheckPageDescs));
+                std::for_each( aAllLayouts.begin(), aAllLayouts.end(), [](SwRootFrm* pLayout)
+                {
+                    pLayout->FreezeLayout(false);
+                    pLayout->AllCheckPageDescs();
+                });
             }
 
             pProgressDlg.disposeAndClear();


More information about the Libreoffice-commits mailing list