diff options
author | Michael Stahl <mstahl@redhat.com> | 2017-09-29 20:35:40 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-09-29 20:54:40 +0200 |
commit | 41af2a9e26f3ee6b505b343120d5df3617ba5c49 (patch) | |
tree | a38ec5b557b8ca58a41d54748be9899e73fb3138 | |
parent | 6803cabb462ba35812be7de62d60ea4c5b32c3df (diff) |
tdf#91106 sfx2: Stylist: sort top-level styles in hierarchical mode
(regression from 8f04b172c5c78fa80c3692a729f0191425195869)
Change-Id: I111d12a622390afc02eb73a42b1d3c714f046bd2
-rw-r--r-- | sfx2/source/dialog/templdlg.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
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; } |