[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sfx2/source

Michael Stahl mstahl at redhat.com
Tue Oct 3 15:19:17 UTC 2017


 sfx2/source/dialog/templdlg.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 729752b2df5c64429aff10628680d91c8bbbe1a6
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Sep 29 20:35:40 2017 +0200

    tdf#91106 sfx2: Stylist: sort top-level styles in hierarchical mode
    
    (regression from 8f04b172c5c78fa80c3692a729f0191425195869)
    
    Change-Id: I111d12a622390afc02eb73a42b1d3c714f046bd2
    (cherry picked from commit 41af2a9e26f3ee6b505b343120d5df3617ba5c49)
    Reviewed-on: https://gerrit.libreoffice.org/42952
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index fdeaa9910a42..0832f1515a15 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -559,6 +559,12 @@ StyleTreeArr_Impl& MakeTree_Impl(StyleTreeArr_Impl& rArr)
     // Only keep tree roots in rArr, child elements can be accessed through the hierarchy
     rArr.erase(std::remove_if(rArr.begin(), rArr.end(), [](StyleTree_Impl* pEntry) { return pEntry->HasParent(); }), rArr.end());
 
+    // tdf#91106 sort top level styles
+    std::sort(rArr.begin(), rArr.end(),
+        [&aSorter](StyleTree_Impl* pEntry1, StyleTree_Impl* pEntry2) {
+            return aSorter.compare(pEntry1->getName(), pEntry2->getName()) < 0;
+        });
+
     return rArr;
 }
 


More information about the Libreoffice-commits mailing list