ooo-build r11244 - in trunk: . patches/vba



Author: jiaojh
Date: Fri Jan 11 09:06:48 2008
New Revision: 11244
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11244&view=rev

Log:
    * patches/vba/vba-basic-null.diff: make NULL behavior same
      as MSO when VBA enabled.
    * scratch/sc-vba/testvba/TestDocuments/NULL.xls:
      Add the test doc for NULL test.



Added:
   trunk/patches/vba/vba-basic-null.diff
Modified:
   trunk/ChangeLog

Added: trunk/patches/vba/vba-basic-null.diff
==============================================================================
--- (empty file)
+++ trunk/patches/vba/vba-basic-null.diff	Fri Jan 11 09:06:48 2008
@@ -0,0 +1,26 @@
+--- basic/source/sbx/sbxvalue.cxx.bak	2008-01-11 16:53:57.000000000 +0800
++++ basic/source/sbx/sbxvalue.cxx	2008-01-11 16:55:55.000000000 +0800
+@@ -1484,8 +1484,10 @@ BOOL SbxValue::Compare( SbxOperator eOp,
+ 		ResetError();
+ 	if( !CanRead() || !rOp.CanRead() )
+ 		SetError( SbxERR_PROP_WRITEONLY );
+-	else if( GetType() == SbxNULL && rOp.GetType() == SbxNULL )
++	else if( GetType() == SbxNULL && rOp.GetType() == SbxNULL && !bVBAInterop )
++    {
+ 		bRes = TRUE;
++    }
+ 	else if( GetType() == SbxEMPTY && rOp.GetType() == SbxEMPTY )
+ 		bRes = TRUE;
+ 	// Sonderregel 1: Ist ein Operand Null, ist das Ergebnis FALSE
+--- basic/source/runtime/methods.cxx.bak	2008-01-11 16:34:58.000000000 +0800
++++ basic/source/runtime/methods.cxx	2008-01-11 16:35:02.000000000 +0800
+@@ -2388,7 +2388,8 @@ RTLFUNC(IsNull)
+ 		// wenn der pObj-Wert NULL ist
+ 		SbxVariableRef pArg = rPar.Get( 1 );
+ 		BOOL bNull = rPar.Get(1)->IsNull();
+-		if( !bNull && pArg->GetType() == SbxOBJECT )
++        BOOL bVBAInterp = SbiRuntime::isVBAEnabled();
++		if( !bNull && pArg->GetType() == SbxOBJECT && !bVBAInterp )
+ 		{
+ 			SbxBase* pObj = pArg->GetObject();
+ 			if( !pObj )



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