diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-03-01 11:08:05 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-03-01 19:17:09 +0100 |
commit | e50f13c9947332639f455739c87213a954067299 (patch) | |
tree | 85d98a501258a9734c550f997f833c3c353ceee9 /sc/source/ui/vba | |
parent | 05db887bc226b85befe2c2b9e84b796020a6ca05 (diff) |
use SfxItemSet::GetItemIfSet in sc/source/ui/
Change-Id: Ia360a0bbc57f2d50dc26ae670d6e953d3f2d8a8e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130745
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/vba')
-rw-r--r-- | sc/source/ui/vba/vbaapplication.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx index 7b68047d0b80..f9ceb7d930be 100644 --- a/sc/source/ui/vba/vbaapplication.cxx +++ b/sc/source/ui/vba/vbaapplication.cxx @@ -1363,9 +1363,8 @@ ScVbaApplication::getDisplayFormulaBar() reqList.Put( sfxFormBar ); pViewShell->GetState( reqList ); - const SfxPoolItem *pItem=nullptr; - if ( reqList.GetItemState( FID_TOGGLEINPUTLINE, false, &pItem ) == SfxItemState::SET ) - bRes = static_cast<const SfxBoolItem*>(pItem)->GetValue(); + if ( const SfxBoolItem *pItem = reqList.GetItemIfSet( FID_TOGGLEINPUTLINE, false ) ) + bRes = pItem->GetValue(); } return bRes; } |