diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2024-07-25 10:27:31 +0200 |
---|---|---|
committer | Thorsten Behrens <thorsten.behrens@allotropia.de> | 2024-07-28 23:41:29 +0200 |
commit | 74fdd584866c8326678877e4ac47ab9df1a3f635 (patch) | |
tree | 6f4b6f9a80e521b53783d3a9fff5fee953cbd230 | |
parent | 3978dfe0fcd21b35ee3af92ea4129f66b14a2491 (diff) |
tdf#162174: fix crash when opening Bullets and Numbering dialog a second timecib_contract49c-24.2.5.2.M2
It seems we must first retrieve the array of values from:
- officecfg::Office::Common::BulletsNumbering::DefaultBullets
- officecfg::Office::Common::BulletsNumbering::DefaultBulletsFonts
before retrieving the value by index.
Change-Id: I9cdf124f73c52f3027ae8e97a73e01e0efb73603
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171003
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
-rw-r--r-- | cui/source/tabpages/numpages.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 211bb3f550a2..9311ab96559c 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -338,6 +338,8 @@ SvxBulletPickTabPage::SvxBulletPickTabPage(weld::Container* pPage, weld::DialogC m_xExamplesVS->SetSelectHdl(LINK(this, SvxBulletPickTabPage, NumSelectHdl_Impl)); m_xExamplesVS->SetDoubleClickHdl(LINK(this, SvxBulletPickTabPage, DoubleClickHdl_Impl)); m_xBtChangeBullet->connect_clicked(LINK(this, SvxBulletPickTabPage, ClickAddChangeHdl_Impl)); + m_aBulletSymbols = officecfg::Office::Common::BulletsNumbering::DefaultBullets::get(); + m_aBulletSymbolsFonts = officecfg::Office::Common::BulletsNumbering::DefaultBulletsFonts::get(); } SvxBulletPickTabPage::~SvxBulletPickTabPage() @@ -443,10 +445,9 @@ IMPL_LINK_NOARG(SvxBulletPickTabPage, NumSelectHdl_Impl, ValueSet*, void) bPreset = false; bModified = true; sal_uInt16 nIndex = m_xExamplesVS->GetSelectedItemId() - 1; - sal_Unicode cChar = officecfg::Office::Common::BulletsNumbering::DefaultBullets::get()[nIndex].toChar(); + sal_Unicode cChar = m_aBulletSymbols[nIndex].toChar(); vcl::Font& rActBulletFont = lcl_GetDefaultBulletFont(); - rActBulletFont.SetFamilyName( - officecfg::Office::Common::BulletsNumbering::DefaultBulletsFonts::get()[nIndex]); + rActBulletFont.SetFamilyName(m_aBulletSymbolsFonts[nIndex]); sal_uInt16 nMask = 1; for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) @@ -527,8 +528,6 @@ IMPL_LINK_NOARG(SvxBulletPickTabPage, ClickAddChangeHdl_Impl, weld::Button&, voi _nMask <<= 1; } - m_aBulletSymbols = officecfg::Office::Common::BulletsNumbering::DefaultBullets::get(); - m_aBulletSymbolsFonts = officecfg::Office::Common::BulletsNumbering::DefaultBulletsFonts::get(); css::uno::Sequence<OUString> aBulletSymbolsList(m_aBulletSymbols.size()); css::uno::Sequence<OUString> aBulletSymbolsFontsList(m_aBulletSymbolsFonts.size()); auto aBulletSymbolsListRange = asNonConstRange(aBulletSymbolsList); |