rpms/openoffice.org/devel workspace.vcl108.patch, NONE, 1.1 openoffice.org.spec, 1.2090, 1.2091 openoffice.org-3.2.0.ooo107260.vcl.clipboard.shutdown.patch, 1.1, NONE
Caolan McNamara
caolanm at fedoraproject.org
Fri Nov 27 13:10:04 UTC 2009
- Previous message: rpms/kdepim/devel kdepim.spec,1.246,1.247
- Next message: rpms/virtaal/F-12 virtaal-0.5.0-msgfmt_compile_fixes.patch, NONE, 1.1 virtaal-0.5.0-setup_drop_MO_generation.patch, NONE, 1.1 .cvsignore, 1.11, 1.12 sources, 1.11, 1.12 virtaal.spec, 1.13, 1.14 virtaal-0.3beta1-setup_drop_MO_generation.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: caolanm
Update of /cvs/pkgs/rpms/openoffice.org/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv30620
Modified Files:
openoffice.org.spec
Added Files:
workspace.vcl108.patch
Removed Files:
openoffice.org-3.2.0.ooo107260.vcl.clipboard.shutdown.patch
Log Message:
rename to upstream workspace
workspace.vcl108.patch:
unx/source/dtrans/X11_selection.cxx | 92 ++++++++++++++++++++++++++++++++----
unx/source/dtrans/X11_selection.hxx | 18 ++++++-
util/makefile.mk | 1
3 files changed, 99 insertions(+), 12 deletions(-)
--- NEW FILE workspace.vcl108.patch ---
diff -ru vcl/unx/source/dtrans/X11_selection.cxx vcl/unx/source/dtrans/X11_selection.cxx
--- vcl/unx/source/dtrans/X11_selection.cxx 2009-11-26 09:56:24.000000000 +0000
+++ vcl/unx/source/dtrans/X11_selection.cxx 2009-11-26 20:25:02.000000000 +0000
@@ -66,9 +66,9 @@
#include <com/sun/star/awt/MouseEvent.hpp>
#include <com/sun/star/awt/MouseButton.hpp>
#include <rtl/tencinfo.h>
-#ifndef OSL_PROCESS_H
#include <osl/process.h>
-#endif
+
+#include <comphelper/processfactory.hxx>
#define DRAG_EVENT_MASK ButtonPressMask |\
ButtonReleaseMask |\
@@ -81,12 +81,20 @@
using namespace com::sun::star::lang;
using namespace com::sun::star::awt;
using namespace com::sun::star::uno;
+using namespace com::sun::star::frame;
using namespace cppu;
using namespace osl;
using namespace rtl;
using namespace x11;
+//Temporarily redeclare to avoid pre/postx and renaming*/
+class Application
+{
+public:
+ static void Yield( bool bAllEvents = false );
+};
+
// stubs to satisfy solaris compiler's rather rigid linking warning
extern "C"
{
@@ -3698,6 +3706,14 @@
timeval aLast;
gettimeofday( &aLast, 0 );
+ Reference< XMultiServiceFactory > xFact( ::comphelper::getProcessServiceFactory() );
+ if( xFact.is() )
+ {
+ Reference< XDesktop > xDesktop( xFact->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.frame.Desktop" ) ), UNO_QUERY );
+ if( xDesktop.is() )
+ xDesktop->addTerminateListener(This);
+ }
+
while( osl_scheduleThread(This->m_aThread) )
{
This->dispatchEvent( 1000 );
@@ -3738,12 +3754,46 @@
#endif
}
+void SelectionManager::shutdown() throw()
+{
+ ResettableMutexGuard aGuard(m_aMutex);
+ // stop dispatching
+ if( m_aThread )
+ {
+ osl_terminateThread( m_aThread );
+ /*
+ * Allow thread to finish before app exits to avoid pulling the carpet
+ * out from under it if pasting is occuring during shutdown
+ *
+ * a) allow it to have the Mutex and
+ * b) reschedule to allow it to complete callbacks to any
+ * Application::GetSolarMutex protected regions, etc. e.g.
+ * TransferableHelper::getTransferDataFlavors (via
+ * SelectionManager::handleSelectionRequest) which it might
+ * currently be trying to enter.
+ *
+ * Otherwise the thread may be left still waiting on a GlobalMutex
+ * when that gets destroyed, letting the thread blow up and die
+ * when enters the section in a now dead OOo instance.
+ */
+ aGuard.clear();
+ while (osl_isThreadRunning(m_aThread))
+ Application::Yield();
+ osl_joinWithThread( m_aThread );
+ osl_destroyThread( m_aThread );
+ m_aThread = NULL;
+ aGuard.reset();
+ }
+ m_xDisplayConnection->removeEventHandler( Any(), this );
+ m_xDisplayConnection.clear();
+}
+
// ------------------------------------------------------------------------
sal_Bool SelectionManager::handleEvent( const Any& event ) throw()
{
- Sequence< sal_Int8 > aSeq;
- if( (event >>= aSeq) )
+ Sequence< sal_Int8 > aSeq;
+ if( (event >>= aSeq) )
{
XEvent* pEvent = (XEvent*)aSeq.getArray();
Time nTimestamp = CurrentTime;
@@ -3770,16 +3820,38 @@
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "SelectionManager got downing event\n" );
#endif
- MutexGuard aGuard(m_aMutex);
- // stop dispatching
- if( m_aThread )
- osl_terminateThread( m_aThread );
- m_xDisplayConnection->removeEventHandler( Any(), this );
- m_xDisplayConnection.clear();
+ shutdown();
}
return sal_True;
}
+void SAL_CALL SelectionManager::disposing( const ::com::sun::star::lang::EventObject& )
+ throw( ::com::sun::star::uno::RuntimeException )
+{
+}
+
+void SAL_CALL SelectionManager::queryTermination( const ::com::sun::star::lang::EventObject& )
+ throw( ::com::sun::star::frame::TerminationVetoException, ::com::sun::star::uno::RuntimeException )
+{
+}
+
+/*
+ * To be safe, shutdown needs to be called before the ~SfxApplication is called, waiting until
+ * the downing event can be too late if paste are requested during shutdown and ~SfxApplication
+ * has been called before vcl is shutdown
+ */
+void SAL_CALL SelectionManager::notifyTermination( const ::com::sun::star::lang::EventObject& rEvent )
+ throw( ::com::sun::star::uno::RuntimeException )
+{
+ Reference< XDesktop > xDesktop( rEvent.Source, UNO_QUERY );
+ if( xDesktop.is() == sal_True )
+ xDesktop->removeTerminateListener( this );
+ #if OSL_DEBUG_LEVEL > 1
+ fprintf( stderr, "SelectionManager got app termination event\n" );
+ #endif
+ shutdown();
+}
+
// ------------------------------------------------------------------------
void SelectionManager::registerHandler( Atom selection, SelectionAdaptor& rAdaptor )
diff -ru vcl/unx/source/dtrans/X11_selection.hxx vcl/unx/source/dtrans/X11_selection.hxx
--- vcl/unx/source/dtrans/X11_selection.hxx 2009-11-26 09:56:24.000000000 +0000
+++ vcl/unx/source/dtrans/X11_selection.hxx 2009-11-26 17:54:21.000000000 +0000
@@ -32,6 +32,7 @@
#define _DTRANS_X11_SELECTION_HXX_
#include <cppuhelper/compbase3.hxx>
+#include <cppuhelper/compbase4.hxx>
#include <com/sun/star/datatransfer/XTransferable.hpp>
#include <com/sun/star/datatransfer/dnd/XDropTarget.hpp>
#include <com/sun/star/datatransfer/dnd/XDragSource.hpp>
@@ -39,6 +40,7 @@
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/script/XInvocation.hpp>
+#include <com/sun/star/frame/XDesktop.hpp>
#include <osl/thread.h>
#ifndef _OSL_CONDITION_HXX_
@@ -155,10 +157,11 @@
class SelectionManager :
- public ::cppu::WeakImplHelper3<
+ public ::cppu::WeakImplHelper4<
::com::sun::star::datatransfer::dnd::XDragSource,
::com::sun::star::lang::XInitialization,
- ::com::sun::star::awt::XEventHandler
+ ::com::sun::star::awt::XEventHandler,
+ ::com::sun::star::frame::XTerminateListener
>,
public SelectionAdaptor
{
@@ -478,6 +481,8 @@
void setImage( sal_Int32 image, Window aDropWindow, Time aTimestamp );
void transferablesFlavorsChanged();
+ void shutdown() throw();
+
// XInitialization
virtual void SAL_CALL initialize( const Sequence< Any >& arguments ) throw( ::com::sun::star::uno::Exception );
@@ -499,6 +504,15 @@
virtual void clearTransferable() throw();
virtual void fireContentsChanged() throw();
virtual Reference< XInterface > getReference() throw();
+
+ // XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw( ::com::sun::star::uno::RuntimeException );
+
+ // XTerminateListener
+ virtual void SAL_CALL queryTermination( const ::com::sun::star::lang::EventObject& aEvent )
+ throw( ::com::sun::star::frame::TerminationVetoException, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL notifyTermination( const ::com::sun::star::lang::EventObject& aEvent )
+ throw( ::com::sun::star::uno::RuntimeException );
};
// ------------------------------------------------------------------------
diff -ru vcl/util/makefile.mk vcl/util/makefile.mk
--- vcl/util/makefile.mk 2009-11-26 09:56:21.000000000 +0000
+++ vcl/util/makefile.mk 2009-11-26 17:48:17.000000000 +0000
@@ -304,6 +304,7 @@
$(VOSLIB) \
$(BASEGFXLIB) \
$(UNOTOOLSLIB) \
+ $(COMPHELPERLIB) \
$(CPPUHELPERLIB) \
$(CPPULIB) \
$(SALLIB)
Index: openoffice.org.spec
===================================================================
RCS file: /cvs/pkgs/rpms/openoffice.org/devel/openoffice.org.spec,v
retrieving revision 1.2090
retrieving revision 1.2091
diff -u -p -r1.2090 -r1.2091
--- openoffice.org.spec 27 Nov 2009 09:22:35 -0000 1.2090
+++ openoffice.org.spec 27 Nov 2009 13:10:04 -0000 1.2091
@@ -130,7 +130,7 @@ Patch52: workspace.impress184.patch
Patch53: openoffice.org-3.2.0.ooo107137.canvas.fixcolorspace.patch
Patch54: openoffice.org-3.2.0.ooo107151.sc.pop-empty-cell.patch
Patch55: openoffice.org-3.3.0.ooo102645.fix.es.patch
-Patch56: openoffice.org-3.2.0.ooo107260.vcl.clipboard.shutdown.patch
+Patch56: workspace.vcl108.patch
%define python_py_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(0)")
%define instdir %{_libdir}
@@ -1655,7 +1655,7 @@ cat %{PATCH10} >> svtools/source/dialogs
%patch53 -p0 -b .ooo107137.canvas.fixcolorspace.patch
%patch54 -p1 -b .ooo107151.sc.pop-empty-cell.patch
%patch55 -p0 -b .ooo102645.fix.es.patch
-%patch56 -p0 -b .ooo107260.vcl.clipboard.shutdown.patch
+%patch56 -p0 -b .workspace.vcl108.patch
%build
echo build start time is `date`, diskspace: `df -h . | tail -n 1`
--- openoffice.org-3.2.0.ooo107260.vcl.clipboard.shutdown.patch DELETED ---
- Previous message: rpms/kdepim/devel kdepim.spec,1.246,1.247
- Next message: rpms/virtaal/F-12 virtaal-0.5.0-msgfmt_compile_fixes.patch, NONE, 1.1 virtaal-0.5.0-setup_drop_MO_generation.patch, NONE, 1.1 .cvsignore, 1.11, 1.12 sources, 1.11, 1.12 virtaal.spec, 1.13, 1.14 virtaal-0.3beta1-setup_drop_MO_generation.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list