summaryrefslogtreecommitdiff
path: root/forms
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 /forms
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 'forms')
-rw-r--r--forms/source/richtext/rtattributehandler.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/forms/source/richtext/rtattributehandler.cxx b/forms/source/richtext/rtattributehandler.cxx
index 65117893305b..582b451a8423 100644
--- a/forms/source/richtext/rtattributehandler.cxx
+++ b/forms/source/richtext/rtattributehandler.cxx
@@ -402,9 +402,8 @@ namespace frm
// if the current adjustment of the was the default adjustment for the *previous* text direction,
// then we toggle the adjustment, too
SvxAdjust eCurrentAdjustment = SvxAdjust::Left;
- const SfxPoolItem* pCurrentAdjustment = nullptr;
- if ( SfxItemState::SET == _rCurrentAttribs.GetItemState( EE_PARA_JUST, true, &pCurrentAdjustment ) )
- eCurrentAdjustment = static_cast< const SvxAdjustItem* >( pCurrentAdjustment )->GetAdjust();
+ if ( const SvxAdjustItem* pCurrentAdjustment = _rCurrentAttribs.GetItemIfSet( EE_PARA_JUST ) )
+ eCurrentAdjustment = pCurrentAdjustment->GetAdjust();
if ( eCurrentAdjustment == m_eOppositeDefaultAdjustment )
_rNewAttribs.Put( SvxAdjustItem( m_eDefaultAdjustment, EE_PARA_JUST ) );