diff options
Diffstat (limited to 'sd/source/ui/view/MediaObjectBar.cxx')
-rw-r--r-- | sd/source/ui/view/MediaObjectBar.cxx | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/sd/source/ui/view/MediaObjectBar.cxx b/sd/source/ui/view/MediaObjectBar.cxx index d2d9bf767fa2..0c34eee8d050 100644 --- a/sd/source/ui/view/MediaObjectBar.cxx +++ b/sd/source/ui/view/MediaObjectBar.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -98,15 +98,15 @@ MediaObjectBar::~MediaObjectBar() void MediaObjectBar::GetState( SfxItemSet& rSet ) { - SfxWhichIter aIter( rSet ); - USHORT nWhich = aIter.FirstWhich(); + SfxWhichIter aIter( rSet ); + USHORT nWhich = aIter.FirstWhich(); while( nWhich ) { - if( SID_AVMEDIA_TOOLBOX == nWhich ) + if( SID_AVMEDIA_TOOLBOX == nWhich ) { SdrMarkList* pMarkList = new SdrMarkList( mpView->GetMarkedObjectList() ); - bool bDisable = true; + bool bDisable = true; if( 1 == pMarkList->GetMarkCount() ) { @@ -115,7 +115,7 @@ void MediaObjectBar::GetState( SfxItemSet& rSet ) if( pObj && pObj->ISA( SdrMediaObj ) ) { ::avmedia::MediaItem aItem( SID_AVMEDIA_TOOLBOX ); - + static_cast< sdr::contact::ViewContactOfSdrMediaObj& >( pObj->GetViewContact() ).updateMediaItem( aItem ); rSet.Put( aItem ); bDisable = false; @@ -124,7 +124,7 @@ void MediaObjectBar::GetState( SfxItemSet& rSet ) if( bDisable ) rSet.DisableItem( SID_AVMEDIA_TOOLBOX ); - + delete pMarkList; } @@ -136,14 +136,14 @@ void MediaObjectBar::GetState( SfxItemSet& rSet ) void MediaObjectBar::Execute( SfxRequest& rReq ) { - if( SID_AVMEDIA_TOOLBOX == rReq.GetSlot() ) + if( SID_AVMEDIA_TOOLBOX == rReq.GetSlot() ) { - const SfxItemSet* pArgs = rReq.GetArgs(); - const SfxPoolItem* pItem; - + const SfxItemSet* pArgs = rReq.GetArgs(); + const SfxPoolItem* pItem; + if( !pArgs || ( SFX_ITEM_SET != pArgs->GetItemState( SID_AVMEDIA_TOOLBOX, FALSE, &pItem ) ) ) pItem = NULL; - + if( pItem ) { SdrMarkList* pMarkList = new SdrMarkList( mpView->GetMarkedObjectList() ); @@ -154,7 +154,7 @@ void MediaObjectBar::Execute( SfxRequest& rReq ) if( pObj && pObj->ISA( SdrMediaObj ) ) { - static_cast< sdr::contact::ViewContactOfSdrMediaObj& >( pObj->GetViewContact() ).executeMediaItem( + static_cast< sdr::contact::ViewContactOfSdrMediaObj& >( pObj->GetViewContact() ).executeMediaItem( static_cast< const ::avmedia::MediaItem& >( *pItem ) ); } } |