Use configured bullet symbol when clicking bullets button

Instead of the generic default symbol

Change-Id: I0923d4ede5d7cc09d61bb57d5cb6dbf6f2af8058
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170373
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
Tested-by: Jenkins
This commit is contained in:
Samuel Mehrbrodt
2024-07-11 17:16:56 +02:00
parent 74829f2a64
commit 626357f53c
+8 -12
View File
@@ -1584,11 +1584,6 @@ void SwWrtShell::NumOrBulletOn(bool bNum)
// Append the character template at the numbering.
SwCharFormat* pChrFormat;
SwDocShell* pDocSh = GetView().GetDocShell();
// #i63395#
// Only apply user defined default bullet font
const vcl::Font* pFnt = numfunc::IsDefBulletFontUserDefined()
? &numfunc::GetDefBulletFont()
: nullptr;
if (bNum)
{
@@ -1615,13 +1610,14 @@ void SwWrtShell::NumOrBulletOn(bool bNum)
if (! bNum)
{
// #i63395#
// Only apply user defined default bullet font
if ( pFnt )
{
aFormat.SetBulletFont( pFnt );
}
aFormat.SetBulletChar( numfunc::GetBulletChar(nLvl) );
uno::Sequence<OUString> aBulletSymbols(
officecfg::Office::Common::BulletsNumbering::DefaultBullets::get());
uno::Sequence<OUString> aBulletSymbolsFonts(
officecfg::Office::Common::BulletsNumbering::DefaultBulletsFonts::get());
aFormat.SetBulletChar(aBulletSymbols[0].toChar());
vcl::Font aFont;
aFont.SetFamilyName(aBulletSymbolsFonts[0]);
aFormat.SetBulletFont(&aFont);
aFormat.SetNumberingType(SVX_NUM_CHAR_SPECIAL);
// #i93908# clear suffix for bullet lists
aFormat.SetListFormat(u""_ustr, u""_ustr, nLvl);