diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2005-09-29 17:40:22 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2005-09-29 17:40:22 +0000 |
commit | 056ac9c66dd16728d185060369d26bb81ae3ab71 (patch) | |
tree | 9fc5f1e2d302b05542db6a21e6253cb347812abb /basic | |
parent | 970312b249ff579c241597672dd9d7af7b2a13b2 (diff) |
INTEGRATION: CWS ab17fixes (1.3.18); FILE MERGED
2005/09/29 18:28:52 hr 1.3.18.2: #i10000: manual resync; repair broken CWS
2005/08/16 10:13:49 ab 1.3.18.1: 125046# Support On Error Goto -1
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/comp/loops.cxx | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/basic/source/comp/loops.cxx b/basic/source/comp/loops.cxx index 0bb774c13c32..5e2dc5ed80ac 100644 --- a/basic/source/comp/loops.cxx +++ b/basic/source/comp/loops.cxx @@ -4,9 +4,9 @@ * * $RCSfile: loops.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: hr $ $Date: 2005-09-29 16:35:53 $ + * last change: $Author: hr $ $Date: 2005-09-29 18:40:22 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -486,6 +486,7 @@ void SbiParser::On() { // ON ERROR GOTO label|0 Next(); + bool bError = false; if( MayBeLabel() ) { if( eCurTok == NUMBER && !nVal ) @@ -496,7 +497,16 @@ void SbiParser::On() aGen.Gen( _ERRHDL, nOff ); } } - else Error( SbERR_LABEL_EXPECTED ); + else if( eCurTok == MINUS ) + { + Next(); + if( eCurTok == NUMBER && nVal == 1 ) + aGen.Gen( _STDERROR ); + else + bError = true; + } + if( bError ) + Error( SbERR_LABEL_EXPECTED ); } else if( eCurTok == RESUME ) { |