summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2018-03-13 22:16:20 +0100
committerMichael Stahl <mstahl@redhat.com>2018-03-13 22:44:06 +0100
commitfd67ee14e769ebdf1e43d55e0117f70f90d53053 (patch)
tree366d0ef603a9fc2731f9a2d3bec94fa8d70ad9b4
parentfa585ae736246126cf1b574f72750b7a57cba947 (diff)
tdf#91106 sfx2: Stylist hierarchical: sort the Default Style first
(regression from 41af2a9e26f3ee6b505b343120d5df3617ba5c49) Change-Id: I47377447dd1e04a44033dea27ce7307a65821737
-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 7f1a9a77038b..79f4970b98d0 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -555,6 +555,10 @@ void MakeTree_Impl(StyleTreeArr_Impl& rArr)
// tdf#91106 sort top level styles
std::sort(rArr.begin(), rArr.end(),
[&aSorter](std::unique_ptr<StyleTree_Impl> const & pEntry1, std::unique_ptr<StyleTree_Impl> const & 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;
});
}