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 3c12bd0f084e74fe4ca98db50b454af5ef2b96d9 Author: Aron Budea <[email protected]> AuthorDate: Mon Jan 12 01:40:19 2026 +1030 Commit: Miklos Vajna <[email protected]> CommitDate: Mon Jan 12 13:24:47 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]> diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs index cd3ba8cc88f4..ba4964e28dcf 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 ea695848b948..992930f8c1a7 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);
