diff options
author | Alexander Wilms <f.alexander.wilms@gmail.com> | 2014-02-22 21:20:15 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-23 03:38:49 +0000 |
commit | 0ce0c369aa8880dff9fe874ba85ec6f52ee37ddf (patch) | |
tree | 5024cba9f9ea5e3b23ea26025323f6aef39488d0 /avmedia/source/framework | |
parent | b81ac16e65b311d6e43c05c22c65d2040c9d7e04 (diff) |
Remove unneccessary comments
Change-Id: I939160ae72fecbe3d4a60ce755730bd4c38497fb
Reviewed-on: https://gerrit.libreoffice.org/8182
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'avmedia/source/framework')
-rw-r--r-- | avmedia/source/framework/mediacontrol.cxx | 36 | ||||
-rw-r--r-- | avmedia/source/framework/mediaitem.cxx | 58 | ||||
-rw-r--r-- | avmedia/source/framework/mediaplayer.cxx | 22 | ||||
-rw-r--r-- | avmedia/source/framework/mediatoolbox.cxx | 28 | ||||
-rw-r--r-- | avmedia/source/framework/soundhandler.hxx | 28 |
5 files changed, 48 insertions, 124 deletions
diff --git a/avmedia/source/framework/mediacontrol.cxx b/avmedia/source/framework/mediacontrol.cxx index d0525d2a6eba..2a6e66d0167a 100644 --- a/avmedia/source/framework/mediacontrol.cxx +++ b/avmedia/source/framework/mediacontrol.cxx @@ -59,9 +59,9 @@ namespace avmedia { -// ---------------- + // - MediaControl - -// --------------- + MediaControl::MediaControl( Window* pParent, MediaControlStyle eControlStyle ) : Control( pParent ), @@ -194,7 +194,7 @@ MediaControl::MediaControl( Window* pParent, MediaControlStyle eControlStyle ) : maTimer.Start(); } -// ------------------------------------------------------------------------------ + MediaControl::~MediaControl() { @@ -202,14 +202,14 @@ MediaControl::~MediaControl() delete mpZoomListBox; } -// ------------------------------------------------------------------------------ + const Size& MediaControl::getMinSizePixel() const { return maMinSize; } -// ------------------------------------------------------------------------------ + void MediaControl::Resize() { @@ -267,7 +267,7 @@ void MediaControl::Resize() } } -// ------------------------------------------------------------------------------ + void MediaControl::setState( const MediaItem& rItem ) { @@ -282,7 +282,7 @@ void MediaControl::setState( const MediaItem& rItem ) } } -// ------------------------------------------------------------------------------ + void MediaControl::implUpdateToolboxes() { @@ -361,7 +361,7 @@ void MediaControl::implUpdateToolboxes() } } -// ------------------------------------------------------------------------------ + void MediaControl::implUpdateTimeSlider() { @@ -388,7 +388,7 @@ void MediaControl::implUpdateTimeSlider() } } -// ------------------------------------------------------------------------------ + void MediaControl::implUpdateVolumeSlider() { @@ -405,7 +405,7 @@ void MediaControl::implUpdateVolumeSlider() } } -// ------------------------------------------------------------------------------ + void MediaControl::implUpdateTimeField( double fCurTime ) { @@ -425,14 +425,14 @@ void MediaControl::implUpdateTimeField( double fCurTime ) } } -// ------------------------------------------------------------------------------ + Image MediaControl::implGetImage( sal_Int32 nImageId ) const { return maImageList.GetImage( static_cast< sal_uInt16 >( nImageId ) ); } -// ------------------------------------------------------------------------------ + IMPL_LINK( MediaControl, implTimeHdl, Slider*, p ) { @@ -443,7 +443,7 @@ IMPL_LINK( MediaControl, implTimeHdl, Slider*, p ) return 0; } -// ------------------------------------------------------------------------------ + IMPL_LINK( MediaControl, implTimeEndHdl, Slider*, p ) { @@ -458,7 +458,7 @@ IMPL_LINK( MediaControl, implTimeEndHdl, Slider*, p ) return 0; } -// ------------------------------------------------------------------------------ + IMPL_LINK( MediaControl, implVolumeHdl, Slider*, p ) { @@ -471,14 +471,14 @@ IMPL_LINK( MediaControl, implVolumeHdl, Slider*, p ) return 0; } -// ------------------------------------------------------------------------------ + IMPL_LINK_NOARG(MediaControl, implVolumeEndHdl) { return 0; } -// ------------------------------------------------------------------------------ + IMPL_LINK( MediaControl, implSelectHdl, ToolBox*, p ) { @@ -569,7 +569,7 @@ IMPL_LINK( MediaControl, implSelectHdl, ToolBox*, p ) return 0; } -// ------------------------------------------------------------------------------ + IMPL_LINK( MediaControl, implZoomSelectHdl, ListBox*, p ) { @@ -597,7 +597,7 @@ IMPL_LINK( MediaControl, implZoomSelectHdl, ListBox*, p ) return 0; } -// ------------------------------------------------------------------------------ + IMPL_LINK_NOARG(MediaControl, implTimeoutHdl) { diff --git a/avmedia/source/framework/mediaitem.cxx b/avmedia/source/framework/mediaitem.cxx index f8e0f434e7f0..b9ab635cdc72 100644 --- a/avmedia/source/framework/mediaitem.cxx +++ b/avmedia/source/framework/mediaitem.cxx @@ -43,10 +43,7 @@ using namespace ::com::sun::star; namespace avmedia { -// ------------- // - MediaItem - -// ------------- - TYPEINIT1_AUTOFACTORY( MediaItem, ::SfxPoolItem ); struct MediaItem::Impl @@ -90,30 +87,22 @@ struct MediaItem::Impl } }; -// ------------------------------------------------------------------------------ - MediaItem::MediaItem( sal_uInt16 const i_nWhich, sal_uInt32 const nMaskSet ) : SfxPoolItem( i_nWhich ) , m_pImpl( new Impl(nMaskSet) ) { } -// ------------------------------------------------------------------------------ - MediaItem::MediaItem( const MediaItem& rItem ) : SfxPoolItem( rItem ) , m_pImpl( new Impl(*rItem.m_pImpl) ) { } -// ------------------------------------------------------------------------------ - MediaItem::~MediaItem() { } -// ------------------------------------------------------------------------------ - bool MediaItem::operator==( const SfxPoolItem& rItem ) const { assert( SfxPoolItem::operator==(rItem)); @@ -130,15 +119,11 @@ bool MediaItem::operator==( const SfxPoolItem& rItem ) const && m_pImpl->m_eZoom == rOther.m_pImpl->m_eZoom; } -// ------------------------------------------------------------------------------ - SfxPoolItem* MediaItem::Clone( SfxItemPool* ) const { return new MediaItem( *this ); } -//------------------------------------------------------------------------ - SfxItemPresentation MediaItem::GetPresentation( SfxItemPresentation, SfxMapUnit, SfxMapUnit, @@ -149,8 +134,6 @@ SfxItemPresentation MediaItem::GetPresentation( SfxItemPresentation, return SFX_ITEM_PRESENTATION_NONE; } -//------------------------------------------------------------------------ - bool MediaItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 ) const { uno::Sequence< uno::Any > aSeq( 9 ); @@ -170,8 +153,6 @@ bool MediaItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 ) const return true; } -//------------------------------------------------------------------------ - bool MediaItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 ) { uno::Sequence< uno::Any > aSeq; @@ -198,8 +179,6 @@ bool MediaItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 ) return bRet; } -//------------------------------------------------------------------------ - void MediaItem::merge( const MediaItem& rMediaItem ) { const sal_uInt32 nMaskSet = rMediaItem.getMaskSet(); @@ -229,15 +208,11 @@ void MediaItem::merge( const MediaItem& rMediaItem ) setZoom( rMediaItem.getZoom() ); } -//------------------------------------------------------------------------ - sal_uInt32 MediaItem::getMaskSet() const { return m_pImpl->m_nMaskSet; } -//------------------------------------------------------------------------ - void MediaItem::setURL( const OUString& rURL, const OUString& rTempURL, const OUString& rReferer ) { m_pImpl->m_nMaskSet |= AVMEDIA_SETMASK_URL; @@ -246,8 +221,6 @@ void MediaItem::setURL( const OUString& rURL, const OUString& rTempURL, const OU m_pImpl->m_Referer = rReferer; } -//------------------------------------------------------------------------ - const OUString& MediaItem::getURL() const { return m_pImpl->m_URL; @@ -263,113 +236,83 @@ const OUString& MediaItem::getReferer() const return m_pImpl->m_Referer; } -//------------------------------------------------------------------------ - void MediaItem::setState( MediaState eState ) { m_pImpl->m_eState = eState; m_pImpl->m_nMaskSet |= AVMEDIA_SETMASK_STATE; } -//------------------------------------------------------------------------ - MediaState MediaItem::getState() const { return m_pImpl->m_eState; } -//------------------------------------------------------------------------ - void MediaItem::setDuration( double fDuration ) { m_pImpl->m_fDuration = fDuration; m_pImpl->m_nMaskSet |= AVMEDIA_SETMASK_DURATION; } -//------------------------------------------------------------------------ - double MediaItem::getDuration() const { return m_pImpl->m_fDuration; } -//------------------------------------------------------------------------ - void MediaItem::setTime( double fTime ) { m_pImpl->m_fTime = fTime; m_pImpl->m_nMaskSet |= AVMEDIA_SETMASK_TIME; } -//------------------------------------------------------------------------ - double MediaItem::getTime() const { return m_pImpl->m_fTime; } -//------------------------------------------------------------------------ - void MediaItem::setLoop( bool bLoop ) { m_pImpl->m_bLoop = bLoop; m_pImpl->m_nMaskSet |= AVMEDIA_SETMASK_LOOP; } -//------------------------------------------------------------------------ - bool MediaItem::isLoop() const { return m_pImpl->m_bLoop; } -//------------------------------------------------------------------------ - void MediaItem::setMute( bool bMute ) { m_pImpl->m_bMute = bMute; m_pImpl->m_nMaskSet |= AVMEDIA_SETMASK_MUTE; } -//------------------------------------------------------------------------ - bool MediaItem::isMute() const { return m_pImpl->m_bMute; } -//------------------------------------------------------------------------ - void MediaItem::setVolumeDB( sal_Int16 nDB ) { m_pImpl->m_nVolumeDB = nDB; m_pImpl->m_nMaskSet |= AVMEDIA_SETMASK_VOLUMEDB; } -//------------------------------------------------------------------------ - sal_Int16 MediaItem::getVolumeDB() const { return m_pImpl->m_nVolumeDB; } -//------------------------------------------------------------------------ - void MediaItem::setZoom( ::com::sun::star::media::ZoomLevel eZoom ) { m_pImpl->m_eZoom = eZoom; m_pImpl->m_nMaskSet |= AVMEDIA_SETMASK_ZOOM; } -//------------------------------------------------------------------------ - ::com::sun::star::media::ZoomLevel MediaItem::getZoom() const { return m_pImpl->m_eZoom; } -//------------------------------------------------------------------------ - static OUString lcl_GetFilename(OUString const& rSourceURL) { uno::Reference<uri::XUriReferenceFactory> const xUriFactory( @@ -488,7 +431,6 @@ bool EmbedMedia(uno::Reference<frame::XModel> const& xModel, } return false; } - } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/avmedia/source/framework/mediaplayer.cxx b/avmedia/source/framework/mediaplayer.cxx index bef6fc6cdef7..cc592c2caf8d 100644 --- a/avmedia/source/framework/mediaplayer.cxx +++ b/avmedia/source/framework/mediaplayer.cxx @@ -33,9 +33,9 @@ namespace avmedia { -// --------------- + // - MediaPlayer - -// --------------- + MediaPlayer::MediaPlayer( Window* _pParent, sal_uInt16 nId, SfxBindings* _pBindings, SfxChildWinInfo* pInfo ) : SfxChildWindow( _pParent, nId ) @@ -45,19 +45,19 @@ MediaPlayer::MediaPlayer( Window* _pParent, sal_uInt16 nId, SfxBindings* _pBindi static_cast< MediaFloater* >( pWindow )->Initialize( pInfo ); }; -// ----------------------------------------------------------------------------- + MediaPlayer::~MediaPlayer() { } -// ----------------------------------------------------------------------------- + SFX_IMPL_DOCKINGWINDOW_WITHID( MediaPlayer, SID_AVMEDIA_PLAYER ) -// ---------------- + // - MediaFloater - -// ---------------- + MediaFloater::MediaFloater( SfxBindings* _pBindings, SfxChildWindow* pCW, Window* pParent ) : SfxDockingWindow( _pBindings, pCW, pParent, WB_CLOSEABLE | WB_MOVEABLE | WB_SIZEABLE | WB_DOCKABLE ), @@ -71,7 +71,7 @@ MediaFloater::MediaFloater( SfxBindings* _pBindings, SfxChildWindow* pCW, Window mpMediaWindow->show(); } -// ----------------------------------------------------------------------------- + MediaFloater::~MediaFloater() { @@ -79,7 +79,7 @@ MediaFloater::~MediaFloater() mpMediaWindow = NULL; } -// ------------------------------------------------------------------------- + void MediaFloater::Resize() { @@ -89,7 +89,7 @@ void MediaFloater::Resize() mpMediaWindow->setPosSize( Rectangle( Point(), GetOutputSizePixel() ) ); } -// ----------------------------------------------------------------------------- + void MediaFloater::ToggleFloatingMode() { @@ -114,7 +114,7 @@ void MediaFloater::ToggleFloatingMode() mpMediaWindow->show(); } -// ----------------------------------------------------------------------------- + void MediaFloater::setURL( const OUString& rURL, const OUString& rReferer, bool bPlayImmediately ) { @@ -127,7 +127,7 @@ void MediaFloater::setURL( const OUString& rURL, const OUString& rReferer, bool } } -// ----------------------------------------------------------------------------- + void MediaFloater::dispatchCurrentURL() { diff --git a/avmedia/source/framework/mediatoolbox.cxx b/avmedia/source/framework/mediatoolbox.cxx index b0d859a4033b..c90eb5919e29 100644 --- a/avmedia/source/framework/mediatoolbox.cxx +++ b/avmedia/source/framework/mediatoolbox.cxx @@ -31,9 +31,9 @@ using namespace ::com::sun::star; namespace avmedia { -// ----------------------- + // - MediaToolboxControl - -// ----------------------- + class MediaToolBoxControl_Impl : public MediaControl { @@ -50,7 +50,7 @@ private: MediaToolBoxControl* mpToolBoxControl; }; -// --------------------------------------------------------------------- + MediaToolBoxControl_Impl::MediaToolBoxControl_Impl( Window& rParent, MediaToolBoxControl& rControl ) : MediaControl( &rParent, MEDIACONTROLSTYLE_SINGLELINE ), @@ -59,33 +59,33 @@ MediaToolBoxControl_Impl::MediaToolBoxControl_Impl( Window& rParent, MediaToolBo SetSizePixel( getMinSizePixel() ); } -// --------------------------------------------------------------------- + MediaToolBoxControl_Impl::~MediaToolBoxControl_Impl() { } -// --------------------------------------------------------------------- + void MediaToolBoxControl_Impl::update() { mpToolBoxControl->implUpdateMediaControl(); } -// --------------------------------------------------------------------- + void MediaToolBoxControl_Impl::execute( const MediaItem& rItem ) { mpToolBoxControl->implExecuteMediaControl( rItem ); } -// ----------------------- + // - MediaToolBoxControl - -// ----------------------- + SFX_IMPL_TOOLBOX_CONTROL( ::avmedia::MediaToolBoxControl, ::avmedia::MediaItem ); -// ----------------------------------------------------------------------------- + MediaToolBoxControl::MediaToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ) @@ -93,13 +93,13 @@ MediaToolBoxControl::MediaToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, To rTbx.Invalidate(); } -// ----------------------------------------------------------------------------- + MediaToolBoxControl::~MediaToolBoxControl() { } -// ----------------------------------------------------------------------------- + void MediaToolBoxControl::StateChanged( sal_uInt16 /* nSID */, SfxItemState eState, const SfxPoolItem* pState ) @@ -127,21 +127,21 @@ void MediaToolBoxControl::StateChanged( sal_uInt16 /* nSID */, SfxItemState eSta } } -// ----------------------------------------------------------------------------- + Window* MediaToolBoxControl::CreateItemWindow( Window *pParent ) { return( pParent ? new MediaToolBoxControl_Impl( *pParent, *this ) : NULL ); } -// ----------------------------------------------------------------------------- + void MediaToolBoxControl::implUpdateMediaControl() { updateStatus( ".uno:AVMediaToolBox" ); } -// ----------------------------------------------------------------------------- + void MediaToolBoxControl::implExecuteMediaControl( const MediaItem& rItem ) { diff --git a/avmedia/source/framework/soundhandler.hxx b/avmedia/source/framework/soundhandler.hxx index 6673674fe5fa..2d0772029184 100644 --- a/avmedia/source/framework/soundhandler.hxx +++ b/avmedia/source/framework/soundhandler.hxx @@ -69,20 +69,14 @@ class SoundHandler : // interfaces , private ThreadHelpBase , public ::cppu::OWeakObject { - //------------------------------------------------------------------------------------------------------------- - // public methods - //------------------------------------------------------------------------------------------------------------- + // public methods public: - //--------------------------------------------------------------------------------------------------------- - // constructor / destructor - //--------------------------------------------------------------------------------------------------------- + // constructor / destructor SoundHandler( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory ); virtual ~SoundHandler( ); - //--------------------------------------------------------------------------------------------------------- // XInterface, XTypeProvider, XServiceInfo - //--------------------------------------------------------------------------------------------------------- virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) throw( css::uno::RuntimeException ); virtual void SAL_CALL acquire() throw(); virtual void SAL_CALL release() throw(); @@ -102,16 +96,12 @@ class SoundHandler : // interfaces /* Helper for initialization of service by using own reference! */ virtual void SAL_CALL impl_initService ( ); - //--------------------------------------------------------------------------------------------------------- // XNotifyingDispatch - //--------------------------------------------------------------------------------------------------------- virtual void SAL_CALL dispatchWithNotification(const css::util::URL& aURL , const css::uno::Sequence< css::beans::PropertyValue >& lArguments, const css::uno::Reference< css::frame::XDispatchResultListener >& xListener ) throw(css::uno::RuntimeException); - //--------------------------------------------------------------------------------------------------------- // XDispatch - //--------------------------------------------------------------------------------------------------------- virtual void SAL_CALL dispatch ( const css::util::URL& aURL , const css::uno::Sequence< css::beans::PropertyValue >& lArguments ) throw( css::uno::RuntimeException ); // not supported ! @@ -120,32 +110,24 @@ class SoundHandler : // interfaces virtual void SAL_CALL removeStatusListener ( const css::uno::Reference< css::frame::XStatusListener >& /*xListener*/ , const css::util::URL& /*aURL*/ ) throw( css::uno::RuntimeException ) {}; - //--------------------------------------------------------------------------------------------------------- // XExtendedFilterDetection - //--------------------------------------------------------------------------------------------------------- virtual OUString SAL_CALL detect ( css::uno::Sequence< css::beans::PropertyValue >& lDescriptor ) throw( css::uno::RuntimeException ); - //------------------------------------------------------------------------------------------------------------- // protected methods - //------------------------------------------------------------------------------------------------------------- protected: - //------------------------------------------------------------------------------------------------------------- // private methods - //------------------------------------------------------------------------------------------------------------- private: DECL_LINK( implts_PlayerNotify, void* ); - //------------------------------------------------------------------------------------------------------------- // variables // (should be private everyway!) - //------------------------------------------------------------------------------------------------------------- private: bool m_bError; - css::uno::Reference< css::lang::XMultiServiceFactory > m_xFactory ; /// global uno service factory to create new services - css::uno::Reference< css::uno::XInterface > m_xSelfHold ; /// we must protect us against dieing during async(!) dispatch() call! - css::uno::Reference< css::media::XPlayer > m_xPlayer ; /// uses avmedia player to play sounds ... + css::uno::Reference< css::lang::XMultiServiceFactory > m_xFactory ; // global uno service factory to create new services + css::uno::Reference< css::uno::XInterface > m_xSelfHold ; // we must protect us against dieing during async(!) dispatch() call! + css::uno::Reference< css::media::XPlayer > m_xPlayer ; // uses avmedia player to play sounds... css::uno::Reference< css::frame::XDispatchResultListener > m_xListener ; Timer m_aUpdateTimer; |