diff options
Diffstat (limited to 'sc/source/ui/view/cellsh1.cxx')
-rw-r--r-- | sc/source/ui/view/cellsh1.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index f38184ac3b1b..75f2e670ae91 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -1305,12 +1305,9 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) SotClipboardFormatId nFormat = SotClipboardFormatId::NONE; const SfxPoolItem* pItem; - if ( pReqArgs && - pReqArgs->GetItemState(nSlot, true, &pItem) == SfxItemState::SET && - dynamic_cast<const SfxUInt32Item*>( pItem) != nullptr ) - { - nFormat = static_cast<SotClipboardFormatId>(static_cast<const SfxUInt32Item*>(pItem)->GetValue()); - } + if ( pReqArgs && pReqArgs->GetItemState(nSlot, true, &pItem) == SfxItemState::SET ) + if (auto pIntItem = dynamic_cast<const SfxUInt32Item*>(pItem) ) + nFormat = static_cast<SotClipboardFormatId>(pIntItem->GetValue()); if ( nFormat != SotClipboardFormatId::NONE ) { |