[Libreoffice-commits] core.git: sfx2/source
Michael Stahl
mstahl at redhat.com
Tue Mar 13 21:46:36 UTC 2018
sfx2/source/dialog/templdlg.cxx | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit fd67ee14e769ebdf1e43d55e0117f70f90d53053
Author: Michael Stahl <mstahl at redhat.com>
Date: Tue Mar 13 22:16:20 2018 +0100
tdf#91106 sfx2: Stylist hierarchical: sort the Default Style first
(regression from 41af2a9e26f3ee6b505b343120d5df3617ba5c49)
Change-Id: I47377447dd1e04a44033dea27ce7307a65821737
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;
});
}
More information about the Libreoffice-commits
mailing list