diff options
Diffstat (limited to 'avmedia')
65 files changed, 777 insertions, 777 deletions
diff --git a/avmedia/inc/avmedia/mediaitem.hxx b/avmedia/inc/avmedia/mediaitem.hxx index 753deeec6d52..7b80f5899a13 100644 --- a/avmedia/inc/avmedia/mediaitem.hxx +++ b/avmedia/inc/avmedia/mediaitem.hxx @@ -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 @@ -33,16 +33,16 @@ #include <svl/poolitem.hxx> #include <com/sun/star/media/ZoomLevel.hpp> -#define AVMEDIA_SETMASK_NONE ((sal_uInt32)(0x00000000)) -#define AVMEDIA_SETMASK_STATE ((sal_uInt32)(0x00000001)) -#define AVMEDIA_SETMASK_DURATION ((sal_uInt32)(0x00000002)) -#define AVMEDIA_SETMASK_TIME ((sal_uInt32)(0x00000004)) -#define AVMEDIA_SETMASK_LOOP ((sal_uInt32)(0x00000008)) -#define AVMEDIA_SETMASK_MUTE ((sal_uInt32)(0x00000010)) -#define AVMEDIA_SETMASK_VOLUMEDB ((sal_uInt32)(0x00000020)) -#define AVMEDIA_SETMASK_ZOOM ((sal_uInt32)(0x00000040)) -#define AVMEDIA_SETMASK_URL ((sal_uInt32)(0x00000080)) -#define AVMEDIA_SETMASK_ALL ((sal_uInt32)(0xffffffff)) +#define AVMEDIA_SETMASK_NONE ((sal_uInt32)(0x00000000)) +#define AVMEDIA_SETMASK_STATE ((sal_uInt32)(0x00000001)) +#define AVMEDIA_SETMASK_DURATION ((sal_uInt32)(0x00000002)) +#define AVMEDIA_SETMASK_TIME ((sal_uInt32)(0x00000004)) +#define AVMEDIA_SETMASK_LOOP ((sal_uInt32)(0x00000008)) +#define AVMEDIA_SETMASK_MUTE ((sal_uInt32)(0x00000010)) +#define AVMEDIA_SETMASK_VOLUMEDB ((sal_uInt32)(0x00000020)) +#define AVMEDIA_SETMASK_ZOOM ((sal_uInt32)(0x00000040)) +#define AVMEDIA_SETMASK_URL ((sal_uInt32)(0x00000080)) +#define AVMEDIA_SETMASK_ALL ((sal_uInt32)(0xffffffff)) class SvStream; @@ -72,56 +72,56 @@ public: MediaItem( USHORT nWhich = 0, sal_uInt32 nMaskSet = AVMEDIA_SETMASK_NONE ); MediaItem( const MediaItem& rMediaItem ); - virtual ~MediaItem(); + virtual ~MediaItem(); - virtual int operator==( const SfxPoolItem& ) const; - virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; + virtual int operator==( const SfxPoolItem& ) const; + virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreUnit, SfxMapUnit ePresUnit, - XubString& rText, + XubString& rText, const IntlWrapper *pIntl ) const; - virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); - void merge( const MediaItem& rMediaItem ); + void merge( const MediaItem& rMediaItem ); - sal_uInt32 getMaskSet() const; + sal_uInt32 getMaskSet() const; - void setState( MediaState eState ); - MediaState getState() const; + void setState( MediaState eState ); + MediaState getState() const; - void setDuration( double fDuration ); - double getDuration() const; + void setDuration( double fDuration ); + double getDuration() const; - void setTime( double fTime ); - double getTime() const; + void setTime( double fTime ); + double getTime() const; - void setLoop( sal_Bool bLoop ); - sal_Bool isLoop() const; + void setLoop( sal_Bool bLoop ); + sal_Bool isLoop() const; - void setMute( sal_Bool bMute ); - sal_Bool isMute() const; + void setMute( sal_Bool bMute ); + sal_Bool isMute() const; - void setVolumeDB( sal_Int16 nDB ); - sal_Int16 getVolumeDB() const; + void setVolumeDB( sal_Int16 nDB ); + sal_Int16 getVolumeDB() const; - void setZoom( ::com::sun::star::media::ZoomLevel eZoom ); - ::com::sun::star::media::ZoomLevel getZoom() const; + void setZoom( ::com::sun::star::media::ZoomLevel eZoom ); + ::com::sun::star::media::ZoomLevel getZoom() const; - void setURL( const ::rtl::OUString& rURL ); + void setURL( const ::rtl::OUString& rURL ); const ::rtl::OUString& getURL() const; private: - ::rtl::OUString maURL; - sal_uInt32 mnMaskSet; - MediaState meState; - double mfTime; - double mfDuration; - sal_Int16 mnVolumeDB; - sal_Bool mbLoop; - sal_Bool mbMute; + ::rtl::OUString maURL; + sal_uInt32 mnMaskSet; + MediaState meState; + double mfTime; + double mfDuration; + sal_Int16 mnVolumeDB; + sal_Bool mbLoop; + sal_Bool mbMute; ::com::sun::star::media::ZoomLevel meZoom; }; diff --git a/avmedia/inc/avmedia/mediaplayer.hxx b/avmedia/inc/avmedia/mediaplayer.hxx index 2c2704a5e657..175719a8f419 100644 --- a/avmedia/inc/avmedia/mediaplayer.hxx +++ b/avmedia/inc/avmedia/mediaplayer.hxx @@ -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 @@ -37,10 +37,10 @@ // - Defines - // ----------- -#define AVMEDIA_MEDIAWINDOW() \ -(static_cast< ::avmedia::MediaFloater* >( ( \ -SfxViewFrame::Current() && SfxViewFrame::Current()->GetChildWindow(::avmedia::MediaPlayer::GetChildWindowId())) ? \ -SfxViewFrame::Current()->GetChildWindow(::avmedia::MediaPlayer::GetChildWindowId())->GetWindow() : \ +#define AVMEDIA_MEDIAWINDOW() \ +(static_cast< ::avmedia::MediaFloater* >( ( \ +SfxViewFrame::Current() && SfxViewFrame::Current()->GetChildWindow(::avmedia::MediaPlayer::GetChildWindowId())) ? \ +SfxViewFrame::Current()->GetChildWindow(::avmedia::MediaPlayer::GetChildWindowId())->GetWindow() : \ NULL)) namespace avmedia @@ -67,29 +67,29 @@ class MediaWindow; class MediaFloater : public SfxDockingWindow { -public: +public: MediaFloater( SfxBindings* pBindings, SfxChildWindow* pCW, Window* pParent ); ~MediaFloater(); - void setURL( const ::rtl::OUString& rURL, bool bPlayImmediately ); - const ::rtl::OUString& getURL() const; + void setURL( const ::rtl::OUString& rURL, bool bPlayImmediately ); + const ::rtl::OUString& getURL() const; - void dispatchCurrentURL(); + void dispatchCurrentURL(); protected: - virtual void Resize(); - virtual void ToggleFloatingMode(); + virtual void Resize(); + virtual void ToggleFloatingMode(); private: - MediaWindow* mpMediaWindow; - Size maLastSize; - long mnDummy1; - long mnDummy2; + MediaWindow* mpMediaWindow; + Size maLastSize; + long mnDummy1; + long mnDummy2; - void implInit(); + void implInit(); }; } diff --git a/avmedia/inc/avmedia/mediatoolbox.hxx b/avmedia/inc/avmedia/mediatoolbox.hxx index 1f0fd47b18bd..c65a670a58af 100644 --- a/avmedia/inc/avmedia/mediatoolbox.hxx +++ b/avmedia/inc/avmedia/mediatoolbox.hxx @@ -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 @@ -41,7 +41,7 @@ namespace avmedia class MediaItem; -class MediaToolBoxControl : public SfxToolBoxControl +class MediaToolBoxControl : public SfxToolBoxControl { friend class MediaToolBoxControl_Impl; @@ -52,13 +52,13 @@ public: MediaToolBoxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbX ); ~MediaToolBoxControl(); - virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ); - virtual Window* CreateItemWindow( Window* pParent ); + virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ); + virtual Window* CreateItemWindow( Window* pParent ); private: - void implUpdateMediaControl(); - void implExecuteMediaControl( const MediaItem& rItem ); + void implUpdateMediaControl(); + void implExecuteMediaControl( const MediaItem& rItem ); }; } diff --git a/avmedia/inc/avmedia/mediawindow.hxx b/avmedia/inc/avmedia/mediawindow.hxx index fd56282d284c..62b998b2e11a 100644 --- a/avmedia/inc/avmedia/mediawindow.hxx +++ b/avmedia/inc/avmedia/mediawindow.hxx @@ -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 @@ -76,13 +76,13 @@ namespace avmedia { public: MediaWindow( Window* parent, bool bInternalMediaControl ); - virtual ~MediaWindow(); + virtual ~MediaWindow(); void setURL( const ::rtl::OUString& rURL ); const ::rtl::OUString& getURL() const; bool isValid() const; -// +// bool hasPreferredSize() const; Size getPreferredSize() const; diff --git a/avmedia/inc/helpids.hrc b/avmedia/inc/helpids.hrc index 2d7ccd764762..1f7ffb617228 100644 --- a/avmedia/inc/helpids.hrc +++ b/avmedia/inc/helpids.hrc @@ -1,7 +1,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 @@ -30,14 +30,14 @@ #include <svl/solar.hrc> -#define HID_AVMEDIA_TOOLBOXITEM_PLAY (HID_AVMEDIA_START+0) -#define HID_AVMEDIA_TOOLBOXITEM_PAUSE (HID_AVMEDIA_START+1) -#define HID_AVMEDIA_TOOLBOXITEM_STOP (HID_AVMEDIA_START+2) -#define HID_AVMEDIA_TOOLBOXITEM_MUTE (HID_AVMEDIA_START+3) -#define HID_AVMEDIA_TOOLBOXITEM_LOOP (HID_AVMEDIA_START+4) -#define HID_AVMEDIA_TOOLBOXITEM_OPEN (HID_AVMEDIA_START+5) -#define HID_AVMEDIA_TOOLBOXITEM_INSERT (HID_AVMEDIA_START+6) -#define HID_AVMEDIA_ZOOMLISTBOX (HID_AVMEDIA_START+7) +#define HID_AVMEDIA_TOOLBOXITEM_PLAY (HID_AVMEDIA_START+0) +#define HID_AVMEDIA_TOOLBOXITEM_PAUSE (HID_AVMEDIA_START+1) +#define HID_AVMEDIA_TOOLBOXITEM_STOP (HID_AVMEDIA_START+2) +#define HID_AVMEDIA_TOOLBOXITEM_MUTE (HID_AVMEDIA_START+3) +#define HID_AVMEDIA_TOOLBOXITEM_LOOP (HID_AVMEDIA_START+4) +#define HID_AVMEDIA_TOOLBOXITEM_OPEN (HID_AVMEDIA_START+5) +#define HID_AVMEDIA_TOOLBOXITEM_INSERT (HID_AVMEDIA_START+6) +#define HID_AVMEDIA_ZOOMLISTBOX (HID_AVMEDIA_START+7) #define HID_AVMEDIA_TIMESLIDER (HID_AVMEDIA_START+8) #define HID_AVMEDIA_TIMEEDIT (HID_AVMEDIA_START+9) #define HID_AVMEDIA_VOLUMESLIDER (HID_AVMEDIA_START+10) diff --git a/avmedia/inc/mediacontrol.hxx b/avmedia/inc/mediacontrol.hxx index 022a32eb9586..20e90c4ee23b 100644 --- a/avmedia/inc/mediacontrol.hxx +++ b/avmedia/inc/mediacontrol.hxx @@ -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 @@ -29,7 +29,7 @@ #ifndef _AVMEDIA_MEDIACONTROL_HXX #define _AVMEDIA_MEDIACONTROL_HXX -#include <avmedia/mediaitem.hxx> +#include <avmedia/mediaitem.hxx> #include <vcl/timer.hxx> #include <vcl/slider.hxx> @@ -65,27 +65,27 @@ class MediaControl : public Control public: MediaControl( Window* pParent, MediaControlStyle eControlStyle ); - virtual ~MediaControl(); - - const Size& getMinSizePixel() const; - - void setState( const MediaItem& rItem ); - void getState( MediaItem& rItem ) const; - + virtual ~MediaControl(); + + const Size& getMinSizePixel() const; + + void setState( const MediaItem& rItem ); + void getState( MediaItem& rItem ) const; + protected: - - virtual void update() = 0; - virtual void execute( const MediaItem& rItem ) = 0; - - virtual void Resize(); + + virtual void update() = 0; + virtual void execute( const MediaItem& rItem ) = 0; + + virtual void Resize(); private: - void implUpdateToolboxes(); - void implUpdateTimeSlider(); - void implUpdateVolumeSlider(); - void implUpdateTimeField( double fCurTime ); - Image implGetImage( sal_Int32 nImageId ) const; + void implUpdateToolboxes(); + void implUpdateTimeSlider(); + void implUpdateVolumeSlider(); + void implUpdateTimeField( double fCurTime ); + Image implGetImage( sal_Int32 nImageId ) const; DECL_LINK( implTimeHdl, Slider* ); DECL_LINK( implTimeEndHdl, Slider* ); @@ -94,24 +94,24 @@ private: DECL_LINK( implSelectHdl, ToolBox* ); DECL_LINK( implZoomSelectHdl, ListBox* ); DECL_LINK( implTimeoutHdl, Timer* ); - - ImageList maImageList; - Timer maTimer; - MediaItem maItem; - ToolBox maPlayToolBox; - Slider maTimeSlider; - ToolBox maMuteToolBox; - Slider maVolumeSlider; - ToolBox maZoomToolBox; - ListBox* mpZoomListBox; - Edit maTimeEdit; - Size maMinSize; - MediaControlStyle meControlStyle; + + ImageList maImageList; + Timer maTimer; + MediaItem maItem; + ToolBox maPlayToolBox; + Slider maTimeSlider; + ToolBox maMuteToolBox; + Slider maVolumeSlider; + ToolBox maZoomToolBox; + ListBox* mpZoomListBox; + Edit maTimeEdit; + Size maMinSize; + MediaControlStyle meControlStyle; bool mbLocked; }; } -#endif +#endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/avmedia/source/framework/mediacontrol.cxx b/avmedia/source/framework/mediacontrol.cxx index 110900071d3b..56fac24e394b 100644 --- a/avmedia/source/framework/mediacontrol.cxx +++ b/avmedia/source/framework/mediacontrol.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 @@ -37,31 +37,31 @@ #include <vcl/lstbox.hxx> #include <unotools/syslocale.hxx> #include <sfx2/viewfrm.hxx> -#include <math.h> -#include <algorithm> +#include <math.h> +#include <algorithm> -#define AVMEDIA_TIMEOUT 100 -#define AVMEDIA_TIME_RANGE 2048 -#define AVMEDIA_DB_RANGE -40 -#define AVMEDIA_LINEINCREMENT 1.0 -#define AVMEDIA_PAGEINCREMENT 10.0 +#define AVMEDIA_TIMEOUT 100 +#define AVMEDIA_TIME_RANGE 2048 +#define AVMEDIA_DB_RANGE -40 +#define AVMEDIA_LINEINCREMENT 1.0 +#define AVMEDIA_PAGEINCREMENT 10.0 -#define AVMEDIA_TOOLBOXITEM_PLAY 0x0001 +#define AVMEDIA_TOOLBOXITEM_PLAY 0x0001 #define AVMEDIA_TOOLBOXITEM_PLAYFFW 0x0002 -#define AVMEDIA_TOOLBOXITEM_PAUSE 0x0004 -#define AVMEDIA_TOOLBOXITEM_STOP 0x0008 -#define AVMEDIA_TOOLBOXITEM_MUTE 0x0010 -#define AVMEDIA_TOOLBOXITEM_LOOP 0x0011 -#define AVMEDIA_TOOLBOXITEM_ZOOM 0x0012 -#define AVMEDIA_TOOLBOXITEM_OPEN 0x0014 -#define AVMEDIA_TOOLBOXITEM_INSERT 0x0018 - -#define AVMEDIA_ZOOMLEVEL_50 0 -#define AVMEDIA_ZOOMLEVEL_100 1 -#define AVMEDIA_ZOOMLEVEL_200 2 -#define AVMEDIA_ZOOMLEVEL_FIT 3 -#define AVMEDIA_ZOOMLEVEL_SCALED 4 -#define AVMEDIA_ZOOMLEVEL_INVALID 65535 +#define AVMEDIA_TOOLBOXITEM_PAUSE 0x0004 +#define AVMEDIA_TOOLBOXITEM_STOP 0x0008 +#define AVMEDIA_TOOLBOXITEM_MUTE 0x0010 +#define AVMEDIA_TOOLBOXITEM_LOOP 0x0011 +#define AVMEDIA_TOOLBOXITEM_ZOOM 0x0012 +#define AVMEDIA_TOOLBOXITEM_OPEN 0x0014 +#define AVMEDIA_TOOLBOXITEM_INSERT 0x0018 + +#define AVMEDIA_ZOOMLEVEL_50 0 +#define AVMEDIA_ZOOMLEVEL_100 1 +#define AVMEDIA_ZOOMLEVEL_200 2 +#define AVMEDIA_ZOOMLEVEL_FIT 3 +#define AVMEDIA_ZOOMLEVEL_SCALED 4 +#define AVMEDIA_ZOOMLEVEL_INVALID 65535 namespace avmedia { @@ -77,7 +77,7 @@ MediaControl::MediaControl( Window* pParent, MediaControlStyle eControlStyle ) : maPlayToolBox( this, WB_3DLOOK ), maTimeSlider( this, WB_HORZ | WB_DRAG | WB_3DLOOK | WB_SLIDERSET ), maMuteToolBox( this, WB_3DLOOK ), - maVolumeSlider( this, WB_HORZ | WB_DRAG | WB_SLIDERSET ), + maVolumeSlider( this, WB_HORZ | WB_DRAG | WB_SLIDERSET ), maZoomToolBox( this, WB_3DLOOK ), mpZoomListBox( new ListBox( &maZoomToolBox, WB_BORDER | WB_DROPDOWN | WB_AUTOHSCROLL | WB_3DLOOK ) ), maTimeEdit( this, WB_CENTER | WB_READONLY | WB_BORDER | WB_3DLOOK | WB_READONLY ), @@ -96,10 +96,10 @@ MediaControl::MediaControl( Window* pParent, MediaControlStyle eControlStyle ) : maPlayToolBox.InsertItem( AVMEDIA_TOOLBOXITEM_OPEN, implGetImage( AVMEDIA_IMG_OPEN ), String( AVMEDIA_RESID( AVMEDIA_STR_OPEN ) ) ); maPlayToolBox.SetHelpId( AVMEDIA_TOOLBOXITEM_OPEN, HID_AVMEDIA_TOOLBOXITEM_OPEN ); - + maPlayToolBox.InsertItem( AVMEDIA_TOOLBOXITEM_INSERT, implGetImage( AVMEDIA_IMG_INSERT ), String( AVMEDIA_RESID( AVMEDIA_STR_INSERT ) ) ); maPlayToolBox.SetHelpId( AVMEDIA_TOOLBOXITEM_INSERT, HID_AVMEDIA_TOOLBOXITEM_INSERT ); - + maPlayToolBox.InsertSeparator(); } else @@ -116,7 +116,7 @@ MediaControl::MediaControl( Window* pParent, MediaControlStyle eControlStyle ) : maMuteToolBox.SetPaintTransparent( TRUE ); } - + maPlayToolBox.InsertItem( AVMEDIA_TOOLBOXITEM_PLAY, implGetImage( AVMEDIA_IMG_PLAY ), String( AVMEDIA_RESID( AVMEDIA_STR_PLAY ) ), TIB_CHECKABLE ); maPlayToolBox.SetHelpId( AVMEDIA_TOOLBOXITEM_PLAY, HID_AVMEDIA_TOOLBOXITEM_PLAY ); @@ -130,10 +130,10 @@ MediaControl::MediaControl( Window* pParent, MediaControlStyle eControlStyle ) : maPlayToolBox.InsertItem( AVMEDIA_TOOLBOXITEM_LOOP, implGetImage( AVMEDIA_IMG_ENDLESS ), String( AVMEDIA_RESID( AVMEDIA_STR_ENDLESS ) ) ); maPlayToolBox.SetHelpId( AVMEDIA_TOOLBOXITEM_LOOP, HID_AVMEDIA_TOOLBOXITEM_LOOP ); - + if( MEDIACONTROLSTYLE_SINGLELINE == meControlStyle ) maPlayToolBox.InsertSeparator(); - + maPlayToolBox.SetSelectHdl( LINK( this, MediaControl, implSelectHdl ) ); maPlayToolBox.SetSizePixel( maPlayToolBox.CalcWindowSizePixel() ); maPlayToolBox.Show(); @@ -159,10 +159,10 @@ MediaControl::MediaControl( Window* pParent, MediaControlStyle eControlStyle ) : if( MEDIACONTROLSTYLE_SINGLELINE == meControlStyle ) maMuteToolBox.InsertSeparator(); - + maMuteToolBox.InsertItem( AVMEDIA_TOOLBOXITEM_MUTE, implGetImage( AVMEDIA_IMG_MUTE ), String( AVMEDIA_RESID( AVMEDIA_STR_MUTE ) ) ); maMuteToolBox.SetHelpId( AVMEDIA_TOOLBOXITEM_MUTE, HID_AVMEDIA_TOOLBOXITEM_MUTE ); - + maMuteToolBox.SetSelectHdl( LINK( this, MediaControl, implSelectHdl ) ); maMuteToolBox.SetSizePixel( maMuteToolBox.CalcWindowSizePixel() ); maMuteToolBox.Show(); @@ -176,7 +176,7 @@ MediaControl::MediaControl( Window* pParent, MediaControlStyle eControlStyle ) : maVolumeSlider.SetSizePixel( Size( 48, maPlayToolBox.GetSizePixel().Height() ) ); maVolumeSlider.Show(); maMinSize.Width() += maVolumeSlider.GetSizePixel().Width(); - + mpZoomListBox->SetSizePixel( Size( maTimeEdit.GetSizePixel().Width(), 260 ) ); mpZoomListBox->InsertEntry( String( AVMEDIA_RESID( AVMEDIA_STR_ZOOM_50 ) ), AVMEDIA_ZOOMLEVEL_50 ); mpZoomListBox->InsertEntry( String( AVMEDIA_RESID( AVMEDIA_STR_ZOOM_100 ) ), AVMEDIA_ZOOMLEVEL_100 ); @@ -184,22 +184,22 @@ MediaControl::MediaControl( Window* pParent, MediaControlStyle eControlStyle ) : mpZoomListBox->InsertEntry( String( AVMEDIA_RESID( AVMEDIA_STR_ZOOM_FIT ) ), AVMEDIA_ZOOMLEVEL_FIT ); mpZoomListBox->SetSelectHdl( LINK( this, MediaControl, implZoomSelectHdl ) ); mpZoomListBox->SetHelpId( HID_AVMEDIA_ZOOMLISTBOX ); - + maZoomToolBox.InsertItem( AVMEDIA_TOOLBOXITEM_ZOOM, String( AVMEDIA_RESID( AVMEDIA_STR_ZOOM ) ) ); maZoomToolBox.SetHelpId( AVMEDIA_TOOLBOXITEM_ZOOM, HID_AVMEDIA_ZOOMLISTBOX ); - + maZoomToolBox.SetItemWindow( AVMEDIA_TOOLBOXITEM_ZOOM, mpZoomListBox ); maZoomToolBox.SetSelectHdl( LINK( this, MediaControl, implSelectHdl ) ); maZoomToolBox.SetSizePixel( maZoomToolBox.CalcWindowSizePixel() ); maZoomToolBox.Show(); maMinSize.Width() += maZoomToolBox.GetSizePixel().Width(); - + if( MEDIACONTROLSTYLE_MULTILINE == meControlStyle ) { maMinSize.Width() = 256; maMinSize.Height() = ( maMinSize.Height() << 1 ) + AVMEDIA_CONTROLOFFSET; } - + maTimer.SetTimeout( AVMEDIA_TIMEOUT ); maTimer.SetTimeoutHdl( LINK( this, MediaControl, implTimeoutHdl ) ); maTimer.Start(); @@ -215,7 +215,7 @@ MediaControl::~MediaControl() // ------------------------------------------------------------------------------ -const Size& MediaControl::getMinSizePixel() const +const Size& MediaControl::getMinSizePixel() const { return maMinSize; } @@ -224,55 +224,55 @@ const Size& MediaControl::getMinSizePixel() const void MediaControl::Resize() { - Point aPos( 0, 0 ); - const sal_Int32 nPlayToolBoxWidth = maPlayToolBox.GetSizePixel().Width(); - const sal_Int32 nMuteToolBoxWidth = maMuteToolBox.GetSizePixel().Width(); - const sal_Int32 nVolumeSliderWidth = maVolumeSlider.GetSizePixel().Width(); + Point aPos( 0, 0 ); + const sal_Int32 nPlayToolBoxWidth = maPlayToolBox.GetSizePixel().Width(); + const sal_Int32 nMuteToolBoxWidth = maMuteToolBox.GetSizePixel().Width(); + const sal_Int32 nVolumeSliderWidth = maVolumeSlider.GetSizePixel().Width(); const sal_Int32 nZoomToolBoxWidth = maZoomToolBox.GetSizePixel().Width(); - const sal_Int32 nTimeEditWidth = maTimeEdit.GetSizePixel().Width(); - const sal_Int32 nTimeSliderHeight = maTimeSlider.GetSizePixel().Height(); - + const sal_Int32 nTimeEditWidth = maTimeEdit.GetSizePixel().Width(); + const sal_Int32 nTimeSliderHeight = maTimeSlider.GetSizePixel().Height(); + if( MEDIACONTROLSTYLE_SINGLELINE == meControlStyle ) { - const sal_Int32 nTimeSliderWidth = GetSizePixel().Width() - ( AVMEDIA_CONTROLOFFSET * 3 ) - + const sal_Int32 nTimeSliderWidth = GetSizePixel().Width() - ( AVMEDIA_CONTROLOFFSET * 3 ) - nPlayToolBoxWidth - nMuteToolBoxWidth - nVolumeSliderWidth - nTimeEditWidth - nZoomToolBoxWidth; - + maPlayToolBox.SetPosSizePixel( aPos, maPlayToolBox.GetSizePixel() ); - + aPos.X() += nPlayToolBoxWidth; maTimeSlider.SetPosSizePixel( aPos, Size( nTimeSliderWidth, nTimeSliderHeight ) ); - + aPos.X() += nTimeSliderWidth + AVMEDIA_CONTROLOFFSET; maTimeEdit.SetPosSizePixel( aPos, maTimeEdit.GetSizePixel() ); - + aPos.X() += nTimeEditWidth + AVMEDIA_CONTROLOFFSET; maMuteToolBox.SetPosSizePixel( aPos, maMuteToolBox.GetSizePixel() ); - + aPos.X() += nMuteToolBoxWidth; maVolumeSlider.SetPosSizePixel( aPos, maVolumeSlider.GetSizePixel() ); - + aPos.X() += nVolumeSliderWidth + AVMEDIA_CONTROLOFFSET; maZoomToolBox.SetPosSizePixel( aPos, maZoomToolBox.GetSizePixel() ); } else { - const sal_Int32 nTimeSliderWidth = GetSizePixel().Width() - AVMEDIA_CONTROLOFFSET - nTimeEditWidth; - + const sal_Int32 nTimeSliderWidth = GetSizePixel().Width() - AVMEDIA_CONTROLOFFSET - nTimeEditWidth; + maTimeSlider.SetPosSizePixel( aPos, Size( nTimeSliderWidth, nTimeSliderHeight ) ); - + aPos.X() += nTimeSliderWidth + AVMEDIA_CONTROLOFFSET; maTimeEdit.SetPosSizePixel( aPos, maTimeEdit.GetSizePixel() ); - + aPos.X() = 0; aPos.Y() += nTimeSliderHeight + AVMEDIA_CONTROLOFFSET; maPlayToolBox.SetPosSizePixel( aPos, maPlayToolBox.GetSizePixel() ); - + aPos.X() = GetSizePixel().Width() - nVolumeSliderWidth - nMuteToolBoxWidth - nZoomToolBoxWidth - AVMEDIA_CONTROLOFFSET; maMuteToolBox.SetPosSizePixel( aPos, maMuteToolBox.GetSizePixel() ); aPos.X() += nMuteToolBoxWidth; maVolumeSlider.SetPosSizePixel( aPos, maVolumeSlider.GetSizePixel() ); - + aPos.X() = GetSizePixel().Width() - nZoomToolBoxWidth; maZoomToolBox.SetPosSizePixel( aPos, maZoomToolBox.GetSizePixel() ); } @@ -285,7 +285,7 @@ void MediaControl::setState( const MediaItem& rItem ) if( !mbLocked ) { maItem.merge( rItem ); - + implUpdateToolboxes(); implUpdateTimeSlider(); implUpdateVolumeSlider(); @@ -317,7 +317,7 @@ void MediaControl::execute( const MediaItem& ) void MediaControl::implUpdateToolboxes() { const bool bValidURL = ( maItem.getURL().getLength() > 0 ); - + maPlayToolBox.EnableItem( AVMEDIA_TOOLBOXITEM_INSERT, bValidURL ); maPlayToolBox.EnableItem( AVMEDIA_TOOLBOXITEM_PLAY, bValidURL ); maPlayToolBox.EnableItem( AVMEDIA_TOOLBOXITEM_PLAYFFW, bValidURL ); @@ -325,7 +325,7 @@ void MediaControl::implUpdateToolboxes() maPlayToolBox.EnableItem( AVMEDIA_TOOLBOXITEM_STOP, bValidURL ); maPlayToolBox.EnableItem( AVMEDIA_TOOLBOXITEM_LOOP, bValidURL ); maMuteToolBox.EnableItem( AVMEDIA_TOOLBOXITEM_MUTE, bValidURL ); - + if( !bValidURL || !IsEnabled() ) { mpZoomListBox->Disable(); @@ -339,7 +339,7 @@ void MediaControl::implUpdateToolboxes() { maPlayToolBox.Enable(); maMuteToolBox.Enable(); - + if( MEDIASTATE_PLAY == maItem.getState() || MEDIASTATE_PLAYFFW == maItem.getState() ) { maPlayToolBox.CheckItem( AVMEDIA_TOOLBOXITEM_PLAY, true ); @@ -361,14 +361,14 @@ void MediaControl::implUpdateToolboxes() maPlayToolBox.CheckItem( AVMEDIA_TOOLBOXITEM_PAUSE, false ); maPlayToolBox.CheckItem( AVMEDIA_TOOLBOXITEM_STOP, true ); } - + maPlayToolBox.CheckItem( AVMEDIA_TOOLBOXITEM_LOOP, maItem.isLoop() ); maMuteToolBox.CheckItem( AVMEDIA_TOOLBOXITEM_MUTE, maItem.isMute() ); - + if( !mpZoomListBox->IsTravelSelect() && !mpZoomListBox->IsInDropDown() ) { USHORT nSelectEntryPos ; - + switch( maItem.getZoom() ) { case( ::com::sun::star::media::ZoomLevel_ZOOM_1_TO_2 ): nSelectEntryPos = AVMEDIA_ZOOMLEVEL_50; break; @@ -376,10 +376,10 @@ void MediaControl::implUpdateToolboxes() case( ::com::sun::star::media::ZoomLevel_ZOOM_2_TO_1 ): nSelectEntryPos = AVMEDIA_ZOOMLEVEL_200; break; case( ::com::sun::star::media::ZoomLevel_FIT_TO_WINDOW_FIXED_ASPECT ): nSelectEntryPos = AVMEDIA_ZOOMLEVEL_FIT; break; case( ::com::sun::star::media::ZoomLevel_FIT_TO_WINDOW ): nSelectEntryPos = AVMEDIA_ZOOMLEVEL_SCALED; break; - + default: nSelectEntryPos = AVMEDIA_ZOOMLEVEL_INVALID; break; } - + if( nSelectEntryPos != AVMEDIA_ZOOMLEVEL_INVALID ) { mpZoomListBox->Enable(); @@ -402,17 +402,17 @@ void MediaControl::implUpdateTimeSlider() maTimeSlider.Enable(); const double fDuration = maItem.getDuration(); - + if( fDuration > 0.0 ) { const double fTime = ::std::min( maItem.getTime(), fDuration ); - + if( !maTimeSlider.GetLineSize() ) maTimeSlider.SetLineSize( static_cast< sal_uInt32 >( AVMEDIA_TIME_RANGE * AVMEDIA_LINEINCREMENT / fDuration ) ); - + if( !maTimeSlider.GetPageSize() ) maTimeSlider.SetPageSize( static_cast< sal_uInt32 >( AVMEDIA_TIME_RANGE * AVMEDIA_PAGEINCREMENT / fDuration ) ); - + maTimeSlider.SetThumbPos( static_cast< sal_Int32 >( fTime / fDuration * AVMEDIA_TIME_RANGE ) ); } } @@ -430,7 +430,7 @@ void MediaControl::implUpdateVolumeSlider() const sal_Int32 nVolumeDB = maItem.getVolumeDB(); - maVolumeSlider.SetThumbPos( ::std::min( ::std::max( nVolumeDB, static_cast< sal_Int32 >( AVMEDIA_DB_RANGE ) ), + maVolumeSlider.SetThumbPos( ::std::min( ::std::max( nVolumeDB, static_cast< sal_Int32 >( AVMEDIA_DB_RANGE ) ), static_cast< sal_Int32 >( 0 ) ) ); } } @@ -441,15 +441,15 @@ void MediaControl::implUpdateTimeField( double fCurTime ) { if( maItem.getURL().getLength() > 0 ) { - String aTimeString; - + String aTimeString; + SvtSysLocale aSysLocale; const LocaleDataWrapper& rLocaleData = aSysLocale.GetLocaleData(); aTimeString += rLocaleData.getDuration( Time( 0, 0, static_cast< sal_uInt32 >( floor( fCurTime ) ) ) ); aTimeString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " / " )); aTimeString += rLocaleData.getDuration( Time( 0, 0, static_cast< sal_uInt32 >( floor( maItem.getDuration() ) )) ); - + if( maTimeEdit.GetText() != aTimeString ) maTimeEdit.SetText( aTimeString ); } @@ -469,7 +469,7 @@ IMPL_LINK( MediaControl, implTimeHdl, Slider*, p ) mbLocked = true; maTimer.Stop(); implUpdateTimeField( p->GetThumbPos() * maItem.getDuration() / AVMEDIA_TIME_RANGE ); - + return 0; } @@ -478,13 +478,13 @@ IMPL_LINK( MediaControl, implTimeHdl, Slider*, p ) IMPL_LINK( MediaControl, implTimeEndHdl, Slider*, p ) { MediaItem aExecItem; - + aExecItem.setTime( p->GetThumbPos() * maItem.getDuration() / AVMEDIA_TIME_RANGE ); execute( aExecItem ); update(); maTimer.Start(); mbLocked = false; - + return 0; } @@ -493,7 +493,7 @@ IMPL_LINK( MediaControl, implTimeEndHdl, Slider*, p ) IMPL_LINK( MediaControl, implVolumeHdl, Slider*, p ) { MediaItem aExecItem; - + aExecItem.setVolumeDB( static_cast< sal_Int16 >( p->GetThumbPos() ) ); execute( aExecItem ); update(); @@ -515,13 +515,13 @@ IMPL_LINK( MediaControl, implSelectHdl, ToolBox*, p ) if( p ) { MediaItem aExecItem; - + switch( p->GetCurItemId() ) { case( AVMEDIA_TOOLBOXITEM_OPEN ): { ::rtl::OUString aURL; - + if( ::avmedia::MediaWindow::executeMediaURLDialog( GetParent(), aURL, false ) ) { if( !::avmedia::MediaWindow::isMediaURL( aURL, true ) ) @@ -538,12 +538,12 @@ IMPL_LINK( MediaControl, implSelectHdl, ToolBox*, p ) case( AVMEDIA_TOOLBOXITEM_INSERT ): { MediaFloater* pFloater = AVMEDIA_MEDIAWINDOW(); - + if( pFloater ) pFloater->dispatchCurrentURL(); } break; - + case( AVMEDIA_TOOLBOXITEM_PLAY ): case( AVMEDIA_TOOLBOXITEM_PLAYFFW ): { @@ -561,14 +561,14 @@ IMPL_LINK( MediaControl, implSelectHdl, ToolBox*, p ) aExecItem.setState( MEDIASTATE_PAUSE ); } break; - + case( AVMEDIA_TOOLBOXITEM_STOP ): { aExecItem.setState( MEDIASTATE_STOP ); aExecItem.setTime( 0.0 ); } break; - + case( AVMEDIA_TOOLBOXITEM_MUTE ): { aExecItem.setMute( !maMuteToolBox.IsItemChecked( AVMEDIA_TOOLBOXITEM_MUTE ) ); @@ -580,15 +580,15 @@ IMPL_LINK( MediaControl, implSelectHdl, ToolBox*, p ) aExecItem.setLoop( !maPlayToolBox.IsItemChecked( AVMEDIA_TOOLBOXITEM_LOOP ) ); } break; - + default: break; } - + if( aExecItem.getMaskSet() != AVMEDIA_SETMASK_NONE ) execute( aExecItem ); } - + update(); p->Invalidate( INVALIDATE_UPDATE ); @@ -603,7 +603,7 @@ IMPL_LINK( MediaControl, implZoomSelectHdl, ListBox*, p ) { MediaItem aExecItem; ::com::sun::star::media::ZoomLevel eLevel; - + switch( p->GetSelectEntryPos() ) { case( AVMEDIA_ZOOMLEVEL_50 ): eLevel = ::com::sun::star::media::ZoomLevel_ZOOM_1_TO_2; break; @@ -611,15 +611,15 @@ IMPL_LINK( MediaControl, implZoomSelectHdl, ListBox*, p ) case( AVMEDIA_ZOOMLEVEL_200 ): eLevel = ::com::sun::star::media::ZoomLevel_ZOOM_2_TO_1; break; case( AVMEDIA_ZOOMLEVEL_FIT ): eLevel = ::com::sun::star::media::ZoomLevel_FIT_TO_WINDOW_FIXED_ASPECT; break; case( AVMEDIA_ZOOMLEVEL_SCALED ): eLevel = ::com::sun::star::media::ZoomLevel_FIT_TO_WINDOW; break; - + default: eLevel = ::com::sun::star::media::ZoomLevel_NOT_AVAILABLE; break; } - + aExecItem.setZoom( eLevel ); execute( aExecItem ); update(); } - + return 0; } diff --git a/avmedia/source/framework/mediacontrol.hrc b/avmedia/source/framework/mediacontrol.hrc index 081958ccd42c..ef9ddc2a1b7e 100644 --- a/avmedia/source/framework/mediacontrol.hrc +++ b/avmedia/source/framework/mediacontrol.hrc @@ -1,7 +1,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 @@ -24,30 +24,30 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ - -#define AVMEDIA_STR_PLAY 1024 -#define AVMEDIA_STR_PAUSE 1025 -#define AVMEDIA_STR_STOP 1026 -#define AVMEDIA_STR_ENDLESS 1027 -#define AVMEDIA_STR_ZOOM 1028 -#define AVMEDIA_STR_ZOOM_50 1029 -#define AVMEDIA_STR_ZOOM_100 1030 -#define AVMEDIA_STR_ZOOM_200 1031 -#define AVMEDIA_STR_ZOOM_FIT 1032 -#define AVMEDIA_STR_MUTE 1033 -#define AVMEDIA_STR_OPEN 1034 -#define AVMEDIA_STR_INSERT 1035 + +#define AVMEDIA_STR_PLAY 1024 +#define AVMEDIA_STR_PAUSE 1025 +#define AVMEDIA_STR_STOP 1026 +#define AVMEDIA_STR_ENDLESS 1027 +#define AVMEDIA_STR_ZOOM 1028 +#define AVMEDIA_STR_ZOOM_50 1029 +#define AVMEDIA_STR_ZOOM_100 1030 +#define AVMEDIA_STR_ZOOM_200 1031 +#define AVMEDIA_STR_ZOOM_FIT 1032 +#define AVMEDIA_STR_MUTE 1033 +#define AVMEDIA_STR_OPEN 1034 +#define AVMEDIA_STR_INSERT 1035 #define AVMEDIA_STR_MEDIAPLAYER 1036 -#define AVMEDIA_IMG_OPEN 2048 -#define AVMEDIA_IMG_PLAY 2049 -#define AVMEDIA_IMG_PAUSE 2050 -#define AVMEDIA_IMG_STOP 2051 -#define AVMEDIA_IMG_ENDLESS 2052 -#define AVMEDIA_IMG_INSERT 2053 -#define AVMEDIA_IMG_MUTE 2054 +#define AVMEDIA_IMG_OPEN 2048 +#define AVMEDIA_IMG_PLAY 2049 +#define AVMEDIA_IMG_PAUSE 2050 +#define AVMEDIA_IMG_STOP 2051 +#define AVMEDIA_IMG_ENDLESS 2052 +#define AVMEDIA_IMG_INSERT 2053 +#define AVMEDIA_IMG_MUTE 2054 -#define AVMEDIA_IMGLST 3072 -#define AVMEDIA_IMGLST_HC 3073 -#define AVMEDIA_IMGLST_L 3074 -#define AVMEDIA_IMGLST_L_HC 3075 +#define AVMEDIA_IMGLST 3072 +#define AVMEDIA_IMGLST_HC 3073 +#define AVMEDIA_IMGLST_L 3074 +#define AVMEDIA_IMGLST_L_HC 3075 diff --git a/avmedia/source/framework/mediacontrol.src b/avmedia/source/framework/mediacontrol.src index 2ad203e2c34f..f56e1bbeae7b 100644 --- a/avmedia/source/framework/mediacontrol.src +++ b/avmedia/source/framework/mediacontrol.src @@ -1,7 +1,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 @@ -55,14 +55,14 @@ String AVMEDIA_STR_PAUSE // ------------------------------------------------------------------------------ -String AVMEDIA_STR_STOP +String AVMEDIA_STR_STOP { Text[en-US] = "Stop"; }; // ------------------------------------------------------------------------------ -String AVMEDIA_STR_ENDLESS +String AVMEDIA_STR_ENDLESS { Text[en-US] = "Repeat"; }; @@ -76,35 +76,35 @@ String AVMEDIA_STR_MUTE // ------------------------------------------------------------------------------ -String AVMEDIA_STR_ZOOM +String AVMEDIA_STR_ZOOM { Text[en-US] = "View"; }; // ------------------------------------------------------------------------------ -String AVMEDIA_STR_ZOOM_50 +String AVMEDIA_STR_ZOOM_50 { Text[en-US] = "50%"; }; // ------------------------------------------------------------------------------ -String AVMEDIA_STR_ZOOM_100 +String AVMEDIA_STR_ZOOM_100 { Text[en-US] = "100%"; }; // ------------------------------------------------------------------------------ -String AVMEDIA_STR_ZOOM_200 +String AVMEDIA_STR_ZOOM_200 { Text[en-US] = "200%"; }; // ------------------------------------------------------------------------------ -String AVMEDIA_STR_ZOOM_FIT +String AVMEDIA_STR_ZOOM_FIT { Text[en-US] = "Scaled"; }; diff --git a/avmedia/source/framework/mediaitem.cxx b/avmedia/source/framework/mediaitem.cxx index 5ed6c0d4ea69..8501fd054db8 100644 --- a/avmedia/source/framework/mediaitem.cxx +++ b/avmedia/source/framework/mediaitem.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 @@ -25,8 +25,8 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ - -#include <avmedia/mediaitem.hxx> + +#include <avmedia/mediaitem.hxx> #include <com/sun/star/uno/Sequence.hxx> using namespace ::com::sun::star; @@ -39,14 +39,14 @@ namespace avmedia // ------------- TYPEINIT1_AUTOFACTORY( MediaItem, ::SfxPoolItem ); - ::rtl::OUString maURL; - sal_uInt32 mnMaskSet; - MediaState meState; - double mfTime; - double mfDuration; - sal_Int16 mnVolumeDB; - sal_Bool mbLoop; - sal_Bool mbMute; + ::rtl::OUString maURL; + sal_uInt32 mnMaskSet; + MediaState meState; + double mfTime; + double mfDuration; + sal_Int16 mnVolumeDB; + sal_Bool mbLoop; + sal_Bool mbMute; ::com::sun::star::media::ZoomLevel meZoom; // ------------------------------------------------------------------------------ @@ -88,7 +88,7 @@ MediaItem::~MediaItem() // ------------------------------------------------------------------------------ -int MediaItem::operator==( const SfxPoolItem& rItem ) const +int MediaItem::operator==( const SfxPoolItem& rItem ) const { DBG_ASSERT( SfxPoolItem::operator==(rItem), "unequal types" ); return( mnMaskSet == static_cast< const MediaItem& >( rItem ).mnMaskSet && @@ -114,7 +114,7 @@ SfxPoolItem* MediaItem::Clone( SfxItemPool* ) const SfxItemPresentation MediaItem::GetPresentation( SfxItemPresentation, SfxMapUnit, SfxMapUnit, - XubString& rText, + XubString& rText, const IntlWrapper * ) const { rText.Erase(); @@ -146,8 +146,8 @@ bool MediaItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE ) const bool MediaItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE ) { - uno::Sequence< uno::Any > aSeq; - bool bRet = false; + uno::Sequence< uno::Any > aSeq; + bool bRet = false; if( ( rVal >>= aSeq ) && ( aSeq.getLength() == 9 ) ) { @@ -177,10 +177,10 @@ void MediaItem::merge( const MediaItem& rMediaItem ) if( AVMEDIA_SETMASK_URL & nMaskSet ) setURL( rMediaItem.getURL() ); - + if( AVMEDIA_SETMASK_STATE & nMaskSet ) setState( rMediaItem.getState() ); - + if( AVMEDIA_SETMASK_DURATION & nMaskSet ) setDuration( rMediaItem.getDuration() ); @@ -216,14 +216,14 @@ void MediaItem::setURL( const ::rtl::OUString& rURL ) } //------------------------------------------------------------------------ - + const ::rtl::OUString& MediaItem::getURL() const { return maURL; } //------------------------------------------------------------------------ - + void MediaItem::setState( MediaState eState ) { meState = eState; @@ -231,14 +231,14 @@ void MediaItem::setState( MediaState eState ) } //------------------------------------------------------------------------ - + MediaState MediaItem::getState() const { return meState; } //------------------------------------------------------------------------ - + void MediaItem::setDuration( double fDuration ) { mfDuration = fDuration; @@ -246,14 +246,14 @@ void MediaItem::setDuration( double fDuration ) } //------------------------------------------------------------------------ - + double MediaItem::getDuration() const { return mfDuration; } //------------------------------------------------------------------------ - + void MediaItem::setTime( double fTime ) { mfTime = fTime; @@ -261,14 +261,14 @@ void MediaItem::setTime( double fTime ) } //------------------------------------------------------------------------ - + double MediaItem::getTime() const { return mfTime; } //------------------------------------------------------------------------ - + void MediaItem::setLoop( sal_Bool bLoop ) { mbLoop = bLoop; @@ -276,14 +276,14 @@ void MediaItem::setLoop( sal_Bool bLoop ) } //------------------------------------------------------------------------ - + sal_Bool MediaItem::isLoop() const { return mbLoop; } //------------------------------------------------------------------------ - + void MediaItem::setMute( sal_Bool bMute ) { mbMute = bMute; @@ -298,7 +298,7 @@ sal_Bool MediaItem::isMute() const } //------------------------------------------------------------------------ - + void MediaItem::setVolumeDB( sal_Int16 nDB ) { mnVolumeDB = nDB; @@ -321,7 +321,7 @@ void MediaItem::setZoom( ::com::sun::star::media::ZoomLevel eZoom ) } //------------------------------------------------------------------------ - + ::com::sun::star::media::ZoomLevel MediaItem::getZoom() const { return meZoom; diff --git a/avmedia/source/framework/mediamisc.cxx b/avmedia/source/framework/mediamisc.cxx index 882f5db55d9c..73f1d75206a8 100644 --- a/avmedia/source/framework/mediamisc.cxx +++ b/avmedia/source/framework/mediamisc.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 @@ -40,7 +40,7 @@ ResMgr* GetResMgr() { ByteString aResMgrName( "avmedia" ); - pResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() ); + pResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() ); } return pResMgr; diff --git a/avmedia/source/framework/mediaplayer.cxx b/avmedia/source/framework/mediaplayer.cxx index af6fde31d984..9ef4042c5bdb 100644 --- a/avmedia/source/framework/mediaplayer.cxx +++ b/avmedia/source/framework/mediaplayer.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 @@ -28,7 +28,7 @@ #include <avmedia/mediaplayer.hxx> #include <avmedia/mediawindow.hxx> -#include <avmedia/mediaitem.hxx> +#include <avmedia/mediaitem.hxx> #include "mediamisc.hxx" #include "mediacontrol.hrc" #include "helpids.hrc" @@ -82,7 +82,7 @@ MediaFloater::MediaFloater( SfxBindings* _pBindings, SfxChildWindow* pCW, Window } // ----------------------------------------------------------------------------- - + MediaFloater::~MediaFloater() { delete mpMediaWindow; @@ -100,7 +100,7 @@ void MediaFloater::implInit() void MediaFloater::Resize() { SfxDockingWindow::Resize(); - + if( mpMediaWindow ) mpMediaWindow->setPosSize( Rectangle( Point(), GetOutputSizePixel() ) ); } @@ -110,20 +110,20 @@ void MediaFloater::Resize() void MediaFloater::ToggleFloatingMode() { ::avmedia::MediaItem aRestoreItem; - + mpMediaWindow->updateMediaItem( aRestoreItem ); delete mpMediaWindow; mpMediaWindow = NULL; SfxDockingWindow::ToggleFloatingMode(); - + mpMediaWindow = new MediaWindow( this, true ); - + mpMediaWindow->setPosSize( Rectangle( Point(), GetOutputSizePixel() ) ); mpMediaWindow->executeMediaItem( aRestoreItem ); - + Window* pWindow = mpMediaWindow->getWindow(); - + if( pWindow ) pWindow->SetHelpId( HID_AVMEDIA_PLAYERWINDOW ); @@ -137,7 +137,7 @@ void MediaFloater::setURL( const ::rtl::OUString& rURL, bool bPlayImmediately ) if( mpMediaWindow ) { mpMediaWindow->setURL( rURL ); - + if( mpMediaWindow->isValid() && bPlayImmediately ) mpMediaWindow->start(); } @@ -156,9 +156,9 @@ const ::rtl::OUString& MediaFloater::getURL() const void MediaFloater::dispatchCurrentURL() { SfxDispatcher* pDispatcher = GetBindings().GetDispatcher(); - + if( pDispatcher ) - { + { const SfxStringItem aMediaURLItem( SID_INSERT_AVMEDIA, getURL() ); pDispatcher->Execute( SID_INSERT_AVMEDIA, SFX_CALLMODE_RECORD, &aMediaURLItem, 0L ); } diff --git a/avmedia/source/framework/mediatoolbox.cxx b/avmedia/source/framework/mediatoolbox.cxx index e6c7750b37a4..993bf5d50796 100644 --- a/avmedia/source/framework/mediatoolbox.cxx +++ b/avmedia/source/framework/mediatoolbox.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 @@ -26,8 +26,8 @@ * ************************************************************************/ -#include <avmedia/mediatoolbox.hxx> -#include <avmedia/mediaitem.hxx> +#include <avmedia/mediatoolbox.hxx> +#include <avmedia/mediaitem.hxx> #include "mediacontrol.hxx" #include <sfx2/app.hxx> @@ -47,16 +47,16 @@ namespace avmedia class MediaToolBoxControl_Impl : public MediaControl { public: - + MediaToolBoxControl_Impl( Window& rParent, MediaToolBoxControl& rControl ); ~MediaToolBoxControl_Impl(); - void update(); - void execute( const MediaItem& rItem ); - + void update(); + void execute( const MediaItem& rItem ); + private: - MediaToolBoxControl* mpToolBoxControl; + MediaToolBoxControl* mpToolBoxControl; }; // --------------------------------------------------------------------- @@ -114,9 +114,9 @@ void MediaToolBoxControl::StateChanged( USHORT /* nSID */, SfxItemState eState, { MediaToolBoxControl_Impl* pCtrl = static_cast< MediaToolBoxControl_Impl* >( GetToolBox().GetItemWindow( GetId() ) ); - + DBG_ASSERT( pCtrl, "MediaToolBoxControl::StateChanged: media control not found" ); - + if( eState == SFX_ITEM_DISABLED ) { pCtrl->Enable( false, false ); @@ -126,11 +126,11 @@ void MediaToolBoxControl::StateChanged( USHORT /* nSID */, SfxItemState eState, pCtrl->setState( aEmptyMediaItem ); } else - { + { pCtrl->Enable( true, false ); const MediaItem* pMediaItem = PTR_CAST( MediaItem, pState ); - + if( pMediaItem && ( SFX_ITEM_AVAILABLE == eState ) ) pCtrl->setState( *pMediaItem ); } @@ -154,15 +154,15 @@ void MediaToolBoxControl::implUpdateMediaControl() void MediaToolBoxControl::implExecuteMediaControl( const MediaItem& rItem ) { - MediaItem aExecItem( SID_AVMEDIA_TOOLBOX ); - uno::Sequence< beans::PropertyValue > aArgs( 1 ); - uno::Any aAny; - + MediaItem aExecItem( SID_AVMEDIA_TOOLBOX ); + uno::Sequence< beans::PropertyValue > aArgs( 1 ); + uno::Any aAny; + aExecItem.merge( rItem ); aExecItem.QueryValue( aAny ); aArgs[ 0 ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "AVMediaToolBox" ) ); aArgs[ 0 ].Value = aAny; - + Dispatch( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:AVMediaToolBox" ) ), aArgs ); } diff --git a/avmedia/source/framework/soundhandler.cxx b/avmedia/source/framework/soundhandler.cxx index d292bd723647..e727f2ffe0e1 100644 --- a/avmedia/source/framework/soundhandler.cxx +++ b/avmedia/source/framework/soundhandler.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 @@ -27,7 +27,7 @@ ************************************************************************/ //_________________________________________________________________________________________________________________ -// my own includes +// my own includes //_________________________________________________________________________________________________________________ #include "soundhandler.hxx" @@ -35,13 +35,13 @@ #include <comphelper/mediadescriptor.hxx> //_________________________________________________________________________________________________________________ -// interface includes +// interface includes //_________________________________________________________________________________________________________________ #include <com/sun/star/io/XInputStream.hpp> #include <com/sun/star/frame/DispatchResultState.hpp> //_________________________________________________________________________________________________________________ -// includes of other projects +// includes of other projects //_________________________________________________________________________________________________________________ #include <comphelper/sequenceashashmap.hxx> #include <rtl/ustrbuf.hxx> @@ -50,21 +50,21 @@ #include <cppuhelper/factory.hxx> //_________________________________________________________________________________________________________________ -// namespace +// namespace //_________________________________________________________________________________________________________________ namespace avmedia{ //_________________________________________________________________________________________________________________ -// non exported const +// non exported const //_________________________________________________________________________________________________________________ //_________________________________________________________________________________________________________________ -// non exported definitions +// non exported definitions //_________________________________________________________________________________________________________________ //_________________________________________________________________________________________________________________ -// declarations +// declarations //_________________________________________________________________________________________________________________ //***************************************************************************************************************** @@ -87,7 +87,7 @@ css::uno::Any SAL_CALL SoundHandler::queryInterface( const css::uno::Type& aType { /* Attention: Don't use mutex or guard in this method!!! Is a method of XInterface. */ /* Ask for my own supported interfaces ...*/ - css::uno::Any aReturn( ::cppu::queryInterface( aType, + css::uno::Any aReturn( ::cppu::queryInterface( aType, static_cast< css::lang::XTypeProvider* >(this), static_cast< css::lang::XServiceInfo* >(this), static_cast< css::frame::XNotifyingDispatch* >(this), @@ -128,7 +128,7 @@ css::uno::Sequence< sal_Int8 > SAL_CALL SoundHandler::getImplementationId() thro } css::uno::Sequence< css::uno::Type > SAL_CALL SoundHandler::getTypes() throw( css::uno::RuntimeException ) -{ +{ /* Optimize this method ! */ /* We initialize a static variable only one time. */ /* And we don't must use a mutex at every call! */ @@ -182,8 +182,8 @@ sal_Bool SAL_CALL SoundHandler::supportsService( const ::rtl::OUString& sService /* Get names of all supported servicenames. */ css::uno::Sequence< ::rtl::OUString > seqServiceNames = getSupportedServiceNames(); const ::rtl::OUString* pArray = seqServiceNames.getConstArray(); - sal_Int32 nCounter = 0; - sal_Int32 nLength = seqServiceNames.getLength(); + sal_Int32 nCounter = 0; + sal_Int32 nLength = seqServiceNames.getLength(); /* Search for right name in list. */ while ( ( nCounter < nLength ) && @@ -270,11 +270,11 @@ void SAL_CALL SoundHandler::impl_initService() @threadsafe yes *//*-*************************************************************************************************************/ SoundHandler::SoundHandler( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory ) - // Init baseclasses first + // Init baseclasses first : ThreadHelpBase ( ) , ::cppu::OWeakObject ( ) // Init member - , m_bError ( false ) + , m_bError ( false ) , m_xFactory ( xFactory ) { m_aUpdateTimer.SetTimeoutHdl(LINK(this, SoundHandler, implts_PlayerNotify)); @@ -332,7 +332,7 @@ void SAL_CALL SoundHandler::dispatchWithNotification(const css::util::URL& // SAFE { const ::osl::MutexGuard aLock( m_aLock ); - { + { //close streams otherwise on windows we can't reopen the file in the //media player when we pass the url to directx as it'll already be open ::comphelper::MediaDescriptor aDescriptor(lDescriptor); diff --git a/avmedia/source/framework/soundhandler.hxx b/avmedia/source/framework/soundhandler.hxx index 0544ee41071b..decb1771789e 100644 --- a/avmedia/source/framework/soundhandler.hxx +++ b/avmedia/source/framework/soundhandler.hxx @@ -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 @@ -30,7 +30,7 @@ #define __FRAMEWORK_HANDLER_SOUNDHANDLER_HXX_ //_________________________________________________________________________________________________________________ -// interface includes +// interface includes //_________________________________________________________________________________________________________________ #include <com/sun/star/lang/XTypeProvider.hpp> @@ -47,7 +47,7 @@ #include <com/sun/star/lang/XSingleServiceFactory.hpp> //_________________________________________________________________________________________________________________ -// other includes +// other includes //_________________________________________________________________________________________________________________ #include <cppuhelper/weak.hxx> @@ -59,17 +59,17 @@ namespace css = ::com::sun::star; //_________________________________________________________________________________________________________________ -// namespace +// namespace //_________________________________________________________________________________________________________________ namespace avmedia{ //_________________________________________________________________________________________________________________ -// exported const +// exported const //_________________________________________________________________________________________________________________ //_________________________________________________________________________________________________________________ -// exported definitions +// exported definitions //_________________________________________________________________________________________________________________ struct ThreadHelpBase @@ -100,12 +100,12 @@ class SoundHandler : // interfaces , public ::cppu::OWeakObject { //------------------------------------------------------------------------------------------------------------- - // public methods + // public methods //------------------------------------------------------------------------------------------------------------- public: //--------------------------------------------------------------------------------------------------------- - // constructor / destructor + // constructor / destructor //--------------------------------------------------------------------------------------------------------- SoundHandler( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory ); virtual ~SoundHandler( ); @@ -119,19 +119,19 @@ class SoundHandler : // interfaces virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () throw( css::uno::RuntimeException ); virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw( css::uno::RuntimeException ); - - /* interface XServiceInfo */ - virtual ::rtl::OUString SAL_CALL getImplementationName ( ) throw( css::uno::RuntimeException ); - virtual sal_Bool SAL_CALL supportsService ( const ::rtl::OUString& sServiceName ) throw( css::uno::RuntimeException ); - virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames ( ) throw( css::uno::RuntimeException ); - /* Helper for XServiceInfo */ - static css::uno::Sequence< ::rtl::OUString > SAL_CALL impl_getStaticSupportedServiceNames( ); - static ::rtl::OUString SAL_CALL impl_getStaticImplementationName ( ); - /* Helper for registry */ - static css::uno::Reference< css::uno::XInterface > SAL_CALL impl_createInstance ( const css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager ) throw( css::uno::Exception ); - static css::uno::Reference< css::lang::XSingleServiceFactory > SAL_CALL impl_createFactory ( const css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager ); - /* Helper for initialization of service by using own reference! */ - virtual void SAL_CALL impl_initService ( ); + + /* interface XServiceInfo */ + virtual ::rtl::OUString SAL_CALL getImplementationName ( ) throw( css::uno::RuntimeException ); + virtual sal_Bool SAL_CALL supportsService ( const ::rtl::OUString& sServiceName ) throw( css::uno::RuntimeException ); + virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames ( ) throw( css::uno::RuntimeException ); + /* Helper for XServiceInfo */ + static css::uno::Sequence< ::rtl::OUString > SAL_CALL impl_getStaticSupportedServiceNames( ); + static ::rtl::OUString SAL_CALL impl_getStaticImplementationName ( ); + /* Helper for registry */ + static css::uno::Reference< css::uno::XInterface > SAL_CALL impl_createInstance ( const css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager ) throw( css::uno::Exception ); + static css::uno::Reference< css::lang::XSingleServiceFactory > SAL_CALL impl_createFactory ( const css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager ); + /* Helper for initialization of service by using own reference! */ + virtual void SAL_CALL impl_initService ( ); //--------------------------------------------------------------------------------------------------------- // XNotifyingDispatch @@ -141,7 +141,7 @@ class SoundHandler : // interfaces const css::uno::Reference< css::frame::XDispatchResultListener >& xListener ) throw(css::uno::RuntimeException); //--------------------------------------------------------------------------------------------------------- - // XDispatch + // XDispatch //--------------------------------------------------------------------------------------------------------- virtual void SAL_CALL dispatch ( const css::util::URL& aURL , const css::uno::Sequence< css::beans::PropertyValue >& lArguments ) throw( css::uno::RuntimeException ); @@ -157,33 +157,33 @@ class SoundHandler : // interfaces virtual ::rtl::OUString SAL_CALL detect ( css::uno::Sequence< css::beans::PropertyValue >& lDescriptor ) throw( css::uno::RuntimeException ); //------------------------------------------------------------------------------------------------------------- - // protected methods + // protected methods //------------------------------------------------------------------------------------------------------------- protected: //------------------------------------------------------------------------------------------------------------- - // private methods + // private methods //------------------------------------------------------------------------------------------------------------- private: DECL_LINK( implts_PlayerNotify, void* ); //------------------------------------------------------------------------------------------------------------- - // variables - // (should be private everyway!) + // 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::media::XPlayer > m_xPlayer ; /// uses avmedia player to play sounds ... css::uno::Reference< css::frame::XDispatchResultListener > m_xListener ; Timer m_aUpdateTimer; }; // class SoundHandler -} // namespace avmedia +} // namespace avmedia #endif // #ifndef __FRAMEWORK_HANDLER_SOUNDHANDLER_HXX_ diff --git a/avmedia/source/framework/soundhandler.xml b/avmedia/source/framework/soundhandler.xml index 065b31a2c402..3eb039dec787 100644 --- a/avmedia/source/framework/soundhandler.xml +++ b/avmedia/source/framework/soundhandler.xml @@ -18,30 +18,30 @@ <supported-service> com.sun.star.frame.ContentHandler </supported-service> </component-description> - <project-build-dependency> cppu </project-build-dependency> - <project-build-dependency> cppuhelper </project-build-dependency> - <project-build-dependency> sal </project-build-dependency> - <project-build-dependency> tools </project-build-dependency> - <project-build-dependency> svtools </project-build-dependency> - <project-build-dependency> toolkit </project-build-dependency> - <project-build-dependency> sv </project-build-dependency> - <project-build-dependency> comphelper </project-build-dependency> - <project-build-dependency> unotools </project-build-dependency> - <project-build-dependency> ucbhelper </project-build-dependency> - <project-build-dependency> svl </project-build-dependency> - <project-build-dependency> sot </project-build-dependency> + <project-build-dependency> cppu </project-build-dependency> + <project-build-dependency> cppuhelper </project-build-dependency> + <project-build-dependency> sal </project-build-dependency> + <project-build-dependency> tools </project-build-dependency> + <project-build-dependency> svtools </project-build-dependency> + <project-build-dependency> toolkit </project-build-dependency> + <project-build-dependency> sv </project-build-dependency> + <project-build-dependency> comphelper </project-build-dependency> + <project-build-dependency> unotools </project-build-dependency> + <project-build-dependency> ucbhelper </project-build-dependency> + <project-build-dependency> svl </project-build-dependency> + <project-build-dependency> sot </project-build-dependency> - <runtime-module-dependency> cppu2 </runtime-module-dependency> - <runtime-module-dependency> cppuhelper </runtime-module-dependency> - <runtime-module-dependency> sal2 </runtime-module-dependency> - <runtime-module-dependency> tl </runtime-module-dependency> - <runtime-module-dependency> svt </runtime-module-dependency> - <runtime-module-dependency> svl </runtime-module-dependency> - <runtime-module-dependency> tk </runtime-module-dependency> - <runtime-module-dependency> sv </runtime-module-dependency> - <runtime-module-dependency> comphelp2 </runtime-module-dependency> - <runtime-module-dependency> utl </runtime-module-dependency> - <runtime-module-dependency> ucb </runtime-module-dependency> - <runtime-module-dependency> sot </runtime-module-dependency> + <runtime-module-dependency> cppu2 </runtime-module-dependency> + <runtime-module-dependency> cppuhelper </runtime-module-dependency> + <runtime-module-dependency> sal2 </runtime-module-dependency> + <runtime-module-dependency> tl </runtime-module-dependency> + <runtime-module-dependency> svt </runtime-module-dependency> + <runtime-module-dependency> svl </runtime-module-dependency> + <runtime-module-dependency> tk </runtime-module-dependency> + <runtime-module-dependency> sv </runtime-module-dependency> + <runtime-module-dependency> comphelp2 </runtime-module-dependency> + <runtime-module-dependency> utl </runtime-module-dependency> + <runtime-module-dependency> ucb </runtime-module-dependency> + <runtime-module-dependency> sot </runtime-module-dependency> </module-description> diff --git a/avmedia/source/gstreamer/gstuno.cxx b/avmedia/source/gstreamer/gstuno.cxx index 1a0fcc52240a..96c199daac42 100644 --- a/avmedia/source/gstreamer/gstuno.cxx +++ b/avmedia/source/gstreamer/gstuno.cxx @@ -82,7 +82,7 @@ extern "C" sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, voi extern "C" void* SAL_CALL component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* /*pRegistryKey*/ ) { uno::Reference< lang::XSingleServiceFactory > xFactory; - void* pRet = 0; + void* pRet = 0; if( rtl_str_compare( pImplName, "com.sun.star.comp.media.Manager_GStreamer" ) == 0 ) { diff --git a/avmedia/source/inc/mediamisc.hxx b/avmedia/source/inc/mediamisc.hxx index c09e6e098e83..7c24df071adc 100644 --- a/avmedia/source/inc/mediamisc.hxx +++ b/avmedia/source/inc/mediamisc.hxx @@ -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 @@ -33,7 +33,7 @@ class ResMgr; #ifdef GSTREAMER #define AVMEDIA_MANAGER_SERVICE_NAME "com.sun.star.media.Manager_GStreamer" #else -#ifdef WNT +#ifdef WNT #define AVMEDIA_MANAGER_SERVICE_NAME "com.sun.star.media.Manager_DirectX" #else #ifdef QUARTZ @@ -43,7 +43,7 @@ class ResMgr; #endif #endif #endif - + namespace avmedia { ResMgr* GetResMgr(); diff --git a/avmedia/source/java/FrameGrabber.java b/avmedia/source/java/FrameGrabber.java index 1a0deda4ce57..a3ad559aa9ae 100644 --- a/avmedia/source/java/FrameGrabber.java +++ b/avmedia/source/java/FrameGrabber.java @@ -1,7 +1,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 @@ -51,7 +51,7 @@ public class FrameGrabber implements com.sun.star.lang.XServiceInfo, public FrameGrabber( com.sun.star.lang.XMultiServiceFactory aFactory, String aURL ) { maFactory = aFactory; - + try { maPlayer = javax.media.Manager.createRealizedPlayer( new java.net.URL( aURL ) ); @@ -71,39 +71,39 @@ public class FrameGrabber implements com.sun.star.lang.XServiceInfo, catch( java.lang.Exception e ) { } - + if( maPlayer != null ) { maFrameGrabbingControl = (javax.media.control.FrameGrabbingControl) maPlayer.getControl( "javax.media.control.FrameGrabbingControl" ); } } - + // ------------------------------------------------------------------------- public com.sun.star.graphic.XGraphic implImageToXGraphic( java.awt.Image aImage ) { com.sun.star.graphic.XGraphic aRet = null; - + if( maFactory != null && aImage != null ) { if( aImage instanceof java.awt.image.BufferedImage ) { java.io.File aTempFile = null; - + try { aTempFile = java.io.File.createTempFile( "sv0", ".png" ); - + if( aTempFile.canWrite() ) { javax.imageio.ImageIO.write( (java.awt.image.BufferedImage) aImage, "png", aTempFile ); - + com.sun.star.graphic.XGraphicProvider aProvider = (com.sun.star.graphic.XGraphicProvider) UnoRuntime.queryInterface( com.sun.star.graphic.XGraphicProvider.class, maFactory.createInstance("com.sun.star.graphic.GraphicProvider") ); - + if( aProvider != null ) { com.sun.star.beans.PropertyValue[] aArgs = new com.sun.star.beans.PropertyValue[ 1 ]; @@ -125,15 +125,15 @@ public class FrameGrabber implements com.sun.star.lang.XServiceInfo, catch( com.sun.star.uno.Exception aExcp ) { } - + if( aTempFile != null ) aTempFile.delete(); } } - + return aRet; } - + // ----------------- // - XFrameGrabber - // ----------------- @@ -141,24 +141,24 @@ public class FrameGrabber implements com.sun.star.lang.XServiceInfo, public synchronized com.sun.star.graphic.XGraphic grabFrame( double fMediaTime ) { com.sun.star.graphic.XGraphic aRet = null; - + if( maFrameGrabbingControl != null ) { if( fMediaTime >= 0.0 && fMediaTime <= maPlayer.getDuration().getSeconds() ) { maPlayer.setMediaTime( new javax.media.Time( fMediaTime ) ); - + javax.media.Buffer aBuffer = maFrameGrabbingControl.grabFrame(); - + if( aBuffer != null && aBuffer.getFormat() instanceof javax.media.format.VideoFormat ) { - aRet = implImageToXGraphic( new javax.media.util.BufferToImage( + aRet = implImageToXGraphic( new javax.media.util.BufferToImage( (javax.media.format.VideoFormat) aBuffer.getFormat() ). createImage( aBuffer ) ); } } } - + return aRet; } diff --git a/avmedia/source/java/Manager.java b/avmedia/source/java/Manager.java index 47707478fd5b..a85a5176a1e7 100644 --- a/avmedia/source/java/Manager.java +++ b/avmedia/source/java/Manager.java @@ -1,7 +1,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 @@ -38,15 +38,15 @@ import com.sun.star.media.*; public class Manager implements com.sun.star.lang.XServiceInfo, com.sun.star.lang.XTypeProvider, com.sun.star.media.XManager - + { private com.sun.star.lang.XMultiServiceFactory maFactory; - + // ------------------------------------------------------------------------- public Manager( com.sun.star.lang.XMultiServiceFactory aFactory ) { - maFactory = aFactory; + maFactory = aFactory; } // ------------ @@ -128,7 +128,7 @@ public class Manager implements com.sun.star.lang.XServiceInfo, } // ------------------------------------------------------------------------- - + synchronized public byte[] getImplementationId() { if( maImplementationId == null) @@ -144,5 +144,5 @@ public class Manager implements com.sun.star.lang.XServiceInfo, } return maImplementationId; - } + } } diff --git a/avmedia/source/java/MediaUno.java b/avmedia/source/java/MediaUno.java index ca7a164586d8..004ae7cf68a0 100644 --- a/avmedia/source/java/MediaUno.java +++ b/avmedia/source/java/MediaUno.java @@ -1,7 +1,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 @@ -38,13 +38,13 @@ public class MediaUno private static final String s_serviceName = "com.sun.star.media.Manager_Java"; // ------------------------------------------------------------------------- - + public MediaUno() { } // ------------------------------------------------------------------------- - + public static com.sun.star.lang.XSingleServiceFactory __getServiceFactory( String implName, com.sun.star.lang.XMultiServiceFactory multiFactory, @@ -61,12 +61,12 @@ public class MediaUno { } } - + return null; } // ------------------------------------------------------------------------- - + public static boolean __writeRegistryServiceInfo( com.sun.star.registry.XRegistryKey regKey ) { diff --git a/avmedia/source/java/Player.java b/avmedia/source/java/Player.java index be3b3d62d367..d35be5cc1a21 100644 --- a/avmedia/source/java/Player.java +++ b/avmedia/source/java/Player.java @@ -1,7 +1,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 @@ -42,7 +42,7 @@ public class Player implements javax.media.ControllerListener, com.sun.star.lang.XServiceInfo, com.sun.star.media.XPlayer, com.sun.star.lang.XComponent - + { private com.sun.star.lang.XMultiServiceFactory maFactory; @@ -54,7 +54,7 @@ public class Player implements javax.media.ControllerListener, // ------------------------------------------------------------------------- - public Player( com.sun.star.lang.XMultiServiceFactory aFactory, + public Player( com.sun.star.lang.XMultiServiceFactory aFactory, javax.media.Player aPlayer, String aURL ) { maFactory = aFactory; @@ -113,9 +113,9 @@ public class Player implements javax.media.ControllerListener, { return mbStarted; } - + // ------------------------------------------------------------------------- - + public synchronized double getDuration() { return maPlayer.getDuration().getSeconds(); @@ -137,44 +137,44 @@ public class Player implements javax.media.ControllerListener, } // ------------------------------------------------------------------------- - + public synchronized void setStopTime( double fTime ) { boolean bOldStarted = mbStarted; - + if( mbStarted ) stop(); - + maPlayer.setStopTime( new javax.media.Time( fTime ) ); - + if( bOldStarted ) start(); } // ------------------------------------------------------------------------- - + public synchronized double getStopTime() { return maPlayer.getStopTime().getSeconds(); } // ------------------------------------------------------------------------- - + public synchronized void setRate( double fRate ) { boolean bOldStarted = mbStarted; - + if( mbStarted ) stop(); maPlayer.setRate( (float) fRate ); - - if( bOldStarted ) + + if( bOldStarted ) start(); } // ------------------------------------------------------------------------- - + public synchronized double getRate() { return (double) maPlayer.getRate(); @@ -208,7 +208,7 @@ public class Player implements javax.media.ControllerListener, { return( maGainControl != null ? (short) maGainControl.getDB() : 0 ); } - + // ------------------------------------------------------------------------- public synchronized void setMute( boolean bSet ) @@ -248,14 +248,14 @@ public class Player implements javax.media.ControllerListener, { try { - com.sun.star.media.XPlayerWindow xPlayerWindow = ( ( ( aArgs.length > 1 ) && ( AnyConverter.toInt( aArgs[ 0 ] ) > 0 ) ) ? - new PlayerWindow( maFactory, aArgs, maPlayer ) : + com.sun.star.media.XPlayerWindow xPlayerWindow = ( ( ( aArgs.length > 1 ) && ( AnyConverter.toInt( aArgs[ 0 ] ) > 0 ) ) ? + new PlayerWindow( maFactory, aArgs, maPlayer ) : null ); - + // check if it is a real player window (video window) if( xPlayerWindow != null && xPlayerWindow.getZoomLevel() == com.sun.star.media.ZoomLevel.NOT_AVAILABLE ) xPlayerWindow = null; - + return xPlayerWindow; } catch( com.sun.star.lang.IllegalArgumentException e ) @@ -270,7 +270,7 @@ public class Player implements javax.media.ControllerListener, { return( (com.sun.star.media.XFrameGrabber) new FrameGrabber( maFactory, maURL ) ); } - + // -------------- // - XComponent - // -------------- @@ -278,7 +278,7 @@ public class Player implements javax.media.ControllerListener, public synchronized void addEventListener( com.sun.star.lang.XEventListener xListener ) { } - + // ------------------------------------------------------------------------- public synchronized void removeEventListener( com.sun.star.lang.XEventListener xListener ) @@ -286,7 +286,7 @@ public class Player implements javax.media.ControllerListener, } // ------------------------------------------------------------------------- - + public synchronized void dispose() { if( maPlayer != null ) @@ -296,7 +296,7 @@ public class Player implements javax.media.ControllerListener, maPlayer = null; } } - + // ---------------- // - XServiceInfo - // ---------------- diff --git a/avmedia/source/java/PlayerWindow.java b/avmedia/source/java/PlayerWindow.java index 229c651d9f54..4bc9db4ac764 100644 --- a/avmedia/source/java/PlayerWindow.java +++ b/avmedia/source/java/PlayerWindow.java @@ -1,7 +1,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 @@ -58,7 +58,7 @@ public class PlayerWindow implements java.awt.event.KeyListener, java.lang.Object[] aArgs, javax.media.Player aPlayer ) { maFactory = aFactory; - + try { if( aArgs.length > 1 ) @@ -104,7 +104,7 @@ public class PlayerWindow implements java.awt.event.KeyListener, if( maFrame.getJavaFrame() != null ) maFrame.getJavaFrame().add( aPanel ); - + LayoutComponents(); } } @@ -123,33 +123,33 @@ public class PlayerWindow implements java.awt.event.KeyListener, int nW = maFrame.getJavaFrame().getWidth(); int nH = maFrame.getJavaFrame().getHeight(); int nControlH = 0; - + aPanel.setBounds( 0, 0, nW, nH ); - + if( mbShowControls ) { java.awt.Component aControlComponent = aPanel.getComponent( 0 ); - + if( aControlComponent != null ) { java.awt.Dimension aControlDimension = aControlComponent.getPreferredSize(); - + nControlH = Math.min( nH, aControlDimension.height ); aControlComponent.setBounds( 0, nH - nControlH, nW, nControlH ); } } - + if( com.sun.star.media.ZoomLevel.NOT_AVAILABLE != meZoomLevel ) { java.awt.Component aVisualComponent = aPanel.getComponent( mbShowControls ? 1 : 0 ); - + if( aVisualComponent != null ) { java.awt.Dimension aPrefDim = aVisualComponent.getPreferredSize(); int nVideoW = nW, nVideoH = ( nH - nControlH ); int nX = 0, nY = 0, nWidth = 0, nHeight = 0; boolean bDone = false, bZoom = false; - + if( com.sun.star.media.ZoomLevel.ORIGINAL == meZoomLevel ) { bZoom = true; @@ -184,7 +184,7 @@ public class PlayerWindow implements java.awt.event.KeyListener, nHeight = nVideoH; bDone = true; } - + if( bZoom ) { if( ( aPrefDim.width <= nVideoW ) && ( aPrefDim.height <= nVideoH ) ) @@ -196,18 +196,18 @@ public class PlayerWindow implements java.awt.event.KeyListener, bDone = true; } } - + if( !bDone ) { if( aPrefDim.width > 0 && aPrefDim.height > 0 && nVideoW > 0 && nVideoH > 0 ) { double fPrefWH = (double) aPrefDim.width / aPrefDim.height; - + if( fPrefWH < ( (double) nVideoW / nVideoH ) ) nVideoW = (int)( nVideoH * fPrefWH ); else nVideoH = (int)( nVideoW / fPrefWH ); - + nX = ( nW - nVideoW ) >> 1; nY = ( nH - nControlH - nVideoH ) >> 1; nWidth = nVideoW; @@ -216,7 +216,7 @@ public class PlayerWindow implements java.awt.event.KeyListener, else nX = nY = nWidth = nHeight = 0; } - + aVisualComponent.setBounds( nX, nY, nWidth, nHeight ); aVisualComponent.requestFocus(); } @@ -381,17 +381,17 @@ public class PlayerWindow implements java.awt.event.KeyListener, if( maFrame.getJavaFrame() != null ) { int nCursor; - + switch( nPointerType ) { case( com.sun.star.awt.SystemPointer.CROSS ): nCursor = java.awt.Cursor.CROSSHAIR_CURSOR; break; case( com.sun.star.awt.SystemPointer.HAND ): nCursor = java.awt.Cursor.HAND_CURSOR; break; case( com.sun.star.awt.SystemPointer.MOVE ): nCursor = java.awt.Cursor.MOVE_CURSOR; break; case( com.sun.star.awt.SystemPointer.WAIT ): nCursor = java.awt.Cursor.WAIT_CURSOR; break; - + default: nCursor = java.awt.Cursor.DEFAULT_CURSOR; break; } - + maFrame.getJavaFrame().setCursor( java.awt.Cursor.getPredefinedCursor( nCursor ) ); } } @@ -405,13 +405,13 @@ public class PlayerWindow implements java.awt.event.KeyListener, if( maFrame != null ) { java.awt.Panel aPanel = (java.awt.Panel) maFrame.getJavaFrame().getComponent( 0 ); - + if( aPanel != null && aPanel.getComponent( 0 ) != null ) aPanel.getComponent( 0 ).removeFocusListener( this ); - + if( maFrame.getJavaFrame() != null ) maFrame.getJavaFrame().dispose(); - + maFrame.fireDisposingEvent(); } @@ -477,7 +477,7 @@ public class PlayerWindow implements java.awt.event.KeyListener, if( maFrame != null ) maFrame.removeEventListener( xListener ); } - + // ------------------------------------------------------------------------- public synchronized void addWindowListener( XWindowListener xListener ) diff --git a/avmedia/source/java/WindowAdapter.java b/avmedia/source/java/WindowAdapter.java index bd11aec5e738..053b37e1bd86 100644 --- a/avmedia/source/java/WindowAdapter.java +++ b/avmedia/source/java/WindowAdapter.java @@ -1,7 +1,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 @@ -42,7 +42,7 @@ public class WindowAdapter private LinkedList maMouseMotionListeners = new LinkedList(); private LinkedList maPaintListeners = new LinkedList(); private boolean mbShift = false, mbMod1 = false, mbMod2 = false; - + // ----------------- // - WindowAdapter - // ----------------- @@ -53,7 +53,7 @@ public class WindowAdapter } //---------------------------------------------------------------------------------- - + public java.awt.Frame getJavaFrame() { return maFrame; @@ -64,7 +64,7 @@ public class WindowAdapter private short implGetUNOKeyCode( int nJavaKeyCode ) { short nRet = 0; - + switch( nJavaKeyCode ) { case( java.awt.event.KeyEvent.VK_NUMPAD0 ): @@ -346,7 +346,7 @@ public class WindowAdapter } //---------------------------------------------------------------------------------- - + public void fireDisposingEvent() { ListIterator aIter = maEventListeners.listIterator( 0 ); diff --git a/avmedia/source/java/win/SystemWindowAdapter.java b/avmedia/source/java/win/SystemWindowAdapter.java index ebf3cac99307..1d2f143add9c 100644 --- a/avmedia/source/java/win/SystemWindowAdapter.java +++ b/avmedia/source/java/win/SystemWindowAdapter.java @@ -1,7 +1,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 diff --git a/avmedia/source/java/x11/SystemWindowAdapter.java b/avmedia/source/java/x11/SystemWindowAdapter.java index 4292dabe6775..6cada4298261 100644 --- a/avmedia/source/java/x11/SystemWindowAdapter.java +++ b/avmedia/source/java/x11/SystemWindowAdapter.java @@ -1,7 +1,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 @@ -37,16 +37,16 @@ public class SystemWindowAdapter if( aOS.startsWith( "SunOS" ) ) { - try + try { Class aClass = Class.forName( "sun.awt.motif.MEmbeddedFrame" ); - + if( aClass != null ) - { + { try { Constructor aCtor = aClass.getConstructor( new Class[] { long.class, boolean.class } ); - + if( aCtor != null ) { aFrame = (java.awt.Frame) aCtor.newInstance( new Object[] { new Long( windowHandle ), @@ -56,7 +56,7 @@ public class SystemWindowAdapter catch( Exception e ) { } - + if( aFrame == null ) { try @@ -80,12 +80,12 @@ public class SystemWindowAdapter } else { - try + try { Class aClass = Class.forName( "sun.awt.motif.MEmbeddedFrame" ); if( aClass != null ) - { + { Constructor aCtor = aClass.getConstructor( new Class[] { long.class } ); if( aCtor != null ) @@ -100,12 +100,12 @@ public class SystemWindowAdapter if( aFrame == null ) { - try + try { Class aClass = Class.forName( "sun.awt.X11.XEmbeddedFrame" ); if( aClass != null ) - { + { Constructor aCtor = aClass.getConstructor( new Class[] { long.class } ); if( aCtor != null ) @@ -117,7 +117,7 @@ public class SystemWindowAdapter } } } - + return aFrame; } } diff --git a/avmedia/source/quicktime/framegrabber.cxx b/avmedia/source/quicktime/framegrabber.cxx index 5da2aa2f2836..d6b51290ccce 100644 --- a/avmedia/source/quicktime/framegrabber.cxx +++ b/avmedia/source/quicktime/framegrabber.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 @@ -50,8 +50,8 @@ FrameGrabber::FrameGrabber( const uno::Reference< lang::XMultiServiceFactory >& { OSErr result; - NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; - // check the version of QuickTime installed + NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; + // check the version of QuickTime installed result = Gestalt(gestaltQuickTime,&mnVersion); if ((result == noErr) && (mnVersion >= QT701)) { @@ -83,7 +83,7 @@ bool FrameGrabber::create( const ::rtl::OUString& rURL ) { bool bRet = false; maURL = rURL; - NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; + NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; NSString* aNSStr = [[[NSString alloc] initWithCharacters: rURL.getStr() length: rURL.getLength()]stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding] ; NSURL* aURL = [NSURL URLWithString:aNSStr ]; @@ -91,7 +91,7 @@ bool FrameGrabber::create( const ::rtl::OUString& rURL ) mpMovie = [mpMovie initWithURL:aURL error:nil]; if(mpMovie) - { + { [mpMovie retain]; bRet = true; } @@ -107,7 +107,7 @@ uno::Reference< graphic::XGraphic > SAL_CALL FrameGrabber::grabFrame( double fMe throw (uno::RuntimeException) { uno::Reference< graphic::XGraphic > xRet; - + NSImage* pImage = [mpMovie frameImageAtTime: QTMakeTimeWithTimeInterval(fMediaTime)]; NSData *pBitmap = [pImage TIFFRepresentation]; long nSize = [pBitmap length]; diff --git a/avmedia/source/quicktime/framegrabber.hxx b/avmedia/source/quicktime/framegrabber.hxx index 8fa2b5b5fc95..95d62c18cf7c 100644 --- a/avmedia/source/quicktime/framegrabber.hxx +++ b/avmedia/source/quicktime/framegrabber.hxx @@ -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 @@ -61,9 +61,9 @@ private: ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMgr; ::rtl::OUString maURL; - QTMovie* mpMovie; - sal_Bool mbInitialized; - long mnVersion; + QTMovie* mpMovie; + sal_Bool mbInitialized; + long mnVersion; }; } // namespace quicktime diff --git a/avmedia/source/quicktime/manager.cxx b/avmedia/source/quicktime/manager.cxx index ca8da8e5d8b4..bdf5105caeb5 100644 --- a/avmedia/source/quicktime/manager.cxx +++ b/avmedia/source/quicktime/manager.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 diff --git a/avmedia/source/quicktime/manager.hxx b/avmedia/source/quicktime/manager.hxx index 8c8749683ce7..2fb8f3d10682 100644 --- a/avmedia/source/quicktime/manager.hxx +++ b/avmedia/source/quicktime/manager.hxx @@ -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 diff --git a/avmedia/source/quicktime/player.cxx b/avmedia/source/quicktime/player.cxx index d2ca846f053a..079307fd3760 100644 --- a/avmedia/source/quicktime/player.cxx +++ b/avmedia/source/quicktime/player.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 @@ -92,8 +92,8 @@ Player::Player( const uno::Reference< lang::XMultiServiceFactory >& rxMgr ) : OSErr result; NSApplicationLoad(); - NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; - // check the version of QuickTime installed + NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; + // check the version of QuickTime installed result = Gestalt(gestaltQuickTime,&mnVersion); if ((result == noErr) && (mnVersion >= QT701)) { @@ -117,7 +117,7 @@ Player::~Player() QTMovie* Player::getMovie() { - OSL_ASSERT( mpMovie ); + OSL_ASSERT( mpMovie ); return mpMovie; } @@ -126,17 +126,17 @@ QTMovie* Player::getMovie() bool Player::create( const ::rtl::OUString& rURL ) { bool bRet = false; - // create the Movie + // create the Movie if( mbInitialized ) { - NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; - + NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; + if( mpMovie ) { [mpMovie release]; mpMovie = nil; } - + NSString* aNSStr = [[[NSString alloc] initWithCharacters: rURL.getStr() length: rURL.getLength()]stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding] ; NSURL* aURL = [NSURL URLWithString:aNSStr ]; @@ -201,7 +201,7 @@ sal_Bool SAL_CALL Player::isPlaying() bRet = true; } } - + return bRet; } @@ -214,7 +214,7 @@ double SAL_CALL Player::getDuration( ) double duration = 0.01; if ( mpMovie ) // && mnDuration > 0 ) { - { + { QTTime structDuration = [mpMovie duration] ; duration = (double)structDuration.timeValue / (double)structDuration.timeScale; } @@ -228,7 +228,7 @@ void SAL_CALL Player::setMediaTime( double fTime ) throw (uno::RuntimeException) { OSL_TRACE ("Player::setMediaTime"); - + if ( mpMovie ) { [mpMovie setCurrentTime: QTMakeTimeWithTimeInterval(fTime)]; @@ -282,7 +282,7 @@ void SAL_CALL Player::setRate( double fRate ) throw (uno::RuntimeException) { OSL_TRACE ("Player::setRate"); - + // Quicktime: 0 = stop, 1 = normal speed, 2 = double speed, -1 = normal speed backwards if ( mpMovie ) { @@ -299,7 +299,7 @@ double SAL_CALL Player::getRate( ) double rate = 1.0; OSL_TRACE ("Player::getRate"); - + if ( mpMovie ) { rate = (double) [mpMovie rate]; @@ -333,7 +333,7 @@ sal_Bool SAL_CALL Player::isPlaybackLoop( ) bool bRet = [[mpMovie attributeForKey:QTMovieLoopsAttribute] boolValue]; OSL_TRACE ("Player::isPlaybackLoop ? %s", bRet?"True":"False" ); - + return bRet; } @@ -347,7 +347,7 @@ void SAL_CALL Player::setMute( sal_Bool bSet ) // change the volume to 0 or the unmuted volume if( mpMovie && mbMuted != bSet ) { - [mpMovie setMuted: bSet ]; + [mpMovie setMuted: bSet ]; mbMuted = bSet; } @@ -365,7 +365,7 @@ sal_Bool SAL_CALL Player::isMute( ) // ------------------------------------------------------------------------------ -void SAL_CALL Player::setVolumeDB( sal_Int16 nVolumeDB ) +void SAL_CALL Player::setVolumeDB( sal_Int16 nVolumeDB ) throw (uno::RuntimeException) { // OOo db volume -40 = QTVolume 0 @@ -378,24 +378,24 @@ void SAL_CALL Player::setVolumeDB( sal_Int16 nVolumeDB ) { mnUnmutedVolume = pow( 10.0, nVolumeDB / 20.0 ); } - + OSL_TRACE( "set volume: %d gst volume: %f", nVolumeDB, mnUnmutedVolume ); // change volume if( !mbMuted && mpMovie ) { - [mpMovie setVolume: mnUnmutedVolume ]; + [mpMovie setVolume: mnUnmutedVolume ]; } } // ------------------------------------------------------------------------------ - -sal_Int16 SAL_CALL Player::getVolumeDB( ) + +sal_Int16 SAL_CALL Player::getVolumeDB( ) throw (uno::RuntimeException) { sal_Int16 nVolumeDB = 0.0; - - if( mpMovie ) + + if( mpMovie ) { float volume = 0.0; @@ -409,7 +409,7 @@ sal_Int16 SAL_CALL Player::getVolumeDB( ) nVolumeDB = -40 ; // QT zero volume is no volume, -40db } } - + return nVolumeDB; } @@ -432,13 +432,13 @@ uno::Reference< ::media::XPlayerWindow > SAL_CALL Player::createPlayerWindow( co uno::Reference< ::media::XPlayerWindow > xRet; awt::Size aSize( getPreferredPlayerWindowSize() ); NSSize nsSize( NSMakeSize(aSize.Width, aSize.Height) ); - + OSL_TRACE( "Player::createPlayerWindow %d %d length: %d", aSize.Width, aSize.Height, aArguments.getLength() ); if( aSize.Width > 0 && aSize.Height > 0 ) { sal_IntPtr nPtr = NULL; - aArguments[0] >>= nPtr; + aArguments[0] >>= nPtr; NSView* pParentView = reinterpret_cast< NSView * >(nPtr); ::avmedia::quicktime::Window* pWindow = new ::avmedia::quicktime::Window( mxMgr, *this, pParentView ); @@ -450,7 +450,7 @@ uno::Reference< ::media::XPlayerWindow > SAL_CALL Player::createPlayerWindow( co // ------------------------------------------------------------------------------ -uno::Reference< media::XFrameGrabber > SAL_CALL Player::createFrameGrabber( ) +uno::Reference< media::XFrameGrabber > SAL_CALL Player::createFrameGrabber( ) throw (::com::sun::star::uno::RuntimeException) { uno::Reference< media::XFrameGrabber > xRet; @@ -459,15 +459,15 @@ uno::Reference< media::XFrameGrabber > SAL_CALL Player::createFrameGrabber( ) if( maURL.getLength() > 0 ) { FrameGrabber* pGrabber = new FrameGrabber( mxMgr ); - + xRet = pGrabber; - + if( !pGrabber->create( maURL ) ) { xRet.clear(); } } - + return xRet; } diff --git a/avmedia/source/quicktime/player.hxx b/avmedia/source/quicktime/player.hxx index e7b35c9d5017..204f520703b4 100644 --- a/avmedia/source/quicktime/player.hxx +++ b/avmedia/source/quicktime/player.hxx @@ -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 @@ -52,7 +52,7 @@ public: bool create( const ::rtl::OUString& rURL ); -// void processMessage( GstMessage *message ); +// void processMessage( GstMessage *message ); // XPlayer virtual void SAL_CALL start( ) throw (::com::sun::star::uno::RuntimeException); @@ -78,21 +78,21 @@ public: virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException); - + QTMovie* getMovie(); private: ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMgr; ::rtl::OUString maURL; - + QTMovie *mpMovie; // the Movie object /* GST sal_Bool mbFakeVideo; */ float mnUnmutedVolume; double mnStopTime; - + sal_Bool mbMuted; sal_Bool mbLooping; sal_Bool mbInitialized; diff --git a/avmedia/source/quicktime/quicktimecommon.hxx b/avmedia/source/quicktime/quicktimecommon.hxx index f0d9996c193f..e89bc21dc4a5 100644 --- a/avmedia/source/quicktime/quicktimecommon.hxx +++ b/avmedia/source/quicktime/quicktimecommon.hxx @@ -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 diff --git a/avmedia/source/quicktime/quicktimeuno.cxx b/avmedia/source/quicktime/quicktimeuno.cxx index 2f4e646483e7..48233b4dd0a8 100644 --- a/avmedia/source/quicktime/quicktimeuno.cxx +++ b/avmedia/source/quicktime/quicktimeuno.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 @@ -62,11 +62,11 @@ extern "C" sal_Bool SAL_CALL component_writeInfo( void* /* pServiceManager */, v try { uno::Reference< registry::XRegistryKey > xNewKey1( - static_cast< registry::XRegistryKey* >( pRegistryKey )->createKey( + static_cast< registry::XRegistryKey* >( pRegistryKey )->createKey( ::rtl::OUString::createFromAscii( "/" AVMEDIA_QUICKTIME_MANAGER_IMPLEMENTATIONNAME "/UNO/SERVICES/" AVMEDIA_QUICKTIME_MANAGER_SERVICENAME ) ) ); - + bRet = sal_True; } catch( registry::InvalidRegistryException& ) @@ -85,7 +85,7 @@ extern "C" sal_Bool SAL_CALL component_writeInfo( void* /* pServiceManager */, v extern "C" void* SAL_CALL component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* /* pRegistryKey */ ) { uno::Reference< lang::XSingleServiceFactory > xFactory; - void* pRet = 0; + void* pRet = 0; if( rtl_str_compare( pImplName, AVMEDIA_QUICKTIME_MANAGER_IMPLEMENTATIONNAME ) == 0 ) { diff --git a/avmedia/source/quicktime/window.cxx b/avmedia/source/quicktime/window.cxx index 3f5aa3dc54d5..024354093ba4 100644 --- a/avmedia/source/quicktime/window.cxx +++ b/avmedia/source/quicktime/window.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 @@ -73,13 +73,13 @@ Window::Window( const uno::Reference< lang::XMultiServiceFactory >& i_rxMgr, Pla mpParentView( i_pParentView ), mpMovieView( nil ) { - + ::osl::MutexGuard aGuard( ImplGetOwnStaticMutex() ); if( mpParentView ) // sanity check { - + NSRect aViewRect = [mpParentView frame]; aViewRect.origin.x = aViewRect.origin.y = 0; mpMovieView = [[QTMovieView alloc] initWithFrame: aViewRect]; @@ -104,7 +104,7 @@ Window::~Window() [mpMovieView setMovie:nil]; [mpMovieView release]; mpMovieView = nil; - } + } } bool Window::create( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) @@ -139,7 +139,7 @@ media::ZoomLevel SAL_CALL Window::getZoomLevel( ) // ------------------------------------------------------------------------------ -void SAL_CALL Window::setPointerType( sal_Int32 nPointerType ) +void SAL_CALL Window::setPointerType( sal_Int32 nPointerType ) throw (uno::RuntimeException) { mnPointerType = nPointerType; @@ -182,7 +182,7 @@ void SAL_CALL Window::setVisible( sal_Bool bVisible ) throw (uno::RuntimeException) { OSL_TRACE ("Window::setVisible"); - + } // ------------------------------------------------------------------------------ diff --git a/avmedia/source/quicktime/window.hxx b/avmedia/source/quicktime/window.hxx index e782e6367af9..a2e58ece2c90 100644 --- a/avmedia/source/quicktime/window.hxx +++ b/avmedia/source/quicktime/window.hxx @@ -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 diff --git a/avmedia/source/viewer/mediaevent_impl.cxx b/avmedia/source/viewer/mediaevent_impl.cxx index 0e8dfe0ca295..1d96dc9245c7 100644 --- a/avmedia/source/viewer/mediaevent_impl.cxx +++ b/avmedia/source/viewer/mediaevent_impl.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 diff --git a/avmedia/source/viewer/mediaevent_impl.hxx b/avmedia/source/viewer/mediaevent_impl.hxx index 9f282a90688f..7246eb7b3623 100644 --- a/avmedia/source/viewer/mediaevent_impl.hxx +++ b/avmedia/source/viewer/mediaevent_impl.hxx @@ -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 @@ -55,7 +55,7 @@ namespace avmedia MediaEventListenersImpl( Window& rNotifyWindow ); ~MediaEventListenersImpl(); - + void cleanUp(); protected: @@ -74,14 +74,14 @@ namespace avmedia // XMouseMotionListener virtual void SAL_CALL mouseDragged( const ::com::sun::star::awt::MouseEvent& e ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL mouseMoved( const ::com::sun::star::awt::MouseEvent& e ) throw (::com::sun::star::uno::RuntimeException); - + // XFocusListener virtual void SAL_CALL focusGained( const ::com::sun::star::awt::FocusEvent& e ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL focusLost( const ::com::sun::star::awt::FocusEvent& e ) throw (::com::sun::star::uno::RuntimeException); private: - Window* mpNotifyWindow; + Window* mpNotifyWindow; mutable ::osl::Mutex maMutex; }; } diff --git a/avmedia/source/viewer/mediawindow.cxx b/avmedia/source/viewer/mediawindow.cxx index bb903da70593..e7cc9604d03a 100644 --- a/avmedia/source/viewer/mediawindow.cxx +++ b/avmedia/source/viewer/mediawindow.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 diff --git a/avmedia/source/viewer/mediawindow.hrc b/avmedia/source/viewer/mediawindow.hrc index 67036e300c13..988088e88b77 100644 --- a/avmedia/source/viewer/mediawindow.hrc +++ b/avmedia/source/viewer/mediawindow.hrc @@ -1,9 +1,9 @@ -#define AVMEDIA_STR_OPENMEDIA_DLG 16384 -#define AVMEDIA_STR_INSERTMEDIA_DLG 16385 -#define AVMEDIA_STR_ALL_MEDIAFILES 16386 -#define AVMEDIA_STR_ALL_FILES 16387 +#define AVMEDIA_STR_OPENMEDIA_DLG 16384 +#define AVMEDIA_STR_INSERTMEDIA_DLG 16385 +#define AVMEDIA_STR_ALL_MEDIAFILES 16386 +#define AVMEDIA_STR_ALL_FILES 16387 -#define AVMEDIA_BMP_AUDIOLOGO 20000 -#define AVMEDIA_BMP_EMPTYLOGO 20001 +#define AVMEDIA_BMP_AUDIOLOGO 20000 +#define AVMEDIA_BMP_EMPTYLOGO 20001 -#define AVMEDIA_ERR_URL 21000 +#define AVMEDIA_ERR_URL 21000 diff --git a/avmedia/source/viewer/mediawindow.src b/avmedia/source/viewer/mediawindow.src index 1c92b4d913af..4cadd3fac853 100644 --- a/avmedia/source/viewer/mediawindow.src +++ b/avmedia/source/viewer/mediawindow.src @@ -1,7 +1,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 diff --git a/avmedia/source/viewer/mediawindow_impl.cxx b/avmedia/source/viewer/mediawindow_impl.cxx index 787a5087129b..3e4151037a35 100644 --- a/avmedia/source/viewer/mediawindow_impl.cxx +++ b/avmedia/source/viewer/mediawindow_impl.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 @@ -44,14 +44,14 @@ #include <com/sun/star/awt/SystemPointer.hdl> #include <com/sun/star/lang/XComponent.hdl> -#define AVMEDIA_TOOLBOXITEM_PREV 0x0001 -#define AVMEDIA_TOOLBOXITEM_PLAY 0x0002 -#define AVMEDIA_TOOLBOXITEM_PAUSE 0x0004 -#define AVMEDIA_TOOLBOXITEM_STOP 0x0008 -#define AVMEDIA_TOOLBOXITEM_NEXT 0x0010 -#define AVMEDIA_TOOLBOXITEM_MUTE 0x0100 +#define AVMEDIA_TOOLBOXITEM_PREV 0x0001 +#define AVMEDIA_TOOLBOXITEM_PLAY 0x0002 +#define AVMEDIA_TOOLBOXITEM_PAUSE 0x0004 +#define AVMEDIA_TOOLBOXITEM_STOP 0x0008 +#define AVMEDIA_TOOLBOXITEM_NEXT 0x0010 +#define AVMEDIA_TOOLBOXITEM_MUTE 0x0100 -#define AVMEDIA_FFW_PLAYRATE 4 +#define AVMEDIA_FFW_PLAYRATE 4 using namespace ::com::sun::star; @@ -77,7 +77,7 @@ MediaWindowControl::~MediaWindowControl() void MediaWindowControl::update() { MediaItem aItem; - + static_cast< MediaWindowImpl* >( GetParent() )->updateMediaItem( aItem ); setState( aItem ); } @@ -114,7 +114,7 @@ void MediaChildWindow::MouseMove( const MouseEvent& rMEvt ) { const MouseEvent aTransformedEvent( GetParent()->ScreenToOutputPixel( OutputToScreenPixel( rMEvt.GetPosPixel() ) ), rMEvt.GetClicks(), rMEvt.GetMode(), rMEvt.GetButtons(), rMEvt.GetModifier() ); - + #ifdef GSTREAMER SystemChildWindow::MouseMove( rMEvt ); #else @@ -129,7 +129,7 @@ void MediaChildWindow::MouseButtonDown( const MouseEvent& rMEvt ) { const MouseEvent aTransformedEvent( GetParent()->ScreenToOutputPixel( OutputToScreenPixel( rMEvt.GetPosPixel() ) ), rMEvt.GetClicks(), rMEvt.GetMode(), rMEvt.GetButtons(), rMEvt.GetModifier() ); - + #ifdef GSTREAMER SystemChildWindow::MouseButtonDown( rMEvt ); #else @@ -183,7 +183,7 @@ void MediaChildWindow::Command( const CommandEvent& rCEvt ) { const CommandEvent aTransformedEvent( GetParent()->ScreenToOutputPixel( OutputToScreenPixel( rCEvt.GetMousePosPixel() ) ), rCEvt.GetCommand(), rCEvt.IsMouseEvent(), rCEvt.GetData() ); - + #ifdef GSTREAMER SystemChildWindow::Command( rCEvt ); #else @@ -209,7 +209,7 @@ MediaWindowImpl::MediaWindowImpl( Window* pParent, MediaWindow* pMediaWindow, bo { maChildWindow.SetHelpId( HID_AVMEDIA_PLAYERWINDOW ); maChildWindow.Hide(); - + if( mpMediaWindowControl ) { mpMediaWindowControl->SetSizePixel( mpMediaWindowControl->getMinSizePixel() ); @@ -239,12 +239,12 @@ void MediaWindowImpl::cleanUp() xPlayerWindow->removeKeyListener( uno::Reference< awt::XKeyListener >( mxEventsIf, uno::UNO_QUERY ) ); xPlayerWindow->removeMouseListener( uno::Reference< awt::XMouseListener >( mxEventsIf, uno::UNO_QUERY ) ); xPlayerWindow->removeMouseMotionListener( uno::Reference< awt::XMouseMotionListener >( mxEventsIf, uno::UNO_QUERY ) ); - + uno::Reference< lang::XComponent > xComponent( xPlayerWindow, uno::UNO_QUERY ); - + if( xComponent.is() ) xComponent->dispose(); - + setPlayerWindow( NULL ); } @@ -260,13 +260,13 @@ void MediaWindowImpl::onURLChanged() uno::Sequence< uno::Any > aArgs( 3 ); uno::Reference< media::XPlayerWindow > xPlayerWindow; const Point aPoint; - const Size aSize( maChildWindow.GetSizePixel() ); + const Size aSize( maChildWindow.GetSizePixel() ); #ifndef GSTREAMER const sal_IntPtr nWndHandle = static_cast< sal_IntPtr >( maChildWindow.getParentWindowHandleForJava() ); #else const sal_Int32 nWndHandle = 0; #endif - + aArgs[ 0 ] = uno::makeAny( nWndHandle ); aArgs[ 1 ] = uno::makeAny( awt::Rectangle( aPoint.X(), aPoint.Y(), aSize.Width(), aSize.Height() ) ); #ifdef GSTREAMER @@ -274,7 +274,7 @@ void MediaWindowImpl::onURLChanged() OSL_TRACE( "MediaWindowImpl::onURLChanged xwindow id: %ld", pSystemData->aWindow ); aArgs[ 2 ] = uno::makeAny( pSystemData->aWindow ); #endif - + try { #ifdef GSTREAMER @@ -288,7 +288,7 @@ void MediaWindowImpl::onURLChanged() { // happens eg, on MacOSX where Java frames cannot be created from X11 window handles } - + setPlayerWindow( xPlayerWindow ); if( xPlayerWindow.is() ) @@ -301,20 +301,20 @@ void MediaWindowImpl::onURLChanged() } else setPlayerWindow( NULL ); - + if( getPlayerWindow().is() ) maChildWindow.Show(); else maChildWindow.Hide(); - + if( mpMediaWindowControl ) { MediaItem aItem; - + updateMediaItem( aItem ); mpMediaWindowControl->setState( aItem ); } - + Invalidate(); } @@ -323,7 +323,7 @@ void MediaWindowImpl::onURLChanged() void MediaWindowImpl::update() { uno::Reference< media::XPlayerWindow > xPlayerWindow( getPlayerWindow() ); - + if( xPlayerWindow.is() ) xPlayerWindow->update(); } @@ -339,26 +339,26 @@ void MediaWindowImpl::setPosSize( const Rectangle& rRect ) void MediaWindowImpl::setPointer( const Pointer& rPointer ) { - uno::Reference< media::XPlayerWindow > xPlayerWindow( getPlayerWindow() ); - + uno::Reference< media::XPlayerWindow > xPlayerWindow( getPlayerWindow() ); + SetPointer( rPointer ); maChildWindow.SetPointer( rPointer ); - + if( xPlayerWindow.is() ) { - + long nPointer; - + switch( rPointer.GetStyle() ) { case( POINTER_CROSS ): nPointer = awt::SystemPointer::CROSS; break; case( POINTER_HAND ): nPointer = awt::SystemPointer::HAND; break; case( POINTER_MOVE ): nPointer = awt::SystemPointer::MOVE; break; case( POINTER_WAIT ): nPointer = awt::SystemPointer::WAIT; break; - + default: nPointer = awt::SystemPointer::ARROW; break; } - + xPlayerWindow->setPointerType( nPointer ); } } @@ -381,23 +381,23 @@ bool MediaWindowImpl::hasInternalMediaControl() const void MediaWindowImpl::Resize() { - uno::Reference< media::XPlayerWindow > xPlayerWindow( getPlayerWindow() ); - const Size aCurSize( GetOutputSizePixel() ); - const sal_Int32 nOffset( mpMediaWindowControl ? AVMEDIA_CONTROLOFFSET : 0 ); - Size aPlayerWindowSize( aCurSize.Width() - ( nOffset << 1 ), + uno::Reference< media::XPlayerWindow > xPlayerWindow( getPlayerWindow() ); + const Size aCurSize( GetOutputSizePixel() ); + const sal_Int32 nOffset( mpMediaWindowControl ? AVMEDIA_CONTROLOFFSET : 0 ); + Size aPlayerWindowSize( aCurSize.Width() - ( nOffset << 1 ), aCurSize.Height() - ( nOffset << 1 ) ); - + if( mpMediaWindowControl ) { - const sal_Int32 nControlHeight = mpMediaWindowControl->GetSizePixel().Height(); - const sal_Int32 nControlY = ::std::max( aCurSize.Height() - nControlHeight - nOffset, 0L ); - + const sal_Int32 nControlHeight = mpMediaWindowControl->GetSizePixel().Height(); + const sal_Int32 nControlY = ::std::max( aCurSize.Height() - nControlHeight - nOffset, 0L ); + aPlayerWindowSize.Height() = ( nControlY - ( nOffset << 1 ) ); mpMediaWindowControl->SetPosSizePixel( Point( nOffset, nControlY ), Size( aCurSize.Width() - ( nOffset << 1 ), nControlHeight ) ); } - + maChildWindow.SetPosSizePixel( Point( nOffset, nOffset ), aPlayerWindowSize ); - + if( xPlayerWindow.is() ) xPlayerWindow->setPosSize( 0, 0, aPlayerWindowSize.Width(), aPlayerWindowSize.Height(), 0 ); } @@ -438,34 +438,34 @@ void MediaWindowImpl::StateChanged( StateChangedType eType ) void MediaWindowImpl::Paint( const Rectangle& ) { BitmapEx* pLogo = NULL; - + if( !getPlayer().is() ) { if( !mpEmptyBmpEx ) mpEmptyBmpEx = new BitmapEx( AVMEDIA_RESID( AVMEDIA_BMP_EMPTYLOGO ) ); - + pLogo = mpEmptyBmpEx; } else if ( !getPlayerWindow().is() ) { if( !mpAudioBmpEx ) mpAudioBmpEx = new BitmapEx( AVMEDIA_RESID( AVMEDIA_BMP_AUDIOLOGO ) ); - + pLogo = mpAudioBmpEx; } const Point aBasePos( maChildWindow.GetPosPixel() ); - const Rectangle aVideoRect( aBasePos, maChildWindow.GetSizePixel() ); - + const Rectangle aVideoRect( aBasePos, maChildWindow.GetSizePixel() ); + if( pLogo && !pLogo->IsEmpty() && ( aVideoRect.GetWidth() > 0 ) && ( aVideoRect.GetHeight() > 0 ) ) { - Size aLogoSize( pLogo->GetSizePixel() ); - const Color aBackgroundColor( 67, 67, 67 ); + Size aLogoSize( pLogo->GetSizePixel() ); + const Color aBackgroundColor( 67, 67, 67 ); SetLineColor( aBackgroundColor ); SetFillColor( aBackgroundColor ); DrawRect( aVideoRect ); - + if( ( aLogoSize.Width() > aVideoRect.GetWidth() || aLogoSize.Height() > aVideoRect.GetHeight() ) && ( aLogoSize.Height() > 0 ) ) { @@ -483,7 +483,7 @@ void MediaWindowImpl::Paint( const Rectangle& ) } } - DrawBitmapEx( Point( aBasePos.X() + ( ( aVideoRect.GetWidth() - aLogoSize.Width() ) >> 1 ), + DrawBitmapEx( Point( aBasePos.X() + ( ( aVideoRect.GetWidth() - aLogoSize.Width() ) >> 1 ), aBasePos.Y() + ( ( aVideoRect.GetHeight() - aLogoSize.Height() ) >> 1 ) ), aLogoSize, *pLogo ); } diff --git a/avmedia/source/viewer/mediawindow_impl.hxx b/avmedia/source/viewer/mediawindow_impl.hxx index f7cbbd8a02e9..c2dc31082107 100644 --- a/avmedia/source/viewer/mediawindow_impl.hxx +++ b/avmedia/source/viewer/mediawindow_impl.hxx @@ -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 @@ -48,24 +48,24 @@ namespace avmedia // ---------------------- // - MediaWindowControl - // ---------------------- - + class MediaWindowControl : public MediaControl { public: - + MediaWindowControl( Window* pParent ); ~MediaWindowControl(); - + protected: - - void update(); - void execute( const MediaItem& rItem ); + + void update(); + void execute( const MediaItem& rItem ); }; // -------------------- // - MediaChildWindow - // -------------------- - + #ifdef GSTREAMER class MediaChildWindow : public SystemChildWindow #else @@ -73,12 +73,12 @@ namespace avmedia #endif { public: - + MediaChildWindow( Window* pParent ); ~MediaChildWindow(); - + protected: - + virtual void MouseMove( const MouseEvent& rMEvt ); virtual void MouseButtonDown( const MouseEvent& rMEvt ); virtual void MouseButtonUp( const MouseEvent& rMEvt ); @@ -86,7 +86,7 @@ namespace avmedia virtual void KeyUp( const KeyEvent& rKEvt ); virtual void Command( const CommandEvent& rCEvt ); }; - + // ------------------. // - MediaWindowImpl - // ------------------- @@ -97,7 +97,7 @@ namespace avmedia public MediaWindowBaseImpl, public DropTargetHelper, public DragSourceHelper - + { public: @@ -105,19 +105,19 @@ namespace avmedia virtual ~MediaWindowImpl(); virtual void cleanUp(); - virtual void onURLChanged(); - + virtual void onURLChanged(); + public: - - void update(); - - void setPosSize( const Rectangle& rRect ); - - void setPointer( const Pointer& rPointer ); - const Pointer& getPointer() const; - - bool hasInternalMediaControl() const; - + + void update(); + + void setPosSize( const Rectangle& rRect ); + + void setPointer( const Pointer& rPointer ); + const Pointer& getPointer() const; + + bool hasInternalMediaControl() const; + protected: // Window @@ -141,12 +141,12 @@ namespace avmedia private: - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxEventsIf; + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxEventsIf; MediaEventListenersImpl* mpEvents; - MediaChildWindow maChildWindow; - MediaWindowControl* mpMediaWindowControl; - BitmapEx* mpEmptyBmpEx; - BitmapEx* mpAudioBmpEx; + MediaChildWindow maChildWindow; + MediaWindowControl* mpMediaWindowControl; + BitmapEx* mpEmptyBmpEx; + BitmapEx* mpAudioBmpEx; }; } } diff --git a/avmedia/source/viewer/mediawindowbase_impl.cxx b/avmedia/source/viewer/mediawindowbase_impl.cxx index 9374e1cfb690..d047b963fd84 100644 --- a/avmedia/source/viewer/mediawindowbase_impl.cxx +++ b/avmedia/source/viewer/mediawindowbase_impl.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 @@ -27,7 +27,7 @@ ************************************************************************/ #include "mediawindowbase_impl.hxx" -#include <avmedia/mediaitem.hxx> +#include <avmedia/mediaitem.hxx> #include "mediamisc.hxx" #include "mediawindow.hrc" #include <tools/urlobj.hxx> @@ -69,11 +69,11 @@ uno::Reference< media::XPlayer > MediaWindowBaseImpl::createPlayer( const ::rtl: { try { - + uno::Reference< ::com::sun::star::media::XManager > xManager( xFactory->createInstance( ::rtl::OUString::createFromAscii( AVMEDIA_MANAGER_SERVICE_NAME ) ), uno::UNO_QUERY ); - + if( xManager.is() ) { xPlayer = uno::Reference< ::com::sun::star::media::XPlayer >( @@ -84,7 +84,7 @@ uno::Reference< media::XPlayer > MediaWindowBaseImpl::createPlayer( const ::rtl: { } } - + return xPlayer; } @@ -96,21 +96,21 @@ void MediaWindowBaseImpl::setURL( const ::rtl::OUString& rURL ) if( rURL != getURL() ) { INetURLObject aURL( maFileURL = rURL ); - + if( mxPlayer.is() ) mxPlayer->stop(); - + if( mxPlayerWindow.is() ) { mxPlayerWindow->setVisible( false ); mxPlayerWindow.clear(); } - + mxPlayer.clear(); - + if( aURL.GetProtocol() != INET_PROT_NOT_VALID ) maFileURL = aURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ); - + mxPlayer = createPlayer( maFileURL ); onURLChanged(); } @@ -123,7 +123,7 @@ void MediaWindowBaseImpl::onURLChanged() } // --------------------------------------------------------------------- - + const ::rtl::OUString& MediaWindowBaseImpl::getURL() const { return maFileURL; @@ -186,13 +186,13 @@ void MediaWindowBaseImpl::cleanUp() mxPlayer->stop(); uno::Reference< lang::XComponent > xComponent( mxPlayer, uno::UNO_QUERY ); - + if( xComponent.is() ) xComponent->dispose(); - + mxPlayer.clear(); } - + mpMediaWindow = NULL; } @@ -347,7 +347,7 @@ void MediaWindowBaseImpl::setVolumeDB( sal_Int16 nVolumeDB ) } // --------------------------------------------------------------------- - + sal_Int16 MediaWindowBaseImpl::getVolumeDB() const { return( mxPlayer.is() ? mxPlayer->getVolumeDB() : 0 ); @@ -361,7 +361,7 @@ void MediaWindowBaseImpl::updateMediaItem( MediaItem& rItem ) const rItem.setState( ( getRate() > 1.0 ) ? MEDIASTATE_PLAYFFW : MEDIASTATE_PLAY ); else rItem.setState( ( 0.0 == getMediaTime() ) ? MEDIASTATE_STOP : MEDIASTATE_PAUSE ); - + rItem.setDuration( getDuration() ); rItem.setTime( getMediaTime() ); rItem.setLoop( isPlaybackLoop() ); @@ -377,26 +377,26 @@ void MediaWindowBaseImpl::executeMediaItem( const MediaItem& rItem ) { const sal_uInt32 nMaskSet = rItem.getMaskSet(); - // set URL first + // set URL first if( nMaskSet & AVMEDIA_SETMASK_URL ) setURL( rItem.getURL() ); - + // set different states next if( nMaskSet & AVMEDIA_SETMASK_TIME ) setMediaTime( ::std::min( rItem.getTime(), getDuration() ) ); - + if( nMaskSet & AVMEDIA_SETMASK_LOOP ) setPlaybackLoop( rItem.isLoop() ); if( nMaskSet & AVMEDIA_SETMASK_MUTE ) setMute( rItem.isMute() ); - + if( nMaskSet & AVMEDIA_SETMASK_VOLUMEDB ) setVolumeDB( rItem.getVolumeDB() ); if( nMaskSet & AVMEDIA_SETMASK_ZOOM ) setZoom( rItem.getZoom() ); - + // set play state at last if( nMaskSet & AVMEDIA_SETMASK_STATE ) { @@ -405,9 +405,9 @@ void MediaWindowBaseImpl::executeMediaItem( const MediaItem& rItem ) case( MEDIASTATE_PLAY ): case( MEDIASTATE_PLAYFFW ): { -/* +/* const double fNewRate = ( ( MEDIASTATE_PLAYFFW == rItem.getState() ) ? AVMEDIA_FFW_PLAYRATE : 1.0 ); - + if( getRate() != fNewRate ) setRate( fNewRate ); */ @@ -422,7 +422,7 @@ void MediaWindowBaseImpl::executeMediaItem( const MediaItem& rItem ) stop(); } break; - + case( MEDIASTATE_STOP ): { if( isPlaying() ) diff --git a/avmedia/source/viewer/mediawindowbase_impl.hxx b/avmedia/source/viewer/mediawindowbase_impl.hxx index 0e4b48f0e022..063665b97d06 100644 --- a/avmedia/source/viewer/mediawindowbase_impl.hxx +++ b/avmedia/source/viewer/mediawindowbase_impl.hxx @@ -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 @@ -47,7 +47,7 @@ namespace avmedia UPDATEMODE_SYNC_PLAYER = 1, UPDATEMODE_SYNC_NONE = 2 }; - + // ----------------------- // - MediaWindowBaseImpl - // ----------------------- @@ -57,20 +57,20 @@ namespace avmedia public: MediaWindowBaseImpl( MediaWindow* pMediaWindow ); - virtual ~MediaWindowBaseImpl(); - - virtual void cleanUp(); - virtual void onURLChanged(); - + virtual ~MediaWindowBaseImpl(); + + virtual void cleanUp(); + virtual void onURLChanged(); + static ::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayer > createPlayer( const ::rtl::OUString& rURL ); - + public: - void setURL( const ::rtl::OUString& rURL ); - const ::rtl::OUString& getURL() const; - - bool isValid() const; - + void setURL( const ::rtl::OUString& rURL ); + const ::rtl::OUString& getURL() const; + + bool isValid() const; + bool hasPreferredSize() const; Size getPreferredSize() const; @@ -105,25 +105,25 @@ namespace avmedia void setVolumeDB( sal_Int16 nVolumeDB ); sal_Int16 getVolumeDB() const; - void updateMediaItem( MediaItem& rItem ) const; - void executeMediaItem( const MediaItem& rItem ); - + void updateMediaItem( MediaItem& rItem ) const; + void executeMediaItem( const MediaItem& rItem ); + protected: - void stopPlayingInternal( bool ); + void stopPlayingInternal( bool ); MediaWindow* getMediaWindow() const; ::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayer > getPlayer() const; - void setPlayerWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayerWindow >& rxPlayerWindow ); + void setPlayerWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayerWindow >& rxPlayerWindow ); ::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayerWindow > getPlayerWindow() const; private: - ::rtl::OUString maFileURL; - ::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayer > mxPlayer; - ::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayerWindow > mxPlayerWindow; + ::rtl::OUString maFileURL; + ::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayer > mxPlayer; + ::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayerWindow > mxPlayerWindow; MediaWindow* mpMediaWindow; }; } diff --git a/avmedia/source/win/framegrabber.cxx b/avmedia/source/win/framegrabber.cxx index 3cfe5f89264d..59a9217da47f 100644 --- a/avmedia/source/win/framegrabber.cxx +++ b/avmedia/source/win/framegrabber.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 @@ -96,7 +96,7 @@ IMediaDet* FrameGrabber::implCreateMediaDet( const ::rtl::OUString& rURL ) const } } } - + return pDet; } @@ -106,7 +106,7 @@ bool FrameGrabber::create( const ::rtl::OUString& rURL ) { // just check if a MediaDet interface can be created with the given URL IMediaDet* pDet = implCreateMediaDet( rURL ); - + if( pDet ) { maURL = rURL; @@ -126,19 +126,19 @@ uno::Reference< graphic::XGraphic > SAL_CALL FrameGrabber::grabFrame( double fMe { uno::Reference< graphic::XGraphic > xRet; IMediaDet* pDet = implCreateMediaDet( maURL ); - + if( pDet ) { double fLength; long nStreamCount; bool bFound = false; - + if( SUCCEEDED( pDet->get_OutputStreams( &nStreamCount ) ) ) { for( long n = 0; ( n < nStreamCount ) && !bFound; ++n ) { GUID aMajorType; - + if( SUCCEEDED( pDet->put_CurrentStream( n ) ) && SUCCEEDED( pDet->get_StreamType( &aMajorType ) ) && ( aMajorType == MEDIATYPE_Video ) ) @@ -147,24 +147,24 @@ uno::Reference< graphic::XGraphic > SAL_CALL FrameGrabber::grabFrame( double fMe } } } - + if( bFound && ( S_OK == pDet->get_StreamLength( &fLength ) ) && ( fLength > 0.0 ) && ( fMediaTime >= 0.0 ) && ( fMediaTime <= fLength ) ) { AM_MEDIA_TYPE aMediaType; - long nWidth = 0, nHeight = 0, nSize = 0; - + long nWidth = 0, nHeight = 0, nSize = 0; + if( SUCCEEDED( pDet->get_StreamMediaType( &aMediaType ) ) ) { - if( ( aMediaType.formattype == FORMAT_VideoInfo ) && + if( ( aMediaType.formattype == FORMAT_VideoInfo ) && ( aMediaType.cbFormat >= sizeof( VIDEOINFOHEADER ) ) ) { VIDEOINFOHEADER* pVih = reinterpret_cast< VIDEOINFOHEADER* >( aMediaType.pbFormat ); - + nWidth = pVih->bmiHeader.biWidth; nHeight = pVih->bmiHeader.biHeight; - + if( nHeight < 0 ) nHeight *= -1; } @@ -175,27 +175,27 @@ uno::Reference< graphic::XGraphic > SAL_CALL FrameGrabber::grabFrame( double fMe aMediaType.cbFormat = 0; aMediaType.pbFormat = NULL; } - + if( aMediaType.pUnk != NULL ) { aMediaType.pUnk->Release(); aMediaType.pUnk = NULL; - } + } } - + if( ( nWidth > 0 ) && ( nHeight > 0 ) && SUCCEEDED( pDet->GetBitmapBits( 0, &nSize, NULL, nWidth, nHeight ) ) && ( nSize > 0 ) ) { char* pBuffer = new char[ nSize ]; - try + try { if( SUCCEEDED( pDet->GetBitmapBits( fMediaTime, NULL, pBuffer, nWidth, nHeight ) ) ) { SvMemoryStream aMemStm( pBuffer, nSize, STREAM_READ | STREAM_WRITE ); Bitmap aBmp; - + if( aBmp.Read( aMemStm, false ) && !aBmp.IsEmpty() ) { const Graphic aGraphic( aBmp ); @@ -213,7 +213,7 @@ uno::Reference< graphic::XGraphic > SAL_CALL FrameGrabber::grabFrame( double fMe pDet->Release(); } - + return xRet; } diff --git a/avmedia/source/win/framegrabber.hxx b/avmedia/source/win/framegrabber.hxx index 0499a5086e49..9d3b23753cf1 100644 --- a/avmedia/source/win/framegrabber.hxx +++ b/avmedia/source/win/framegrabber.hxx @@ -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 diff --git a/avmedia/source/win/interface.hxx b/avmedia/source/win/interface.hxx index 0e1944c4923e..be9efe3fcd9a 100644 --- a/avmedia/source/win/interface.hxx +++ b/avmedia/source/win/interface.hxx @@ -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 diff --git a/avmedia/source/win/manager.cxx b/avmedia/source/win/manager.cxx index c10a96233766..3ba63fab827e 100644 --- a/avmedia/source/win/manager.cxx +++ b/avmedia/source/win/manager.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 diff --git a/avmedia/source/win/manager.hxx b/avmedia/source/win/manager.hxx index 0dd52627641b..9f4d6b46bb23 100644 --- a/avmedia/source/win/manager.hxx +++ b/avmedia/source/win/manager.hxx @@ -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 diff --git a/avmedia/source/win/player.cxx b/avmedia/source/win/player.cxx index 4d341fb667ea..9b7e8f7f2a54 100644 --- a/avmedia/source/win/player.cxx +++ b/avmedia/source/win/player.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 @@ -104,22 +104,22 @@ Player::~Player() if( mpMP ) mpMP->Release(); - + if( mpMS ) mpMS->Release(); - + if( mpME ) mpME->Release(); - + if( mpMC ) mpMC->Release(); - + if( mpEV ) mpEV->Release(); - + if( mpOMF ) mpOMF->Release(); - + if( mpGB ) mpGB->Release(); @@ -143,12 +143,12 @@ bool Player::create( const ::rtl::OUString& rURL ) if( SUCCEEDED( CoCreateInstance( CLSID_OverlayMixer, NULL, CLSCTX_INPROC_SERVER, IID_IBaseFilter, (void**) &mpOMF ) ) ) { mpGB->AddFilter( mpOMF, L"com_sun_star_media_OverlayMixerFilter" ); - + if( !SUCCEEDED( mpOMF->QueryInterface( IID_IDDrawExclModeVideo, (void**) &mpEV ) ) ) mpEV = NULL; } } - + if( SUCCEEDED( hR = mpGB->RenderFile( reinterpret_cast<LPCWSTR>(rURL.getStr()), NULL ) ) && SUCCEEDED( hR = mpGB->QueryInterface( IID_IMediaControl, (void**) &mpMC ) ) && SUCCEEDED( hR = mpGB->QueryInterface( IID_IMediaEventEx, (void**) &mpME ) ) && @@ -168,7 +168,7 @@ bool Player::create( const ::rtl::OUString& rURL ) bRet = true; } } - + if( bRet ) maURL = rURL; else @@ -206,15 +206,15 @@ void Player::setDDrawParams( IDirectDraw* pDDraw, IDirectDrawSurface* pDDrawSurf // ------------------------------------------------------------------------------ long Player::processEvent() -{ +{ long nCode, nParam1, nParam2; - + if( mpME && SUCCEEDED( mpME->GetEvent( &nCode, &nParam1, &nParam2, 0 ) ) ) { if( EC_COMPLETE == nCode ) { if( mbLooping ) - { + { setMediaTime( 0.0 ); start(); } @@ -224,10 +224,10 @@ long Player::processEvent() stop(); } } - + mpME->FreeEventParams( nCode, nParam1, nParam2 ); } - + return 0; } @@ -272,7 +272,7 @@ double SAL_CALL Player::getDuration( ) if( mpMP ) mpMP->get_Duration( &aRefTime ); - + return aRefTime; } @@ -301,8 +301,8 @@ double SAL_CALL Player::getMediaTime( ) if( mpMP ) mpMP->get_CurrentPosition( &aRefTime ); - - return aRefTime; + + return aRefTime; } // ------------------------------------------------------------------------------ @@ -324,7 +324,7 @@ double SAL_CALL Player::getStopTime( ) if( mpMP ) mpMP->get_StopTime( &aRefTime ); - return aRefTime; + return aRefTime; } // ------------------------------------------------------------------------------ @@ -345,7 +345,7 @@ double SAL_CALL Player::getRate( ) if( mpMP ) mpMP->get_Rate( &fRet ); - + return fRet; } @@ -387,7 +387,7 @@ sal_Bool SAL_CALL Player::isMute( ) // ------------------------------------------------------------------------------ -void SAL_CALL Player::setVolumeDB( sal_Int16 nVolumeDB ) +void SAL_CALL Player::setVolumeDB( sal_Int16 nVolumeDB ) throw (uno::RuntimeException) { mnUnmutedVolume = static_cast< long >( nVolumeDB ) * 100; @@ -397,8 +397,8 @@ void SAL_CALL Player::setVolumeDB( sal_Int16 nVolumeDB ) } // ------------------------------------------------------------------------------ - -sal_Int16 SAL_CALL Player::getVolumeDB( ) + +sal_Int16 SAL_CALL Player::getVolumeDB( ) throw (uno::RuntimeException) { return( static_cast< sal_Int16 >( mnUnmutedVolume / 100 ) ); @@ -410,9 +410,9 @@ awt::Size SAL_CALL Player::getPreferredPlayerWindowSize( ) throw (uno::RuntimeException) { awt::Size aSize( 0, 0 ); - + if( mpBV ) - { + { long nWidth = 0, nHeight = 0; mpBV->GetVideoSize( &nWidth, &nHeight ); @@ -454,13 +454,13 @@ uno::Reference< media::XFrameGrabber > SAL_CALL Player::createFrameGrabber( ) if( maURL.getLength() > 0 ) { FrameGrabber* pGrabber = new FrameGrabber( mxMgr ); - + xRet = pGrabber; - + if( !pGrabber->create( maURL ) ) xRet.clear(); } - + return xRet; } diff --git a/avmedia/source/win/player.hxx b/avmedia/source/win/player.hxx index 7f87511209bd..c91a1435e561 100644 --- a/avmedia/source/win/player.hxx +++ b/avmedia/source/win/player.hxx @@ -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 @@ -65,9 +65,9 @@ public: void setNotifyWnd( int nNotifyWnd ); void setDDrawParams( IDirectDraw* pDDraw, IDirectDrawSurface* pDDrawSurface ); long processEvent(); - + const IVideoWindow* getVideoWindow() const; - + // XPlayer virtual void SAL_CALL start( ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL stop( ) throw (::com::sun::star::uno::RuntimeException); diff --git a/avmedia/source/win/wincommon.hxx b/avmedia/source/win/wincommon.hxx index 0dd7cae023d3..d0877fd05532 100644 --- a/avmedia/source/win/wincommon.hxx +++ b/avmedia/source/win/wincommon.hxx @@ -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 diff --git a/avmedia/source/win/window.cxx b/avmedia/source/win/window.cxx index 7163c076fb8b..3c2006abb81f 100644 --- a/avmedia/source/win/window.cxx +++ b/avmedia/source/win/window.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 @@ -90,11 +90,11 @@ LRESULT CALLBACK MediaPlayerWndProc( HWND hWnd,UINT nMsg, WPARAM nPar1, LPARAM n case( WM_SETCURSOR ): pWindow->updatePointer(); break; - + case( WM_GRAPHNOTIFY ): pWindow->processGraphEvent(); break; - + case( WM_MOUSEMOVE ): case( WM_LBUTTONDOWN ): case( WM_MBUTTONDOWN ): @@ -105,11 +105,11 @@ LRESULT CALLBACK MediaPlayerWndProc( HWND hWnd,UINT nMsg, WPARAM nPar1, LPARAM n { awt::MouseEvent aUNOEvt; POINT aWinPoint; - + if( !::GetCursorPos( &aWinPoint ) || !::ScreenToClient( hWnd, &aWinPoint ) ) { - aWinPoint.x = GET_X_LPARAM( nPar2 ); - aWinPoint.y = GET_Y_LPARAM( nPar2 ); + aWinPoint.x = GET_X_LPARAM( nPar2 ); + aWinPoint.y = GET_Y_LPARAM( nPar2 ); } aUNOEvt.Modifiers = 0; aUNOEvt.Buttons = 0; @@ -337,11 +337,11 @@ bool Window::create( const uno::Sequence< uno::Any >& rArguments ) aRect.X, aRect.Y, aRect.Width, aRect.Height, (HWND)mnParentWnd , NULL, mpWndClass->hInstance, 0 ); } - + if( mnFrameWnd ) { ::SetWindowLong( (HWND) mnFrameWnd, 0, (DWORD) this ); - + #ifdef DDRAW_TEST_OUTPUT IDirectDraw7* pDDraw; IDirectDrawSurface7* pDDSurface; @@ -352,12 +352,12 @@ bool Window::create( const uno::Sequence< uno::Any >& rArguments ) if( DD_OK == pDDraw->SetCooperativeLevel( (HWND) mnParentWnd, DDSCL_NORMAL ) ) { DDSURFACEDESC2 aDDDesc; - + memset( &aDDDesc, 0, sizeof( aDDDesc ) ); aDDDesc.dwSize = sizeof( aDDDesc ); aDDDesc.dwFlags = DDSD_CAPS; aDDDesc.ddsCaps.dwCaps |= DDSCAPS_PRIMARYSURFACE; - + if( DD_OK == pDDraw->CreateSurface( &aDDDesc, &pDDSurface, NULL ) ) { if( DD_OK == pDDraw->CreateClipper( 0, &pDDClipper, NULL ) ) @@ -367,21 +367,21 @@ bool Window::create( const uno::Sequence< uno::Any >& rArguments ) } mrPlayer.setDDrawParams( (IDirectDraw*) pDDraw, (IDirectDrawSurface*) pDDSurface ); -#endif - +#endif + pVideoWindow->put_Owner( (OAHWND) mnFrameWnd ); pVideoWindow->put_MessageDrain( (OAHWND) mnFrameWnd ); pVideoWindow->put_WindowStyle( WS_VISIBLE | WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN ); mrPlayer.setNotifyWnd( mnFrameWnd ); - + meZoomLevel = media::ZoomLevel_ORIGINAL; ImplLayoutVideoWindow(); #ifdef DDRAW_TEST_OUTPUT } } } -#endif +#endif } } @@ -397,7 +397,7 @@ void Window::processGraphEvent() // ------------------------------------------------------------------------------ -void Window::updatePointer() +void Window::updatePointer() { char* pCursorName; @@ -407,12 +407,12 @@ void Window::updatePointer() //case( awt::SystemPointer::HAND ): pCursorName = IDC_HAND; break; case( awt::SystemPointer::MOVE ): pCursorName = IDC_SIZEALL; break; case( awt::SystemPointer::WAIT ): pCursorName = IDC_WAIT; break; - + default: pCursorName = IDC_ARROW; break; } - + ::SetCursor( ::LoadCursor( NULL, pCursorName ) ); } @@ -456,7 +456,7 @@ media::ZoomLevel SAL_CALL Window::getZoomLevel( ) // ------------------------------------------------------------------------------ -void SAL_CALL Window::setPointerType( sal_Int32 nPointerType ) +void SAL_CALL Window::setPointerType( sal_Int32 nPointerType ) throw (uno::RuntimeException) { mnPointerType = nPointerType; @@ -655,11 +655,11 @@ void SAL_CALL Window::removeEventListener( const uno::Reference< lang::XEventLis void Window::fireMousePressedEvent( const ::com::sun::star::awt::MouseEvent& rEvt ) { ::cppu::OInterfaceContainerHelper* pContainer = maListeners.getContainer( getCppuType( (uno::Reference< awt::XMouseListener >*) 0 ) ); - + if( pContainer ) { ::cppu::OInterfaceIteratorHelper aIter( *pContainer ); - + while( aIter.hasMoreElements() ) uno::Reference< awt::XMouseListener >( aIter.next(), uno::UNO_QUERY )->mousePressed( rEvt ); } @@ -670,11 +670,11 @@ void Window::fireMousePressedEvent( const ::com::sun::star::awt::MouseEvent& rEv void Window::fireMouseReleasedEvent( const ::com::sun::star::awt::MouseEvent& rEvt ) { ::cppu::OInterfaceContainerHelper* pContainer = maListeners.getContainer( getCppuType( (uno::Reference< awt::XMouseListener >*) 0 ) ); - + if( pContainer ) { ::cppu::OInterfaceIteratorHelper aIter( *pContainer ); - + while( aIter.hasMoreElements() ) uno::Reference< awt::XMouseListener >( aIter.next(), uno::UNO_QUERY )->mouseReleased( rEvt ); } @@ -685,11 +685,11 @@ void Window::fireMouseReleasedEvent( const ::com::sun::star::awt::MouseEvent& rE void Window::fireMouseMovedEvent( const ::com::sun::star::awt::MouseEvent& rEvt ) { ::cppu::OInterfaceContainerHelper* pContainer = maListeners.getContainer( getCppuType( (uno::Reference< awt::XMouseMotionListener >*) 0 ) ); - + if( pContainer ) { ::cppu::OInterfaceIteratorHelper aIter( *pContainer ); - + while( aIter.hasMoreElements() ) uno::Reference< awt::XMouseMotionListener >( aIter.next(), uno::UNO_QUERY )->mouseMoved( rEvt ); } @@ -700,11 +700,11 @@ void Window::fireMouseMovedEvent( const ::com::sun::star::awt::MouseEvent& rEvt void Window::fireSetFocusEvent( const ::com::sun::star::awt::FocusEvent& rEvt ) { ::cppu::OInterfaceContainerHelper* pContainer = maListeners.getContainer( getCppuType( (uno::Reference< awt::XFocusListener >*) 0 ) ); - + if( pContainer ) { ::cppu::OInterfaceIteratorHelper aIter( *pContainer ); - + while( aIter.hasMoreElements() ) uno::Reference< awt::XFocusListener >( aIter.next(), uno::UNO_QUERY )->focusGained( rEvt ); } diff --git a/avmedia/source/win/window.hxx b/avmedia/source/win/window.hxx index 22a6c295f8d3..047f1744c84b 100644 --- a/avmedia/source/win/window.hxx +++ b/avmedia/source/win/window.hxx @@ -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 diff --git a/avmedia/source/win/winuno.cxx b/avmedia/source/win/winuno.cxx index 3a63f757fbd3..8f4b3d6e93a1 100644 --- a/avmedia/source/win/winuno.cxx +++ b/avmedia/source/win/winuno.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 @@ -62,7 +62,7 @@ extern "C" sal_Bool SAL_CALL component_writeInfo( void*, void* pRegistryKey ) try { uno::Reference< registry::XRegistryKey > xNewKey1( - static_cast< registry::XRegistryKey* >( pRegistryKey )->createKey( + static_cast< registry::XRegistryKey* >( pRegistryKey )->createKey( ::rtl::OUString::createFromAscii( "/com.sun.star.comp.media.Manager_DirectX/UNO/SERVICES/com.sun.star.media.Manager_DirectX" ) ) ); bRet = sal_True; @@ -83,7 +83,7 @@ extern "C" sal_Bool SAL_CALL component_writeInfo( void*, void* pRegistryKey ) extern "C" void* SAL_CALL component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* ) { uno::Reference< lang::XSingleServiceFactory > xFactory; - void* pRet = 0; + void* pRet = 0; if( rtl_str_compare( pImplName, "com.sun.star.comp.media.Manager_DirectX" ) == 0 ) { diff --git a/avmedia/source/xine/manager.cxx b/avmedia/source/xine/manager.cxx index c9fa8c78f470..151a63001fb9 100644 --- a/avmedia/source/xine/manager.cxx +++ b/avmedia/source/xine/manager.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 @@ -52,7 +52,7 @@ Manager::~Manager() uno::Reference< media::XPlayer > SAL_CALL Manager::createPlayer( const ::rtl::OUString& aURL ) throw (uno::RuntimeException) { - Player* pPlayer( new Player ); + Player* pPlayer( new Player ); uno::Reference< media::XPlayer > xRet( pPlayer ); if( !pPlayer->create( aURL ) ) diff --git a/avmedia/source/xine/manager.hxx b/avmedia/source/xine/manager.hxx index 783baa66d003..93cd7b6deb73 100644 --- a/avmedia/source/xine/manager.hxx +++ b/avmedia/source/xine/manager.hxx @@ -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 diff --git a/avmedia/source/xine/player.cxx b/avmedia/source/xine/player.cxx index 027827022553..71b62b9e1ab0 100644 --- a/avmedia/source/xine/player.cxx +++ b/avmedia/source/xine/player.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 @@ -87,7 +87,7 @@ double SAL_CALL Player::getDuration( ) throw (uno::RuntimeException) { double fRet = 0.0; - + return fRet; } @@ -104,7 +104,7 @@ double SAL_CALL Player::getMediaTime( ) throw (uno::RuntimeException) { double fRet = 0.0; - + return fRet; } @@ -121,7 +121,7 @@ double SAL_CALL Player::getStopTime( ) throw (uno::RuntimeException) { double fRet = 0.0; - + return fRet; } @@ -138,7 +138,7 @@ double SAL_CALL Player::getRate( ) throw (uno::RuntimeException) { double fRet = 0.0; - + return fRet; } @@ -178,14 +178,14 @@ sal_Bool SAL_CALL Player::isMute( ) // ------------------------------------------------------------------------------ -void SAL_CALL Player::setVolumeDB( sal_Int16 /* nVolumeDB */ ) +void SAL_CALL Player::setVolumeDB( sal_Int16 /* nVolumeDB */ ) throw (uno::RuntimeException) { } // ------------------------------------------------------------------------------ - -sal_Int16 SAL_CALL Player::getVolumeDB( ) + +sal_Int16 SAL_CALL Player::getVolumeDB( ) throw (uno::RuntimeException) { sal_Int16 nRet = 0; @@ -199,7 +199,7 @@ awt::Size SAL_CALL Player::getPreferredPlayerWindowSize( ) throw (uno::RuntimeException) { awt::Size aSize( 0, 0 ); - + return aSize; } @@ -226,7 +226,7 @@ uno::Reference< ::media::XPlayerWindow > SAL_CALL Player::createPlayerWindow( co // ------------------------------------------------------------------------------ -uno::Reference< media::XFrameGrabber > SAL_CALL Player::createFrameGrabber( ) +uno::Reference< media::XFrameGrabber > SAL_CALL Player::createFrameGrabber( ) throw (::com::sun::star::uno::RuntimeException) { return NULL; diff --git a/avmedia/source/xine/player.hxx b/avmedia/source/xine/player.hxx index b14442a6d715..cb503e61af3f 100644 --- a/avmedia/source/xine/player.hxx +++ b/avmedia/source/xine/player.hxx @@ -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 diff --git a/avmedia/source/xine/window.cxx b/avmedia/source/xine/window.cxx index f78198583266..4634233769b0 100644 --- a/avmedia/source/xine/window.cxx +++ b/avmedia/source/xine/window.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 @@ -74,11 +74,11 @@ LRESULT CALLBACK MediaPlayerWndProc( HWND hWnd,UINT nMsg, WPARAM nPar1, LPARAM n case( WM_SETCURSOR ): pWindow->updatePointer(); break; - + case( WM_GRAPHNOTIFY ): pWindow->processGraphEvent(); break; - + case( WM_MOUSEMOVE ): case( WM_LBUTTONDOWN ): case( WM_MBUTTONDOWN ): @@ -89,11 +89,11 @@ LRESULT CALLBACK MediaPlayerWndProc( HWND hWnd,UINT nMsg, WPARAM nPar1, LPARAM n { awt::MouseEvent aUNOEvt; POINT aWinPoint; - + if( !::GetCursorPos( &aWinPoint ) || !::ScreenToClient( hWnd, &aWinPoint ) ) { - aWinPoint.x = GET_X_LPARAM( nPar2 ); - aWinPoint.y = GET_Y_LPARAM( nPar2 ); + aWinPoint.x = GET_X_LPARAM( nPar2 ); + aWinPoint.y = GET_Y_LPARAM( nPar2 ); } aUNOEvt.Modifiers = 0; aUNOEvt.Buttons = 0; @@ -274,7 +274,7 @@ void Window::implLayoutVideoWindow() bool Window::create( const uno::Sequence< uno::Any >& /*rArguments*/ ) { bool bRet = false; - + return bRet; } @@ -317,7 +317,7 @@ media::ZoomLevel SAL_CALL Window::getZoomLevel( ) // ------------------------------------------------------------------------------ -void SAL_CALL Window::setPointerType( sal_Int32 nPointerType ) +void SAL_CALL Window::setPointerType( sal_Int32 nPointerType ) throw (uno::RuntimeException) { mnPointerType = nPointerType; @@ -486,11 +486,11 @@ void SAL_CALL Window::removeEventListener( const uno::Reference< lang::XEventLis void Window::fireMousePressedEvent( const ::com::sun::star::awt::MouseEvent& rEvt ) { ::cppu::OInterfaceContainerHelper* pContainer = maListeners.getContainer( getCppuType( (uno::Reference< awt::XMouseListener >*) 0 ) ); - + if( pContainer ) { ::cppu::OInterfaceIteratorHelper aIter( *pContainer ); - + while( aIter.hasMoreElements() ) uno::Reference< awt::XMouseListener >( aIter.next(), uno::UNO_QUERY )->mousePressed( rEvt ); } @@ -501,11 +501,11 @@ void Window::fireMousePressedEvent( const ::com::sun::star::awt::MouseEvent& rEv void Window::fireMouseReleasedEvent( const ::com::sun::star::awt::MouseEvent& rEvt ) { ::cppu::OInterfaceContainerHelper* pContainer = maListeners.getContainer( getCppuType( (uno::Reference< awt::XMouseListener >*) 0 ) ); - + if( pContainer ) { ::cppu::OInterfaceIteratorHelper aIter( *pContainer ); - + while( aIter.hasMoreElements() ) uno::Reference< awt::XMouseListener >( aIter.next(), uno::UNO_QUERY )->mouseReleased( rEvt ); } @@ -516,11 +516,11 @@ void Window::fireMouseReleasedEvent( const ::com::sun::star::awt::MouseEvent& rE void Window::fireMouseMovedEvent( const ::com::sun::star::awt::MouseEvent& rEvt ) { ::cppu::OInterfaceContainerHelper* pContainer = maListeners.getContainer( getCppuType( (uno::Reference< awt::XMouseMotionListener >*) 0 ) ); - + if( pContainer ) { ::cppu::OInterfaceIteratorHelper aIter( *pContainer ); - + while( aIter.hasMoreElements() ) uno::Reference< awt::XMouseMotionListener >( aIter.next(), uno::UNO_QUERY )->mouseMoved( rEvt ); } @@ -531,11 +531,11 @@ void Window::fireMouseMovedEvent( const ::com::sun::star::awt::MouseEvent& rEvt void Window::fireSetFocusEvent( const ::com::sun::star::awt::FocusEvent& rEvt ) { ::cppu::OInterfaceContainerHelper* pContainer = maListeners.getContainer( getCppuType( (uno::Reference< awt::XFocusListener >*) 0 ) ); - + if( pContainer ) { ::cppu::OInterfaceIteratorHelper aIter( *pContainer ); - + while( aIter.hasMoreElements() ) uno::Reference< awt::XFocusListener >( aIter.next(), uno::UNO_QUERY )->focusGained( rEvt ); } diff --git a/avmedia/source/xine/window.hxx b/avmedia/source/xine/window.hxx index c67f219ca663..1db5bc65c590 100644 --- a/avmedia/source/xine/window.hxx +++ b/avmedia/source/xine/window.hxx @@ -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 @@ -101,8 +101,8 @@ private: ::osl::Mutex maMutex; Player& mrPlayer; ::cppu::OMultiTypeInterfaceContainerHelper maListeners; - ::com::sun::star::media::ZoomLevel meZoomLevel; - sal_Int32 mnPointerType; + ::com::sun::star::media::ZoomLevel meZoomLevel; + sal_Int32 mnPointerType; void implLayoutVideoWindow(); }; diff --git a/avmedia/source/xine/xinecommon.hxx b/avmedia/source/xine/xinecommon.hxx index 819dcbd48c9b..11f964f205b7 100644 --- a/avmedia/source/xine/xinecommon.hxx +++ b/avmedia/source/xine/xinecommon.hxx @@ -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 diff --git a/avmedia/source/xine/xineuno.cxx b/avmedia/source/xine/xineuno.cxx index 59c325d32562..72d87fcae708 100644 --- a/avmedia/source/xine/xineuno.cxx +++ b/avmedia/source/xine/xineuno.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 @@ -62,11 +62,11 @@ extern "C" sal_Bool SAL_CALL component_writeInfo( void* /* pServiceManager */, v try { uno::Reference< registry::XRegistryKey > xNewKey1( - static_cast< registry::XRegistryKey* >( pRegistryKey )->createKey( + static_cast< registry::XRegistryKey* >( pRegistryKey )->createKey( ::rtl::OUString::createFromAscii( "/" AVMEDIA_XINE_MANAGER_IMPLEMENTATIONNAME "/UNO/SERVICES/" AVMEDIA_XINE_MANAGER_SERVICENAME ) ) ); - + bRet = sal_True; } catch( registry::InvalidRegistryException& ) @@ -85,7 +85,7 @@ extern "C" sal_Bool SAL_CALL component_writeInfo( void* /* pServiceManager */, v extern "C" void* SAL_CALL component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* /* pRegistryKey */ ) { uno::Reference< lang::XSingleServiceFactory > xFactory; - void* pRet = 0; + void* pRet = 0; if( rtl_str_compare( pImplName, AVMEDIA_XINE_MANAGER_IMPLEMENTATIONNAME ) == 0 ) { diff --git a/avmedia/util/hidother.src b/avmedia/util/hidother.src index c6d5dc07c9a5..c8352e29cb7e 100755 --- a/avmedia/util/hidother.src +++ b/avmedia/util/hidother.src @@ -1,7 +1,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 @@ -27,7 +27,7 @@ #include "../inc/helpids.hrc" -hidspecial HID_AVMEDIA_TOOLBOXITEM_PLAY { HelpId = HID_AVMEDIA_TOOLBOXITEM_PLAY; }; +hidspecial HID_AVMEDIA_TOOLBOXITEM_PLAY { HelpId = HID_AVMEDIA_TOOLBOXITEM_PLAY; }; hidspecial HID_AVMEDIA_TOOLBOXITEM_PAUSE { HelpId = HID_AVMEDIA_TOOLBOXITEM_PAUSE; }; hidspecial HID_AVMEDIA_TOOLBOXITEM_STOP { HelpId = HID_AVMEDIA_TOOLBOXITEM_STOP; }; hidspecial HID_AVMEDIA_TOOLBOXITEM_MUTE { HelpId = HID_AVMEDIA_TOOLBOXITEM_MUTE; }; |