[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sfx2/source

Michael Stahl mstahl at redhat.com
Wed Mar 21 14:10:35 UTC 2018


 sfx2/source/dialog/templdlg.cxx |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 8256df2bb3823f318d2131f513d62784e702b90c
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)
    
    (cherry picked from commit fd67ee14e769ebdf1e43d55e0117f70f90d53053)
    
    Change-Id: I47377447dd1e04a44033dea27ce7307a65821737
    Reviewed-on: https://gerrit.libreoffice.org/51244
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 21f220fce05bb99964f098247786eec014e56902)
    Reviewed-on: https://gerrit.libreoffice.org/51591

diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 0832f1515a15..0e872b367581 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -562,6 +562,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;
         });
 


More information about the Libreoffice-commits mailing list