summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2024-07-25 10:27:31 +0200
committerJulien Nabet <serval2412@yahoo.fr>2024-07-25 12:14:06 +0200
commite219fc0ede27854a82681fde8c1fa3d4f60b2068 (patch)
treeee7b865210ca13a8d386dcae87cb828e19e387ac /cui
parent042c62954be6ca55287e64cc725e71db4ddd7d8c (diff)
tdf#162174: fix crash when opening Bullets and Numbering dialog a second time
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>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/tabpages/numpages.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 08f05c9b9a0f..6a838d001772 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -335,6 +335,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()
@@ -440,10 +442,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++)
@@ -524,8 +525,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);