ooo-build r11812 - in trunk: . patches/src680



Author: jholesovsky
Date: Wed Mar  5 16:00:30 2008
New Revision: 11812
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11812&view=rev

Log:
2008-03-05  Jan Holesovsky  <kendy suse cz>

        * patches/src680/sc-middle-button-should-paste-text.diff,
          patches/src680/apply: Fix pasting with middle button in Calc.


Added:
   trunk/patches/src680/sc-middle-button-should-paste-text.diff
Modified:
   trunk/ChangeLog
   trunk/patches/src680/apply

Modified: trunk/patches/src680/apply
==============================================================================
--- trunk/patches/src680/apply	(original)
+++ trunk/patches/src680/apply	Wed Mar  5 16:00:30 2008
@@ -2276,6 +2276,9 @@
 [ Fixes ]
 sc-xclimpchangetrack-discard-bogus-formula-size.diff, n#355304, tml
 
+# Fix pasting with middle button in Calc
+sc-middle-button-should-paste-text.diff, n#282767, i#86734, jholesov
+
 [ Fixes < ooh680-m6 ]
 dmake-heap-corruption.diff, i#85381, tml
 

Added: trunk/patches/src680/sc-middle-button-should-paste-text.diff
==============================================================================
--- (empty file)
+++ trunk/patches/src680/sc-middle-button-should-paste-text.diff	Wed Mar  5 16:00:30 2008
@@ -0,0 +1,31 @@
+diff --git sc/source/ui/view/gridwin.cxx sc/source/ui/view/gridwin.cxx
+index 18c198e..c96dc5b 100644
+--- sc/source/ui/view/gridwin.cxx
++++ sc/source/ui/view/gridwin.cxx
+@@ -3604,7 +3604,7 @@ sal_Int8 ScGridWindow::AcceptDrop( const AcceptDropEvent& rEvt )
+ 	return nRet;
+ }
+ 
+-ULONG lcl_GetDropFormatId( const uno::Reference<datatransfer::XTransferable>& xTransfer )
++ULONG lcl_GetDropFormatId( const uno::Reference<datatransfer::XTransferable>& xTransfer, bool bPreferText = false )
+ {
+ 	TransferableDataHelper aDataHelper( xTransfer );
+ 
+@@ -3673,6 +3673,8 @@ ULONG lcl_GetDropFormatId( const uno::Reference<datatransfer::XTransferable>& xT
+ 		nFormatId = SOT_FORMATSTR_ID_SYLK;
+ 	else if ( aDataHelper.HasFormat( SOT_FORMATSTR_ID_LINK ) )
+ 		nFormatId = SOT_FORMATSTR_ID_LINK;
++	else if ( bPreferText && aDataHelper.HasFormat( SOT_FORMAT_STRING ) ) // #i86734# the behaviour introduced in #i62773# is wrong when pasting
++		nFormatId = SOT_FORMAT_STRING;
+     else if ( aDataHelper.HasFormat( SOT_FORMAT_FILE_LIST ) )
+         nFormatId = SOT_FORMAT_FILE_LIST;
+     else if ( aDataHelper.HasFormat( SOT_FORMAT_FILE ) )    // #i62773# FILE_LIST/FILE before STRING (Unix file managers)
+@@ -4200,7 +4202,7 @@ void ScGridWindow::PasteSelection( const Point& rPosPixel )
+ 		uno::Reference<datatransfer::XTransferable> xTransferable = aDataHelper.GetTransferable();
+ 		if ( xTransferable.is() )
+ 		{
+-			ULONG nFormatId = lcl_GetDropFormatId( xTransferable );
++			ULONG nFormatId = lcl_GetDropFormatId( xTransferable, true );
+ 			if ( nFormatId )
+ 			{
+ 				bPasteIsDrop = TRUE;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]