diff options
author | Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> | 2024-02-22 11:55:30 +0100 |
---|---|---|
committer | Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> | 2024-02-26 13:26:20 +0100 |
commit | f944648e0f5d52605a267ed50bba4bfc035aecc6 (patch) | |
tree | cb1497e11f7d32025101b574d7f1dfd456fedcaf /cui | |
parent | e0839be6c1d6d5439716596687aec9596d025808 (diff) |
tdf#108697 Allow modifying default bullet selection
Allow to change bullets in configuration.
Change-Id: Iab26118dd597417997d6f0a7355f516a4da97ee4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163735
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/tabpages/numpages.cxx | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 36868e3579ab..8bba652c594e 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -55,6 +55,7 @@ #include <comphelper/lok.hxx> #include <svx/svxids.hrc> #include <o3tl/string_view.hxx> +#include <officecfg/Office/Common.hxx> #include <algorithm> #include <memory> @@ -122,19 +123,6 @@ static SvxNumSettings_Impl* lcl_CreateNumSettingsPtr(const Sequence<PropertyValu return pNew; } -// the selection of bullets from the OpenSymbol -const sal_Unicode aBulletTypes[] = -{ - 0x2022, - 0x25cf, - 0xe00c, - 0xe00a, - 0x2794, - 0x27a2, - 0x2717, - 0x2714 -}; - // Is one of the masked formats set? static bool lcl_IsNumFmtSet(SvxNumRule const * pNum, sal_uInt16 nLevelMask) { @@ -149,7 +137,7 @@ static bool lcl_IsNumFmtSet(SvxNumRule const * pNum, sal_uInt16 nLevelMask) return bRet; } -static const vcl::Font& lcl_GetDefaultBulletFont() +static vcl::Font& lcl_GetDefaultBulletFont() { static vcl::Font aDefBulletFont = []() { @@ -443,8 +431,11 @@ IMPL_LINK_NOARG(SvxBulletPickTabPage, NumSelectHdl_Impl, ValueSet*, void) bPreset = false; bModified = true; - sal_Unicode cChar = aBulletTypes[m_xExamplesVS->GetSelectedItemId() - 1]; - const vcl::Font& rActBulletFont = lcl_GetDefaultBulletFont(); + sal_uInt16 nIndex = m_xExamplesVS->GetSelectedItemId() - 1; + sal_Unicode cChar = officecfg::Office::Common::BulletsNumbering::DefaultBullets::get()[nIndex].toChar(); + vcl::Font& rActBulletFont = lcl_GetDefaultBulletFont(); + rActBulletFont.SetFamilyName( + officecfg::Office::Common::BulletsNumbering::DefaultBulletsFonts::get()[nIndex]); sal_uInt16 nMask = 1; for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) |