diff options
Diffstat (limited to 'sc/source/ui/vba/vbaapplication.cxx')
-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; } |