[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - sfx2/source

Michael Stahl mstahl at redhat.com
Mon Mar 19 20:29:50 UTC 2018


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

New commits:
commit 21f220fce05bb99964f098247786eec014e56902
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>

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;
         });
 


More information about the Libreoffice-commits mailing list