ooo-build r11715 - in trunk: . patches/src680 patches/vba scratch/sc-vba/testvba/TestDocuments



Author: pflin
Date: Wed Feb 27 09:07:26 2008
New Revision: 11715
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11715&view=rev

Log:
	* patches/vba/vba-stringtodouble.diff: fix for n#359943
	(not applied currently, need review by Noel)
	* scratch/sc-vba/testvba/TestDocuments/stringtodouble.xls:  
	test document for n#359943
	* patches/src680/apply.



Added:
   trunk/scratch/sc-vba/testvba/TestDocuments/stringtodouble.xls   (contents, props changed)
Modified:
   trunk/ChangeLog
   trunk/patches/src680/apply
   trunk/patches/vba/vba-stringtodouble.diff

Modified: trunk/patches/src680/apply
==============================================================================
--- trunk/patches/src680/apply	(original)
+++ trunk/patches/src680/apply	Wed Feb 27 09:07:26 2008
@@ -1518,7 +1518,6 @@
 SectionOwner => noelpwer
 # start LCL hacks
 vba-stringtodouble.diff, n#359943, noelpwer
-vba-stringtodouble.diff, n#359943, noelpwer
 # incomplete solution ( works for import of ocx radio buttons only )
 radiobutton-group-hack.diff, n#359937, jonp
 # end LCL hacks

Modified: trunk/patches/vba/vba-stringtodouble.diff
==============================================================================
--- trunk/patches/vba/vba-stringtodouble.diff	(original)
+++ trunk/patches/vba/vba-stringtodouble.diff	Wed Feb 27 09:07:26 2008
@@ -1,6 +1,6 @@
-diff -rup /data4/scratch/ooh680-m3/basic/source/sbx/sbxdbl.cxx basic/source/sbx/sbxdbl.cxx
---- /data4/scratch/ooh680-m3/basic/source/sbx/sbxdbl.cxx	2007-11-13 15:22:39.000000000 +0000
-+++ basic/source/sbx/sbxdbl.cxx	2008-02-04 11:50:31.000000000 +0000
+diff -ruNp basic/source/sbx/sbxdbl.cxx basic/source/sbx/sbxdbl.cxx
+--- basic/source/sbx/sbxdbl.cxx	2007-11-13 23:22:39.000000000 +0800
++++ basic/source/sbx/sbxdbl.cxx	2008-02-27 15:30:35.000000000 +0800
 @@ -41,6 +41,7 @@
  #endif
  #include <basic/sbx.hxx>
@@ -9,7 +9,17 @@
  
  double ImpGetDouble( const SbxValues* p )
  {
-@@ -93,7 +93,11 @@ double ImpGetDouble( const SbxValues* p 
+@@ -87,13 +88,21 @@ double ImpGetDouble( const SbxValues* p 
+ 		case SbxSTRING:
+ 		case SbxLPSTR:
+ 			if( !p->pString )
++			{	
+ 				nRes = 0;
++				if ( SbiRuntime::isVBAEnabled() )// VBA only behaviour
++					SbxBase::SetError( SbxERR_CONVERSION );
++			}		
+ 			else
+ 			{
  				double d;
  				SbxDataType t;
  				if( ImpScan( *p->pString, d, t, NULL ) != SbxERR_OK )
@@ -21,18 +31,18 @@
  				else
  					nRes = d;
  			}
-diff -rup /data4/scratch/ooh680-m3/basic/source/sbx/sbxscan.cxx basic/source/sbx/sbxscan.cxx
---- /data4/scratch/ooh680-m3/basic/source/sbx/sbxscan.cxx	2007-11-13 15:23:45.000000000 +0000
-+++ basic/source/sbx/sbxscan.cxx	2008-02-04 11:46:28.000000000 +0000
+diff -ruNp basic/source/sbx/sbxscan.cxx basic/source/sbx/sbxscan.cxx
+--- basic/source/sbx/sbxscan.cxx	2008-01-18 20:59:08.000000000 +0800
++++ basic/source/sbx/sbxscan.cxx	2008-02-26 11:40:57.000000000 +0800
 @@ -61,6 +61,7 @@
  #include <svtools/svtools.hrc>
  
  #include "basrid.hxx"
 +#include "runtime.hxx"
  
- void ImpGetIntntlSep( sal_Unicode& rcDecimalSep, sal_Unicode& rcThousandSep )
- {
-@@ -235,6 +235,11 @@ SbxError ImpScan( const XubString& rWSrc
+ #include <svtools/zforlist.hxx>
+ #include <comphelper/processfactory.hxx>
+@@ -239,6 +240,11 @@ SbxError ImpScan( const XubString& rWSrc
  		if( l >= SbxMININT && l <= SbxMAXINT )
  			eScanType = SbxINTEGER;
  	}
@@ -44,3 +54,25 @@
  	if( pLen )
  		*pLen = (USHORT) ( p - pStart );
  	if( !bRes )
+diff -ruNp basic/source/sbx/sbxvalue.cxx basic/source/sbx/sbxvalue.cxx
+--- basic/source/sbx/sbxvalue.cxx	2008-02-20 10:15:01.000000000 +0800
++++ source/sbx/sbxvalue.cxx	2008-02-27 16:01:24.000000000 +0800
+@@ -1175,7 +1175,17 @@ BOOL SbxValue::Compute( SbxOperator eOp,
+ 		bool bDecimal = false;
+ 		if( eThisType == SbxSTRING || eOp == SbxCAT || ( bVBAInterop && ( eOpType == SbxSTRING ) && (  eOp == SbxPLUS ) ) )
+ 		{
+-			if( eOp == SbxCAT || eOp == SbxPLUS )
++			if( bVBAInterop && eOp == SbxPLUS && ( eThisType != SbxSTRING || eOpType != SbxSTRING ) )
++			{
++				// if string + (not string), I supposed that the result is treated as double? 
++				aL.eType = aR.eType = SbxDOUBLE;
++				rOp.Get( aR ); 
++				if( rOp.GetType() == SbxEMPTY )
++					goto Lbl_OpIsEmpty;
++				Get( aL );
++				aL.nDouble += aR.nDouble;
++			}
++			else if( eOp == SbxCAT || eOp == SbxPLUS )
+ 			{
+ 				// AB 5.11.1999, OUString beruecksichtigen
+ 				aL.eType = aR.eType = SbxSTRING;

Added: trunk/scratch/sc-vba/testvba/TestDocuments/stringtodouble.xls
==============================================================================
Binary file. No diff available.



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