diff options
author | Rüdiger Timm <rt@openoffice.org> | 2005-01-28 15:07:49 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2005-01-28 15:07:49 +0000 |
commit | dc0893e2372563902ee5a71752061273c83e6c83 (patch) | |
tree | 2d9d691226acde6c45cbc5e36bf9316cc40a87ad /basic | |
parent | bcd1814189b82981035f74a94a2cccc6be11aaed (diff) |
INTEGRATION: CWS ab13fixes (1.19.14); FILE MERGED
2005/01/17 14:07:45 ab 1.19.14.1: #118116# Extended SbiForStack for 'for each' command
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/inc/runtime.hxx | 47 |
1 files changed, 40 insertions, 7 deletions
diff --git a/basic/source/inc/runtime.hxx b/basic/source/inc/runtime.hxx index 5eb424c5cf01..881c4bc9161d 100644 --- a/basic/source/inc/runtime.hxx +++ b/basic/source/inc/runtime.hxx @@ -2,9 +2,9 @@ * * $RCSfile: runtime.hxx,v $ * - * $Revision: 1.19 $ + * $Revision: 1.20 $ * - * last change: $Author: rt $ $Date: 2004-11-15 16:35:59 $ + * last change: $Author: rt $ $Date: 2005-01-28 16:07:49 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -89,10 +89,14 @@ #ifndef _COM_SUN_STAR_LANG_XCOMPONENT_HPP_ #include <com/sun/star/lang/XComponent.hpp> #endif +#ifndef _COM_SUN_STAR_CONTAINER_XENUMERATION_HPP_ +#include <com/sun/star/container/XEnumeration.hpp> +#endif using namespace rtl; using namespace com::sun::star::uno; using namespace com::sun::star::lang; +using namespace com::sun::star::container; // Define activates old file implementation @@ -134,11 +138,39 @@ class SbiDdeControl; // DDE-Steuerung class SbiDllMgr; // Aufrufe in DLLs class SvNumberFormatter; // Zeit/Datumsfunktionen +enum ForType +{ + FOR_TO, + FOR_EACH_ARRAY, + FOR_EACH_COLLECTION, + FOR_EACH_XENUMERATION +}; + struct SbiForStack { // for/next stack: - SbiForStack* pNext; // Chain - SbxVariableRef refVar; // loop variable - SbxVariableRef refEnd; // end expression - SbxVariableRef refInc; // increment expression + SbiForStack* pNext; // Chain + SbxVariableRef refVar; // loop variable + SbxVariableRef refEnd; // end expression / for each: Array/BasicCollection object + SbxVariableRef refInc; // increment expression + + // For each support + ForType eForType; + INT32 nCurCollectionIndex; + INT32* pArrayCurIndices; + INT32* pArrayLowerBounds; + INT32* pArrayUpperBounds; + Reference< XEnumeration > xEnumeration; + + SbiForStack( void ) + : pArrayCurIndices( NULL ) + , pArrayLowerBounds( NULL ) + , pArrayUpperBounds( NULL ) + {} + ~SbiForStack() + { + delete[] pArrayCurIndices; + delete[] pArrayLowerBounds; + delete[] pArrayUpperBounds; + } }; struct SbiGosubStack { // GOSUB-Stack: @@ -411,6 +443,7 @@ class SbiRuntime void ClearArgvStack(); // Argv-Stack freigeben void PushFor(); // For-Element push + void PushForEach(); // For-Each-Element push void PopFor(); // For-Element pop void ClearForStack(); // For-Stack freigeben @@ -438,7 +471,7 @@ class SbiRuntime void StepARGV(), StepINPUT(), StepLINPUT(), StepSTOP(); void StepGET(), StepSET(), StepPUT(), StepPUTC(); void StepDIM(), StepREDIM(), StepREDIMP(), StepERASE(); - void StepINITFOR(), StepNEXT(), StepERROR(); + void StepINITFOR(), StepNEXT(), StepERROR(), StepINITFOREACH(); void StepCASE(), StepENDCASE(), StepSTDERROR(); void StepNOERROR(), StepCHANNEL(), StepCHANNEL0(), StepPRINT(); void StepPRINTF(), StepWRITE(), StepRENAME(), StepPROMPT(); |