rpms/openoffice.org/devel workspace.unifysound01.patch, NONE, 1.1 openoffice.org.spec, 1.1237, 1.1238
Caolan McNamara (caolanm)
fedora-extras-commits at redhat.com
Wed Aug 8 09:40:11 UTC 2007
Author: caolanm
Update of /cvs/pkgs/rpms/openoffice.org/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22540
Modified Files:
openoffice.org.spec
Added Files:
workspace.unifysound01.patch
Log Message:
workspace.unifysound01.patch
workspace.unifysound01.patch:
--- NEW FILE workspace.unifysound01.patch ---
Index: source/framework/makefile.mk
===================================================================
RCS file: /cvs/graphics/avmedia/source/framework/makefile.mk,v
retrieving revision 1.3
diff -u -r1.3 makefile.mk
--- openoffice.org.orig/avmedia/source/framework/makefile.mk 6 Feb 2007 13:32:06 -0000 1.3
+++ openoffice.org/avmedia/source/framework/makefile.mk 8 Aug 2007 09:13:09 -0000
@@ -54,7 +54,11 @@
$(SLO)$/mediamisc.obj \
$(SLO)$/mediacontrol.obj \
$(SLO)$/mediatoolbox.obj \
- $(SLO)$/mediaplayer.obj
+ $(SLO)$/mediaplayer.obj \
+ $(SLO)$/soundhandler.obj
+
+EXCEPTIONSFILES = \
+ $(SLO)$/soundhandler.obj
# --- Targets ----------------------------------
--- /dev/null 2007-08-08 09:28:55.295802468 +0100
+++ openoffice.org/avmedia/source/framework/soundhandler.xml 2007-08-07 10:58:46.000000000 +0100
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE module-description PUBLIC "-//StarOffice//DTD ComponentDescription 1.0//EN" "module-description.dtd">
+
+<module-description xmlns:xlink="http://www.w3.org/1999/xlink">
+
+ <module-name> avmedia </module-name>
+
+ <component-description>
+ <author> Andreas Schluens </author>
+ <name> com.sun.star.comp.framework.SoundHandler </name>
+ <description>
+ Implements a handler service to detect and/or play audio files.
+ supported formats: wav/au
+ </description>
+ <loader-name> com.sun.star.loader.SharedLibrary </loader-name>
+ <language> c++ </language>
+ <status value="final"/>
+ <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> vos </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> vos2$(COM) </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>
--- /dev/null 2007-08-08 09:28:55.295802468 +0100
+++ openoffice.org/avmedia/source/framework/soundhandler.hxx 2007-08-07 16:48:43.000000000 +0100
@@ -0,0 +1,215 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile$
+ *
+ * $Revision$
+ *
+ * last change: $Author$ $Date$
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef __FRAMEWORK_HANDLER_SOUNDHANDLER_HXX_
+#define __FRAMEWORK_HANDLER_SOUNDHANDLER_HXX_
+
+#include <vcl/timer.hxx>
+#include <tools/link.hxx>
+
+//_________________________________________________________________________________________________________________
+// interface includes
+//_________________________________________________________________________________________________________________
+
+#ifndef _COM_SUN_STAR_LANG_XTYPEPROVIDER_HPP_
+#include <com/sun/star/lang/XTypeProvider.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_FRAME_XNOTIFYINGDISPATCH_HPP_
+#include <com/sun/star/frame/XNotifyingDispatch.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_FRAME_XSTATUSLISTENER_HPP_
+#include <com/sun/star/frame/XStatusListener.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_FRAME_XFRAME_HPP_
+#include <com/sun/star/frame/XFrame.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_DOCUMENT_XEXTENDEDFILTERDETECTION_HPP_
+#include <com/sun/star/document/XExtendedFilterDetection.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_MEDIA_XPLAYER_HPP_
+#include <com/sun/star/media/XPlayer.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
+#include <com/sun/star/beans/PropertyValue.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_UTIL_URL_HPP_
+#include <com/sun/star/util/URL.hpp>
+#endif
+
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/XSingleServiceFactory.hpp>
+
+//_________________________________________________________________________________________________________________
+// other includes
+//_________________________________________________________________________________________________________________
+
+#ifndef _CPPUHELPER_WEAK_HXX_
+#include <cppuhelper/weak.hxx>
+#endif
+
+namespace css = ::com::sun::star;
+
+//_________________________________________________________________________________________________________________
+// namespace
+//_________________________________________________________________________________________________________________
+
+namespace avmedia{
+
+//_________________________________________________________________________________________________________________
+// exported const
+//_________________________________________________________________________________________________________________
+
+//_________________________________________________________________________________________________________________
+// exported definitions
+//_________________________________________________________________________________________________________________
+
+struct MyThreadHelpBase
+{
+ public:
+ mutable ::osl::Mutex m_aLock;
+};
+
+
+/*-************************************************************************************************************//**
+ @short handler to detect and play sounds ("wav" and "au" only!)
+ @descr Register this implementation as a content handler to detect and/or play wav- and au-sounds.
+ It doesn't depend from the target platform. But one instance of this class
+ can play one sound at the same time only. Means every new dispatch request will stop the
+ might still running one. So we support one operation/one URL/one listener at the same time
+ only.
+
+ @devstatus ready
+ @threadsafe yes
+*//*-*************************************************************************************************************/
+class SoundHandler : // interfaces
+ public css::lang::XTypeProvider
+ , public css::lang::XServiceInfo
+ , public css::frame::XNotifyingDispatch // => XDispatch
+ , public css::document::XExtendedFilterDetection
+ // baseclasses
+ // Order is neccessary for right initialization!
+ , private MyThreadHelpBase
+ , public ::cppu::OWeakObject
+{
+ //-------------------------------------------------------------------------------------------------------------
+ // public methods
+ //-------------------------------------------------------------------------------------------------------------
+ public:
+
+ //---------------------------------------------------------------------------------------------------------
+ // constructor / destructor
+ //---------------------------------------------------------------------------------------------------------
+ SoundHandler( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory );
+ virtual ~SoundHandler( );
+
+ //---------------------------------------------------------------------------------------------------------
+ // XInterface, XTypeProvider, XServiceInfo
+ //---------------------------------------------------------------------------------------------------------
+ virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) throw( css::uno::RuntimeException );
+ virtual void SAL_CALL acquire() throw();
+ virtual void SAL_CALL release() throw();
+ 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 ( );
+ //---------------------------------------------------------------------------------------------------------
+ // XNotifyingDispatch
+ //---------------------------------------------------------------------------------------------------------
+ virtual void SAL_CALL dispatchWithNotification(const css::util::URL& aURL ,
+ const css::uno::Sequence< css::beans::PropertyValue >& lArguments,
+ const css::uno::Reference< css::frame::XDispatchResultListener >& xListener ) throw(css::uno::RuntimeException);
+
+ //---------------------------------------------------------------------------------------------------------
+ // XDispatch
+ //---------------------------------------------------------------------------------------------------------
+ virtual void SAL_CALL dispatch ( const css::util::URL& aURL ,
+ const css::uno::Sequence< css::beans::PropertyValue >& lArguments ) throw( css::uno::RuntimeException );
+ // not supported !
+ virtual void SAL_CALL addStatusListener ( const css::uno::Reference< css::frame::XStatusListener >& /*xListener*/ ,
+ const css::util::URL& /*aURL*/ ) throw( css::uno::RuntimeException ) {};
+ virtual void SAL_CALL removeStatusListener ( const css::uno::Reference< css::frame::XStatusListener >& /*xListener*/ ,
+ const css::util::URL& /*aURL*/ ) throw( css::uno::RuntimeException ) {};
+
+ //---------------------------------------------------------------------------------------------------------
+ // XExtendedFilterDetection
+ //---------------------------------------------------------------------------------------------------------
+ virtual ::rtl::OUString SAL_CALL detect ( css::uno::Sequence< css::beans::PropertyValue >& lDescriptor ) throw( css::uno::RuntimeException );
+
+ //-------------------------------------------------------------------------------------------------------------
+ // private methods
+ //-------------------------------------------------------------------------------------------------------------
+ private:
+ DECL_LINK( implts_PlayerNotify, void* );
+
+ //-------------------------------------------------------------------------------------------------------------
+ // variables
+ // (should be private everyway!)
+ //-------------------------------------------------------------------------------------------------------------
+ private:
+
+ css::uno::Reference< css::lang::XMultiServiceFactory > m_xFactory ; /// global uno service factory to create new services
+ css::uno::Reference< css::uno::XInterface > m_xSelfHold ; /// we must protect us against dieing during async(!) dispatch() call!
+ css::uno::Reference< css::media::XPlayer > m_xPlayer ; /// uses avmedia player to play sounds ...
+ css::uno::Reference< css::frame::XDispatchResultListener > m_xListener ;
+ Timer m_aUpdateTimer;
+
+}; // class SoundHandler
+
+} // namespace avmedia
+
+#endif // #ifndef __FRAMEWORK_HANDLER_SOUNDHANDLER_HXX_
--- /dev/null 2007-08-08 09:28:55.295802468 +0100
+++ openoffice.org/avmedia/source/framework/soundhandler.cxx 2007-08-07 17:15:51.000000000 +0100
@@ -0,0 +1,575 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile$
+ *
+ * $Revision$
+ *
+ * last change: $Author$ $Date$
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+//_________________________________________________________________________________________________________________
+// my own includes
+//_________________________________________________________________________________________________________________
+
+#ifndef __FRAMEWORK_DISPATCH_SOUNDHANDLER_HXX_
+#include <soundhandler.hxx>
+#endif
+
+#ifndef __COMPHELPER_MEDIADESCRIPTOR_HXX_
+#include <comphelper/mediadescriptor.hxx>
+#endif
+
+//_________________________________________________________________________________________________________________
+// interface includes
+//_________________________________________________________________________________________________________________
+
+#ifndef _COM_SUN_STAR_IO_XINPUTSTREAM_HPP_
+#include <com/sun/star/io/XInputStream.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_FRAME_DISPATCHRESULTSTATE_HPP_
+#include <com/sun/star/frame/DispatchResultState.hpp>
+#endif
+
+//_________________________________________________________________________________________________________________
+// includes of other projects
+//_________________________________________________________________________________________________________________
+
+#ifndef _COMPHELPER_SEQUENCEASHASHMAP_HXX_
+#include <comphelper/sequenceashashmap.hxx>
+#endif
+
+#ifndef _RTL_USTRBUF_HXX_
+#include <rtl/ustrbuf.hxx>
+#endif
+
+#ifndef _SV_SALSTYPE_HXX
+#include <vcl/salstype.hxx>
+#endif
+
+#include <avmedia/mediawindow.hxx>
+#include <cppuhelper/typeprovider.hxx>
+#include <cppuhelper/factory.hxx>
+
+#include <stdio.h>
+
+//_________________________________________________________________________________________________________________
+// namespace
+//_________________________________________________________________________________________________________________
+
+namespace avmedia{
+
+//_________________________________________________________________________________________________________________
+// non exported const
+//_________________________________________________________________________________________________________________
+
+//_________________________________________________________________________________________________________________
+// non exported definitions
+//_________________________________________________________________________________________________________________
+
+//_________________________________________________________________________________________________________________
+// declarations
+//_________________________________________________________________________________________________________________
+
+//*****************************************************************************************************************
+// XInterface, XTypeProvider, XServiceInfo
+//*****************************************************************************************************************
+
+void SAL_CALL SoundHandler::acquire() throw()
+{
+ /* Don't use mutex in methods of XInterface! */
+ OWeakObject::acquire();
+}
+
+void SAL_CALL SoundHandler::release() throw()
+{
+ /* Don't use mutex in methods of XInterface! */
+ OWeakObject::acquire();
+}
+
+css::uno::Any SAL_CALL SoundHandler::queryInterface( const css::uno::Type& aType ) throw( css::uno::RuntimeException )
+{
+ /* 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,
+ static_cast< css::lang::XTypeProvider* >(this),
+ static_cast< css::lang::XServiceInfo* >(this),
+ static_cast< css::frame::XNotifyingDispatch* >(this),
+ static_cast< css::frame::XDispatch* >(this),
+ static_cast< css::document::XExtendedFilterDetection* >(this)));
+ /* If searched interface not supported by this class ... */
+ if ( aReturn.hasValue() == sal_False )
+ {
+ /* ... ask baseclass for interfaces! */
+ aReturn = OWeakObject::queryInterface( aType );
+ }
+ /* Return result of this search. */
+ return aReturn;
+}
+
+css::uno::Sequence< sal_Int8 > SAL_CALL SoundHandler::getImplementationId() throw( css::uno::RuntimeException )
+{
+ /* Create one Id for all instances of this class. */
+ /* Use ethernet address to do this! (sal_True) */
+ /* Optimize this method */
+ /* We initialize a static variable only one time. And we don't must use a mutex at every call! */
+ /* For the first call; pID is NULL - for the second call pID is different from NULL! */
+ static ::cppu::OImplementationId* pID = NULL ;
+ if ( pID == NULL )
+ {
+ /* Ready for multithreading; get global mutex for first call of this method only! see before */
+ ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
+ /* Control these pointer again ... it can be, that another instance will be faster then these! */
+ if ( pID == NULL )
+ {
+ /* Create a new static ID ... */
+ static ::cppu::OImplementationId aID( sal_False );
+ /* ... and set his address to static pointer! */
+ pID = &aID ;
+ }
+ }
+ return pID->getImplementationId();
+}
+
+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! */
+ /* For the first call; pTypeCollection is NULL - */
+ /* for the second call pTypeCollection is different from NULL! */
+ static ::cppu::OTypeCollection* pTypeCollection = NULL ;
+ if ( pTypeCollection == NULL )
+ {
+ /* Ready for multithreading; get global mutex for first call of this method only! see before */
+ ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
+ /* Control these pointer again ... it can be, that another instance will be faster then these! */
+ if ( pTypeCollection == NULL )
+ {
+ /* Create a static typecollection ... */
+ static ::cppu::OTypeCollection aTypeCollection
+ (
+ ::getCppuType(( const ::com::sun::star::uno::Reference< css::lang::XTypeProvider >*)NULL ),
+ ::getCppuType(( const ::com::sun::star::uno::Reference< css::lang::XServiceInfo >*)NULL ),
+ ::getCppuType(( const ::com::sun::star::uno::Reference< css::frame::XNotifyingDispatch >*)NULL ),
+ ::getCppuType(( const ::com::sun::star::uno::Reference< css::frame::XDispatch >*)NULL ),
+ ::getCppuType(( const ::com::sun::star::uno::Reference< css::document::XExtendedFilterDetection >*)NULL )
+ );
+ /* ... and set his address to static pointer! */
+ pTypeCollection = &aTypeCollection ;
+ }
+ }
+ return pTypeCollection->getTypes();
+}
+
+#define DECLARE_ASCII( SASCIIVALUE ) \
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SASCIIVALUE ) )
+
+#define IMPLEMENTATIONNAME_SOUNDHANDLER DECLARE_ASCII("com.sun.star.comp.framework.SoundHandler")
+#define SERVICENAME_CONTENTHANDLER DECLARE_ASCII("com.sun.star.frame.ContentHandler")
+
+/*===========================================================================================================*/
+/* XServiceInfo */
+/*===========================================================================================================*/
+::rtl::OUString SAL_CALL SoundHandler::getImplementationName() throw( css::uno::RuntimeException )
+{
+ return impl_getStaticImplementationName();
+}
+
+/*===========================================================================================================*/
+/* XServiceInfo */
+/*===========================================================================================================*/
+sal_Bool SAL_CALL SoundHandler::supportsService( const ::rtl::OUString& sServiceName ) throw( css::uno::RuntimeException )
+{
+ /* Set default return value. */
+ sal_Bool bReturn = sal_False ;
+ /* 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();
+ /* Search for right name in list. */
+ while (
+ ( nCounter < nLength ) &&
+ ( bReturn == sal_False )
+ )
+ {
+ /* Is name was found, say "YES, SERVICE IS SUPPORTED." and break loop. */
+ if ( pArray[nCounter] == sServiceName )
+ {
+ bReturn = sal_True ;
+ }
+ /* Else step to next element in list. */
+ ++nCounter;
+ }
+ /* Return state of search. */
+ return bReturn;
+}
+
+/*===========================================================================================================*/
+/* XServiceInfo */
+/*===========================================================================================================*/
+css::uno::Sequence< ::rtl::OUString > SAL_CALL SoundHandler::getSupportedServiceNames() throw( css::uno::RuntimeException )
+{
+ return impl_getStaticSupportedServiceNames();
+}
+
+/*===========================================================================================================*/
+/* Helper for XServiceInfo */
+/*===========================================================================================================*/
+css::uno::Sequence< ::rtl::OUString > SoundHandler::impl_getStaticSupportedServiceNames()
+{
+ css::uno::Sequence< ::rtl::OUString > seqServiceNames( 1 );
+ seqServiceNames.getArray() [0] = SERVICENAME_CONTENTHANDLER;
+ return seqServiceNames;
+}
+
+/*===========================================================================================================*/
+/* Helper for XServiceInfo */
+/*===========================================================================================================*/
+::rtl::OUString SoundHandler::impl_getStaticImplementationName()
+{
+ return IMPLEMENTATIONNAME_SOUNDHANDLER;
+}
+
+css::uno::Reference< css::uno::XInterface > SAL_CALL SoundHandler::impl_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager ) throw( css::uno::Exception )
+{
+ /* create new instance of service */
+ SoundHandler* pClass = new SoundHandler( xServiceManager );
+ /* hold it alive by increasing his ref count!!! */
+ css::uno::Reference< css::uno::XInterface > xService( static_cast< ::cppu::OWeakObject* >(pClass), css::uno::UNO_QUERY );
+ /* initialize new service instance ... he can use his own refcount ... we hold it! */
+ pClass->impl_initService();
+ /* return new created service as reference */
+ return xService;
+}
+
+css::uno::Reference< css::lang::XSingleServiceFactory > SoundHandler::impl_createFactory( const css::uno::Reference< css::lang::XMultiServiceFactory >& xServiceManager )
+{
+ css::uno::Reference< css::lang::XSingleServiceFactory > xReturn ( cppu::createSingleFactory (
+ xServiceManager,
+ SoundHandler::impl_getStaticImplementationName(),
+ SoundHandler::impl_createInstance,
+ SoundHandler::impl_getStaticSupportedServiceNames()
+ )
+ );
+ return xReturn;
+}
+
+void SAL_CALL SoundHandler::impl_initService()
+{
+}
+
+/*-************************************************************************************************************//**
+ @short standard ctor
+ @descr These initialize a new instance of this class with needed informations for work.
+
+ @seealso using at owner
+
+ @param "xFactory", reference to service manager for creation of new services
+ @return -
+
+ @onerror Show an assertion and do nothing else.
+ @threadsafe yes
+*//*-*************************************************************************************************************/
+SoundHandler::SoundHandler( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory )
+ // Init baseclasses first
+ : MyThreadHelpBase ( )
+ , ::cppu::OWeakObject ( )
+ // Init member
+ , m_xFactory ( xFactory )
+{
+ m_aUpdateTimer.SetTimeoutHdl(LINK(this, SoundHandler, implts_PlayerNotify));
+}
+
+/*-************************************************************************************************************//**
+ @short standard dtor
+ @descr -
+
+ @seealso -
+
+ @param -
+ @return -
+
+ @onerror -
+ @threadsafe -
+*//*-*************************************************************************************************************/
+SoundHandler::~SoundHandler()
+{
+ if (m_xListener.is())
+ {
+ css::frame::DispatchResultEvent aEvent;
+ aEvent.State = css::frame::DispatchResultState::FAILURE;
+ m_xListener->dispatchFinished(aEvent);
+ m_xListener = css::uno::Reference< css::frame::XDispatchResultListener >();
+ }
+}
+
+/*-************************************************************************************************************//**
+ @interface ::com::sun::star::frame::XDispatch
+
+ @short try to load audio file
+ @descr This method try to load given audio file by URL and play it. We use vcl/Sound class to do that.
+ Playing of sound is asynchron everytime.
+
+ @attention We must hold us alive by ourself ... because we use async. vcl sound player ... but playing is started
+ in async interface call "dispatch()" too. And caller forget us imediatly. But then our uno ref count
+ will decreased to 0 and will die. The only solution is to use own reference to our implementation.
+ But we do it for realy started jobs only and release it during call back of vcl.
+
+ @seealso class vcl/Sound
+ @seealso method implts_PlayerNotify()
+
+ @param "aURL" , URL to dispatch.
+ @param "lArguments", list of optional arguments.
+ @return -
+
+ @onerror We do nothing.
+ @threadsafe yes
+*//*-*************************************************************************************************************/
+void SAL_CALL SoundHandler::dispatchWithNotification(const css::util::URL& aURL ,
+ const css::uno::Sequence< css::beans::PropertyValue >& /*lArguments*/,
+ const css::uno::Reference< css::frame::XDispatchResultListener >& xListener ) throw(css::uno::RuntimeException)
+{
+ // SAFE {
+ const ::osl::MutexGuard aLock( m_aLock );
+
+ m_aUpdateTimer.Stop();
+ // If player currently used for other dispatch() requests ...
+ // cancel it by calling stop()!
+ if (m_xPlayer.is())
+ {
+ if (m_xPlayer->isPlaying())
+ m_xPlayer->stop();
+ m_xPlayer.clear();
+ }
+
+ // Try to initialize player.
+ m_xListener = xListener;
+
+ css::frame::DispatchResultEvent aEvent;
+ aEvent.State = css::frame::DispatchResultState::SUCCESS;
+
+ try
+ {
+ m_xPlayer.set( avmedia::MediaWindow::createPlayer( aURL.Complete ) );
+ // OK- we can start async playing ...
+ // Count this request and initialize self-holder against dieing by uno ref count ...
+ m_xSelfHold = css::uno::Reference< css::uno::XInterface >(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY);
+ m_xPlayer->start();
+ m_aUpdateTimer.SetTimeout( 200 );
+ m_aUpdateTimer.Start();
+ }
+ catch( css::uno::Exception& e )
+ {
+ (void)e;
+ aEvent.State = css::frame::DispatchResultState::FAILURE;
+ m_xPlayer.clear();
+ }
+
+ // notify might existing listener
+ // And forget this listener!
+ // Because the corresponding dispatch was finished.
+ if (m_xListener.is())
+ {
+ m_xListener->dispatchFinished(aEvent);
+ m_xListener = css::uno::Reference< css::frame::XDispatchResultListener >();
+ }
+
+ // } SAFE
+}
+
+void SAL_CALL SoundHandler::dispatch( const css::util::URL& aURL ,
+ const css::uno::Sequence< css::beans::PropertyValue >& lArguments ) throw( css::uno::RuntimeException )
+{
+ dispatchWithNotification(aURL, lArguments, css::uno::Reference< css::frame::XDispatchResultListener >());
+}
+
+/*-************************************************************************************************************//**
+ @interface ::com::sun::star::document::XExtendedFilterDetection
+
+ @short try to detect file (given as argument included in "lDescriptor")
+ @descr We try to detect, if given file could be handled by this class and is a well known one.
+ If it is - we return right internal type name - otherwise we return nothing!
+ So call can search for another detect service and ask him too.
+
+ @attention a) We don't need any mutex here ... because we don't use any member!
+ b) Dont' use internal player instance "m_pPlayer" to detect given sound file!
+ It's not neccessary to do that ... and we can use temp. variable to do the same.
+ This way is easy - we don't must synchronize it with currently played sounds!
+ Another reason to do so ... We are a listener on our internal ma_Player object.
+ If you would call "IsSoundFile()" on this instance, he would call us back and
+ we make some uneccssary things ...
+
+ @seealso -
+
+ @param "lDescriptor", description of file to detect
+ @return Internal type name which match this file ... or nothing if it is unknown.
+
+ @onerror We return nothing.
+ @threadsafe yes
+*//*-*************************************************************************************************************/
+::rtl::OUString SAL_CALL SoundHandler::detect( css::uno::Sequence< css::beans::PropertyValue >& lDescriptor ) throw( css::uno::RuntimeException )
+{
+ // Our default is "nothing". So we can return it, if detection failed or fily type is realy unknown.
+ ::rtl::OUString sTypeName;
+
+ // Analyze given descriptor to find filename or input stream or ...
+ ::comphelper::MediaDescriptor aDescriptor(lDescriptor);
+ ::rtl::OUString sURL = aDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_URL(), ::rtl::OUString());
+
+ if (
+ (sURL.getLength() ) &&
+ (avmedia::MediaWindow::isMediaURL(sURL))
+ )
+ {
+ // "IsSoundFile" idffer between different "wav" and "au" file versions ...
+ // couldn't return this information ... because: He use the OS to detect it!
+ // I think we can the following ones:
+ // a) look for given extension of url to map our type decision HARD CODED!!!
+ // b) return preferred type every time... it's easy :-)
+ sTypeName = ::rtl::OUString::createFromAscii("wav_Wave_Audio_File");
+ aDescriptor[::comphelper::MediaDescriptor::PROP_TYPENAME()] <<= sTypeName;
+ aDescriptor >> lDescriptor;
+ }
+
+ // Return our decision.
+ return sTypeName;
+}
+
+/*-************************************************************************************************************//**
+ @short call back of sound player
+ @descr Our player call us back to give us some informations.
+ We use this informations to callback our might existing listener.
+
+ @seealso method dispatchWithNotification()
+
+ @param -
+ @return 0 everytime ... it doesnt matter for us.
+
+ @onerror -
+ @threadsafe yes
+*//*-*************************************************************************************************************/
+IMPL_LINK( SoundHandler, implts_PlayerNotify, void*, EMPTYARG )
+{
+ // SAFE {
+ const ::osl::MutexGuard aLock( m_aLock );
+
+ if (m_xPlayer.is() && m_xPlayer->isPlaying())
+ {
+ m_aUpdateTimer.Start();
+ return 0L;
+ }
+ m_xPlayer.clear();
+
+ // We use m_xSelfHold to let us die ... but we must live till real finishing of this method too!!!
+ // So we SHOULD use another "self-holder" temp. to provide that ...
+ css::uno::Reference< css::uno::XInterface > xOperationHold = m_xSelfHold;
+ m_xSelfHold.clear();
+
+ // } SAFE
+
+ return 0;
+}
+
+} // namespace avmedia
+
+// ------------------------------------------
+// - component_getImplementationEnvironment -
+// ------------------------------------------
+
+extern "C" void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** ppEnv )
+{
+ *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
+}
+
+// -----------------------
+// - component_writeInfo -
+// -----------------------
+
+extern "C" sal_Bool SAL_CALL component_writeInfo( void* pServiceManager, void* pRegistryKey )
+{
+ sal_Bool bRet = sal_False;
+
+ if( pRegistryKey )
+ {
+ try
+ {
+ rtl::OUString sKeyName = DECLARE_ASCII( "/" );
+ sKeyName += avmedia::SoundHandler::impl_getStaticImplementationName();
+ sKeyName += DECLARE_ASCII( "/UNO/SERVICES" );
+ css::uno::Reference< css::registry::XRegistryKey > xNewKey(
+ static_cast< css::registry::XRegistryKey* >( pRegistryKey )->createKey(sKeyName));
+
+ if ( xNewKey.is() == sal_True )
+ {
+ css::uno::Sequence< ::rtl::OUString > seqServiceNames = avmedia::SoundHandler::impl_getStaticSupportedServiceNames();
+ const ::rtl::OUString* pArray = seqServiceNames.getArray();
+ sal_Int32 nLength = seqServiceNames.getLength();
+ for ( sal_Int32 nCounter = 0; nCounter < nLength; ++nCounter )
+ xNewKey->createKey( pArray[nCounter] );
+ }
+
+ bRet = sal_True;
+ }
+ catch( css::registry::InvalidRegistryException& )
+ {
+ OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
+ }
+ }
+
+ return bRet;
+}
+
+// ------------------------
+// - component_getFactory -
+// ------------------------
+
+extern "C" void* SAL_CALL component_getFactory(const sal_Char* pImplementationName, void* pServiceManager, void* /*pRegistryKey*/ )
+{
+ void* pReturn = NULL;
+ if (pServiceManager != NULL )
+ {
+ /* Define variables which are used in following macros. */
+ css::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > xFactory;
+ css::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceManager;
+ xServiceManager = reinterpret_cast< ::com::sun::star::lang::XMultiServiceFactory* >( pServiceManager ) ;
+
+ if ( avmedia::SoundHandler::impl_getStaticImplementationName().equals( ::rtl::OUString::createFromAscii( pImplementationName ) ) )
+ xFactory = avmedia::SoundHandler::impl_createFactory( xServiceManager );
+
+ if ( xFactory.is() == sal_True )
+ {
+ xFactory->acquire();
+ pReturn = xFactory.get();
+ }
+ }
+ /* Return with result of this operation. */
+ return pReturn;
+}
diff -ru /usr/src/redhat/BUILD/OOF680_m18/avmedia/source/gstreamer/gstplayer.cxx source/gstreamer/gstplayer.cxx
--- openoffice.org.orig/avmedia/source/gstreamer/gstplayer.cxx 2007-08-07 19:50:02.000000000 +0100
+++ openoffice.org/avmedia/source/gstreamer/gstplayer.cxx 2007-08-07 17:14:52.000000000 +0100
@@ -67,6 +67,7 @@
mpPlaybin( NULL ),
mbFakeVideo (sal_False ),
mnUnmutedVolume( 0 ),
+ mbPlayPending ( false ),
mbMuted( false ),
mbLooping( false ),
mbInitialized( false ),
@@ -132,8 +133,9 @@
switch( GST_MESSAGE_TYPE( message ) ) {
case GST_MESSAGE_EOS:
//DBG( "EOS, reset state to NULL" );
gst_element_set_state( mpPlaybin, GST_STATE_READY );
+ mbPlayPending = false;
break;
case GST_MESSAGE_STATE_CHANGED:
if( message->src == GST_OBJECT( mpPlaybin ) ) {
@@ -151,6 +156,9 @@
pendingstate == GST_STATE_VOID_PENDING &&
mpXOverlay )
gst_x_overlay_expose( mpXOverlay );
+
+ if (mbPlayPending)
+ mbPlayPending = ((newstate == GST_STATE_READY) || (newstate == GST_STATE_PAUSED));
}
default:
break;
@@ -250,6 +260,7 @@
if( mpPlaybin != NULL ) {
gst_element_set_state( mpPlaybin, GST_STATE_NULL );
+ mbPlayPending = false;
g_object_unref( mpPlaybin );
}
@@ -281,6 +293,7 @@
preparePlaybin( rURL, true );
gst_element_set_state( mpPlaybin, GST_STATE_PAUSED );
+ mbPlayPending = false;
bRet = true;
}
@@ -304,7 +318,8 @@
// set the pipeline state to READY and run the loop
if( mbInitialized && NULL != mpPlaybin )
{
gst_element_set_state( mpPlaybin, GST_STATE_PLAYING );
+ mbPlayPending = true;
}
}
@@ -317,6 +336,7 @@
if( mpPlaybin )
gst_element_set_state( mpPlaybin, GST_STATE_PAUSED );
+ mbPlayPending = false;
DBG( "stop %p", mpPlaybin );
}
@@ -325,7 +346,7 @@
sal_Bool SAL_CALL Player::isPlaying()
throw (uno::RuntimeException)
{
- bool bRet = false;
+ bool bRet = mbPlayPending;
// return whether the pipeline is in PLAYING STATE or not
- if( mbInitialized && mpPlaybin )
+ if( !mbPlayPending && mbInitialized && mpPlaybin )
{
bRet = GST_STATE_PLAYING == GST_STATE( mpPlaybin );
}
@@ -369,7 +390,10 @@
GST_SEEK_TYPE_SET, gst_position,
GST_SEEK_TYPE_NONE, 0 );
if( !isPlaying() )
+ {
gst_element_set_state( mpPlaybin, GST_STATE_PAUSED );
+ mbPlayPending = false;
+ }
DBG( "seek to: %lld ns original: %lf s", gst_position, fTime );
}
@@ -537,6 +562,7 @@
g_object_set( G_OBJECT( mpPlaybin ), "video-sink", NULL, NULL );
gst_element_set_state( mpPlaybin, GST_STATE_READY );
gst_element_set_state( mpPlaybin, GST_STATE_PAUSED );
+ mbPlayPending = false;
}
DBG( "%p Player::getPreferredPlayerWindowSize after waitCondition %d, member %d x %d", this, aResult, mnWidth, mnHeight );
diff -ru /usr/src/redhat/BUILD/OOF680_m18/avmedia/source/gstreamer/gstplayer.hxx source/gstreamer/gstplayer.hxx
--- openoffice.org.orig/avmedia/source/gstreamer/gstplayer.hxx 2007-08-07 19:50:02.000000000 +0100
+++ openoffice.org/avmedia/source/gstreamer/gstplayer.hxx 2007-08-07 10:30:45.000000000 +0100
@@ -101,6 +101,7 @@
sal_Bool mbFakeVideo;
gdouble mnUnmutedVolume;
+ sal_Bool mbPlayPending;
sal_Bool mbMuted;
sal_Bool mbLooping;
sal_Bool mbInitialized;
diff -ru SRC680_m224/filter/source/config/fragments/types/wav_Wave_Audio_File.xcu SRC680_m223/filter/source/config/fragments/types/wav_Wave_Audio_File.xcu
--- openoffice.org.orig/filter/source/config/fragments/types/wav_Wave_Audio_File.xcu 2007-08-03 09:24:31.000000000 +0100
+++ openoffice.org/filter/source/config/fragments/types/wav_Wave_Audio_File.xcu 2007-08-08 10:17:21.000000000 +0100
@@ -7,6 +7,6 @@
<value>Wave Audio File</value>
</prop>
<prop oor:name="ClipboardFormat"/>
- <prop oor:name="DetectService"/>
+ <prop oor:name="DetectService"><value>com.sun.star.comp.framework.SoundHandler</value></prop>
<prop oor:name="PreferredFilter"/>
</node>
Index: source/unx/gnome/SalGtkFilePicker.cxx
===================================================================
RCS file: /cvs/gsl/fpicker/source/unx/gnome/SalGtkFilePicker.cxx,v
retrieving revision 1.22
diff -u -r1.22 SalGtkFilePicker.cxx
--- openoffice.org.orig/fpicker/source/unx/gnome/SalGtkFilePicker.cxx 10 May 2007 13:02:50 -0000 1.22
+++ openoffice.org/fpicker/source/unx/gnome/SalGtkFilePicker.cxx 8 Aug 2007 09:29:19 -0000
@@ -192,7 +192,10 @@
}
for( i = 0; i < BUTTON_LAST; i++ )
+ {
m_pButtons[i] = NULL;
+ mbButtonVisibility[i] = false;
+ }
for( i = 0; i < LIST_LAST; i++ )
{
@@ -259,27 +262,6 @@
gtk_box_pack_end( GTK_BOX( pThinVBox ), m_pToggles[i], FALSE, FALSE, 0 );
}
- for( i = 0; i < BUTTON_LAST; i++ )
- {
- m_pButtons[i] = gtk_button_new();
-
-#define LABEL_BUTTON( elem ) \
- case elem : \
- aLabel = aResProvider.getResString( PUSHBUTTON_##elem ); \
- setLabel( PUSHBUTTON_##elem, aLabel ); \
- break
-
- switch( i ) {
-
- LABEL_BUTTON( PLAY );
- default:
- OSL_TRACE("Handle unknown control %d\n", i);
- break;
- }
-
- gtk_box_pack_end( GTK_BOX( pThinVBox ), m_pButtons[i], FALSE, TRUE, 0 );
- }
-
for( i = 0; i < LIST_LAST; i++ )
{
m_pHBoxs[i] = gtk_hbox_new( FALSE, 0 );
@@ -1119,6 +1101,16 @@
retVal = ExecutableDialogResults::CANCEL;
break;
+ case 1: //PLAY
+ {
+ FilePickerEvent evt;
+ evt.ElementId = PUSHBUTTON_PLAY;
+ OSL_TRACE( "filter_changed, isn't it great %x\n", this);
+ controlStateChanged( evt );
+ btn = GTK_RESPONSE_NO;
+ }
+ break;
+
default:
retVal = 0;
break;
@@ -1409,14 +1401,12 @@
OSL_TRACE("enable unknown control %d\n", nControlId );
}
-void SAL_CALL SalGtkFilePicker::setLabel( sal_Int16 nControlId, const ::rtl::OUString& aLabel )
+void SAL_CALL SalGtkFilePicker::setLabel( sal_Int16 nControlId, const ::rtl::OUString& rLabel )
throw( uno::RuntimeException )
{
OSL_ASSERT( m_pDialog != NULL );
::vos::OGuard aGuard( Application::GetSolarMutex() );
- OString aTxt = OUStringToOString( aLabel, RTL_TEXTENCODING_UTF8 );
-
GType tType;
GtkWidget *pWidget;
@@ -1425,7 +1415,18 @@
OSL_TRACE("Set label on unknown control %d\n", nControlId);
return;
}
- if( tType == GTK_TYPE_TOGGLE_BUTTON || tType == GTK_TYPE_BUTTON || tType == GTK_TYPE_LABEL )
+
+ OString aTxt = OUStringToOString( rLabel.replace('~', '_'), RTL_TEXTENCODING_UTF8 );
+ if (nControlId == ExtendedFilePickerElementIds::PUSHBUTTON_PLAY)
+ {
+ CResourceProvider aResProvider;
+ OString aPlay = OUStringToOString( aResProvider.getResString( PUSHBUTTON_PLAY ), RTL_TEXTENCODING_UTF8 );
+ if (aPlay == aTxt)
+ gtk_button_set_label(GTK_BUTTON(pWidget), GTK_STOCK_MEDIA_PLAY);
+ else
+ gtk_button_set_label(GTK_BUTTON(pWidget), GTK_STOCK_MEDIA_STOP);
+ }
+ else if( tType == GTK_TYPE_TOGGLE_BUTTON || tType == GTK_TYPE_BUTTON || tType == GTK_TYPE_LABEL )
g_object_set( pWidget, "label", aTxt.getStr(),
"use_underline", TRUE, (char *)NULL );
else
@@ -1723,6 +1724,7 @@
case FILEOPEN_PLAY:
eAction = GTK_FILE_CHOOSER_ACTION_OPEN;
first_button_text = GTK_STOCK_OPEN;
+ mbButtonVisibility[PLAY] = true;
// TODO
break;
case FILEOPEN_READONLY_VERSION:
@@ -1763,7 +1766,13 @@
gtk_file_chooser_set_action( GTK_FILE_CHOOSER( m_pDialog ), eAction);
dialog_remove_buttons( GTK_DIALOG( m_pDialog ) );
gtk_dialog_add_button( GTK_DIALOG( m_pDialog ), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL );
+ for( int nTVIndex = 0; nTVIndex < BUTTON_LAST; nTVIndex++ )
+ {
+ if( mbButtonVisibility[nTVIndex] )
+ m_pButtons[ nTVIndex ] = gtk_dialog_add_button( GTK_DIALOG( m_pDialog ), GTK_STOCK_MEDIA_PLAY, 1 );
+ }
gtk_dialog_add_button( GTK_DIALOG( m_pDialog ), first_button_text, GTK_RESPONSE_ACCEPT );
+
gtk_dialog_set_default_response( GTK_DIALOG (m_pDialog), GTK_RESPONSE_ACCEPT );
// Setup special flags
@@ -2028,9 +2037,6 @@
for( i = 0; i < TOGGLE_LAST; i++ )
gtk_widget_destroy( m_pToggles[i] );
- for( i = 0; i < BUTTON_LAST; i++ )
- gtk_widget_destroy( m_pButtons[i] );
-
for( i = 0; i < LIST_LAST; i++ )
{
gtk_widget_destroy( m_pListLabels[i] );
Index: source/unx/gnome/SalGtkFilePicker.hxx
===================================================================
RCS file: /cvs/gsl/fpicker/source/unx/gnome/SalGtkFilePicker.hxx,v
retrieving revision 1.10
diff -u -r1.10 SalGtkFilePicker.hxx
--- openoffice.org.orig/fpicker/source/unx/gnome/SalGtkFilePicker.hxx 7 Aug 2006 13:59:37 -0000 1.10
+++ openoffice.org/fpicker/source/unx/gnome/SalGtkFilePicker.hxx 8 Aug 2007 09:29:19 -0000
@@ -332,6 +332,7 @@
GtkWidget *m_pLists[ LIST_LAST ];
GtkWidget *m_pListLabels[ LIST_LAST ];
bool mbListVisibility[ LIST_LAST ];
+ bool mbButtonVisibility[ BUTTON_LAST ];
gulong mnHID_FolderChange;
gulong mnHID_SelectionChange;
Index: source/unx/gnome/SalGtkPicker.cxx
===================================================================
RCS file: /cvs/gsl/fpicker/source/unx/gnome/SalGtkPicker.cxx,v
retrieving revision 1.14
diff -u -r1.14 SalGtkPicker.cxx
--- openoffice.org.orig/fpicker/source/unx/gnome/SalGtkPicker.cxx 24 Oct 2006 15:02:38 -0000 1.14
+++ openoffice.org/fpicker/source/unx/gnome/SalGtkPicker.cxx 8 Aug 2007 09:29:19 -0000
@@ -131,7 +131,8 @@
void RunDialog::run()
{
mnStatus = gtk_dialog_run( GTK_DIALOG( m_pDialog ) );
- gtk_widget_hide( m_pDialog );
+ if (mnStatus != 1) //PLAY
+ gtk_widget_hide( m_pDialog );
maLock.acquire();
mbFinished = true;
Index: inc/services.h
===================================================================
RCS file: /cvs/framework/framework/inc/services.h,v
retrieving revision 1.43
diff -u -r1.43 services.h
--- openoffice.org.orig/framework/inc/services.h 18 Jul 2007 13:25:12 -0000 1.43
+++ openoffice.org/framework/inc/services.h 8 Aug 2007 09:09:44 -0000
@@ -148,7 +148,6 @@
#define IMPLEMENTATIONNAME_LOGINDIALOG DECLARE_ASCII("com.sun.star.comp.framework.LoginDialog" )
#define IMPLEMENTATIONNAME_TYPEDETECTION DECLARE_ASCII("com.sun.star.comp.framework.TypeDetection" )
#define IMPLEMENTATIONNAME_DOCUMENTPROPERTIES DECLARE_ASCII("com.sun.star.comp.framework.DocumentProperties" )
-#define IMPLEMENTATIONNAME_SOUNDHANDLER DECLARE_ASCII("com.sun.star.comp.framework.SoundHandler" )
#define IMPLEMENTATIONNAME_CONTENTHANDLERFACTORY DECLARE_ASCII("com.sun.star.comp.framework.ContentHandlerFactory" )
#define IMPLEMENTATIONNAME_SFXTERMINATOR DECLARE_ASCII("com.sun.star.comp.sfx2.SfxTerminateListener" )
#define IMPLEMENTATIONNAME_PIPETERMINATOR DECLARE_ASCII("com.sun.star.comp.OfficeIPCThreadController" )
Index: qa/unoapi/framework.sce
===================================================================
RCS file: /cvs/framework/framework/qa/unoapi/framework.sce,v
retrieving revision 1.7
diff -u -r1.7 framework.sce
--- openoffice.org.orig/framework/qa/unoapi/framework.sce 14 Jun 2005 15:33:28 -0000 1.7
+++ openoffice.org/framework/qa/unoapi/framework.sce 8 Aug 2007 09:09:46 -0000
@@ -15,7 +15,6 @@
-o fwk.JobHandler
-o fwk.MailToDispatcher
-o fwk.ServiceHandler
--o fwk.SoundHandler
-o fwk.URLTransformer
-o fwk.MacrosMenuController
-o fwk.ModuleManager
Index: source/dispatch/makefile.mk
===================================================================
RCS file: /cvs/framework/framework/source/dispatch/makefile.mk,v
retrieving revision 1.13
diff -u -r1.13 makefile.mk
--- openoffice.org.orig/framework/source/dispatch/makefile.mk 5 Jul 2007 08:57:50 -0000 1.13
+++ openoffice.org/framework/source/dispatch/makefile.mk 8 Aug 2007 09:09:46 -0000
@@ -56,7 +56,6 @@
$(SLO)$/menudispatcher.obj \
$(SLO)$/helpagentdispatcher.obj \
$(SLO)$/mailtodispatcher.obj \
- $(SLO)$/soundhandler.obj \
$(SLO)$/interaction.obj \
$(SLO)$/servicehandler.obj \
$(SLO)$/closedispatcher.obj \
Index: source/register/registerservices.cxx
===================================================================
RCS file: /cvs/framework/framework/source/register/registerservices.cxx,v
retrieving revision 1.38
diff -u -r1.38 registerservices.cxx
--- openoffice.org.orig/framework/source/register/registerservices.cxx 17 Jul 2007 13:25:41 -0000 1.38
+++ openoffice.org/framework/source/register/registerservices.cxx 8 Aug 2007 09:09:49 -0000
@@ -89,10 +89,6 @@
#include <jobs/jobexecutor.hxx>
#endif
-#ifndef __FRAMEWORK_DISPATCH_SOUNDHANDLER_HXX_
-#include <dispatch/soundhandler.hxx>
-#endif
-
#ifndef __FRAMEWORK_RECORDING_DISPATCHRECORDERSUPPLIER_HXX_
#include <recording/dispatchrecordersupplier.hxx>
#endif
@@ -281,7 +277,6 @@
COMPONENTWRITEINFO ( COMPONENTINFO( ::framework::URLTransformer )
COMPONENTINFO( ::framework::Desktop )
COMPONENTINFO( ::framework::Frame )
- COMPONENTINFO( ::framework::SoundHandler )
COMPONENTINFO( ::framework::JobExecutor )
COMPONENTINFO( ::framework::DispatchRecorderSupplier )
COMPONENTINFO( ::framework::DispatchRecorder )
@@ -334,7 +329,6 @@
COMPONENTGETFACTORY ( IFFACTORY( ::framework::URLTransformer ) else
IFFACTORY( ::framework::Desktop ) else
IFFACTORY( ::framework::Frame ) else
- IFFACTORY( ::framework::SoundHandler ) else
IFFACTORY( ::framework::JobExecutor ) else
IFFACTORY( ::framework::DispatchRecorderSupplier ) else
IFFACTORY( ::framework::DispatchRecorder ) else
Index: source/unotypes/fwk.xml
===================================================================
RCS file: /cvs/framework/framework/source/unotypes/fwk.xml,v
retrieving revision 1.12
diff -u -r1.12 fwk.xml
--- openoffice.org.orig/framework/source/unotypes/fwk.xml 14 Jun 2005 15:34:15 -0000 1.12
+++ openoffice.org/framework/source/unotypes/fwk.xml 8 Aug 2007 09:09:50 -0000
@@ -60,19 +60,6 @@
<component-description>
<author> Andreas Schluens </author>
- <name> com.sun.star.comp.framework.SoundHandler </name>
- <description>
- Implements a handler service to detect and/or play audio files.
- supported formats: wav/au
- </description>
- <loader-name> com.sun.star.loader.SharedLibrary </loader-name>
- <language> c++ </language>
- <status value="final"/>
- <supported-service> com.sun.star.frame.ContentHandler </supported-service>
- </component-description>
-
- <component-description>
- <author> Andreas Schluens </author>
<name> com.sun.star.comp.framework.DispatchRecorderSupplier </name>
<description>
This supplier is available on the servcice Frame as property "DispatchRecorderSupplier".
Index: util/makefile.mk
===================================================================
RCS file: /cvs/framework/framework/util/makefile.mk,v
retrieving revision 1.115
diff -u -r1.115 makefile.mk
--- openoffice.org.orig/framework/util/makefile.mk 17 Jul 2007 13:26:27 -0000 1.115
+++ openoffice.org/framework/util/makefile.mk 8 Aug 2007 09:09:50 -0000
@@ -224,7 +224,6 @@
$(SLO)$/oframes.obj \
$(SLO)$/registerservices.obj \
$(SLO)$/closedispatcher.obj \
- $(SLO)$/soundhandler.obj \
$(SLO)$/statusindicator.obj \
$(SLO)$/statusindicatorfactory.obj \
$(SLO)$/targetfinder.obj \
Index: source/ui/view/tabvwshg.cxx
===================================================================
RCS file: /cvs/sc/sc/source/ui/view/tabvwshg.cxx,v
retrieving revision 1.11
diff -u -r1.11 tabvwshg.cxx
--- openoffice.org.orig/sc/source/ui/view/tabvwshg.cxx 14 Nov 2006 16:00:31 -0000 1.11
+++ openoffice.org/sc/source/ui/view/tabvwshg.cxx 8 Aug 2007 09:23:46 -0000
@@ -59,9 +59,7 @@
#include "document.hxx"
#include "drawview.hxx"
#include "globstr.hrc"
-#ifndef _SV_SOUND_HXX
-#include <vcl/sound.hxx>
-#endif
+#include <avmedia/mediawindow.hxx>
//------------------------------------------------------------------------
@@ -116,7 +114,7 @@
aAny <<= eButtonType;
xPropSet->setPropertyValue( rtl::OUString::createFromAscii( "ButtonType" ), aAny );
- if ( Sound::IsSoundFile( rURL ) )
+ if ( ::avmedia::MediaWindow::isMediaURL( rURL ) )
{
// #105638# OJ
aAny <<= sal_True;
diff -ru SRC680_m224/sd/source/ui/animations/CustomAnimationDialog.cxx SRC680_m223/sd/source/ui/animations/CustomAnimationDialog.cxx
--- openoffice.org.orig/sd/source/ui/animations/CustomAnimationDialog.cxx 2007-08-03 09:27:54.000000000 +0100
+++ openoffice.org/sd/source/ui/animations/CustomAnimationDialog.cxx 2007-08-02 14:10:26.000000000 +0100
@@ -178,6 +178,8 @@
#include "STLPropertySet.hxx"
#endif
+#include <avmedia/mediawindow.hxx>
+
#include "filedlg.hxx"
#include "strings.hrc"
#include "helpids.h"
@@ -1280,7 +1282,6 @@
FixedText* mpFTTextDelay;
::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayer > mxPlayer;
- ::com::sun::star::uno::Reference< ::com::sun::star::media::XManager > mxManager;
};
@@ -1940,15 +1941,6 @@
mpLBSound->SelectEntryPos( (USHORT) nPos );
}
-// TODO(Q3): This breaks encapsulation. Either export
-// these strings from avmedia, or provide an XManager
-// factory there
-#ifdef WNT
-# define AVMEDIA_MANAGER_SERVICE_NAME "com.sun.star.media.Manager_DirectX"
-#else
-# define AVMEDIA_MANAGER_SERVICE_NAME "com.sun.star.media.Manager_Java"
-#endif
-
void CustomAnimationEffectTabPage::onSoundPreview()
{
const USHORT nPos = mpLBSound->GetSelectEntryPos();
@@ -1956,18 +1948,7 @@
if( nPos >= 2 ) try
{
const OUString aSoundURL( *(String*)maSoundList.GetObject( nPos-2 ) );
-
- if( !mxManager.is() )
- {
- uno::Reference<lang::XMultiServiceFactory> xFac( ::comphelper::getProcessServiceFactory() );
-
- mxManager.set(
- xFac->createInstance(
- ::rtl::OUString::createFromAscii( AVMEDIA_MANAGER_SERVICE_NAME ) ),
- uno::UNO_QUERY_THROW );
- }
-
- mxPlayer.set( mxManager->createPlayer( aSoundURL ), uno::UNO_QUERY_THROW );
+ mxPlayer.set( avmedia::MediaWindow::createPlayer( aSoundURL ) );
mxPlayer->start();
}
catch( uno::Exception& e )
diff -ru SRC680_m224/sd/source/ui/dlg/filedlg.cxx SRC680_m223/sd/source/ui/dlg/filedlg.cxx
--- openoffice.org.orig/sd/source/ui/dlg/filedlg.cxx 2007-08-03 09:27:54.000000000 +0100
+++ openoffice.org/sd/source/ui/dlg/filedlg.cxx 2007-08-03 16:38:06.000000000 +0100
@@ -107,10 +107,15 @@
#include <svx/impgrf.hxx>
+#ifndef _COM_SUN_STAR_MEDIA_XPLAYER_HPP_
+#include <com/sun/star/media/XPlayer.hpp>
+#endif
+#include <avmedia/mediawindow.hxx>
+
#include "filedlg.hxx"
#include "sdresid.hxx"
#include "strings.hrc"
//-----------------------------------------------------------------------------
@@ -133,16 +140,19 @@
css::uno::Reference< css::ui::dialogs::XFilePickerControlAccess > mxControlAccess;
- Sound maSound;
+ css::uno::Reference< css::media::XPlayer > mxPlayer;
+
ULONG mnPlaySoundEvent;
BOOL mbUsableSelection;
BOOL mbLabelPlaying;
- BOOL mbDuringPreparePlaying;
void CheckSelectionState();
DECL_LINK( PlayMusicHdl, void * );
- DECL_LINK( StopMusicHdl, void * );
+
+ Timer maUpdateTimer;
+
+ DECL_LINK( IsMusicStoppedHdl, void * );
public:
SdFileDialog_Imp( const short nDialogType, sal_Bool bUsableSelection );
@@ -182,16 +192,20 @@
// ------------------------------------------------------------------------
IMPL_LINK( SdFileDialog_Imp, PlayMusicHdl, void *, EMPTYARG )
{
+ maUpdateTimer.Stop();
mnPlaySoundEvent = 0;
+ if (mxPlayer.is())
+ {
+ if (mxPlayer->isPlaying())
+ mxPlayer->stop();
+ mxPlayer.clear();
+ }
+
if( mbLabelPlaying )
{
// switch from playing to not playing
- // reset, so that sound file gets unlocked
- maSound.Stop();
- maSound.SetSoundName( String() );
-
try
{
mxControlAccess->setLabel( css::ui::dialogs::ExtendedFilePickerElementIds::PUSHBUTTON_PLAY,
@@ -209,27 +223,25 @@
else
{
// switch from not playing to playing of current file
- if( maSound.IsPlaying() )
- {
- // reset, so that sound file gets unlocked
- maSound.Stop();
- maSound.SetSoundName( String() );
- }
- INetURLObject aUrl( GetPath() );
- String aSoundFile( aUrl.GetMainURL( INetURLObject::NO_DECODE ) );
-
- if( aSoundFile.Len() > 0 && Sound::IsSoundFile(aSoundFile) )
+ rtl::OUString aUrl( GetPath() );
+
+ if ( aUrl.getLength() )
{
- maSound.SetNotifyHdl( LINK( this, SdFileDialog_Imp, StopMusicHdl ) );
- mbDuringPreparePlaying=TRUE;
- maSound.SetSoundName( aSoundFile );
- maSound.Play();
-
- ULONG nError = maSound.GetLastError();
- mbDuringPreparePlaying=FALSE;
- // guard against early stopping
- if( maSound.IsPlaying() && !nError)
+ try
+ {
+ mxPlayer.set( avmedia::MediaWindow::createPlayer( aUrl ) );
+ mxPlayer->start();
+ maUpdateTimer.SetTimeout( 100 );
+ maUpdateTimer.Start();
+ }
+ catch( css::uno::Exception& e )
+ {
+ (void)e;
+ mxPlayer.clear();
+ }
+
+ if (mxPlayer.is())
{
try
{
@@ -245,45 +257,40 @@
#endif
}
}
- else if(nError)
- {
- //reset error state of sound
- maSound.SetSoundName( String() );
- }
- }
+ }
}
return 0;
}
// ------------------------------------------------------------------------
-IMPL_LINK( SdFileDialog_Imp, StopMusicHdl, void *, EMPTYARG )
+IMPL_LINK( SdFileDialog_Imp, IsMusicStoppedHdl, void *, EMPTYARG )
{
- if(mbDuringPreparePlaying)
- return( 0L ); //don't reset the error state of maSound during prepare playing
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ if (mxPlayer.is() && mxPlayer->isPlaying())
+ {
+ maUpdateTimer.Start();
+ return 0L;
+ }
- // reset, so that sound file gets unlocked
- maSound.SetSoundName( String() );
-
- if( mxControlAccess.is() )
- {
- try
- {
- mxControlAccess->setLabel( css::ui::dialogs::ExtendedFilePickerElementIds::PUSHBUTTON_PLAY,
- String( SdResId( STR_PLAY ) ) );
+ if( mxControlAccess.is() )
+ {
+ try
+ {
+ mxControlAccess->setLabel( css::ui::dialogs::ExtendedFilePickerElementIds::PUSHBUTTON_PLAY,
+ String( SdResId( STR_PLAY ) ) );
mbLabelPlaying = FALSE;
- }
- catch( css::lang::IllegalArgumentException )
- {
+ }
+ catch( css::lang::IllegalArgumentException )
+ {
#ifdef DBG_UTIL
- DBG_ERROR( "Cannot access play button" );
+ DBG_ERROR( "Cannot access play button" );
#endif
- }
- }
+ }
+ }
- return( 0L );
+ return 0L;
}
// check whether to disable the "selection" checkbox
@@ -315,14 +322,15 @@
FileDialogHelper( nDialogType, 0 ),
mnPlaySoundEvent( 0 ),
mbUsableSelection( bUsableSelection ),
- mbLabelPlaying(FALSE),
- mbDuringPreparePlaying(FALSE)
+ mbLabelPlaying(FALSE)
{
+ maUpdateTimer.SetTimeoutHdl(LINK(this, SdFileDialog_Imp, IsMusicStoppedHdl));
+
css::uno::Reference < ::com::sun::star::ui::dialogs::XFilePicker > xFileDlg = GetFilePicker();
// get the control access
mxControlAccess = css::uno::Reference< css::ui::dialogs::XFilePickerControlAccess > ( xFileDlg, css::uno::UNO_QUERY );
if( mxControlAccess.is() )
{
if( nDialogType ==
diff -ru SRC680_m224/sd/source/ui/func/fusel.cxx SRC680_m223/sd/source/ui/func/fusel.cxx
--- openoffice.org.orig/sd/source/ui/func/fusel.cxx 2007-08-03 09:27:55.000000000 +0100
+++ openoffice.org/sd/source/ui/func/fusel.cxx 2007-08-02 14:14:13.000000000 +0100
@@ -148,6 +148,14 @@
#include <svx/svdundo.hxx>
#endif
+#ifndef _UNOTOOLS_PROCESSFACTORY_HXX
+#include <comphelper/processfactory.hxx>
+#endif
+#ifndef _COM_SUN_STAR_MEDIA_XPLAYER_HPP_
+#include <com/sun/star/media/XPlayer.hpp>
+#endif
+#include <avmedia/mediawindow.hxx>
+
using namespace ::com::sun::star;
namespace sd {
@@ -174,7 +182,6 @@
bSuppressChangesOfSelection(FALSE),
bMirrorSide0(FALSE),
nEditMode(SID_BEZIER_MOVE),
- pSound(NULL),
pWaterCanCandidate(NULL)
{
}
@@ -205,8 +212,6 @@
HPUX_DTOR_BUG;
mpView->UnmarkAllPoints();
mpView->ResetCreationActive();
- delete pSound;
- pSound = NULL;
if ( mpView->GetDragMode() != SDRDRAG_MOVE )
{
@@ -1226,20 +1231,6 @@
/*************************************************************************
|*
-|*
-|*
-\************************************************************************/
-
-IMPL_LINK( FuSelection, SoundHasStoppedHdl, void*, EMPTYARG )
-{
- pSound->SetNotifyHdl( Link() );
- pSound->SetSoundName( String() );
- return 0L;
-}
-
-
-/*************************************************************************
-|*
|* Animation oder Interaktion ausfuehren
|*
\************************************************************************/
@@ -1389,15 +1380,15 @@
case presentation::ClickAction_SOUND:
{
- // Sound asynchron abspielen
- if( !pSound )
- {
- pSound = new Sound();
- }
-
- pSound->SetNotifyHdl( LINK( this, FuSelection, SoundHasStoppedHdl ) );
- pSound->SetSoundName( pInfo->maBookmark );
- pSound->Play();
+ try
+ {
+ mxPlayer.set( avmedia::MediaWindow::createPlayer( pInfo->maBookmark ) );
+ mxPlayer->start();
+ }
+ catch( uno::Exception& e )
+ {
+ (void)e;
+ }
bAnimated = TRUE;
}
break;
diff -ru SRC680_m224/sd/source/ui/func/fuslsel.cxx SRC680_m223/sd/source/ui/func/fuslsel.cxx
--- openoffice.org.orig/sd/source/ui/func/fuslsel.cxx 2007-08-03 09:27:56.000000000 +0100
+++ openoffice.org/sd/source/ui/func/fuslsel.cxx 2007-08-02 12:10:57.000000000 +0100
@@ -103,8 +103,7 @@
: FuSlide(pViewSh, pWin, pView, pDoc, rReq),
bSubstShown(FALSE),
bPageHit(FALSE),
- bDragSelection(FALSE),
- pSound(new Sound)
+ bDragSelection(FALSE)
{
pIsShowingEffectInfo = new FSS_IsShowingEffectInfo;
pIsShowingEffectInfo->bDisposed = FALSE;
@@ -131,7 +130,6 @@
FuSlideSelection::~FuSlideSelection()
{
aDragTimer.Stop();
- delete pSound;
if( pIsShowingEffectInfo && pIsShowingEffectInfo->bIsShowingEffect )
{
@@ -496,10 +494,6 @@
void FuSlideSelection::Deactivate()
{
- // Sound nicht mehr blockieren, damit er in der Show gespielt werden kann
- if (pSound)
- pSound->Stop();
-
FuSlide::Deactivate();
}
diff -ru SRC680_m224/sd/source/ui/inc/fusel.hxx SRC680_m223/sd/source/ui/inc/fusel.hxx
--- openoffice.org.orig/sd/source/ui/inc/fusel.hxx 2007-08-03 09:27:56.000000000 +0100
+++ openoffice.org/sd/source/ui/inc/fusel.hxx 2007-08-02 14:14:09.000000000 +0100
@@ -40,6 +40,8 @@
#include "fudraw.hxx"
#endif
+#include <com/sun/star/media/XPlayer.hpp>
+
class SdrHdl;
class SdrObject;
class Sound;
@@ -96,10 +98,7 @@
BOOL bSuppressChangesOfSelection;
BOOL bMirrorSide0;
USHORT nEditMode;
- Sound* pSound;
-
- DECL_LINK( SoundHasStoppedHdl, void* );
- DECL_STATIC_LINK( FuSelection, StaticSoundHasStoppedHdl, Sound* );
+ ::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayer > mxPlayer;
private:
/** This pointer stores a canidate for assigning a style in the water
diff -ru SRC680_m224/sd/source/ui/inc/fuslsel.hxx SRC680_m223/sd/source/ui/inc/fuslsel.hxx
--- openoffice.org.orig/sd/source/ui/inc/fuslsel.hxx 2007-08-03 09:27:56.000000000 +0100
+++ openoffice.org/sd/source/ui/inc/fuslsel.hxx 2007-08-02 12:10:20.000000000 +0100
@@ -109,7 +109,6 @@
Point aDragSelRectAnchor; // fester Punkt des Selektionsrechtecks
Rectangle aDragSelRect;
Point aPosOfInsertMarker;
- Sound* pSound;
FSS_IsShowingEffectInfo* pIsShowingEffectInfo;
void DrawInsertMarker(BOOL bShow);
diff -ru SRC680_m224/sd/source/ui/slideshow/slideshowimpl.cxx SRC680_m223/sd/source/ui/slideshow/slideshowimpl.cxx
--- openoffice.org.orig/sd/source/ui/slideshow/slideshowimpl.cxx 2007-08-03 09:27:57.000000000 +0100
+++ openoffice.org/sd/source/ui/slideshow/slideshowimpl.cxx 2007-08-02 14:08:33.000000000 +0100
@@ -116,15 +116,7 @@
#include "slideshow.hrc"
#include "canvas/elapsedtime.hxx"
#include "canvas/prioritybooster.hxx"
-
-// TODO(Q3): This breaks encapsulation. Either export
-// these strings from avmedia, or provide an XManager
-// factory there
-#ifdef WNT
-# define AVMEDIA_MANAGER_SERVICE_NAME "com.sun.star.media.Manager_DirectX"
-#else
-# define AVMEDIA_MANAGER_SERVICE_NAME "com.sun.star.media.Manager_Java"
-#endif
+#include "avmedia/mediawindow.hxx"
using ::com::sun::star::uno::UNO_QUERY;
using ::com::sun::star::uno::UNO_QUERY_THROW;
@@ -1694,17 +1686,7 @@
{
try
{
- if( !mxManager.is() )
- {
- uno::Reference<lang::XMultiServiceFactory> xFac( ::comphelper::getProcessServiceFactory() );
-
- mxManager.set(
- xFac->createInstance(
- ::rtl::OUString::createFromAscii( AVMEDIA_MANAGER_SERVICE_NAME ) ),
- uno::UNO_QUERY_THROW );
- }
-
- mxPlayer.set( mxManager->createPlayer( pEvent->maStrBookmark ), uno::UNO_QUERY_THROW );
+ mxPlayer.set(avmedia::MediaWindow::createPlayer(pEvent->maStrBookmark));
mxPlayer->start();
}
catch( uno::Exception& e )
diff -ru SRC680_m224/sd/source/ui/slideshow/slideshowimpl.hxx SRC680_m223/sd/source/ui/slideshow/slideshowimpl.hxx
--- openoffice.org.orig/sd/source/ui/slideshow/slideshowimpl.hxx 2007-08-03 09:27:57.000000000 +0100
+++ openoffice.org/sd/source/ui/slideshow/slideshowimpl.hxx 2007-08-02 14:08:19.000000000 +0100
@@ -400,7 +400,6 @@
::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode > mxPreviewAnimationNode;
::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayer > mxPlayer;
- ::com::sun::star::uno::Reference< ::com::sun::star::media::XManager > mxManager;
::std::auto_ptr<PaneHider> mpPaneHider;
Index: source/ui/shells/textdrw.cxx
===================================================================
RCS file: /cvs/sw/sw/source/ui/shells/textdrw.cxx,v
retrieving revision 1.11
diff -u -r1.11 textdrw.cxx
--- openoffice.org.orig/sw/source/ui/shells/textdrw.cxx 16 Sep 2006 23:16:53 -0000 1.11
+++ openoffice.org/sw/source/ui/shells/textdrw.cxx 8 Aug 2007 09:01:15 -0000
@@ -86,9 +86,7 @@
#ifndef SVTOOLS_URIHELPER_HXX
#include <svtools/urihelper.hxx>
#endif
-#ifndef _SV_SOUND_HXX
-#include <vcl/sound.hxx>
-#endif
+#include <avmedia/mediawindow.hxx>
#define C2U(cChar) rtl::OUString::createFromAscii(cChar)
using namespace ::com::sun::star;
@@ -160,8 +160,9 @@
aTmp.setValue( &eButtonType, ::getCppuType((const form::FormButtonType*)0));
xPropSet->setPropertyValue( C2U("ButtonType"), aTmp );
- if ( Sound::IsSoundFile( rURL ) )
+
+ if( ::avmedia::MediaWindow::isMediaURL( rURL ) )
{
// #105638# OJ
aTmp <<= sal_True;
xPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DispatchURLInternal" )), aTmp );
Index: openoffice.org.spec
===================================================================
RCS file: /cvs/pkgs/rpms/openoffice.org/devel/openoffice.org.spec,v
retrieving revision 1.1237
retrieving revision 1.1238
diff -u -r1.1237 -r1.1238
--- openoffice.org.spec 3 Aug 2007 14:25:23 -0000 1.1237
+++ openoffice.org.spec 8 Aug 2007 09:39:39 -0000 1.1238
@@ -151,6 +151,7 @@
Patch87: openoffice.org-2.2.1.ooo79878.vcl.honourwidthtype.patch
Patch88: openoffice.org-2.3.0.ooo80257.sd.textonlystyle.patch
Patch89: openoffice.org-2.3.0.ooo80257.sd.textonlystyle.tar.gz
+Patch90: workspace.unifysound01.patch
%define instdir %{_libdir}/openoffice.org
@@ -1096,6 +1097,7 @@
%patch87 -p1 -b .ooo79878.vcl.honourwidthtype.patch
%patch88 -p1 -b .ooo80257.sd.textonlystyle.patch
tar xzf %{PATCH89}
+%patch90 -p1 -b .workspace.unifysound01.patch
%if %{linkopt}
chmod a+x solenv/bin/mklinkscript.pl
@@ -2693,6 +2695,11 @@
%changelog
* Fri Aug 03 2007 Caolan McNamara <caolanm at redhat.com> - 1:2.2.1-18.8
- clarify licenses is use in OOo
+- rebuild for new icu
+- add workspace.unifysound01,
+ + unify all our sound under gstreamer
+ + add play button to sound selection fpicker
+ + fix type detection for .wavs so they don't open as text files(!)
* Tue Jul 24 2007 Caolan McNamara <caolanm at redhat.com> - 1:2.2.1-18.7
- Resolves: ooo#79953 inhibit screensaver during presentations
More information about the scm-commits
mailing list