sw/source/uibase/wrtsh/wrtsh1.cxx |   20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

New commits:
commit 626357f53c934e7f57dc80c3c83ad080767961f3
Author:     Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de>
AuthorDate: Thu Jul 11 12:48:29 2024 +0200
Commit:     Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de>
CommitDate: Thu Jul 11 17:16:56 2024 +0200

    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.mehrbr...@allotropia.de>
    Tested-by: Jenkins

diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx 
b/sw/source/uibase/wrtsh/wrtsh1.cxx
index e243beb22ea8..78170708ebad 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -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);

Reply via email to