[Libreoffice-commits] core.git: Branch 'libreoffice-5-3-2' - sw/source

Michael Stahl mstahl at redhat.com
Wed Mar 29 17:34:27 UTC 2017


 sw/source/core/doc/docbm.cxx |   20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

New commits:
commit db5bde754ed1c8ab6ae1d9bf346cf954de706bb1
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Feb 3 16:48:02 2017 +0100

    tdf#104447 sw: make lcl_DebugMarks output more readable, pos. at the start
    
    (cherry picked from commit f6596a35c2d9a8c365bb78e1256a2def57ee1a36)
    
    The pass-by-value is also fixed here which is a surprisingly expensive
    performance regression.
    
    Change-Id: If9c151faefa3d109af2df7933a275c667880fb75
    Reviewed-on: https://gerrit.libreoffice.org/35492
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 4c7775247fbbf38cd397fd7649bf10810f27a0b4)
    Reviewed-on: https://gerrit.libreoffice.org/35525
    Reviewed-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>
    Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
    Tested-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>

diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index f75dd0e2c5de..1604d7ccf35c 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -288,28 +288,28 @@ namespace
             [&rName] (IDocumentMarkAccess::pMark_t const& rpMark) { return rpMark->GetName() == rName; } );
     }
 
-    void lcl_DebugMarks(IDocumentMarkAccess::container_t vMarks)
+    void lcl_DebugMarks(IDocumentMarkAccess::container_t const& rMarks)
     {
 #if OSL_DEBUG_LEVEL > 0
-        SAL_INFO("sw.core", vMarks.size() << " Marks");
-        for(IDocumentMarkAccess::iterator_t ppMark = vMarks.begin();
-            ppMark != vMarks.end();
-            ppMark++)
+        SAL_INFO("sw.core", rMarks.size() << " Marks");
+        for (IDocumentMarkAccess::const_iterator_t ppMark = rMarks.begin();
+             ppMark != rMarks.end();
+             ++ppMark)
         {
             IMark* pMark = ppMark->get();
             const SwPosition* const pStPos = &pMark->GetMarkStart();
             const SwPosition* const pEndPos = &pMark->GetMarkEnd();
             SAL_INFO("sw.core",
-                typeid(*pMark).name() << " " <<
-                pMark->GetName() << " " <<
                 pStPos->nNode.GetIndex() << "," <<
                 pStPos->nContent.GetIndex() << " " <<
                 pEndPos->nNode.GetIndex() << "," <<
-                pEndPos->nContent.GetIndex());
+                pEndPos->nContent.GetIndex() << " " <<
+                typeid(*pMark).name() << " " <<
+                pMark->GetName());
         }
 #endif
-        assert(std::is_sorted(vMarks.begin(), vMarks.end(), lcl_MarkOrderingByStart));
-        (void) vMarks;
+        assert(std::is_sorted(rMarks.begin(), rMarks.end(), lcl_MarkOrderingByStart));
+        (void) rMarks;
     };
 }
 


More information about the Libreoffice-commits mailing list