sfx2/source/dialog/templdlg.cxx | 6 ++++++ 1 file changed, 6 insertions(+)
New commits: commit 41af2a9e26f3ee6b505b343120d5df3617ba5c49 Author: Michael Stahl <mst...@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 diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index e20305027caa..1ca0ea85808f 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -558,6 +558,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; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits