summaryrefslogtreecommitdiff
path: root/editeng/source/outliner
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-02-28 14:59:00 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-03-01 07:46:32 +0100
commite13a8c7df2d11814a0a4669aad88e68e27835934 (patch)
treee1669f58faa656da59261b7a24329ae368e43475 /editeng/source/outliner
parent5a64b618d84edb65465950d54e3b4afc952a301c (diff)
use SfxItemSet::GetItemIfSet in desktop..reportdesign
Change-Id: Iaa0ddf4e97866d537a478e668e3c651a9eabc465 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130708 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'editeng/source/outliner')
-rw-r--r--editeng/source/outliner/outlvw.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx
index bf11c742dfea..e4b8fd5e80f3 100644
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -1045,17 +1045,15 @@ void OutlinerView::ApplyBulletsNumbering(
// Get old bullet space.
{
- const SfxPoolItem* pPoolItem=nullptr;
- SfxItemState eState = rAttrs.GetItemState(EE_PARA_NUMBULLET, false, &pPoolItem);
- if (eState != SfxItemState::SET)
+ const SvxNumBulletItem* pNumBulletItem = rAttrs.GetItemIfSet(EE_PARA_NUMBULLET, false);
+ if (pNumBulletItem)
{
// Use default value when has not contain bullet item.
ESelection aSelection(nPara, 0);
SfxItemSet aTmpSet(pOwner->pEditEngine->GetAttribs(aSelection));
- pPoolItem = aTmpSet.GetItem(EE_PARA_NUMBULLET);
+ pNumBulletItem = aTmpSet.GetItem(EE_PARA_NUMBULLET);
}
- const SvxNumBulletItem* pNumBulletItem = dynamic_cast< const SvxNumBulletItem* >(pPoolItem);
if (pNumBulletItem)
{
const sal_uInt16 nLevelCnt = std::min(pNumBulletItem->GetNumRule().GetLevelCount(), aNewRule.GetLevelCount());