officecfg/registry/schema/org/openoffice/Office/Common.xcs |   24 +++++++++++--
 sw/source/uibase/wrtsh/wrtsh1.cxx                          |   16 ++++++--
 2 files changed, 34 insertions(+), 6 deletions(-)

New commits:
commit 8fa60cdf4be2913dc1856693ba45ead768867222
Author:     Aron Budea <[email protected]>
AuthorDate: Mon Jan 12 01:40:19 2026 +1030
Commit:     Aron Budea <[email protected]>
CommitDate: Thu Jan 22 15:09:39 2026 +0100

    tdf#169441 Decouple default list levels from bullet library items
    
    First commit f944648e0f5d52605a267ed50bba4bfc035aecc6 added
    a new config to make bullet library items configurable, then
    commit 626357f53c934e7f57dc80c3c83ad080767961f3 switched
    from using the set of three default list bullets to bullet
    library items.
    The configs are DefaultBullets and DefaultBulletsFonts.
    
    The problem is that the bullet library was never meant to
    correspond to the default list, and a bulleted list looks
    silly now. Let's introduce new configs for the list, with
    the old defaults:
    DefaultListBullets / DefaultListBulletsFonts
    
    Once reaching the end with increasing levels, the list
    wraps around.
    
    Change-Id: I91f6a06e3c298edcfd0d11a3597c23129e0b085d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197014
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <[email protected]>
    (cherry picked from commit 3c12bd0f084e74fe4ca98db50b454af5ef2b96d9)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197783
    Reviewed-by: Mike Kaganski <[email protected]>

diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index 7af8d14237ca..f9857f2fc550 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -3378,7 +3378,7 @@
       </info>
       <prop oor:name="DefaultBullets" oor:type="oor:string-list" 
oor:nillable="false">
         <info>
-          <desc>List of default bullets</desc>
+          <desc>List of default bullets in bullet library</desc>
         </info>
         <value>
           <it>●</it>
@@ -3393,7 +3393,7 @@
       </prop>
       <prop oor:name="DefaultBulletsFonts" oor:type="oor:string-list" 
oor:nillable="false">
         <info>
-          <desc>List of default bullet fonts. Matching font for 
`DefaultBullets`.</desc>
+          <desc>List of default bullet fonts in bullet library. Matching font 
for `DefaultBullets`.</desc>
         </info>
         <value>
           <it>OpenSymbol</it>
@@ -3406,6 +3406,26 @@
           <it>OpenSymbol</it>
         </value>
       </prop>
+      <prop oor:name="DefaultListBullets" oor:type="oor:string-list" 
oor:nillable="false">
+        <info>
+          <desc>List of default bullets in unordered list</desc>
+        </info>
+        <value>
+          <it>•</it>
+          <it>◦</it>
+          <it>▪</it>
+        </value>
+      </prop>
+      <prop oor:name="DefaultListBulletsFonts" oor:type="oor:string-list" 
oor:nillable="false">
+        <info>
+          <desc>List of default bullet fonts in unordered list. Matching font 
for `DefaultListBullets`.</desc>
+        </info>
+        <value>
+          <it>OpenSymbol</it>
+          <it>OpenSymbol</it>
+          <it>OpenSymbol</it>
+        </value>
+      </prop>
     </group>
     <group oor:name="Help">
       <info>
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx 
b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 614c831d952c..0bb86b0cac61 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -1707,13 +1707,21 @@ void SwWrtShell::NumOrBulletOn(bool bNum)
             if (! bNum)
             {
                 uno::Sequence<OUString> aBulletSymbols(
-                    
officecfg::Office::Common::BulletsNumbering::DefaultBullets::get());
+                    
officecfg::Office::Common::BulletsNumbering::DefaultListBullets::get());
                 uno::Sequence<OUString> aBulletSymbolsFonts(
-                    
officecfg::Office::Common::BulletsNumbering::DefaultBulletsFonts::get());
-                sal_Int32 nBulletSymbolIndex = nLvl < 
aBulletSymbols.getLength() ? nLvl : 0;
+                    
officecfg::Office::Common::BulletsNumbering::DefaultListBulletsFonts::get());
+                if (!aBulletSymbols.hasElements())
+                {
+                    // Add a single element even if user cleared the list in 
the config
+                    aBulletSymbols.realloc(1);
+                    aBulletSymbols.getArray()[0] = u"•"_ustr;
+                    aBulletSymbolsFonts.realloc(1);
+                    aBulletSymbolsFonts.getArray()[0] = "OpenSymbol";
+                }
+                sal_Int32 nBulletSymbolIndex = nLvl % 
aBulletSymbols.getLength();
                 
aFormat.SetBulletChar(aBulletSymbols[nBulletSymbolIndex].toChar());
                 vcl::Font aFont;
-                sal_Int32 nBulletSymbolsFontIndex = nLvl < 
aBulletSymbolsFonts.getLength() ? nLvl : 0;
+                sal_Int32 nBulletSymbolsFontIndex = nLvl % 
aBulletSymbolsFonts.getLength();
                 
aFont.SetFamilyName(aBulletSymbolsFonts[nBulletSymbolsFontIndex]);
                 aFormat.SetBulletFont(&aFont);
                 aFormat.SetNumberingType(SVX_NUM_CHAR_SPECIAL);

Reply via email to