diff options
author | Noel Power <noel.power@novell.com> | 2010-10-13 10:51:50 +0100 |
---|---|---|
committer | Noel Power <noel.power@novell.com> | 2010-10-13 10:51:50 +0100 |
commit | 6db6a43ddc5a66f41f109b7995fd83adb5d35411 (patch) | |
tree | be01c36438a39fdebd43608355671d2e6d120108 /basic/source/comp/exprtree.cxx | |
parent | 20658054d8bd6380b4b175b552ccc1480c49d01c (diff) | |
parent | d1a9ad8f4dc25817cea279262286cdfb421fe891 (diff) |
Merge branch 'vba' fix conflics, trailing ws & tab issues
also removed some old headers ( which I need to add new ones for )
Conflicts:
basic/source/classes/sbunoobj.cxx
basic/source/classes/sbxmod.cxx
xmloff/inc/xmlnmspe.hxx
xmloff/inc/xmloff/xmltoken.hxx
xmlscript/inc/xmlscript/xmldlg_imexp.hxx
Diffstat (limited to 'basic/source/comp/exprtree.cxx')
-rw-r--r-- | basic/source/comp/exprtree.cxx | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/basic/source/comp/exprtree.cxx b/basic/source/comp/exprtree.cxx index 7a4ea5965558..04d8236d7669 100644 --- a/basic/source/comp/exprtree.cxx +++ b/basic/source/comp/exprtree.cxx @@ -373,8 +373,12 @@ SbiExprNode* SbiExpression::Term( const KeywordSymbolInfo* pKeywordSymbolInfo ) // Typ SbxOBJECT sein if( pDef->GetType() != SbxOBJECT && pDef->GetType() != SbxVARIANT ) { - pParser->Error( SbERR_BAD_DECLARATION, aSym ); - bError = TRUE; + // defer error until runtime if in vba mode + if ( !pParser->IsVBASupportOn() ) + { + pParser->Error( SbERR_BAD_DECLARATION, aSym ); + bError = TRUE; + } } if( !bError ) pNd->aVar.pNext = ObjTerm( *pDef ); @@ -580,7 +584,11 @@ SbiExprNode* SbiExpression::Unary() eTok = NEG; case NOT: pParser->Next(); - pNd = new SbiExprNode( pParser, Unary(), eTok, NULL ); + // process something like "Do While Not "foo"="" " + if( pParser->IsVBASupportOn() ) + pNd = new SbiExprNode( pParser, Like(), eTok, NULL ); + else + pNd = new SbiExprNode( pParser, Unary(), eTok, NULL ); break; case PLUS: pParser->Next(); @@ -736,7 +744,7 @@ SbiExprNode* SbiExpression::Like() pNd = new SbiExprNode( pParser, pNd, eTok, Comp() ), nCount++; } // Mehrere Operatoren hintereinander gehen nicht - if( nCount > 1 ) + if( nCount > 1 && !pParser->IsVBASupportOn() ) { pParser->Error( SbERR_SYNTAX ); bError = TRUE; |