summaryrefslogtreecommitdiff
path: root/sfx2/source/dialog
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2018-03-13 22:16:20 +0100
committerAndras Timar <andras.timar@collabora.com>2018-03-26 08:23:51 +0200
commit3f7cef8dc3983c9f96c7240bb528f1210b43549f (patch)
tree11d02604436b44e3842c4bb3f3cb14bf3fda5348 /sfx2/source/dialog
parent27be4472daf2e7e247bd68e3fd2eb3b0ea69d82e (diff)
tdf#91106 sfx2: Stylist hierarchical: sort the Default Style first
(regression from 41af2a9e26f3ee6b505b343120d5df3617ba5c49) (cherry picked from commit fd67ee14e769ebdf1e43d55e0117f70f90d53053) Change-Id: I47377447dd1e04a44033dea27ce7307a65821737 Reviewed-on: https://gerrit.libreoffice.org/51244 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 21f220fce05bb99964f098247786eec014e56902)
Diffstat (limited to 'sfx2/source/dialog')
-rw-r--r--sfx2/source/dialog/templdlg.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 0e3f8e54a92b..aab3bc258236 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -561,6 +561,10 @@ StyleTreeArr_Impl& MakeTree_Impl(StyleTreeArr_Impl& rArr)
// tdf#91106 sort top level styles
std::sort(rArr.begin(), rArr.end(),
[&aSorter](StyleTree_Impl* pEntry1, StyleTree_Impl* pEntry2) {
+ if (pEntry2->getName() == "Default Style")
+ return false;
+ if (pEntry1->getName() == "Default Style")
+ return true; // default always first
return aSorter.compare(pEntry1->getName(), pEntry2->getName()) < 0;
});