ooo-build r13448 - in trunk: . patches/test scratch/sc-vba/testvba/TestDocuments
- From: pflin svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r13448 - in trunk: . patches/test scratch/sc-vba/testvba/TestDocuments
- Date: Thu, 31 Jul 2008 06:58:44 +0000 (UTC)
Author: pflin
Date: Thu Jul 31 06:58:43 2008
New Revision: 13448
URL: http://svn.gnome.org/viewvc/ooo-build?rev=13448&view=rev
Log:
2008-07-31 Fong Lin <pflin novell com>
* patches/test/vba-keyword-fix.diff: updated for support
"Sub Test( Name as String ).
* scratch/sc-vba/testvba/TestDocuments/keyword.xls: a simple test doc.
Added:
trunk/scratch/sc-vba/testvba/TestDocuments/keyword.xls (contents, props changed)
Modified:
trunk/ChangeLog
trunk/patches/test/vba-keyword-fix.diff
Modified: trunk/patches/test/vba-keyword-fix.diff
==============================================================================
--- trunk/patches/test/vba-keyword-fix.diff (original)
+++ trunk/patches/test/vba-keyword-fix.diff Thu Jul 31 06:58:43 2008
@@ -1,5 +1,5 @@
---- basic/source/inc/token.hxx.orig 2008-07-25 14:36:01.000000000 +0800
-+++ basic/source/inc/token.hxx 2008-07-25 15:38:51.000000000 +0800
+--- basic/source/inc/token.hxx.orig 2008-07-30 11:33:31.000000000 +0800
++++ basic/source/inc/token.hxx 2008-07-30 16:54:58.000000000 +0800
@@ -162,6 +162,10 @@ public:
{ return BOOL( t >= FIRSTKWD && t <= LASTKWD ); }
static BOOL IsExtra( SbiToken t )
@@ -11,8 +11,8 @@
};
---- basic/source/inc/parser.hxx.orig 2008-07-25 15:00:25.000000000 +0800
-+++ basic/source/inc/parser.hxx 2008-07-28 14:28:36.000000000 +0800
+--- basic/source/inc/parser.hxx.orig 2008-07-30 11:33:31.000000000 +0800
++++ basic/source/inc/parser.hxx 2008-07-30 16:54:58.000000000 +0800
@@ -40,6 +40,7 @@
typedef ::std::vector< String > IfaceVector;
@@ -37,8 +37,8 @@
void Symbol(); // Let oder Call
void ErrorStmnt(); // ERROR n
---- basic/source/comp/token.cxx.orig 2008-07-25 15:35:11.000000000 +0800
-+++ basic/source/comp/token.cxx 2008-07-28 15:11:31.000000000 +0800
+--- basic/source/comp/token.cxx.orig 2008-07-30 11:33:31.000000000 +0800
++++ basic/source/comp/token.cxx 2008-07-30 18:08:00.000000000 +0800
@@ -538,6 +538,12 @@ SbiToken SbiTokenizer::Next()
return eCurTok = SYMBOL;
}
@@ -52,8 +52,21 @@
// LINE INPUT
if( tp->t == LINE )
{
---- basic/source/comp/parser.cxx.orig 2008-07-25 15:03:41.000000000 +0800
-+++ basic/source/comp/parser.cxx 2008-07-28 15:23:32.000000000 +0800
+--- basic/source/comp/dim.cxx.orig 2008-07-31 14:54:31.000000000 +0800
++++ basic/source/comp/dim.cxx 2008-07-31 11:30:36.000000000 +0800
+@@ -40,7 +40,9 @@
+
+ SbiSymDef* SbiParser::VarDecl( SbiDimList** ppDim, BOOL bStatic, BOOL bConst )
+ {
+- if( !TestSymbol() ) return NULL;
++ BOOL bKwdOk = FALSE;
++ if( Peek() == NAME ) bKwdOk = TRUE;
++ if( !TestSymbol( bKwdOk ) ) return NULL;
+ SbxDataType t = eScanType;
+ SbiSymDef* pDef = bConst ? new SbiConstDef( aSym ) : new SbiSymDef( aSym );
+ SbiDimList* pDim = NULL;
+--- basic/source/comp/parser.cxx.orig 2008-07-30 11:33:33.000000000 +0800
++++ basic/source/comp/parser.cxx 2008-07-30 18:05:49.000000000 +0800
@@ -138,6 +138,7 @@ SbiParser::SbiParser( StarBASIC* pb, SbM
pProc = NULL;
pStack = NULL;
@@ -62,7 +75,7 @@
nBase = 0;
bText =
bGblDefs =
-@@ -308,6 +309,24 @@ void SbiParser::TestEoln()
+@@ -308,6 +309,26 @@ void SbiParser::TestEoln()
}
}
@@ -71,23 +84,25 @@
+BOOL SbiParser::IsSymbol( SbiToken t )
+{
+ // FIXME: if "name" is a argument in a subroutine like "Sub Test( name as String )".
-+ if( t == NAME && pCurStat &&
-+ ( pCurStat->eTok == DIM || pCurStat->eTok == PUBLIC ||
-+ pCurStat->eTok == PRIVATE || pCurStat->eTok == GLOBAL ) )
++ if( t == NAME )
+ {
-+ return TRUE;
-+ }
-+ if( t == NAME && pPool->Find(aSym) )
-+ {
-+ return TRUE;
-+ }
++ if( pCurStat && ( pCurStat->eTok == DIM || pCurStat->eTok == PUBLIC ||
++ pCurStat->eTok == PRIVATE || pCurStat->eTok == GLOBAL ))
++ {
++ return TRUE;
++ }
++ if( pPool->Find(aSym) )
++ {
++ return TRUE;
++ }
++ }
+ return FALSE;
+}
+
// Parsing eines Statement-Blocks
// Das Parsing laeuft bis zum Ende-Token.
-@@ -431,7 +450,9 @@ BOOL SbiParser::Parse()
+@@ -431,7 +452,9 @@ BOOL SbiParser::Parse()
if( ( p->bSubr && (eCurTok != STATIC || Peek() == SUB || Peek() == FUNCTION ) ) ||
eCurTok == SUB || eCurTok == FUNCTION )
aGen.Statement();
Added: trunk/scratch/sc-vba/testvba/TestDocuments/keyword.xls
==============================================================================
Binary file. No diff available.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]