tdf#91106 sfx2: Stylist hierarchical: sort the Default Style first
(regression from 41af2a9e26
)
Change-Id: I47377447dd1e04a44033dea27ce7307a65821737
This commit is contained in:
@@ -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;
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user