[ooo-build-commit] Branch 'ooo/master' - 2 commits - dtrans/source vcl/unx
Jan Holesovsky
kendy at kemper.freedesktop.org
Mon Jun 15 18:10:45 PDT 2009
dtrans/source/X11/X11_droptarget.cxx | 48 ++++++++++++++---------------------
dtrans/source/X11/X11_selection.cxx | 4 +-
vcl/unx/gtk/app/gtkdata.cxx | 4 +-
vcl/unx/headless/svpvd.cxx | 11 ++++++--
4 files changed, 33 insertions(+), 34 deletions(-)
New commits:
commit 2f285e0c9121420570f9521870044681f964794a
Author: Ivo Hinkelmann <ihi at openoffice.org>
Date: Mon Jun 15 13:03:05 2009 +0000
CWS-TOOLING: integrate CWS ooo311gsl02_DEV300
2009-05-25 16:07:55 +0200 pl r272260 : #b6843142# #i102226# do not acquire own mutex during outside UNO calls
2009-05-25 16:05:06 +0200 pl r272259 : #b6843142# #i102226# do not acquire solar mutex during UNO calls
diff --git a/dtrans/source/X11/X11_droptarget.cxx b/dtrans/source/X11/X11_droptarget.cxx
index 7a709dd..321d4bb 100644
--- a/dtrans/source/X11/X11_droptarget.cxx
+++ b/dtrans/source/X11/X11_droptarget.cxx
@@ -143,15 +143,13 @@ void DropTarget::setDefaultActions( sal_Int8 actions ) throw()
void DropTarget::drop( const DropTargetDropEvent& dtde ) throw()
{
- ::osl::Guard< ::osl::Mutex > aGuard( m_aMutex );
+ osl::ClearableGuard< ::osl::Mutex > aGuard( m_aMutex );
+ std::list< Reference< XDropTargetListener > > aListeners( m_aListeners );
+ aGuard.clear();
- ::std::list< Reference< XDropTargetListener > >::iterator it1, it2;
- it1 = m_aListeners.begin();
- while( it1 != m_aListeners.end() )
+ for( std::list< Reference< XDropTargetListener > >::iterator it = aListeners.begin(); it!= aListeners.end(); ++it )
{
- it2 = it1;
- it1++;
- (*it2)->drop( dtde );
+ (*it)->drop( dtde );
}
}
@@ -159,15 +157,13 @@ void DropTarget::drop( const DropTargetDropEvent& dtde ) throw()
void DropTarget::dragEnter( const DropTargetDragEnterEvent& dtde ) throw()
{
- ::osl::Guard< ::osl::Mutex > aGuard( m_aMutex );
+ osl::ClearableGuard< ::osl::Mutex > aGuard( m_aMutex );
+ std::list< Reference< XDropTargetListener > > aListeners( m_aListeners );
+ aGuard.clear();
- ::std::list< Reference< XDropTargetListener > >::iterator it1, it2;
- it1 = m_aListeners.begin();
- while( it1 != m_aListeners.end() )
+ for( std::list< Reference< XDropTargetListener > >::iterator it = aListeners.begin(); it!= aListeners.end(); ++it )
{
- it2 = it1;
- it1++;
- (*it2)->dragEnter( dtde );
+ (*it)->dragEnter( dtde );
}
}
@@ -175,15 +171,13 @@ void DropTarget::dragEnter( const DropTargetDragEnterEvent& dtde ) throw()
void DropTarget::dragExit( const DropTargetEvent& dte ) throw()
{
- ::osl::Guard< ::osl::Mutex > aGuard( m_aMutex );
+ osl::ClearableGuard< ::osl::Mutex > aGuard( m_aMutex );
+ std::list< Reference< XDropTargetListener > > aListeners( m_aListeners );
+ aGuard.clear();
- ::std::list< Reference< XDropTargetListener > >::iterator it1, it2;
- it1 = m_aListeners.begin();
- while( it1 != m_aListeners.end() )
+ for( std::list< Reference< XDropTargetListener > >::iterator it = aListeners.begin(); it!= aListeners.end(); ++it )
{
- it2 = it1;
- it1++;
- (*it2)->dragExit( dte );
+ (*it)->dragExit( dte );
}
}
@@ -191,15 +185,13 @@ void DropTarget::dragExit( const DropTargetEvent& dte ) throw()
void DropTarget::dragOver( const DropTargetDragEvent& dtde ) throw()
{
- ::osl::Guard< ::osl::Mutex > aGuard( m_aMutex );
+ osl::ClearableGuard< ::osl::Mutex > aGuard( m_aMutex );
+ std::list< Reference< XDropTargetListener > > aListeners( m_aListeners );
+ aGuard.clear();
- ::std::list< Reference< XDropTargetListener > >::iterator it1, it2;
- it1 = m_aListeners.begin();
- while( it1 != m_aListeners.end() )
+ for( std::list< Reference< XDropTargetListener > >::iterator it = aListeners.begin(); it!= aListeners.end(); ++it )
{
- it2 = it1;
- it1++;
- (*it2)->dragOver( dtde );
+ (*it)->dragOver( dtde );
}
}
diff --git a/dtrans/source/X11/X11_selection.cxx b/dtrans/source/X11/X11_selection.cxx
index c6967b9..b74c8bc 100644
--- a/dtrans/source/X11/X11_selection.cxx
+++ b/dtrans/source/X11/X11_selection.cxx
@@ -1117,7 +1117,7 @@ bool SelectionManager::getPasteData( Atom selection, const ::rtl::OUString& rTyp
bSuccess = getPasteData( selection, m_nImageBmpAtom, rData );
#if OSL_DEBUG_LEVEL > 1
if( bSuccess )
- fprintf( stderr, "got %d bytes of image/bmp\n" ), (int)rData.getLength();
+ fprintf( stderr, "got %d bytes of image/bmp\n", (int)rData.getLength() );
#endif
if( ! bSuccess )
{
@@ -1685,7 +1685,7 @@ bool SelectionManager::handleSelectionRequest( XSelectionRequestEvent& rRequest
XA_INTEGER, 32, PropModeReplace, (const unsigned char*)&nTimeStamp, 1 );
aNotify.xselection.property = rRequest.property;
#if OSL_DEBUG_LEVEL > 1
- fprintf( stderr, "sending timestamp: %d\n", nTimeStamp );
+ fprintf( stderr, "sending timestamp: %d\n", (int)nTimeStamp );
#endif
}
else
diff --git a/vcl/unx/gtk/app/gtkdata.cxx b/vcl/unx/gtk/app/gtkdata.cxx
index 3ea1fca..047938a 100644
--- a/vcl/unx/gtk/app/gtkdata.cxx
+++ b/vcl/unx/gtk/app/gtkdata.cxx
@@ -138,8 +138,6 @@ GdkFilterReturn GtkSalDisplay::filterGdkEvent( GdkXEvent* sys_event,
GdkEvent*,
gpointer data )
{
- GTK_YIELD_GRAB();
-
GdkFilterReturn aFilterReturn = GDK_FILTER_CONTINUE;
XEvent *pEvent = (XEvent *)sys_event;
@@ -150,6 +148,8 @@ GdkFilterReturn GtkSalDisplay::filterGdkEvent( GdkXEvent* sys_event,
CallEventCallback( pEvent, sizeof( XEvent ) ) )
aFilterReturn = GDK_FILTER_REMOVE;
+ GTK_YIELD_GRAB();
+
if (pDisplay->GetDisplay() == pEvent->xany.display )
{
// #i53471# gtk has no callback mechanism that lets us be notified
commit 25c9c1d2cdb1c0d7eee78d439a53e14961281989
Author: Ivo Hinkelmann <ihi at openoffice.org>
Date: Mon Jun 15 12:41:42 2009 +0000
CWS-TOOLING: integrate CWS svp02_DEV300
2009-04-29 16:59:46 +0200 pl r271386 : #159621# defined palette for 1 bit VDevs
diff --git a/vcl/unx/headless/svpvd.cxx b/vcl/unx/headless/svpvd.cxx
index 38990ed..bd8ef08 100644
--- a/vcl/unx/headless/svpvd.cxx
+++ b/vcl/unx/headless/svpvd.cxx
@@ -65,9 +65,14 @@ BOOL SvpSalVirtualDevice::SetSize( long nNewDX, long nNewDY )
if( ! m_aDevice.get() || m_aDevice->getSize() != aDevSize )
{
sal_uInt32 nFormat = SVP_DEFAULT_BITMAP_FORMAT;
+ std::vector< basebmp::Color > aDevPal;
switch( m_nBitCount )
{
- case 1: nFormat = Format::ONE_BIT_MSB_PAL; break;
+ case 1: nFormat = Format::ONE_BIT_MSB_PAL;
+ aDevPal.reserve(2);
+ aDevPal.push_back( basebmp::Color( 0, 0, 0 ) );
+ aDevPal.push_back( basebmp::Color( 0xff, 0xff, 0xff ) );
+ break;
case 4: nFormat = Format::FOUR_BIT_MSB_PAL; break;
case 8: nFormat = Format::EIGHT_BIT_PAL; break;
#ifdef OSL_BIGENDIAN
@@ -78,7 +83,9 @@ BOOL SvpSalVirtualDevice::SetSize( long nNewDX, long nNewDY )
case 24: nFormat = Format::TWENTYFOUR_BIT_TC_MASK; break;
case 32: nFormat = Format::THIRTYTWO_BIT_TC_MASK; break;
}
- m_aDevice = createBitmapDevice( aDevSize, false, nFormat );
+ m_aDevice = aDevPal.empty()
+ ? createBitmapDevice( aDevSize, false, nFormat )
+ : createBitmapDevice( aDevSize, false, nFormat, PaletteMemorySharedVector( new std::vector< basebmp::Color >(aDevPal) ) );
// update device in existing graphics
for( std::list< SvpSalGraphics* >::iterator it = m_aGraphics.begin();
it != m_aGraphics.end(); ++it )
More information about the ooo-build-commit
mailing list