diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2005-09-29 11:47:35 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2005-09-29 11:47:35 +0000 |
commit | f5e21342b5f420aee98d3a620911dea68a4e6b22 (patch) | |
tree | 9f9b060d92e73b6d5b765b904f6118acd7239a07 /basic/source/comp/loops.cxx | |
parent | ae67984ac11b13d02d2d735610856eff6ee1a0ce (diff) |
INTEGRATION: CWS ab17fixes (1.3.18); FILE MERGED
2005/08/16 10:13:49 ab 1.3.18.1: 125046# Support On Error Goto -1
Diffstat (limited to 'basic/source/comp/loops.cxx')
-rw-r--r-- | basic/source/comp/loops.cxx | 80 |
1 files changed, 58 insertions, 22 deletions
diff --git a/basic/source/comp/loops.cxx b/basic/source/comp/loops.cxx index 49561cca7429..ff49918b2b5e 100644 --- a/basic/source/comp/loops.cxx +++ b/basic/source/comp/loops.cxx @@ -1,35 +1,61 @@ /************************************************************************* * - * OpenOffice.org - a multi-platform office productivity suite - * * $RCSfile: loops.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ + * + * last change: $Author: hr $ $Date: 2005-09-29 12:47:35 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * last change: $Author: rt $ $Date: 2005-09-07 21:29:26 $ + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA * - * The Contents of this file are made available subject to - * the terms of GNU Lesser General Public License Version 2.1. * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. * - * GNU Lesser General Public License Version 2.1 - * ============================================= - * Copyright 2005 by Sun Microsystems, Inc. - * 901 San Antonio Road, Palo Alto, CA 94303, USA + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License version 2.1, as published by the Free Software Foundation. + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA * ************************************************************************/ @@ -486,6 +512,7 @@ void SbiParser::On() { // ON ERROR GOTO label|0 Next(); + bool bError = false; if( MayBeLabel() ) { if( eCurTok == NUMBER && !nVal ) @@ -496,7 +523,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 ) { |