incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yda...@apache.org
Subject svn commit: r1353109 - in /incubator/ooo/trunk/main/dtrans/source/os2/clipb: Os2Clipboard.cxx Os2Transferable.hxx
Date Sat, 23 Jun 2012 10:52:51 GMT
Author: ydario
Date: Sat Jun 23 10:52:50 2012
New Revision: 1353109

URL: http://svn.apache.org/viewvc?rev=1353109&view=rev
Log:
i118923 - OS/2 port: do not open the clipboard if data is not available, fix clipboard locking.

Modified:
    incubator/ooo/trunk/main/dtrans/source/os2/clipb/Os2Clipboard.cxx
    incubator/ooo/trunk/main/dtrans/source/os2/clipb/Os2Transferable.hxx

Modified: incubator/ooo/trunk/main/dtrans/source/os2/clipb/Os2Clipboard.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/dtrans/source/os2/clipb/Os2Clipboard.cxx?rev=1353109&r1=1353108&r2=1353109&view=diff
==============================================================================
--- incubator/ooo/trunk/main/dtrans/source/os2/clipb/Os2Clipboard.cxx (original)
+++ incubator/ooo/trunk/main/dtrans/source/os2/clipb/Os2Clipboard.cxx Sat Jun 23 10:52:50
2012
@@ -298,8 +298,9 @@ void SAL_CALL Os2Clipboard::setContents(
 		debug_printf("Os2Clipboard::setContents UnsupportedFlavorException (no bitmap)\n");
 	}
 
-	// copy to clipboard
-	if ( UWinOpenClipbrd( hAB) && (pSharedText || hbm))
+	// copy to clipboard only if we have data available, otherwise clipboard
+	// remains in use and locks all other applications.
+	if ( (pSharedText || hbm) && UWinOpenClipbrd( hAB) )
 	{
 		// set the flag, so we will ignore the next WM_DRAWCLIPBOARD
 		// since we generate it with following code.

Modified: incubator/ooo/trunk/main/dtrans/source/os2/clipb/Os2Transferable.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/dtrans/source/os2/clipb/Os2Transferable.hxx?rev=1353109&r1=1353108&r2=1353109&view=diff
==============================================================================
--- incubator/ooo/trunk/main/dtrans/source/os2/clipb/Os2Transferable.hxx (original)
+++ incubator/ooo/trunk/main/dtrans/source/os2/clipb/Os2Transferable.hxx Sat Jun 23 10:52:50
2012
@@ -38,9 +38,8 @@
 
 #define CHAR_POINTER(THE_OUSTRING) ::rtl::OUStringToOString (THE_OUSTRING, RTL_TEXTENCODING_UTF8).pData->buffer
 
-#if OSL_DEBUG_LEVEL>1
-//extern "C" int debug_printf(const char *f, ...);
-#define debug_printf( ...) { 1; }
+#if OSL_DEBUG_LEVEL>10
+extern "C" int debug_printf(const char *f, ...);
 #else
 #define debug_printf( ...) { 1; }
 #endif



Mime
View raw message