diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-02-14 09:10:23 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-02-15 07:48:14 +0100 |
commit | c2429e3e95a4298f43c468f36a1a2832992dd40e (patch) | |
tree | f43bd173eabe863b896de6057b5aee2f92d808d5 /sd/source/ui/view/MediaObjectBar.cxx | |
parent | b89f239aa9d3d4660380bbd0c893aecde0986032 (diff) |
loplugin:flatten in sd/source/ui/view
Change-Id: I28e75ec162cde89fe1aa7d85aecce7ce80878d88
Reviewed-on: https://gerrit.libreoffice.org/67828
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui/view/MediaObjectBar.cxx')
-rw-r--r-- | sd/source/ui/view/MediaObjectBar.cxx | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/sd/source/ui/view/MediaObjectBar.cxx b/sd/source/ui/view/MediaObjectBar.cxx index 22c6ecf12062..fef4899810ef 100644 --- a/sd/source/ui/view/MediaObjectBar.cxx +++ b/sd/source/ui/view/MediaObjectBar.cxx @@ -108,38 +108,38 @@ void MediaObjectBar::GetState( SfxItemSet& rSet ) void MediaObjectBar::Execute( SfxRequest const & rReq ) { - if( SID_AVMEDIA_TOOLBOX == rReq.GetSlot() ) - { - const SfxItemSet* pArgs = rReq.GetArgs(); - const SfxPoolItem* pItem; + if( SID_AVMEDIA_TOOLBOX != rReq.GetSlot() ) + return; - if( !pArgs || ( SfxItemState::SET != pArgs->GetItemState( SID_AVMEDIA_TOOLBOX, false, &pItem ) ) ) - pItem = nullptr; + const SfxItemSet* pArgs = rReq.GetArgs(); + const SfxPoolItem* pItem; - if( pItem ) - { - std::unique_ptr<SdrMarkList> pMarkList(new SdrMarkList( mpView->GetMarkedObjectList() )); + if( !pArgs || ( SfxItemState::SET != pArgs->GetItemState( SID_AVMEDIA_TOOLBOX, false, &pItem ) ) ) + pItem = nullptr; - if( 1 == pMarkList->GetMarkCount() ) - { - SdrObject* pObj = pMarkList->GetMark( 0 )->GetMarkedSdrObj(); + if( !pItem ) + return; - if( dynamic_cast< SdrMediaObj *>( pObj ) ) - { - static_cast< sdr::contact::ViewContactOfSdrMediaObj& >( pObj->GetViewContact() ).executeMediaItem( - static_cast< const ::avmedia::MediaItem& >( *pItem ) ); + std::unique_ptr<SdrMarkList> pMarkList(new SdrMarkList( mpView->GetMarkedObjectList() )); + if( 1 != pMarkList->GetMarkCount() ) + return; - //if only changing state then don't set modified flag (e.g. playing a video) - if( !(static_cast< const ::avmedia::MediaItem& >( *pItem ).getMaskSet() & AVMediaSetMask::STATE)) - { - //fdo #32598: after changing playback opts, set document's modified flag - SdDrawDocument& rDoc = mpView->GetDoc(); - rDoc.SetChanged(); - } - } - } - } + SdrObject* pObj = pMarkList->GetMark( 0 )->GetMarkedSdrObj(); + + if( !dynamic_cast< SdrMediaObj *>( pObj ) ) + return; + + static_cast< sdr::contact::ViewContactOfSdrMediaObj& >( pObj->GetViewContact() ).executeMediaItem( + static_cast< const ::avmedia::MediaItem& >( *pItem ) ); + + + //if only changing state then don't set modified flag (e.g. playing a video) + if( !(static_cast< const ::avmedia::MediaItem& >( *pItem ).getMaskSet() & AVMediaSetMask::STATE)) + { + //fdo #32598: after changing playback opts, set document's modified flag + SdDrawDocument& rDoc = mpView->GetDoc(); + rDoc.SetChanged(); } } |