summaryrefslogtreecommitdiff
path: root/cui/source/customize
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-02-28 12:01:43 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-03-01 07:49:28 +0100
commite85b482df3fa01e5a2b549df63db96cc49f1ca78 (patch)
treecdeda4bcdcb113f980852bb409648ff2b00e2d9d /cui/source/customize
parent51b995b9861c3415c44f59fa5367347fd7eee255 (diff)
use SfxItemSet::GetItemIfSet in cui
Change-Id: I0a6dbf50d29adf9da9512a9136709bf563e478f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130689 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui/source/customize')
-rw-r--r--cui/source/customize/acccfg.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index 09891003b784..81d1bb10668e 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -1510,10 +1510,9 @@ void SfxAcceleratorConfigPage::Reset(const SfxItemSet* rSet)
RadioHdl(*m_xOfficeButton);
#if HAVE_FEATURE_SCRIPTING
- const SfxPoolItem* pMacroItem = nullptr;
- if (SfxItemState::SET == rSet->GetItemState(SID_MACROINFO, true, &pMacroItem))
+ if (const SfxMacroInfoItem* pMacroItem = rSet->GetItemIfSet(SID_MACROINFO))
{
- m_pMacroInfoItem = &dynamic_cast<const SfxMacroInfoItem&>(*pMacroItem);
+ m_pMacroInfoItem = pMacroItem;
m_xGroupLBox->SelectMacro(m_pMacroInfoItem);
}
#else