Kaydet (Commit) a60c63fd authored tarafından Ricardo Montania's avatar Ricardo Montania Kaydeden (comit) Miklos Vajna

corrections ::rtl::OUString, sal_Bool and macros, in avmedia

Change-Id: Iae12f009a358ef8d648f094db968dae25f0c14a0
Reviewed-on: https://gerrit.libreoffice.org/636Reviewed-by: 's avatarMiklos Vajna <vmiklos@suse.cz>
Tested-by: 's avatarMiklos Vajna <vmiklos@suse.cz>
üst 08215556
...@@ -132,11 +132,8 @@ css::uno::Sequence< css::uno::Type > SAL_CALL SoundHandler::getTypes() throw( cs ...@@ -132,11 +132,8 @@ css::uno::Sequence< css::uno::Type > SAL_CALL SoundHandler::getTypes() throw( cs
return pTypeCollection->getTypes(); return pTypeCollection->getTypes();
} }
#define DECLARE_ASCII( SASCIIVALUE ) \ #define IMPLEMENTATIONNAME_SOUNDHANDLER OUString("com.sun.star.comp.framework.SoundHandler")
OUString( SASCIIVALUE ) #define SERVICENAME_CONTENTHANDLER OUString("com.sun.star.frame.ContentHandler")
#define IMPLEMENTATIONNAME_SOUNDHANDLER DECLARE_ASCII("com.sun.star.comp.framework.SoundHandler")
#define SERVICENAME_CONTENTHANDLER DECLARE_ASCII("com.sun.star.frame.ContentHandler")
/*===========================================================================================================*/ /*===========================================================================================================*/
/* XServiceInfo */ /* XServiceInfo */
...@@ -152,7 +149,7 @@ OUString SAL_CALL SoundHandler::getImplementationName() throw( css::uno::Runtime ...@@ -152,7 +149,7 @@ OUString SAL_CALL SoundHandler::getImplementationName() throw( css::uno::Runtime
sal_Bool SAL_CALL SoundHandler::supportsService( const OUString& sServiceName ) throw( css::uno::RuntimeException ) sal_Bool SAL_CALL SoundHandler::supportsService( const OUString& sServiceName ) throw( css::uno::RuntimeException )
{ {
/* Set default return value. */ /* Set default return value. */
sal_Bool bReturn = sal_False ; bool bReturn = sal_False ;
/* Get names of all supported servicenames. */ /* Get names of all supported servicenames. */
css::uno::Sequence < OUString > seqServiceNames = getSupportedServiceNames(); css::uno::Sequence < OUString > seqServiceNames = getSupportedServiceNames();
const OUString* pArray = seqServiceNames.getConstArray(); const OUString* pArray = seqServiceNames.getConstArray();
......
...@@ -54,7 +54,7 @@ Manager::~Manager() ...@@ -54,7 +54,7 @@ Manager::~Manager()
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
uno::Reference< media::XPlayer > SAL_CALL Manager::createPlayer( const ::rtl::OUString& rURL ) uno::Reference< media::XPlayer > SAL_CALL Manager::createPlayer( const OUString& rURL )
throw (uno::RuntimeException) throw (uno::RuntimeException)
{ {
Player* pPlayer( new Player( mxMgr ) ); Player* pPlayer( new Player( mxMgr ) );
...@@ -69,15 +69,15 @@ uno::Reference< media::XPlayer > SAL_CALL Manager::createPlayer( const ::rtl::OU ...@@ -69,15 +69,15 @@ uno::Reference< media::XPlayer > SAL_CALL Manager::createPlayer( const ::rtl::OU
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
::rtl::OUString SAL_CALL Manager::getImplementationName( ) OUString SAL_CALL Manager::getImplementationName( )
throw (uno::RuntimeException) throw (uno::RuntimeException)
{ {
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( AVMEDIA_WIN_MANAGER_IMPLEMENTATIONNAME ) ); return OUString( AVMEDIA_WIN_MANAGER_IMPLEMENTATIONNAME );
} }
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
sal_Bool SAL_CALL Manager::supportsService( const ::rtl::OUString& ServiceName ) bool SAL_CALL Manager::supportsService( const OUString& ServiceName )
throw (uno::RuntimeException) throw (uno::RuntimeException)
{ {
return ServiceName == AVMEDIA_WIN_MANAGER_SERVICENAME; return ServiceName == AVMEDIA_WIN_MANAGER_SERVICENAME;
...@@ -85,11 +85,11 @@ sal_Bool SAL_CALL Manager::supportsService( const ::rtl::OUString& ServiceName ) ...@@ -85,11 +85,11 @@ sal_Bool SAL_CALL Manager::supportsService( const ::rtl::OUString& ServiceName )
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
uno::Sequence< ::rtl::OUString > SAL_CALL Manager::getSupportedServiceNames( ) uno::Sequence< OUString > SAL_CALL Manager::getSupportedServiceNames( )
throw (uno::RuntimeException) throw (uno::RuntimeException)
{ {
uno::Sequence< ::rtl::OUString > aRet(1); uno::Sequence< OUString > aRet(1);
aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( AVMEDIA_WIN_MANAGER_SERVICENAME ) ); aRet[0] = AVMEDIA_WIN_MANAGER_SERVICENAME ;
return aRet; return aRet;
} }
......
...@@ -48,12 +48,12 @@ public: ...@@ -48,12 +48,12 @@ public:
~Manager(); ~Manager();
// XManager // XManager
virtual ::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayer > SAL_CALL createPlayer( const ::rtl::OUString& aURL ) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayer > SAL_CALL createPlayer( const OUString& aURL ) throw (::com::sun::star::uno::RuntimeException);
// XServiceInfo // XServiceInfo
virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException); virtual 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 bool SAL_CALL supportsService( const 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); virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException);
private: private:
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMgr; ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMgr;
......
...@@ -125,7 +125,7 @@ Player::~Player() ...@@ -125,7 +125,7 @@ Player::~Player()
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
bool Player::create( const ::rtl::OUString& rURL ) bool Player::create( const OUString& rURL )
{ {
HRESULT hR; HRESULT hR;
bool bRet = false; bool bRet = false;
...@@ -169,7 +169,7 @@ bool Player::create( const ::rtl::OUString& rURL ) ...@@ -169,7 +169,7 @@ bool Player::create( const ::rtl::OUString& rURL )
if( bRet ) if( bRet )
maURL = rURL; maURL = rURL;
else else
maURL = ::rtl::OUString(); maURL = OUString();
return bRet; return bRet;
} }
...@@ -249,7 +249,7 @@ void SAL_CALL Player::stop( ) ...@@ -249,7 +249,7 @@ void SAL_CALL Player::stop( )
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
sal_Bool SAL_CALL Player::isPlaying() bool SAL_CALL Player::isPlaying()
throw (uno::RuntimeException) throw (uno::RuntimeException)
{ {
OAFilterState eFilterState; OAFilterState eFilterState;
...@@ -318,7 +318,7 @@ double SAL_CALL Player::getRate( ) ...@@ -318,7 +318,7 @@ double SAL_CALL Player::getRate( )
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
void SAL_CALL Player::setPlaybackLoop( sal_Bool bSet ) void SAL_CALL Player::setPlaybackLoop( bool bSet )
throw (uno::RuntimeException) throw (uno::RuntimeException)
{ {
mbLooping = bSet; mbLooping = bSet;
...@@ -326,7 +326,7 @@ void SAL_CALL Player::setPlaybackLoop( sal_Bool bSet ) ...@@ -326,7 +326,7 @@ void SAL_CALL Player::setPlaybackLoop( sal_Bool bSet )
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
sal_Bool SAL_CALL Player::isPlaybackLoop( ) bool SAL_CALL Player::isPlaybackLoop( )
throw (uno::RuntimeException) throw (uno::RuntimeException)
{ {
return mbLooping; return mbLooping;
...@@ -334,7 +334,7 @@ sal_Bool SAL_CALL Player::isPlaybackLoop( ) ...@@ -334,7 +334,7 @@ sal_Bool SAL_CALL Player::isPlaybackLoop( )
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
void SAL_CALL Player::setMute( sal_Bool bSet ) void SAL_CALL Player::setMute( bool bSet )
throw (uno::RuntimeException) throw (uno::RuntimeException)
{ {
if( mpBA && ( mbMuted != bSet ) ) if( mpBA && ( mbMuted != bSet ) )
...@@ -346,7 +346,7 @@ void SAL_CALL Player::setMute( sal_Bool bSet ) ...@@ -346,7 +346,7 @@ void SAL_CALL Player::setMute( sal_Bool bSet )
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
sal_Bool SAL_CALL Player::isMute( ) bool SAL_CALL Player::isMute( )
throw (uno::RuntimeException) throw (uno::RuntimeException)
{ {
return mbMuted; return mbMuted;
...@@ -433,15 +433,15 @@ uno::Reference< media::XFrameGrabber > SAL_CALL Player::createFrameGrabber( ) ...@@ -433,15 +433,15 @@ uno::Reference< media::XFrameGrabber > SAL_CALL Player::createFrameGrabber( )
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
::rtl::OUString SAL_CALL Player::getImplementationName( ) OUString SAL_CALL Player::getImplementationName( )
throw (uno::RuntimeException) throw (uno::RuntimeException)
{ {
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( AVMEDIA_WIN_PLAYER_IMPLEMENTATIONNAME ) ); return OUString( AVMEDIA_WIN_PLAYER_IMPLEMENTATIONNAME );
} }
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
sal_Bool SAL_CALL Player::supportsService( const ::rtl::OUString& ServiceName ) bool SAL_CALL Player::supportsService( const OUString& ServiceName )
throw (uno::RuntimeException) throw (uno::RuntimeException)
{ {
return ServiceName == AVMEDIA_WIN_PLAYER_SERVICENAME; return ServiceName == AVMEDIA_WIN_PLAYER_SERVICENAME;
...@@ -449,11 +449,11 @@ sal_Bool SAL_CALL Player::supportsService( const ::rtl::OUString& ServiceName ) ...@@ -449,11 +449,11 @@ sal_Bool SAL_CALL Player::supportsService( const ::rtl::OUString& ServiceName )
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
uno::Sequence< ::rtl::OUString > SAL_CALL Player::getSupportedServiceNames( ) uno::Sequence< OUString > SAL_CALL Player::getSupportedServiceNames( )
throw (uno::RuntimeException) throw (uno::RuntimeException)
{ {
uno::Sequence< ::rtl::OUString > aRet(1); uno::Sequence< OUString > aRet(1);
aRet[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( AVMEDIA_WIN_PLAYER_SERVICENAME ) ); aRet[0] = AVMEDIA_WIN_PLAYER_SERVICENAME ;
return aRet; return aRet;
} }
......
...@@ -60,7 +60,7 @@ public: ...@@ -60,7 +60,7 @@ public:
Player( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxMgr ); Player( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxMgr );
~Player(); ~Player();
bool create( const ::rtl::OUString& rURL ); bool create( const OUString& rURL );
void setNotifyWnd( int nNotifyWnd ); void setNotifyWnd( int nNotifyWnd );
void setDDrawParams( IDirectDraw* pDDraw, IDirectDrawSurface* pDDrawSurface ); void setDDrawParams( IDirectDraw* pDDraw, IDirectDrawSurface* pDDrawSurface );
...@@ -71,15 +71,15 @@ public: ...@@ -71,15 +71,15 @@ public:
// XPlayer // XPlayer
virtual void SAL_CALL start( ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL start( ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL stop( ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL stop( ) throw (::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL isPlaying( ) throw (::com::sun::star::uno::RuntimeException); virtual bool SAL_CALL isPlaying( ) throw (::com::sun::star::uno::RuntimeException);
virtual double SAL_CALL getDuration( ) throw (::com::sun::star::uno::RuntimeException); virtual double SAL_CALL getDuration( ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setMediaTime( double fTime ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setMediaTime( double fTime ) throw (::com::sun::star::uno::RuntimeException);
virtual double SAL_CALL getMediaTime( ) throw (::com::sun::star::uno::RuntimeException); virtual double SAL_CALL getMediaTime( ) throw (::com::sun::star::uno::RuntimeException);
virtual double SAL_CALL getRate( ) throw (::com::sun::star::uno::RuntimeException); virtual double SAL_CALL getRate( ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setPlaybackLoop( sal_Bool bSet ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setPlaybackLoop( bool bSet ) throw (::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL isPlaybackLoop( ) throw (::com::sun::star::uno::RuntimeException); virtual bool SAL_CALL isPlaybackLoop( ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setMute( sal_Bool bSet ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setMute( bool bSet ) throw (::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL isMute( ) throw (::com::sun::star::uno::RuntimeException); virtual bool SAL_CALL isMute( ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setVolumeDB( sal_Int16 nVolumeDB ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setVolumeDB( sal_Int16 nVolumeDB ) throw (::com::sun::star::uno::RuntimeException);
virtual sal_Int16 SAL_CALL getVolumeDB( ) throw (::com::sun::star::uno::RuntimeException); virtual sal_Int16 SAL_CALL getVolumeDB( ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::awt::Size SAL_CALL getPreferredPlayerWindowSize( ) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::awt::Size SAL_CALL getPreferredPlayerWindowSize( ) throw (::com::sun::star::uno::RuntimeException);
...@@ -87,15 +87,15 @@ public: ...@@ -87,15 +87,15 @@ public:
virtual ::com::sun::star::uno::Reference< ::com::sun::star::media::XFrameGrabber > SAL_CALL createFrameGrabber( ) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::com::sun::star::media::XFrameGrabber > SAL_CALL createFrameGrabber( ) throw (::com::sun::star::uno::RuntimeException);
// XServiceInfo // XServiceInfo
virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException); virtual 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 bool SAL_CALL supportsService( const 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); virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException);
private: private:
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMgr; ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMgr;
::rtl::OUString maURL; OUString maURL;
IGraphBuilder* mpGB; IGraphBuilder* mpGB;
IBaseFilter* mpOMF; IBaseFilter* mpOMF;
IMediaControl* mpMC; IMediaControl* mpMC;
...@@ -107,8 +107,8 @@ private: ...@@ -107,8 +107,8 @@ private:
IVideoWindow* mpVW; IVideoWindow* mpVW;
IDDrawExclModeVideo* mpEV; IDDrawExclModeVideo* mpEV;
long mnUnmutedVolume; long mnUnmutedVolume;
sal_Bool mbMuted; bool mbMuted;
sal_Bool mbLooping; bool mbLooping;
void ImplLayoutVideoWindow(); void ImplLayoutVideoWindow();
}; };
......
...@@ -47,12 +47,12 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_C ...@@ -47,12 +47,12 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_C
if( rtl_str_compare( pImplName, "com.sun.star.comp.avmedia.Manager_DirectX" ) == 0 ) if( rtl_str_compare( pImplName, "com.sun.star.comp.avmedia.Manager_DirectX" ) == 0 )
{ {
const ::rtl::OUString aServiceName( ::rtl::OUString("com.sun.star.media.Manager_DirectX" ) ); const OUString aServiceName( "com.sun.star.media.Manager_DirectX" );
xFactory = uno::Reference< lang::XSingleServiceFactory >( ::cppu::createSingleFactory( xFactory = uno::Reference< lang::XSingleServiceFactory >( ::cppu::createSingleFactory(
reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ), reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ),
::rtl::OUString("com.sun.star.comp.avmedia.Manager_DirectX" ), OUString("com.sun.star.comp.avmedia.Manager_DirectX" ),
create_MediaPlayer, uno::Sequence< ::rtl::OUString >( &aServiceName, 1 ) ) ); create_MediaPlayer, uno::Sequence< OUString >( &aServiceName, 1 ) ) );
} }
if( xFactory.is() ) if( xFactory.is() )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment