LCOV - code coverage report
Current view: top level - sc/source/filter/lotus - lotform.cxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 73 374 19.5 %
Date: 2014-04-11 Functions: 6 15 40.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #include "decl.h"
      21             : #include "lotform.hxx"
      22             : #include "compiler.hxx"
      23             : #include "lotrange.hxx"
      24             : #include "namebuff.hxx"
      25             : #include "root.hxx"
      26             : #include "ftools.hxx"
      27             : #include "tool.h"
      28             : 
      29             : #include <math.h>
      30             : #include <comphelper/string.hxx>
      31             : 
      32             : extern WKTYP                eTyp;
      33             : 
      34             : static const sal_Char*      GetAddInName( const sal_uInt8 nIndex );
      35             : 
      36             : static DefTokenId           lcl_KnownAddIn(const OString& rTest);
      37             : 
      38           0 : void LotusToSc::DoFunc( DefTokenId eOc, sal_uInt8 nAnz, const sal_Char* pExtString )
      39             : {
      40           0 :     TokenId                     eParam[ 256 ];
      41             :     sal_Int32                       nLauf;
      42           0 :     TokenId                     nMerk0, nMerk1;
      43             : 
      44           0 :     sal_Bool                        bAddIn = false;
      45             : 
      46             :     OSL_ENSURE( nAnz < 128, "-LotusToSc::DoFunc(): Neee! -so viel kann ich nicht!" );
      47             : 
      48           0 :     if( eOc == ocNoName )
      49             :     {
      50           0 :         OString t;
      51           0 :         if( pExtString )
      52             :         {
      53           0 :             const OString s("@<<@123>>");
      54             : 
      55           0 :             t = pExtString;
      56             : 
      57           0 :             sal_Int32 n = t.indexOf(s);
      58           0 :             if( n != -1 )
      59           0 :                 t = t.copy(n + s.getLength());
      60             : 
      61           0 :             t = comphelper::string::stripEnd(t, '(');
      62             : 
      63           0 :             eOc = lcl_KnownAddIn( t );
      64             : 
      65           0 :             if( eOc == ocNoName )
      66           0 :                 t = OString("L123_") + t;
      67             :         }
      68             :         else
      69           0 :             t = "#UNKNOWN FUNC NAME#";
      70             : 
      71           0 :         if( eOc == ocNoName )
      72             :         {
      73           0 :             bAddIn = sal_True;
      74           0 :             nMerk0 = aPool.Store(eOc, OStringToOUString(t, eSrcChar));
      75             : 
      76           0 :             aPool << nMerk0;
      77           0 :         }
      78             :     }
      79             : 
      80           0 :     for( nLauf = 0 ; nLauf < nAnz ; nLauf++ )
      81           0 :         aStack >> eParam[ nLauf ];
      82             : 
      83             :     // special cases...
      84           0 :     switch( eOc )
      85             :     {
      86             :         case ocIndex:
      87             :             OSL_ENSURE( nAnz > 2, "+LotusToSc::DoFunc(): ocIndex braucht mind. 2 Parameter!" );
      88           0 :             nMerk0 = eParam[ 0 ];
      89           0 :             eParam[ 0 ] = eParam[ 1 ];
      90           0 :             eParam[ 1 ] = nMerk0;
      91           0 :             IncToken( eParam[ 0 ] );
      92           0 :             IncToken( eParam[ 1 ] );
      93           0 :             break;
      94             :         case ocIRR:
      95             :         {
      96             :             OSL_ENSURE( nAnz == 2, "+LotusToSc::DoFunc(): ocIRR hat nur 2 Parameter!" );
      97           0 :             nMerk0 = eParam[ 0 ];
      98           0 :             eParam[ 0 ] = eParam[ 1 ];
      99           0 :             eParam[ 1 ] = nMerk0;
     100             :         }
     101           0 :             break;
     102             :         case ocGetYear:
     103             :         {
     104           0 :             nMerk0 = aPool.Store( 1900.0 );
     105           0 :             aPool << ocOpen;
     106             :         }
     107           0 :             break;
     108             :         case ocChose:
     109             :         {// 1. Parameter ++
     110           0 :             if (nAnz >= 1)
     111           0 :                 IncToken( eParam[ nAnz - 1 ] );
     112             :         }
     113           0 :             break;
     114             :         case ocFind:
     115             :         case ocHLookup:
     116             :         case ocVLookup:
     117             :         {// last parameter ++
     118           0 :             IncToken( eParam[ 0 ] );
     119             :         }
     120           0 :             break;
     121             :         case ocMid:
     122             :         case ocReplace:
     123             :         {// 2. Parameter ++
     124           0 :             if (nAnz >= 2)
     125           0 :                 IncToken( eParam[ nAnz - 2 ] );
     126             :         }
     127           0 :             break;
     128             :         case ocZins:
     129             :         {
     130             :             // new quantity = 4!
     131             :             OSL_ENSURE( nAnz == 3,
     132             :                 "*LotusToSc::DoFunc(): ZINS() hat 3 Parameter!" );
     133           0 :             nAnz = 4;
     134           0 :             eParam[ 3 ] = eParam[ 0 ];  // 3. -> 1.
     135           0 :             eParam[ 0 ] = eParam[ 2 ];  // 1. -> 4.
     136           0 :             NegToken( eParam[ 1 ] );    // 2. -> -2. (+ 2. -> 3.)
     137           0 :             eParam[ 2 ] = n0Token;      //    -> 2. as Default
     138             :         }
     139           0 :             break;
     140             :         default:;
     141             :     }
     142             : 
     143           0 :     if( !bAddIn )
     144           0 :         aPool << eOc;
     145             : 
     146           0 :     aPool << ocOpen;
     147             : 
     148           0 :     if( nAnz > 0 )
     149             :     {
     150             :             // ATTENTION: 0 is the last parameter, nAnz-1 the first one
     151             : 
     152           0 :         sal_Int16 nLast = nAnz - 1;
     153             : 
     154           0 :         if( eOc == ocRMZ )
     155             :         {   // Extrawurst ocRMZ letzter Parameter negiert!
     156             :             // zusaetzlich: 1. -> 3., 3. -> 2., 2. -> 1.
     157             :             OSL_ENSURE( nAnz == 3,
     158             :                 "+LotusToSc::DoFunc(): ocRMZ hat genau 3 Parameter!" );
     159           0 :             aPool << eParam[ 1 ] << ocSep << eParam[ 0 ] << ocSep
     160           0 :                 << ocNegSub << eParam[ 2 ];
     161             :         }
     162             :         else
     163             :         {   // Normalfall
     164             :             // [Parameter{;Parameter}]
     165           0 :             aPool << eParam[ nLast ];
     166             : 
     167           0 :             sal_Int16 nNull = -1;   // gibt einen auszulassenden Parameter an
     168           0 :             for( nLauf = nLast - 1 ; nLauf >= 0 ; nLauf-- )
     169             :             {
     170           0 :                 if( nLauf != nNull )
     171           0 :                     aPool << ocSep << eParam[ nLauf ];
     172             :             }
     173             :         }
     174             :     }
     175             : 
     176             : 
     177             :     // Spezialfaelle...
     178           0 :     if( eOc == ocGetYear )
     179             :     {
     180           0 :         aPool << ocClose << ocSub << nMerk0;
     181             :     }
     182           0 :     else if( eOc == ocFixed )
     183             :     {
     184           0 :         aPool << ocSep << ocTrue << ocOpen << ocClose;
     185             :     }
     186           0 :     else if( eOc == ocFind )
     187             :     {
     188           0 :         nMerk1 = aPool.Store();
     189           0 :         DecToken( nMerk1 );
     190           0 :         aPool << nMerk1;
     191             :     }
     192             : 
     193           0 :     aPool << ocClose;
     194             : 
     195           0 :     aPool >> aStack;
     196           0 : }
     197             : 
     198           0 : void LotusToSc::LotusRelToScRel( sal_uInt16 nCol, sal_uInt16 nRow, ScSingleRefData& rSRD )
     199             : {
     200             :     // Col-Bemachung
     201           0 :     if( nCol & 0x8000 )
     202             :     {
     203           0 :         if( nCol & 0x0080 )
     204           0 :             nCol |= 0xFF00;
     205             :         else
     206           0 :             nCol &= 0x00FF;
     207             :         // #i36252# first cast unsigned 16-bit to signed 16-bit, and then to SCCOL
     208           0 :         rSRD.SetRelCol(static_cast<SCCOL>(static_cast<sal_Int16>(nCol)));
     209             :     }
     210             :     else
     211             :     {
     212           0 :         rSRD.SetAbsCol(static_cast<SCCOL>(nCol & 0x00FF));
     213             :     }
     214             : 
     215             :     // Row-Bemachung
     216           0 :     if( nRow & 0x8000 )
     217             :     {
     218           0 :         rSRD.SetRowRel(true);
     219             :         // vorzeichenrichtige Erweiterung
     220           0 :         switch( eTyp )
     221             :         {
     222             :             // 5432 1098 7654 3210
     223             :             // 8421 8421 8421 8421
     224             :             //       xxx xxxx xxxx
     225             :             case eWK_1:
     226           0 :                 if( nRow & 0x0400 )
     227           0 :                     nRow |= 0xF800;
     228             :                 else
     229           0 :                     nRow &= 0x07FF;
     230           0 :                 break;
     231             :             // 8421 8421 8421 8421
     232             :             //    x xxxx xxxx xxxx
     233             :             case eWK_2:
     234           0 :                 if( nRow & 0x1000 )
     235           0 :                     nRow |= 0xE000;
     236             :                 else
     237           0 :                     nRow &= 0x1FFF;
     238           0 :                 break;
     239             :             default:
     240             :                 OSL_FAIL( "*LotusToSc::LotusRelToScRel(): etwas vergessen...?" );
     241             :         }
     242             :     }
     243             :     else
     244             :     {
     245           0 :         rSRD.SetRowRel(false);
     246           0 :         switch( eTyp )
     247             :         {
     248             :             // 5432 1098 7654 3210
     249             :             // 8421 8421 8421 8421
     250             :             //       xxx xxxx xxxx
     251             :             case eWK_1:
     252           0 :                 nRow &= 0x07FF;
     253           0 :                 break;
     254             :             // 8421 8421 8421 8421
     255             :             //   xx xxxx xxxx xxxx
     256             :             case eWK_2:
     257           0 :                 nRow &= 0x3FFF;
     258           0 :                 break;
     259             :             default:
     260             :                 OSL_FAIL( "*LotusToSc::LotusRelToScRel(): etwas vergessen...?" );
     261             :         }
     262             :     }
     263             : 
     264           0 :     if( rSRD.IsRowRel() )
     265             :         // #i36252# first cast unsigned 16-bit to signed 16-bit, and then to SCROW
     266           0 :         rSRD.SetRelRow(static_cast<SCROW>(static_cast<sal_Int16>(nRow)));
     267             :     else
     268           0 :         rSRD.SetAbsRow(static_cast<SCROW>(nRow));
     269           0 : }
     270             : 
     271             : 
     272           2 : void LotusToSc::ReadSRD( ScSingleRefData& rSRD, sal_uInt8 nRelBit )
     273             : {
     274             :     sal_uInt8           nTab, nCol;
     275             :     sal_uInt16          nRow;
     276             : 
     277           2 :     Read( nRow );
     278           2 :     Read( nTab );
     279           2 :     Read( nCol );
     280             : 
     281           2 :     bool b3D = (static_cast<SCTAB>(nTab) != aEingPos.Tab());
     282             : 
     283           2 :     rSRD.SetColRel( ( nRelBit & 0x01 ) != 0 );
     284           2 :     rSRD.SetRowRel( ( nRelBit & 0x02 ) != 0 );
     285           2 :     rSRD.SetTabRel( ( ( nRelBit & 0x04) != 0 ) || !b3D );
     286           2 :     rSRD.SetFlag3D( b3D );
     287             : 
     288           2 :     rSRD.SetAddress(ScAddress(nCol, nRow, nTab), aEingPos);
     289           2 : }
     290             : 
     291             : 
     292           0 : void LotusToSc::IncToken( TokenId &rParam )
     293             : {
     294           0 :     aPool << ocOpen << rParam << nAddToken;
     295           0 :     rParam = aPool.Store();
     296           0 : }
     297             : 
     298             : 
     299           0 : void LotusToSc::DecToken( TokenId &rParam )
     300             : {
     301           0 :     aPool << ocOpen << rParam << nSubToken;
     302           0 :     rParam = aPool.Store();
     303           0 : }
     304             : 
     305             : 
     306           0 : void LotusToSc::NegToken( TokenId &rParam )
     307             : {
     308           0 :     aPool << ocNegSub << ocOpen << rParam << ocClose;
     309           0 :     rParam = aPool.Store();
     310           0 : }
     311             : 
     312             : 
     313           4 : void LotusToSc::Reset( const ScAddress& rEingPos )
     314             : {
     315           4 :     LotusConverterBase::Reset( rEingPos );
     316             : 
     317           4 :     TokenId nEins = aPool.Store( 1.0 );
     318             : 
     319           4 :     aPool << ocClose << ocAdd << nEins;
     320           4 :     nAddToken = aPool.Store();
     321             : 
     322           4 :     aPool << ocClose << ocSub << nEins;
     323           4 :     nSubToken = aPool.Store();
     324             : 
     325           4 :     n0Token = aPool.Store( 0.0 );
     326           4 : }
     327             : 
     328             : 
     329           5 : LotusToSc::LotusToSc( SvStream &rStream, rtl_TextEncoding e, bool b ) :
     330           5 :     LotusConverterBase( rStream, 128 )
     331             : {
     332           5 :     eSrcChar = e;
     333           5 :     bWK3 = false;
     334           5 :     bWK123 = b;
     335           5 : }
     336             : 
     337             : 
     338             : typedef FUNC_TYPE ( FuncType1 ) ( sal_uInt8 );
     339             : typedef DefTokenId ( FuncType2 ) ( sal_uInt8 );
     340             : 
     341             : 
     342           4 : ConvErr LotusToSc::Convert( const ScTokenArray*& rpErg, sal_Int32& rRest,
     343             :     const FORMULA_TYPE /*eFT*/ )
     344             : {
     345             :     sal_uInt8               nOc;
     346             :     sal_uInt8               nAnz;
     347             :     sal_uInt8               nRelBits;
     348             :     sal_uInt16              nStrLen;
     349             :     sal_uInt16              nRngIndex;
     350           4 :     FUNC_TYPE           eType = FT_NOP;
     351           4 :     TokenId             nMerk0;
     352             :     DefTokenId          eOc;
     353           4 :     const sal_Char*     pExtName = 0;
     354           4 :     RangeNameBufferWK3& rRangeNameBufferWK3 = *pLotusRoot->pRngNmBffWK3;
     355             : 
     356             :     ScComplexRefData        aCRD;
     357           4 :     aCRD.InitFlags();
     358           4 :     ScSingleRefData&        rR = aCRD.Ref1;
     359             : 
     360             :     LR_ID               nId;
     361           4 :     TokenId             nNewId;
     362             : 
     363           4 :     LotusRangeList&     rRangeList = *pLotusRoot->pRangeNames;
     364             : 
     365             :     FuncType1*          pIndexToType;
     366             :     FuncType2*          pIndexToToken;
     367             : 
     368           4 :     if( bWK3 )
     369             :     {   // for > WK3
     370           0 :         pIndexToType = IndexToTypeWK123;
     371           0 :         pIndexToToken = IndexToTokenWK123;
     372             :     }
     373           4 :     else if( bWK123 )
     374             :     {
     375           4 :         pIndexToType = IndexToTypeWK123;
     376           4 :         pIndexToToken = IndexToTokenWK123;
     377             :     }
     378             :     else
     379             :     {
     380           0 :         pIndexToType = IndexToType;
     381           0 :         pIndexToToken = IndexToToken;
     382             : 
     383           0 :         rR.SetRelTab(0);
     384           0 :         rR.SetFlag3D( false );
     385             :     }
     386             : 
     387           4 :     aCRD.Ref2 = rR;
     388             : 
     389           4 :     nBytesLeft = rRest;
     390             : 
     391          24 :     while( eType )      // != FT_Return (==0)
     392             :     {
     393          16 :         Read( nOc );
     394             : 
     395          16 :         if( nBytesLeft < 0 )
     396             :         {
     397           0 :             rpErg = aPool[ aStack.Get() ];
     398           0 :             return ConvErrCount;
     399             :         }
     400             : 
     401          16 :         eType = ( pIndexToType )( nOc );
     402          16 :         eOc = ( pIndexToToken)( nOc );
     403          16 :         if( eOc == ocNoName )
     404           0 :             pExtName = GetAddInName( nOc );
     405             : 
     406          16 :         switch( eType )
     407             :         {
     408             :             case FT_Return:
     409           4 :                 if( bWK3 || bWK123 )
     410           4 :                     nBytesLeft = 0; // wird ab WK3 nicht benutzt
     411             : 
     412           4 :                 rRest = nBytesLeft;
     413           4 :                 break;
     414             :             case FT_NotImpl:
     415           0 :             case FT_FuncFix0:   DoFunc( eOc, 0, pExtName ); break;
     416           0 :             case FT_FuncFix1:   DoFunc( eOc, 1, pExtName ); break;
     417           0 :             case FT_FuncFix2:   DoFunc( eOc, 2, pExtName ); break;
     418           0 :             case FT_FuncFix3:   DoFunc( eOc, 3, pExtName ); break;
     419           0 :             case FT_FuncFix4:   DoFunc( eOc, 4, pExtName ); break;
     420             :                 case FT_FuncVar:
     421           0 :                 Read( nAnz );
     422           0 :                 DoFunc( eOc, nAnz, pExtName );
     423           0 :                 break;
     424             :             case FT_Neg:
     425           0 :                 aPool << ocOpen << ocNegSub << aStack << ocClose;
     426           0 :                 aPool >> aStack;
     427           0 :                 break;
     428             :             case FT_Op:
     429           4 :                 aStack >> nMerk0;
     430           4 :                 aPool << aStack << eOc << nMerk0;
     431           4 :                 aPool >> aStack;
     432           4 :                 break;
     433             :             case FT_ConstFloat:
     434             :             {
     435             :                 double  fDouble;
     436           0 :                 Read( fDouble );
     437           0 :                 aStack << aPool.Store( fDouble );
     438             :             }
     439           0 :                 break;
     440             :             case FT_Variable:
     441             :             {
     442             :                 sal_uInt16  nCol, nRow;
     443           0 :                 Read( nCol );
     444           0 :                 Read( nRow );
     445             : 
     446           0 :                 LotusRelToScRel( nCol, nRow, rR );
     447             : 
     448           0 :                 if( bWK3 )
     449           0 :                     nNewId = aPool.Store( rR );
     450             :                 else
     451             :                 {
     452           0 :                     nId = rRangeList.GetIndex(rR.Col(), rR.Row());
     453             : 
     454           0 :                     if( nId == ID_FAIL )
     455             :                         // kein Range dazu
     456           0 :                         nNewId = aPool.Store( rR );
     457             :                     else
     458           0 :                         nNewId = aPool.Store( ( sal_uInt16 ) nId );
     459             :                 }
     460             : 
     461           0 :                 aStack << nNewId;
     462             :             }
     463           0 :                 break;
     464             :             case FT_Range:
     465             :             {
     466             :                 sal_uInt16  nColS, nRowS, nColE, nRowE;
     467           0 :                 Read( nColS );
     468           0 :                 Read( nRowS );
     469           0 :                 Read( nColE );
     470           0 :                 Read( nRowE );
     471             : 
     472           0 :                 LotusRelToScRel( nColS, nRowS, rR );
     473           0 :                 LotusRelToScRel( nColE, nRowE, aCRD.Ref2 );
     474             : 
     475           0 :                 if( bWK3 )
     476           0 :                     nNewId = aPool.Store( aCRD );
     477             :                 else
     478             :                 {
     479           0 :                     nId = rRangeList.GetIndex(rR.Col(), rR.Row(), aCRD.Ref2.Col(), aCRD.Ref2.Row());
     480             : 
     481           0 :                     if( nId == ID_FAIL )
     482             :                         // kein Range dazu
     483           0 :                         nNewId = aPool.Store( aCRD );
     484             :                     else
     485           0 :                         nNewId = aPool.Store( ( sal_uInt16 ) nId );
     486             :                 }
     487             : 
     488           0 :                 aStack << nNewId;
     489             :             }
     490           0 :                 break;
     491             :             case FT_Braces:
     492           0 :                 aPool << ocOpen << aStack << ocClose;
     493           0 :                 aPool >> aStack;
     494           0 :                 break;
     495             :             case FT_ConstInt:
     496             :             {
     497             :                 sal_Int16   nVal;
     498           0 :                 Read( nVal );
     499           0 :                 aStack << aPool.Store( ( double ) nVal );
     500             :             }
     501           0 :                 break;
     502             :             case FT_ConstString:
     503             :             {
     504           0 :                 OUString  aTmp(ScfTools::read_zeroTerminated_uInt8s_ToOUString(aIn, nBytesLeft, eSrcChar));
     505           0 :                 aStack << aPool.Store( aTmp );
     506             :             }
     507           0 :                 break;
     508             :             case FT_NOP:
     509           0 :                 break;
     510             :             // for > WK3
     511             :             case FT_Cref:
     512           2 :                 Read( nRelBits );
     513           2 :                 ReadSRD( rR, nRelBits );
     514           2 :                 aStack << aPool.Store( rR );
     515           2 :                 break;
     516             :             case FT_Rref:
     517           0 :                 Read( nRelBits );
     518           0 :                 ReadCRD( aCRD, nRelBits );
     519           0 :                 aStack << aPool.Store( aCRD );
     520           0 :                 break;
     521             :             case FT_Nrref:
     522             :             {
     523           0 :                 OUString  aTmp(ScfTools::read_zeroTerminated_uInt8s_ToOUString(aIn, nBytesLeft, eSrcChar));
     524           0 :                 if( rRangeNameBufferWK3.FindRel( aTmp, nRngIndex ) )
     525           0 :                     aStack << aPool.Store( nRngIndex );
     526             :                 else
     527             :             {
     528           0 :                     OUString  aText( "NRREF ");
     529           0 :                     aText += aTmp;
     530           0 :                     aStack << aPool.Store( aText );
     531           0 :             }
     532             :             }
     533           0 :                 break;
     534             :             case FT_Absnref:
     535             :             {
     536           0 :                 OUString aTmp(ScfTools::read_zeroTerminated_uInt8s_ToOUString(aIn, nBytesLeft, eSrcChar));
     537           0 :                 if( rRangeNameBufferWK3.FindAbs( aTmp, nRngIndex ) )
     538           0 :                     aStack << aPool.Store( nRngIndex );
     539             :                 else
     540             :                 {
     541           0 :                     OUString  aText( "ABSNREF " );
     542           0 :                     aText += aTmp;
     543           0 :                     aStack << aPool.Store( aText );
     544           0 :                 }
     545             :             }
     546           0 :                 break;
     547             :             case FT_Erref:
     548           0 :                 Ignore( 4 );
     549           0 :                 aPool << ocBad;
     550           0 :                 aPool >> aStack;
     551           0 :                 break;
     552             :             case FT_Ecref:
     553           0 :                 Ignore( 5 );
     554           0 :                 aPool << ocBad;
     555           0 :                 aPool >> aStack;
     556           0 :                 break;
     557             :             case FT_Econstant:
     558           0 :                 Ignore( 10 );
     559           0 :                 aPool << ocBad;
     560           0 :                 aPool >> aStack;
     561           0 :                 break;
     562             :             case FT_Splfunc:
     563             :             {
     564           0 :                 Read( nAnz );
     565           0 :                 Read( nStrLen );
     566             : 
     567           0 :                 if( nStrLen )
     568             :                 {
     569           0 :                                         sal_Char*       p = new (::std::nothrow) sal_Char[ nStrLen + 1 ];
     570           0 :                     if (p)
     571             :                     {
     572           0 :                         aIn.Read( p, nStrLen );
     573           0 :                         p[ nStrLen ] = 0x00;
     574             : 
     575           0 :                         DoFunc( ocNoName, nAnz, p );
     576             : 
     577           0 :                         delete[] p;
     578             :                     }
     579             :                     else
     580           0 :                         DoFunc( ocNoName, nAnz, NULL );
     581             :                 }
     582             :                 else
     583           0 :                     DoFunc( ocNoName, nAnz, NULL );
     584             :             }
     585           0 :                 break;
     586             :             case FT_Const10Float:
     587           0 :                     if ( bWK123 )
     588             :                     {
     589             :                             double fValue;
     590           0 :                             Read( fValue );
     591           0 :                             aStack << aPool.Store( fValue );
     592             :                     }
     593           0 :                     else aStack << aPool.Store( ScfTools::ReadLongDouble( aIn ) );
     594           0 :                     break;
     595             :             case FT_Snum:
     596           6 :                     if ( bWK123 )
     597             :                 {
     598             :                          sal_uInt32   nValue;
     599             : 
     600           6 :                          Read( nValue );
     601           6 :                      double  fValue = Snum32ToDouble( nValue );
     602           6 :                      aStack << aPool.Store( fValue );
     603             :                 }
     604             :                 else
     605             :                 {
     606             :                         sal_Int16 nVal;
     607           0 :                         Read( nVal );
     608           0 :                         aStack << aPool.Store( SnumToDouble( nVal ) );
     609             :                 }
     610           6 :                 break;
     611             :                 default:
     612             :                 OSL_FAIL( "*LotusToSc::Convert(): unbekannter enum!" );
     613             :         }
     614             :     }
     615             : 
     616           4 :     rpErg = aPool[ aStack.Get() ];
     617             : 
     618             :     OSL_ENSURE( nBytesLeft >= 0, "*LotusToSc::Convert(): zuviel verarbeitet!");
     619             :     OSL_ENSURE( nBytesLeft <= 0, "*LotusToSc::Convert(): wat is mit'm Rest?" );
     620             : 
     621           4 :     if( rRest )
     622           0 :         aIn.SeekRel( nBytesLeft );  // eventuellen Rest/Ueberlauf korrigieren
     623             : 
     624           4 :     rRest = 0;
     625             : 
     626           4 :     return ConvOK;
     627             : }
     628             : 
     629             : 
     630           0 : FUNC_TYPE LotusToSc::IndexToType( sal_uInt8 nIndex )
     631             : {
     632             :     static const FUNC_TYPE pType[ 256 ] =
     633             :     {                       // Code Bezeichnung
     634             :         FT_ConstFloat,      //    0 8-Byte-IEEE-Float
     635             :         FT_Variable,        //    1 Variable
     636             :         FT_Range,           //    2 Bereich
     637             :         FT_Return,          //    3 return
     638             :         FT_Braces,          //    4 Klammer
     639             :         FT_ConstInt,        //    5 2-Byte-Integer
     640             :         FT_ConstString,     //    6 ASCII-String
     641             :         FT_NOP,             //    7 NOP
     642             :         FT_Neg,             //    8 Negation
     643             :         FT_Op,              //    9 Addition
     644             :         FT_Op,              //   10 Subtraktion
     645             :         FT_Op,              //   11 Multiplikation
     646             :         FT_Op,              //   12 Division
     647             :         FT_Op,              //   13 Potenzierung
     648             :         FT_Op,              //   14 Gleichheit
     649             :         FT_Op,              //   15 Ungleich
     650             :         FT_Op,              //   16 Kleiner-gleich
     651             :         FT_Op,              //   17 Groesser-gleich
     652             :         FT_Op,              //   18 Kleiner
     653             :         FT_Op,              //   19 Groesser
     654             :         FT_Op,              //   20 And (logisch)
     655             :         FT_Op,              //   21 Or (logisch)
     656             :         FT_FuncFix1,        //   22 Not (logisch)
     657             :         FT_NOP,             //   23 unaeres Plus
     658             :         FT_NotImpl,         //   24
     659             :         FT_NotImpl,         //   25
     660             :         FT_NotImpl,         //   26
     661             :         FT_NotImpl,         //   27
     662             :         FT_NotImpl,         //   28
     663             :         FT_NotImpl,         //   29
     664             :         FT_NotImpl,         //   30
     665             :         FT_FuncFix0,        //   31 Not applicable
     666             :         FT_FuncFix0,        //   32 Error
     667             :         FT_FuncFix1,        //   33 Betrag ABS()
     668             :         FT_FuncFix1,        //   34 Ganzzahl INT()
     669             :         FT_FuncFix1,        //   35 Quadratwurzel
     670             :         FT_FuncFix1,        //   36 Zehnerlogarithmus
     671             :         FT_FuncFix1,        //   37 Natuerlicher Logarithmus
     672             :         FT_FuncFix0,        //   38 PI
     673             :         FT_FuncFix1,        //   39 Sinus
     674             :         FT_FuncFix1,        //   40 Cosinus
     675             :         FT_FuncFix1,        //   41 Tangens
     676             :         FT_FuncFix2,        //   42 Arcus-Tangens 2 (4.Quadrant) <- correct?
     677             :         FT_FuncFix1,        //   43 Arcus-Tangens (2.Quadrant)
     678             :         FT_FuncFix1,        //   44 Arcus-Sinus
     679             :         FT_FuncFix1,        //   45 Arcus-Cosinus
     680             :         FT_FuncFix1,        //   46 Exponentialfunktion
     681             :         FT_FuncFix2,        //   47 Modulo
     682             :         FT_FuncVar,         //   48 Auswahl
     683             :         FT_FuncFix1,        //   49 Is not applicable?
     684             :         FT_FuncFix1,        //   50 Is Error?
     685             :         FT_FuncFix0,        //   51 FALSE
     686             :         FT_FuncFix0,        //   52 TRUE
     687             :         FT_FuncFix0,        //   53 Zufallszahl
     688             :         FT_FuncFix3,        //   54 Datum
     689             :         FT_FuncFix0,        //   55 Heute
     690             :         FT_FuncFix3,        //   56 Payment
     691             :         FT_FuncFix3,        //   57 Present Value
     692             :         FT_FuncFix3,        //   58 Future Value
     693             :         FT_FuncFix3,        //   59 If ... then ... else ...
     694             :         FT_FuncFix1,        //   60 Tag des Monats
     695             :         FT_FuncFix1,        //   61 Monat
     696             :         FT_FuncFix1,        //   62 Jahr
     697             :         FT_FuncFix2,        //   63 Runden
     698             :         FT_FuncFix3,        //   64 Zeit
     699             :         FT_FuncFix1,        //   65 Stunde
     700             :         FT_FuncFix1,        //   66 Minute
     701             :         FT_FuncFix1,        //   67 Sekunde
     702             :         FT_FuncFix1,        //   68 Ist Zahl?
     703             :         FT_FuncFix1,        //   69 Ist Text?
     704             :         FT_FuncFix1,        //   70 Len()
     705             :         FT_FuncFix1,        //   71 Val()
     706             :         FT_FuncFix2,        //   72 String()
     707             :         FT_FuncFix3,        //   73 Mid()
     708             :         FT_FuncFix1,        //   74 Char()
     709             :         FT_FuncFix1,        //   75 Ascii()
     710             :         FT_FuncFix3,        //   76 Find()
     711             :         FT_FuncFix1,        //   77 Datevalue
     712             :         FT_FuncFix1,        //   78 Timevalue
     713             :         FT_FuncFix1,        //   79 Cellpointer
     714             :         FT_FuncVar,         //   80 Sum()
     715             :         FT_FuncVar,         //   81 Avg()
     716             :         FT_FuncVar,         //   82 Cnt()
     717             :         FT_FuncVar,         //   83 Min()
     718             :         FT_FuncVar,         //   84 Max()
     719             :         FT_FuncFix3,        //   85 Vlookup()
     720             :         FT_FuncFix2,        //   86 Npv()
     721             :         FT_FuncVar,         //   87 Var()
     722             :         FT_FuncVar,         //   88 Std()
     723             :         FT_FuncFix2,        //   89 Irr()
     724             :         FT_FuncFix3,        //   90 Hlookup()
     725             :         FT_FuncFix3,        //   91 ?
     726             :         FT_FuncFix3,        //   92 ?
     727             :         FT_FuncFix3,        //   93 ?
     728             :         FT_FuncFix3,        //   94 ?
     729             :         FT_FuncFix3,        //   95 ?
     730             :         FT_FuncFix3,        //   96 ?
     731             :         FT_FuncFix3,        //   97 ?
     732             :         FT_FuncFix3,        //   98 Index() <- correct?
     733             :         FT_FuncFix1,        //   99 Cols()
     734             :         FT_FuncFix1,        //  100 Rows()
     735             :         FT_FuncFix2,        //  101 Repeat()
     736             :         FT_FuncFix1,        //  102 Upper()
     737             :         FT_FuncFix1,        //  103 Lower()
     738             :         FT_FuncFix2,        //  104 Left()
     739             :         FT_FuncFix2,        //  105 Right()
     740             :         FT_FuncFix4,        //  106 Replace()
     741             :         FT_FuncFix1,        //  107 Proper()
     742             :         FT_FuncFix2,        //  108 Cell()
     743             :         FT_FuncFix1,        //  109 Trim()
     744             :         FT_FuncFix1,        //  110 Clean()
     745             :         FT_FuncFix1,        //  111 F()
     746             :         FT_FuncFix1,        //  112 Wert() (or W()?)
     747             :         FT_FuncFix2,        //  113 Exact()
     748             :         FT_NotImpl,         //  114 Call()
     749             :         FT_FuncFix1,        //  115 @@()
     750             :         FT_FuncFix3,        //  116 Rate()
     751             :         FT_FuncFix1,        //  117 Term()
     752             :         FT_FuncFix1,        //  118 Cterm()
     753             :         FT_FuncFix3,        //  119 Sln()
     754             :         FT_FuncFix4,        //  120 Syd(), Soy()
     755             :         FT_FuncFix4,        //  121 Ddb()
     756             :         FT_NotImpl,         //  122
     757             :         FT_NotImpl,         //  123
     758             :         FT_NotImpl,         //  124
     759             :         FT_NotImpl,         //  125
     760             :         FT_NotImpl,         //  126
     761             :         FT_NotImpl,         //  127
     762             :         FT_NotImpl,         //  128
     763             :         FT_NotImpl,         //  129
     764             :         FT_NotImpl,         //  130
     765             :         FT_NotImpl,         //  131
     766             :         FT_NotImpl,         //  132
     767             :         FT_NotImpl,         //  133
     768             :         FT_NotImpl,         //  134
     769             :         FT_NotImpl,         //  135
     770             :         FT_NotImpl,         //  136
     771             :         FT_NotImpl,         //  137
     772             :         FT_NotImpl,         //  138
     773             :         FT_NotImpl,         //  139
     774             :         FT_NotImpl,         //  140
     775             :         FT_NotImpl,         //  141
     776             :         FT_NotImpl,         //  142
     777             :         FT_NotImpl,         //  143
     778             :         FT_NotImpl,         //  144
     779             :         FT_NotImpl,         //  145
     780             :         FT_NotImpl,         //  146
     781             :         FT_NotImpl,         //  147
     782             :         FT_NotImpl,         //  148
     783             :         FT_NotImpl,         //  149
     784             :         FT_NotImpl,         //  150
     785             :         FT_NotImpl,         //  151
     786             :         FT_NotImpl,         //  152
     787             :         FT_NotImpl,         //  153
     788             :         FT_NotImpl,         //  154
     789             :         FT_NotImpl,         //  155
     790             :         FT_FuncVar,         //  156 ?
     791             :         FT_NotImpl,         //  157
     792             :         FT_NotImpl,         //  158
     793             :         FT_NotImpl,         //  159
     794             :         FT_NotImpl,         //  160
     795             :         FT_NotImpl,         //  161
     796             :         FT_NotImpl,         //  162
     797             :         FT_NotImpl,         //  163
     798             :         FT_NotImpl,         //  164
     799             :         FT_NotImpl,         //  165
     800             :         FT_NotImpl,         //  166
     801             :         FT_NotImpl,         //  167
     802             :         FT_NotImpl,         //  168
     803             :         FT_NotImpl,         //  169
     804             :         FT_NotImpl,         //  170
     805             :         FT_NotImpl,         //  171
     806             :         FT_NotImpl,         //  172
     807             :         FT_NotImpl,         //  173
     808             :         FT_NotImpl,         //  174
     809             :         FT_NotImpl,         //  175
     810             :         FT_NotImpl,         //  176
     811             :         FT_NotImpl,         //  177
     812             :         FT_NotImpl,         //  178
     813             :         FT_NotImpl,         //  179
     814             :         FT_NotImpl,         //  180
     815             :         FT_NotImpl,         //  181
     816             :         FT_NotImpl,         //  182
     817             :         FT_NotImpl,         //  183
     818             :         FT_NotImpl,         //  184
     819             :         FT_NotImpl,         //  185
     820             :         FT_NotImpl,         //  186
     821             :         FT_NotImpl,         //  187
     822             :         FT_NotImpl,         //  188
     823             :         FT_NotImpl,         //  189
     824             :         FT_NotImpl,         //  190
     825             :         FT_NotImpl,         //  191
     826             :         FT_NotImpl,         //  192
     827             :         FT_NotImpl,         //  193
     828             :         FT_NotImpl,         //  194
     829             :         FT_NotImpl,         //  195
     830             :         FT_NotImpl,         //  196
     831             :         FT_NotImpl,         //  197
     832             :         FT_NotImpl,         //  198
     833             :         FT_NotImpl,         //  199
     834             :         FT_NotImpl,         //  200
     835             :         FT_NotImpl,         //  201
     836             :         FT_NotImpl,         //  202
     837             :         FT_NotImpl,         //  203
     838             :         FT_NotImpl,         //  204
     839             :         FT_NotImpl,         //  205
     840             :         FT_FuncVar,         //  206 ?
     841             :         FT_NotImpl,         //  207
     842             :         FT_NotImpl,         //  208
     843             :         FT_NotImpl,         //  209
     844             :         FT_NotImpl,         //  210
     845             :         FT_NotImpl,         //  211
     846             :         FT_NotImpl,         //  212
     847             :         FT_NotImpl,         //  213
     848             :         FT_NotImpl,         //  214
     849             :         FT_NotImpl,         //  215
     850             :         FT_NotImpl,         //  216
     851             :         FT_NotImpl,         //  217
     852             :         FT_NotImpl,         //  218
     853             :         FT_NotImpl,         //  219
     854             :         FT_NotImpl,         //  220
     855             :         FT_NotImpl,         //  221
     856             :         FT_NotImpl,         //  222
     857             :         FT_NotImpl,         //  223
     858             :         FT_NotImpl,         //  224
     859             :         FT_NotImpl,         //  225
     860             :         FT_NotImpl,         //  226
     861             :         FT_NotImpl,         //  227
     862             :         FT_NotImpl,         //  228
     863             :         FT_NotImpl,         //  229
     864             :         FT_NotImpl,         //  230
     865             :         FT_NotImpl,         //  231
     866             :         FT_NotImpl,         //  232
     867             :         FT_NotImpl,         //  233
     868             :         FT_NotImpl,         //  234
     869             :         FT_NotImpl,         //  235
     870             :         FT_NotImpl,         //  236
     871             :         FT_NotImpl,         //  237
     872             :         FT_NotImpl,         //  238
     873             :         FT_NotImpl,         //  239
     874             :         FT_NotImpl,         //  240
     875             :         FT_NotImpl,         //  241
     876             :         FT_NotImpl,         //  242
     877             :         FT_NotImpl,         //  243
     878             :         FT_NotImpl,         //  244
     879             :         FT_NotImpl,         //  245
     880             :         FT_NotImpl,         //  246
     881             :         FT_NotImpl,         //  247
     882             :         FT_NotImpl,         //  248
     883             :         FT_NotImpl,         //  249
     884             :         FT_NotImpl,         //  250
     885             :         FT_NotImpl,         //  251
     886             :         FT_NotImpl,         //  252
     887             :         FT_NotImpl,         //  253
     888             :         FT_NotImpl,         //  254
     889             :         FT_FuncVar,         //  255 ?
     890             :     };
     891           0 :     return pType[ nIndex ];
     892             : }
     893             : 
     894             : 
     895           0 : DefTokenId LotusToSc::IndexToToken( sal_uInt8 nIndex )
     896             : {
     897             :     static const DefTokenId pToken[ 256 ] =
     898             :     {                       // Code Bezeichnung
     899             :         ocPush,             //    0 8-Byte-IEEE-Float
     900             :         ocPush,             //    1 Variable
     901             :         ocPush,             //    2 Bereich
     902             :         ocPush,             //    3 return
     903             :         ocPush,             //    4 Klammer
     904             :         ocPush,             //    5 2-Byte-Integer
     905             :         ocPush,             //    6 ASCII-String
     906             :         ocPush,             //    7 NOP
     907             :         ocNegSub,           //    8 Negation
     908             :         ocAdd,              //    9 Addition
     909             :         ocSub,              //   10 Subtraktion
     910             :         ocMul,              //   11 Multiplikation
     911             :         ocDiv,              //   12 Division
     912             :         ocPow,              //   13 Potenzierung
     913             :         ocEqual,            //   14 Gleichheit
     914             :         ocNotEqual,         //   15 Ungleich
     915             :         ocLessEqual,        //   16 Kleiner-gleich
     916             :         ocGreaterEqual,     //   17 Groesser-gleich
     917             :         ocLess,             //   18 Kleiner
     918             :         ocGreater,          //   19 Groesser
     919             :         ocAnd,              //   20 And (logisch)
     920             :         ocOr,               //   21 Or (logisch)
     921             :         ocNot,              //   22 Not (logisch)
     922             :         ocPush,             //   23 unaeres Plus
     923             :         ocNoName,           //   24
     924             :         ocNoName,           //   25
     925             :         ocNoName,           //   26
     926             :         ocNoName,           //   27
     927             :         ocNoName,           //   28
     928             :         ocNoName,           //   29
     929             :         ocNoName,           //   30
     930             :         ocNotAvail,         //   31 Not available
     931             :         ocNoName,           //   32 Error
     932             :         ocAbs,              //   33 Betrag ABS()
     933             :         ocInt,              //   34 Ganzzahl INT()
     934             :         ocSqrt,             //   35 Quadratwurzel
     935             :         ocLog10,            //   36 Zehnerlogarithmus
     936             :         ocLn,               //   37 Natuerlicher Logarithmus
     937             :         ocPi,               //   38 PI
     938             :         ocSin,              //   39 Sinus
     939             :         ocCos,              //   40 Cosinus
     940             :         ocTan,              //   41 Tangens
     941             :         ocArcTan2,          //   42 Arcus-Tangens 2 (4.Quadrant)
     942             :         ocArcTan,           //   43 Arcus-Tangens (2.Quadrant)
     943             :         ocArcSin,           //   44 Arcus-Sinus
     944             :         ocArcCos,           //   45 Arcus-Cosinus
     945             :         ocExp,              //   46 Exponentialfunktion
     946             :         ocMod,              //   47 Modulo
     947             :         ocChose,            //   48 Auswahl
     948             :         ocIsNA,             //   49 Is not available?
     949             :         ocIsError,          //   50 Is Error?
     950             :         ocFalse,            //   51 FALSE
     951             :         ocTrue,             //   52 TRUE
     952             :         ocRandom,           //   53 Zufallszahl
     953             :         ocGetDate,          //   54 Datum
     954             :         ocGetActDate,       //   55 Heute
     955             :         ocRMZ,              //   56 Payment
     956             :         ocBW,               //   57 Present Value
     957             :         ocZW,               //   58 Future Value
     958             :         ocIf,               //   59 If ... then ... else ...
     959             :         ocGetDay,           //   60 Tag des Monats
     960             :         ocGetMonth,         //   61 Monat
     961             :         ocGetYear,          //   62 Jahr
     962             :         ocRound,            //   63 Runden
     963             :         ocGetTime,          //   64 Zeit
     964             :         ocGetHour,          //   65 Stunde
     965             :         ocGetMin,           //   66 Minute
     966             :         ocGetSec,           //   67 Sekunde
     967             :         ocIsValue,          //   68 Ist Zahl?
     968             :         ocIsString,         //   69 Ist Text?
     969             :         ocLen,              //   70 Len()
     970             :         ocValue,            //   71 Val()
     971             :         ocFixed,            //   72 String()    ocFixed ersatzweise + Spezialfall
     972             :         ocMid,              //   73 Mid()
     973             :         ocChar,             //   74 Char()
     974             :         ocCode,             //   75 Ascii()
     975             :         ocFind,             //   76 Find()
     976             :         ocGetDateValue,     //   77 Datevalue
     977             :         ocGetTimeValue,     //   78 Timevalue
     978             :         ocNoName,           //   79 Cellpointer
     979             :         ocSum,              //   80 Sum()
     980             :         ocAverage,          //   81 Avg()
     981             :         ocCount,            //   82 Cnt()
     982             :         ocMin,              //   83 Min()
     983             :         ocMax,              //   84 Max()
     984             :         ocVLookup,          //   85 Vlookup()
     985             :         ocNPV,              //   86 Npv()
     986             :         ocVar,              //   87 Var()
     987             :         ocNormDist,         //   88 Std()
     988             :         ocIRR,              //   89 Irr()
     989             :         ocHLookup,          //   90 Hlookup()
     990             :         ocDBSum,            //   91 XlfDsum
     991             :         ocDBAverage,        //   92 XlfDaverage
     992             :         ocDBCount,          //   93 XlfDcount
     993             :         ocDBMin,            //   94 XlfDmin
     994             :         ocDBMax,            //   95 XlfDmax
     995             :         ocDBVar,            //   96 XlfDvar
     996             :         ocDBStdDev,         //   97 XlfDstdev
     997             :         ocIndex,            //   98 Index()
     998             :         ocColumns,          //   99 Cols()
     999             :         ocRows,             //  100 Rows()
    1000             :         ocRept,             //  101 Repeat()
    1001             :         ocUpper,            //  102 Upper()
    1002             :         ocLower,            //  103 Lower()
    1003             :         ocLeft,             //  104 Left()
    1004             :         ocRight,            //  105 Right()
    1005             :         ocReplace,          //  106 Replace()
    1006             :         ocPropper,          //  107 Proper()
    1007             :         ocNoName,           //  108 Cell()
    1008             :         ocTrim,             //  109 Trim()
    1009             :         ocClean,            //  110 Clean()
    1010             :         ocFalse,            //  111 F()
    1011             :         ocTrue,             //  112 W()
    1012             :         ocExact,            //  113 Exact()
    1013             :         ocNoName,           //  114 Call()
    1014             :         ocIndirect,         //  115 @@()
    1015             :         ocZins,             //  116 Rate()
    1016             :         ocNoName,           //  117 Term()
    1017             :         ocNoName,           //  118 Cterm()
    1018             :         ocLIA,              //  119 Sln()
    1019             :         ocDIA,              //  120 Syd(), Soy()
    1020             :         ocGDA,              //  121 Ddb()
    1021             :         ocNoName,           //  122
    1022             :         ocNoName,           //  123
    1023             :         ocNoName,           //  124
    1024             :         ocNoName,           //  125
    1025             :         ocNoName,           //  126
    1026             :         ocNoName,           //  127
    1027             :         ocNoName,           //  128
    1028             :         ocNoName,           //  129
    1029             :         ocNoName,           //  130
    1030             :         ocNoName,           //  131
    1031             :         ocNoName,           //  132
    1032             :         ocNoName,           //  133
    1033             :         ocNoName,           //  134
    1034             :         ocNoName,           //  135
    1035             :         ocNoName,           //  136
    1036             :         ocNoName,           //  137
    1037             :         ocNoName,           //  138
    1038             :         ocNoName,           //  139
    1039             :         ocNoName,           //  140
    1040             :         ocNoName,           //  141
    1041             :         ocNoName,           //  142
    1042             :         ocNoName,           //  143
    1043             :         ocNoName,           //  144
    1044             :         ocNoName,           //  145
    1045             :         ocNoName,           //  146
    1046             :         ocNoName,           //  147
    1047             :         ocNoName,           //  148
    1048             :         ocNoName,           //  149
    1049             :         ocNoName,           //  150
    1050             :         ocNoName,           //  151
    1051             :         ocNoName,           //  152
    1052             :         ocNoName,           //  153
    1053             :         ocNoName,           //  154
    1054             :         ocNoName,           //  155
    1055             :         ocNoName,           //  156 ?
    1056             :         ocNoName,           //  157
    1057             :         ocNoName,           //  158
    1058             :         ocNoName,           //  159
    1059             :         ocNoName,           //  160
    1060             :         ocNoName,           //  161
    1061             :         ocNoName,           //  162
    1062             :         ocNoName,           //  163
    1063             :         ocNoName,           //  164
    1064             :         ocNoName,           //  165
    1065             :         ocNoName,           //  166
    1066             :         ocNoName,           //  167
    1067             :         ocNoName,           //  168
    1068             :         ocNoName,           //  169
    1069             :         ocNoName,           //  170
    1070             :         ocNoName,           //  171
    1071             :         ocNoName,           //  172
    1072             :         ocNoName,           //  173
    1073             :         ocNoName,           //  174
    1074             :         ocNoName,           //  175
    1075             :         ocNoName,           //  176
    1076             :         ocNoName,           //  177
    1077             :         ocNoName,           //  178
    1078             :         ocNoName,           //  179
    1079             :         ocNoName,           //  180
    1080             :         ocNoName,           //  181
    1081             :         ocNoName,           //  182
    1082             :         ocNoName,           //  183
    1083             :         ocNoName,           //  184
    1084             :         ocNoName,           //  185
    1085             :         ocNoName,           //  186
    1086             :         ocNoName,           //  187
    1087             :         ocNoName,           //  188
    1088             :         ocNoName,           //  189
    1089             :         ocNoName,           //  190
    1090             :         ocNoName,           //  191
    1091             :         ocNoName,           //  192
    1092             :         ocNoName,           //  193
    1093             :         ocNoName,           //  194
    1094             :         ocNoName,           //  195
    1095             :         ocNoName,           //  196
    1096             :         ocNoName,           //  197
    1097             :         ocNoName,           //  198
    1098             :         ocNoName,           //  199
    1099             :         ocNoName,           //  200
    1100             :         ocNoName,           //  201
    1101             :         ocNoName,           //  202
    1102             :         ocNoName,           //  203
    1103             :         ocNoName,           //  204
    1104             :         ocNoName,           //  205
    1105             :         ocNoName,           //  206 ?
    1106             :         ocNoName,           //  207
    1107             :         ocNoName,           //  208
    1108             :         ocNoName,           //  209
    1109             :         ocNoName,           //  210
    1110             :         ocNoName,           //  211
    1111             :         ocNoName,           //  212
    1112             :         ocNoName,           //  213
    1113             :         ocNoName,           //  214
    1114             :         ocNoName,           //  215
    1115             :         ocNoName,           //  216
    1116             :         ocNoName,           //  217
    1117             :         ocNoName,           //  218
    1118             :         ocNoName,           //  219
    1119             :         ocNoName,           //  220
    1120             :         ocNoName,           //  221
    1121             :         ocNoName,           //  222
    1122             :         ocNoName,           //  223
    1123             :         ocNoName,           //  224
    1124             :         ocNoName,           //  225
    1125             :         ocNoName,           //  226
    1126             :         ocNoName,           //  227
    1127             :         ocNoName,           //  228
    1128             :         ocNoName,           //  229
    1129             :         ocNoName,           //  230
    1130             :         ocNoName,           //  231
    1131             :         ocNoName,           //  232
    1132             :         ocNoName,           //  233
    1133             :         ocNoName,           //  234
    1134             :         ocNoName,           //  235
    1135             :         ocNoName,           //  236
    1136             :         ocNoName,           //  237
    1137             :         ocNoName,           //  238
    1138             :         ocNoName,           //  239
    1139             :         ocNoName,           //  240
    1140             :         ocNoName,           //  241
    1141             :         ocNoName,           //  242
    1142             :         ocNoName,           //  243
    1143             :         ocNoName,           //  244
    1144             :         ocNoName,           //  245
    1145             :         ocNoName,           //  246
    1146             :         ocNoName,           //  247
    1147             :         ocNoName,           //  248
    1148             :         ocNoName,           //  249
    1149             :         ocNoName,           //  250
    1150             :         ocNoName,           //  251
    1151             :         ocNoName,           //  252
    1152             :         ocNoName,           //  253
    1153             :         ocNoName,           //  254
    1154             :         ocNoName            //  255 ?
    1155             :     };
    1156             : 
    1157           0 :     return pToken[ nIndex ];
    1158             : }
    1159             : 
    1160             : 
    1161          16 : FUNC_TYPE LotusToSc::IndexToTypeWK123( sal_uInt8 nIndex )
    1162             : {
    1163             :     static const FUNC_TYPE pType[ 256 ] =
    1164             :     {                       // Code Bezeichnung
    1165             :         FT_Const10Float,    //    0 8-Byte-IEEE-Long-Number
    1166             :         FT_Cref,            //    1 Cell Reference
    1167             :         FT_Rref,            //    2 Area Reference
    1168             :         FT_Return,          //    3 return
    1169             :         FT_Braces,          //    4 Klammer
    1170             :         FT_Snum,            //    5 Short-Number
    1171             :         FT_ConstString,     //    6 ASCII-String
    1172             :         FT_Nrref,           //    7 Named range reference
    1173             :         FT_Absnref,         //    8 Absolut named range
    1174             :         FT_Erref,           //    9 Err range reference
    1175             :         FT_Ecref,           //   10 Err cell reference
    1176             :         FT_Econstant,       //   11 Err constant
    1177             :         FT_NotImpl,         //   12
    1178             :         FT_NotImpl,         //   13
    1179             :         FT_Neg,             //   14 Negation
    1180             :         FT_Op,              //   15 Addition
    1181             :         FT_Op,              //   16 Subtraktion
    1182             :         FT_Op,              //   17 Multiplikation
    1183             :         FT_Op,              //   18 Division
    1184             :         FT_Op,              //   19 Potenzierung
    1185             :         FT_Op,              //   20 Gleichheit
    1186             :         FT_Op,              //   21 Ungleich
    1187             :         FT_Op,              //   22 Kleiner-gleich
    1188             :         FT_Op,              //   23 Groesser-gleich
    1189             :         FT_Op,              //   24 Kleiner
    1190             :         FT_Op,              //   25 Groesser
    1191             :         FT_Op,              //   26 And (logical)
    1192             :         FT_Op,              //   27 Or (logical)
    1193             :         FT_FuncFix1,        //   28 Not (logical)
    1194             :         FT_NOP,             //   29 unary plus
    1195             :         FT_Op,              //   30 Concatenation
    1196             :         FT_FuncFix0,        //   31 Not applicable
    1197             :         FT_FuncFix0,        //   32 Error
    1198             :         FT_FuncFix1,        //   33 Absolute value ABS()
    1199             :         FT_FuncFix1,        //   34 Integer INT()
    1200             :         FT_FuncFix1,        //   35 Square root
    1201             :         FT_FuncFix1,        //   36 Zehnerlogarithmus
    1202             :         FT_FuncFix1,        //   37 Natuerlicher Logarithmus
    1203             :         FT_FuncFix0,        //   38 PI
    1204             :         FT_FuncFix1,        //   39 Sinus
    1205             :         FT_FuncFix1,        //   40 Cosinus
    1206             :         FT_FuncFix1,        //   41 Tangens
    1207             :         FT_FuncFix2,        //   42 Arcus-Tangens 2 (4.Quadrant)
    1208             :         FT_FuncFix1,        //   43 Arcus-Tangens (2.Quadrant)
    1209             :         FT_FuncFix1,        //   44 Arcus-Sinus
    1210             :         FT_FuncFix1,        //   45 Arcus-Cosinus
    1211             :         FT_FuncFix1,        //   46 Exponentialfunktion
    1212             :         FT_FuncFix2,        //   47 Modulo
    1213             :         FT_FuncVar,         //   48 Selection
    1214             :         FT_FuncFix1,        //   49 Is not applicable?
    1215             :         FT_FuncFix1,        //   50 Is Error?
    1216             :         FT_FuncFix0,        //   51 FALSE
    1217             :         FT_FuncFix0,        //   52 TRUE
    1218             :         FT_FuncFix0,        //   53 Zufallszahl
    1219             :         FT_FuncFix3,        //   54 Datum
    1220             :         FT_FuncFix0,        //   55 Heute
    1221             :         FT_FuncFix3,        //   56 Payment
    1222             :         FT_FuncFix3,        //   57 Present Value
    1223             :         FT_FuncFix3,        //   58 Future Value
    1224             :         FT_FuncFix3,        //   59 If ... then ... else ...
    1225             :         FT_FuncFix1,        //   60 Tag des Monats
    1226             :         FT_FuncFix1,        //   61 Monat
    1227             :         FT_FuncFix1,        //   62 Jahr
    1228             :         FT_FuncFix2,        //   63 Runden
    1229             :         FT_FuncFix3,        //   64 Zeit
    1230             :         FT_FuncFix1,        //   65 Stunde
    1231             :         FT_FuncFix1,        //   66 Minute
    1232             :         FT_FuncFix1,        //   67 Sekunde
    1233             :         FT_FuncFix1,        //   68 Ist Zahl?
    1234             :         FT_FuncFix1,        //   69 Ist Text?
    1235             :         FT_FuncFix1,        //   70 Len()
    1236             :         FT_FuncFix1,        //   71 Val()
    1237             :         FT_FuncFix2,        //   72 String()
    1238             :         FT_FuncFix3,        //   73 Mid()
    1239             :         FT_FuncFix1,        //   74 Char()
    1240             :         FT_FuncFix1,        //   75 Ascii()
    1241             :         FT_FuncFix3,        //   76 Find()
    1242             :         FT_FuncFix1,        //   77 Datevalue
    1243             :         FT_FuncFix1,        //   78 Timevalue
    1244             :         FT_FuncFix1,        //   79 Cellpointer
    1245             :         FT_FuncVar,         //   80 Sum()
    1246             :         FT_FuncVar,         //   81 Avg()
    1247             :         FT_FuncVar,         //   82 Cnt()
    1248             :         FT_FuncVar,         //   83 Min()
    1249             :         FT_FuncVar,         //   84 Max()
    1250             :         FT_FuncFix3,        //   85 Vlookup()
    1251             :         FT_FuncFix2,        //   86 Npv()
    1252             :         FT_FuncVar,         //   87 Var()
    1253             :         FT_FuncVar,         //   88 Std()
    1254             :         FT_FuncFix2,        //   89 Irr()
    1255             :         FT_FuncFix3,        //   90 Hlookup()
    1256             :         FT_FuncVar,         //   91 Dsum                 <- new
    1257             :         FT_FuncVar,         //   92 Davg                 <- new
    1258             :         FT_FuncVar,         //   93 Dcnt                 <- new
    1259             :         FT_FuncVar,         //   94 Dmin                 <- new
    1260             :         FT_FuncVar,         //   95 Dmax                 <- new
    1261             :         FT_FuncVar,         //   96 Dvar                 <- new
    1262             :         FT_FuncVar,         //   97 Dstd                 <- new
    1263             :         FT_FuncVar,         //   98 Index()              <- change!
    1264             :         FT_FuncFix1,        //   99 Cols()               <- new
    1265             :         FT_FuncFix1,        //  100 Rows()               <- new
    1266             :         FT_FuncFix2,        //  101 Repeat()             <- new
    1267             :         FT_FuncFix1,        //  102 Upper()              <- new
    1268             :         FT_FuncFix1,        //  103 Lower()              <- new
    1269             :         FT_FuncFix2,        //  104 Left()               <- new
    1270             :         FT_FuncFix2,        //  105 Right()              <- new
    1271             :         FT_FuncFix4,        //  106 Replace()            <- new
    1272             :         FT_FuncFix1,        //  107 Proper()             <- new
    1273             :         FT_FuncFix2,        //  108 Cell()               <- new
    1274             :         FT_FuncFix1,        //  109 Trim()               <- new
    1275             :         FT_FuncFix1,        //  110 Clean()              <- new
    1276             :         FT_FuncFix1,        //  111 S()                  <- change in Bez.
    1277             :         FT_FuncFix1,        //  112 N()                  <- change in Bez.
    1278             :         FT_FuncFix2,        //  113 Exact()              <- new
    1279             :         FT_NotImpl,         //  114 App                  <- change in Bez.
    1280             :         FT_FuncFix1,        //  115 @@()                 <- new
    1281             :         FT_FuncFix3,        //  116 Rate()               <- new
    1282             :         FT_FuncFix3,        //  117 Term()               <- change in Anz.
    1283             :         FT_FuncFix3,        //  118 Cterm()              <- change in Anz.
    1284             :         FT_FuncFix3,        //  119 Sln()                <- new
    1285             :         FT_FuncFix4,        //  120 Syd()                <- new
    1286             :         FT_FuncFix4,        //  121 Ddb()                <- new
    1287             :         FT_Splfunc,         //  122 Splfunc              <- new
    1288             :         FT_FuncFix1,        //  123 Sheets               <- new
    1289             :         FT_FuncFix1,        //  124 Info                 <- new
    1290             :         FT_FuncVar,         //  125 Sumproduct           <- new
    1291             :         FT_FuncFix1,        //  126 Isrange              <- new
    1292             :         FT_FuncVar,         //  127 Dget                 <- new
    1293             :         FT_FuncVar,         //  128 Dquery               <- new
    1294             :         FT_FuncFix4,        //  129 Coord                <- new
    1295             :         FT_NOP,             //  130 Reserved (internal)  <- new
    1296             :         FT_FuncFix0,        //  131 Today                <- new
    1297             :         FT_FuncVar,         //  132 Vdb                  <- new
    1298             :         FT_FuncVar,         //  133 Dvars                <- new
    1299             :         FT_FuncVar,         //  134 Dstds                <- new
    1300             :         FT_FuncVar,         //  135 Vars                 <- new
    1301             :         FT_FuncVar,         //  136 Stds                 <- new
    1302             :         FT_FuncFix2,        //  137 D360                 <- new
    1303             :         FT_NOP,             //  138 Reserved (internal)  <- new
    1304             :         FT_FuncFix0,        //  139 Isapp                <- new quantity ?
    1305             :         FT_FuncVar,         //  140 Isaaf                <- new quantity ?
    1306             :         FT_FuncFix1,        //  141 Weekday              <- new
    1307             :         FT_FuncFix3,        //  142 Datedif              <- new
    1308             :         FT_FuncVar,         //  143 Rank                 <- new
    1309             :         FT_FuncFix2,        //  144 Numberstring         <- new
    1310             :         FT_FuncFix1,        //  145 Datestring           <- new
    1311             :         FT_FuncFix1,        //  146 Decimal              <- new
    1312             :         FT_FuncFix1,        //  147 Hex                  <- new
    1313             :         FT_FuncFix4,        //  148 Db                   <- new
    1314             :         FT_FuncFix4,        //  149 Pmti                 <- new
    1315             :         FT_FuncFix4,        //  150 Spi                  <- new
    1316             :         FT_FuncFix1,        //  151 Fullp                <- new
    1317             :         FT_FuncFix1,        //  152 Halfp                <- new
    1318             :         FT_FuncVar,         //  153 Pureavg              <- new
    1319             :         FT_FuncVar,         //  154 Purecount            <- new
    1320             :         FT_FuncVar,         //  155 Puremax              <- new
    1321             :         FT_FuncVar,         //  156 Puremin              <- new
    1322             :         FT_FuncVar,         //  157 Purestd              <- new
    1323             :         FT_FuncVar,         //  158 Purevar              <- new
    1324             :         FT_FuncVar,         //  159 Purestds             <- new
    1325             :         FT_FuncVar,         //  160 Purevars             <- new
    1326             :         FT_FuncFix3,        //  161 Pmt2                 <- new
    1327             :         FT_FuncFix3,        //  162 Pv2                  <- new
    1328             :         FT_FuncFix3,        //  163 Fv2                  <- new
    1329             :         FT_FuncFix3,        //  164 Term2                <- new
    1330             :         FT_NotImpl,         //  165--                    <- new quantity ?
    1331             :         FT_FuncFix2,        //  166 D360 (US-Version)
    1332             :         FT_NotImpl,         //  167
    1333             :         FT_NotImpl,         //  168
    1334             :         FT_NotImpl,         //  169
    1335             :         FT_NotImpl,         //  170
    1336             :         FT_NotImpl,         //  171
    1337             :         FT_NotImpl,         //  172
    1338             :         FT_NotImpl,         //  173
    1339             :         FT_NotImpl,         //  174
    1340             :         FT_NotImpl,         //  175
    1341             :         FT_NotImpl,         //  176
    1342             :         FT_NotImpl,         //  177
    1343             :         FT_NotImpl,         //  178
    1344             :         FT_NotImpl,         //  179
    1345             :         FT_NotImpl,         //  180
    1346             :         FT_NotImpl,         //  181
    1347             :         FT_NotImpl,         //  182
    1348             :         FT_NotImpl,         //  183
    1349             :         FT_NotImpl,         //  184
    1350             :         FT_NotImpl,         //  185
    1351             :         FT_FuncVar,         //  186 Solver               <- new
    1352             :         FT_NotImpl,         //  187
    1353             :         FT_NotImpl,         //  188
    1354             :         FT_NotImpl,         //  189
    1355             :         FT_NotImpl,         //  190
    1356             :         FT_NotImpl,         //  191
    1357             :         FT_NotImpl,         //  192
    1358             :         FT_NotImpl,         //  193
    1359             :         FT_NotImpl,         //  194
    1360             :         FT_NotImpl,         //  195
    1361             :         FT_NotImpl,         //  196
    1362             :         FT_NotImpl,         //  197
    1363             :         FT_NotImpl,         //  198
    1364             :         FT_NotImpl,         //  199
    1365             :         FT_NotImpl,         //  200
    1366             :         FT_NotImpl,         //  201
    1367             :         FT_NotImpl,         //  202
    1368             :         FT_NotImpl,         //  203
    1369             :         FT_NotImpl,         //  204
    1370             :         FT_NotImpl,         //  205
    1371             :         FT_NotImpl,         //  206
    1372             :         FT_NotImpl,         //  207
    1373             :         FT_NotImpl,         //  208
    1374             :         FT_NotImpl,         //  209
    1375             :         FT_NotImpl,         //  210
    1376             :         FT_NotImpl,         //  211
    1377             :         FT_NotImpl,         //  212
    1378             :         FT_NotImpl,         //  213
    1379             :         FT_NotImpl,         //  214
    1380             :         FT_NotImpl,         //  215
    1381             :         FT_NotImpl,         //  216
    1382             :         FT_NotImpl,         //  217
    1383             :         FT_NotImpl,         //  218
    1384             :         FT_NotImpl,         //  219
    1385             :         FT_NotImpl,         //  220
    1386             :         FT_NotImpl,         //  221
    1387             :         FT_NotImpl,         //  222
    1388             :         FT_NotImpl,         //  223
    1389             :         FT_NotImpl,         //  224
    1390             :         FT_NotImpl,         //  225
    1391             :         FT_NotImpl,         //  226
    1392             :         FT_NotImpl,         //  227
    1393             :         FT_NotImpl,         //  228
    1394             :         FT_NotImpl,         //  229
    1395             :         FT_NotImpl,         //  230
    1396             :         FT_NotImpl,         //  231
    1397             :         FT_NotImpl,         //  232
    1398             :         FT_NotImpl,         //  233
    1399             :         FT_NotImpl,         //  234
    1400             :         FT_NotImpl,         //  235
    1401             :         FT_NotImpl,         //  236
    1402             :         FT_NotImpl,         //  237
    1403             :         FT_NotImpl,         //  238
    1404             :         FT_NotImpl,         //  239
    1405             :         FT_NotImpl,         //  240
    1406             :         FT_NotImpl,         //  241
    1407             :         FT_NotImpl,         //  242
    1408             :         FT_NotImpl,         //  243
    1409             :         FT_NotImpl,         //  244
    1410             :         FT_NotImpl,         //  245
    1411             :         FT_NotImpl,         //  246
    1412             :         FT_NotImpl,         //  247
    1413             :         FT_NotImpl,         //  248
    1414             :         FT_NotImpl,         //  249
    1415             :         FT_NotImpl,         //  250
    1416             :         FT_NotImpl,         //  251
    1417             :         FT_NotImpl,         //  252
    1418             :         FT_NotImpl,         //  253
    1419             :         FT_NotImpl,         //  254
    1420             :         FT_NotImpl,         //  255
    1421             :     };
    1422          16 :     return pType[ nIndex ];
    1423             : }
    1424             : 
    1425             : 
    1426          16 : DefTokenId LotusToSc::IndexToTokenWK123( sal_uInt8 nIndex )
    1427             : {
    1428             :     static const DefTokenId pToken[ 256 ] =
    1429             :     {                       // Code Description
    1430             :         ocPush,             //    0 8-Byte-IEEE-Long-Numbers
    1431             :         ocPush,             //    1 Variable
    1432             :         ocPush,             //    2 Bereich
    1433             :         ocPush,             //    3 return
    1434             :         ocPush,             //    4 Klammer
    1435             :         ocPush,             //    5 Numbers
    1436             :         ocPush,             //    6 ASCII-String
    1437             :         ocPush,             //    7 Named range reference
    1438             :         ocPush,             //    8 Absolut named range
    1439             :         ocPush,             //    9 Err range reference
    1440             :         ocPush,             //   10 Err cell reference
    1441             :         ocPush,             //   11 Err constant
    1442             :         ocPush,             //   12
    1443             :         ocPush,             //   13
    1444             :         ocNegSub,           //   14 Negation
    1445             :         ocAdd,              //   15 Addition
    1446             :         ocSub,              //   16 Subtraktion
    1447             :         ocMul,              //   17 Multiplikation
    1448             :         ocDiv,              //   18 Division
    1449             :         ocPow,              //   19 Potenzierung
    1450             :         ocEqual,            //   20 Equality
    1451             :         ocNotEqual,         //   21 Inequality
    1452             :         ocLessEqual,        //   22 Kleiner-gleich
    1453             :         ocGreaterEqual,     //   23 Groesser-gleich
    1454             :         ocLess,             //   24 Kleiner
    1455             :         ocGreater,          //   25 Groesser
    1456             :         ocAnd,              //   26 And (logisch)
    1457             :         ocOr,               //   27 Or (logisch)
    1458             :         ocNot,              //   28 Not (logisch)
    1459             :         ocPush,             //   29 unaeres Plus
    1460             :         ocAmpersand,        //   30 Concatenation
    1461             :         ocNotAvail,         //   31 Not available
    1462             :         ocNoName,           //   32 Error
    1463             :         ocAbs,              //   33 Betrag ABS()
    1464             :         ocInt,              //   34 Ganzzahl INT()
    1465             :         ocSqrt,             //   35 Quadratwurzel
    1466             :         ocLog10,            //   36 Zehnerlogarithmus
    1467             :         ocLn,               //   37 Natuerlicher Logarithmus
    1468             :         ocPi,               //   38 Pi
    1469             :         ocSin,              //   39 Sinus
    1470             :         ocCos,              //   40 Cosinus
    1471             :         ocTan,              //   41 Tangens
    1472             :         ocArcTan2,          //   42 Arcus-Tangens 2 (4.Quadrant)
    1473             :         ocArcTan,           //   43 Arcus-Tangens (2.Quadrant)
    1474             :         ocArcSin,           //   44 Arcus-Sinus
    1475             :         ocArcCos,           //   45 Arcus-Cosinus
    1476             :         ocExp,              //   46 Exponentialfunktion
    1477             :         ocMod,              //   47 Modulo
    1478             :         ocChose,            //   48 Selection
    1479             :         ocIsNA,             //   49 Is not available?
    1480             :         ocIsError,          //   50 Is Error?
    1481             :         ocFalse,            //   51 FALSE
    1482             :         ocTrue,             //   52 TRUE
    1483             :         ocRandom,           //   53 Zufallszahl
    1484             :         ocGetDate,          //   54 Datum
    1485             :         ocGetActDate,       //   55 Heute
    1486             :         ocRMZ,              //   56 Payment
    1487             :         ocBW,               //   57 Present Value
    1488             :         ocZW,               //   58 Future Value
    1489             :         ocIf,               //   59 If... then... else...
    1490             :         ocGetDay,           //   60 Tag des Monats
    1491             :         ocGetMonth,         //   61 Month
    1492             :         ocGetYear,          //   62 Year
    1493             :         ocRound,            //   63 Round
    1494             :         ocGetTime,          //   64 Time
    1495             :         ocGetHour,          //   65 Hour
    1496             :         ocGetMin,           //   66 Minute
    1497             :         ocGetSec,           //   67 Second
    1498             :         ocIsValue,          //   68 Is number?
    1499             :         ocIsString,         //   69 Is text?
    1500             :         ocLen,              //   70 Len()
    1501             :         ocValue,            //   71 Val()
    1502             :         ocFixed,            //   72 String()    ocFixed ersatzweise + Spezialfall
    1503             :         ocMid,              //   73 Mid()
    1504             :         ocChar,             //   74 Char()
    1505             :         ocCode,             //   75 Ascii()
    1506             :         ocFind,             //   76 Find()
    1507             :         ocGetDateValue,     //   77 Datevalue
    1508             :         ocGetTimeValue,     //   78 Timevalue
    1509             :         ocNoName,           //   79 Cellpointer
    1510             :         ocSum,              //   80 Sum()
    1511             :         ocAverage,          //   81 Avg()
    1512             :         ocCount,            //   82 Cnt()
    1513             :         ocMin,              //   83 Min()
    1514             :         ocMax,              //   84 Max()
    1515             :         ocVLookup,          //   85 Vlookup()
    1516             :         ocNPV,              //   86 Npv()
    1517             :         ocVar,              //   87 Var()
    1518             :         ocStDev,            //   88 Std()
    1519             :         ocIRR,              //   89 Irr()
    1520             :         ocHLookup,          //   90 Hlookup()
    1521             :         ocDBSum,            //   91 XlfDsum
    1522             :         ocDBAverage,        //   92 XlfDaverage
    1523             :         ocDBCount,          //   93 XlfDcount
    1524             :         ocDBMin,            //   94 XlfDmin
    1525             :         ocDBMax,            //   95 XlfDmax
    1526             :         ocDBVar,            //   96 XlfDvar
    1527             :         ocDBStdDev,         //   97 XlfDstdev
    1528             :         ocIndex,            //   98 Index()
    1529             :         ocColumns,          //   99 Cols()
    1530             :         ocRows,             //  100 Rows()
    1531             :         ocRept,             //  101 Repeat()
    1532             :         ocUpper,            //  102 Upper()
    1533             :         ocLower,            //  103 Lower()
    1534             :         ocLeft,             //  104 Left()
    1535             :         ocRight,            //  105 Right()
    1536             :         ocReplace,          //  106 Replace()
    1537             :         ocPropper,          //  107 Proper()
    1538             :         ocNoName,           //  108 Cell()
    1539             :         ocTrim,             //  109 Trim()
    1540             :         ocClean,            //  110 Clean()
    1541             :         ocNoName,           //  111 F()     (Excel: T()?)
    1542             :         ocNoName,           //  112 W()
    1543             :         ocExact,            //  113 Exact()
    1544             :         ocNoName,           //  114 Call()
    1545             :         ocIndirect,         //  115 @@()
    1546             :         ocZins,             //  116 Rate()
    1547             :         ocNoName,           //  117 Term()
    1548             :         ocNoName,           //  118 Cterm()
    1549             :         ocLIA,              //  119 Sln()
    1550             :         ocDIA,              //  120 Syd(), Soy()
    1551             :         ocGDA,              //  121 Ddb()
    1552             :         ocNoName,           //  122 Splfunc
    1553             :         ocNoName,           //  123 Sheets
    1554             :         ocNoName,           //  124 Info
    1555             :         ocSumProduct,       //  125 Sumproduct
    1556             :         ocNoName,           //  126 Isrange
    1557             :         ocDBGet,            //  127 Dget
    1558             :         ocNoName,           //  128 Dquery
    1559             :         ocNoName,           //  129 Coord
    1560             :         ocNoName,           //  130 Reserved (internal)
    1561             :         ocGetActDate,       //  131 Today
    1562             :         ocNoName,           //  132 Vdb
    1563             :         ocDBVarP,           //  133 Dvars
    1564             :         ocDBStdDevP,        //  134 Dstds
    1565             :         ocVarP,             //  135 Vars
    1566             :         ocStDevP,           //  136 Stds
    1567             :         ocGetDiffDate360,   //  137 D360
    1568             :         ocNoName,           //  138 Reserved (internal)
    1569             :         ocNoName,           //  139 Isapp
    1570             :         ocNoName,           //  140 Isaaf
    1571             :         ocGetDayOfWeek,     //  141 Weekday
    1572             :         ocGetDiffDate,      //  142 Datedif
    1573             :         ocRank,             //  143 Rank
    1574             :         ocNoName,           //  144 Numberstring
    1575             :         ocNoName,           //  145 Datestring
    1576             :         ocNoName,           //  146 Decimal
    1577             :         ocNoName,           //  147 Hex
    1578             :         ocNoName,           //  148 Db
    1579             :         ocNoName,           //  149 Pmti
    1580             :         ocNoName,           //  150 Spi
    1581             :         ocNoName,           //  151 Fullp
    1582             :         ocNoName,           //  152 Halfp
    1583             :         ocNoName,           //  153 Pureavg
    1584             :         ocCount2,           //  154 Purecount
    1585             :         ocNoName,           //  155 Puremax
    1586             :         ocNoName,           //  156 Puremin
    1587             :         ocNoName,           //  157 Purestd
    1588             :         ocNoName,           //  158 Purevar
    1589             :         ocNoName,           //  159 Purestds
    1590             :         ocNoName,           //  160 Purevars
    1591             :         ocNoName,           //  161 Pmt2
    1592             :         ocNoName,           //  162 Pv2
    1593             :         ocNoName,           //  163 Fv2
    1594             :         ocNoName,           //  164 Term2
    1595             :         ocNoName,           //  165--                  <- new quantity ?
    1596             :         ocGetDiffDate360,   //  166 D360 (US-Version, ersatzweise wie ander D360-Funktion)
    1597             :         ocNoName,           //  167
    1598             :         ocNoName,           //  168
    1599             :         ocNoName,           //  169
    1600             :         ocNoName,           //  170
    1601             :         ocNoName,           //  171
    1602             :         ocNoName,           //  172
    1603             :         ocNoName,           //  173
    1604             :         ocNoName,           //  174
    1605             :         ocNoName,           //  175
    1606             :         ocNoName,           //  176
    1607             :         ocNoName,           //  177
    1608             :         ocNoName,           //  178
    1609             :         ocNoName,           //  179
    1610             :         ocNoName,           //  180
    1611             :         ocNoName,           //  181
    1612             :         ocNoName,           //  182
    1613             :         ocNoName,           //  183
    1614             :         ocNoName,           //  184
    1615             :         ocNoName,           //  185
    1616             :         ocNoName,           //  186
    1617             :         ocNoName,           //  187
    1618             :         ocNoName,           //  188
    1619             :         ocNoName,           //  189
    1620             :         ocNoName,           //  190
    1621             :         ocNoName,           //  191
    1622             :         ocNoName,           //  192
    1623             :         ocNoName,           //  193
    1624             :         ocNoName,           //  194
    1625             :         ocNoName,           //  195
    1626             :         ocNoName,           //  196
    1627             :         ocNoName,           //  197
    1628             :         ocNoName,           //  198
    1629             :         ocNoName,           //  199
    1630             :         ocNoName,           //  200
    1631             :         ocNoName,           //  201
    1632             :         ocNoName,           //  202
    1633             :         ocNoName,           //  203
    1634             :         ocNoName,           //  204
    1635             :         ocNoName,           //  205
    1636             :         ocNoName,           //  206 ?
    1637             :         ocNoName,           //  207
    1638             :         ocNoName,           //  208
    1639             :         ocNoName,           //  209
    1640             :         ocNoName,           //  210
    1641             :         ocNoName,           //  211
    1642             :         ocNoName,           //  212
    1643             :         ocNoName,           //  213
    1644             :         ocNoName,           //  214
    1645             :         ocNoName,           //  215
    1646             :         ocNoName,           //  216
    1647             :         ocNoName,           //  217
    1648             :         ocNoName,           //  218
    1649             :         ocNoName,           //  219
    1650             :         ocNoName,           //  220
    1651             :         ocNoName,           //  221
    1652             :         ocNoName,           //  222
    1653             :         ocNoName,           //  223
    1654             :         ocNoName,           //  224
    1655             :         ocNoName,           //  225
    1656             :         ocNoName,           //  226
    1657             :         ocNoName,           //  227
    1658             :         ocNoName,           //  228
    1659             :         ocNoName,           //  229
    1660             :         ocNoName,           //  230
    1661             :         ocNoName,           //  231
    1662             :         ocNoName,           //  232
    1663             :         ocNoName,           //  233
    1664             :         ocNoName,           //  234
    1665             :         ocNoName,           //  235
    1666             :         ocNoName,           //  236
    1667             :         ocNoName,           //  237
    1668             :         ocNoName,           //  238
    1669             :         ocNoName,           //  239
    1670             :         ocNoName,           //  240
    1671             :         ocNoName,           //  241
    1672             :         ocNoName,           //  242
    1673             :         ocNoName,           //  243
    1674             :         ocNoName,           //  244
    1675             :         ocNoName,           //  245
    1676             :         ocNoName,           //  246
    1677             :         ocNoName,           //  247
    1678             :         ocNoName,           //  248
    1679             :         ocNoName,           //  249
    1680             :         ocNoName,           //  250
    1681             :         ocNoName,           //  251
    1682             :         ocNoName,           //  252
    1683             :         ocNoName,           //  253
    1684             :         ocNoName,           //  254
    1685             :         ocNoName            //  255 ?
    1686             :     };
    1687             : 
    1688          16 :     return pToken[ nIndex ];
    1689             : }
    1690             : 
    1691             : 
    1692           0 : const sal_Char* GetAddInName( const sal_uInt8 n )
    1693             : {
    1694             :     static const sal_Char*  pNames[ 256 ] =
    1695             :     {
    1696             :         NULL,                       //    0 8-Byte-IEEE-Float
    1697             :         NULL,                       //    1 Variable
    1698             :         NULL,                       //    2 Bereich
    1699             :         NULL,                       //    3 return
    1700             :         NULL,                       //    4 Bracket
    1701             :         NULL,                       //    5 2-Byte-Integer
    1702             :         NULL,                       //    6 ASCII-String
    1703             :         NULL,                       //    7 Named range reference
    1704             :         NULL,                       //    8 Absolut named range
    1705             :         NULL,                       //    9 Err range reference
    1706             :         NULL,                       //   10 Err cell reference
    1707             :         NULL,                       //   11 Err constant
    1708             :         NULL,                       //   12
    1709             :         NULL,                       //   13
    1710             :         NULL,                       //   14 Negation
    1711             :         NULL,                       //   15 Addition
    1712             :         NULL,                       //   16 Subtraktion
    1713             :         NULL,                       //   17 Multiplikation
    1714             :         NULL,                       //   18 Division
    1715             :         NULL,                       //   19 Potenzierung
    1716             :         NULL,                       //   20 Gleichheit
    1717             :         NULL,                       //   21 Ungleich
    1718             :         NULL,                       //   22 Kleiner-gleich
    1719             :         NULL,                       //   23 Groesser-gleich
    1720             :         NULL,                       //   24 Kleiner
    1721             :         NULL,                       //   25 Groesser
    1722             :         NULL,                       //   26 And (logisch)
    1723             :         NULL,                       //   27 Or (logisch)
    1724             :         NULL,                       //   28 Not (logisch)
    1725             :         NULL,                       //   29 unaeres Plus
    1726             :         NULL,                       //   30 Concatenation
    1727             :         NULL,                       //   31 Not applicable
    1728             :         NULL,                       //   32 Error
    1729             :         NULL,                       //   33 Betrag ABS()
    1730             :         NULL,                       //   34 Ganzzahl INT()
    1731             :         NULL,                       //   35 Quadratwurzel
    1732             :         NULL,                       //   36 Zehnerlogarithmus
    1733             :         NULL,                       //   37 Natuerlicher Logarithmus
    1734             :         NULL,                       //   38 PI
    1735             :         NULL,                       //   39 Sinus
    1736             :         NULL,                       //   40 Cosinus
    1737             :         NULL,                       //   41 Tangens
    1738             :         NULL,                       //   42 Arcus-Tangens 2 (4.Quadrant)
    1739             :         NULL,                       //   43 Arcus-Tangens (2.Quadrant)
    1740             :         NULL,                       //   44 Arcus-Sinus
    1741             :         NULL,                       //   45 Arcus-Cosinus
    1742             :         NULL,                       //   46 Exponentialfunktion
    1743             :         NULL,                       //   47 Modulo
    1744             :         NULL,                       //   48 Auswahl
    1745             :         NULL,                       //   49 Is not applicable?
    1746             :         NULL,                       //   50 Is Error?
    1747             :         NULL,                       //   51 FALSE
    1748             :         NULL,                       //   52 TRUE
    1749             :         NULL,                       //   53 Zufallszahl
    1750             :         NULL,                       //   54 Datum
    1751             :         NULL,                       //   55 Heute
    1752             :         NULL,                       //   56 Payment
    1753             :         NULL,                       //   57 Present Value
    1754             :         NULL,                       //   58 Future Value
    1755             :         NULL,                       //   59 If ... then ... else ...
    1756             :         NULL,                       //   60 Tag des Monats
    1757             :         NULL,                       //   61 Monat
    1758             :         NULL,                       //   62 Jahr
    1759             :         NULL,                       //   63 Runden
    1760             :         NULL,                       //   64 Zeit
    1761             :         NULL,                       //   65 Stunde
    1762             :         NULL,                       //   66 Minute
    1763             :         NULL,                       //   67 Sekunde
    1764             :         NULL,                       //   68 Ist Zahl?
    1765             :         NULL,                       //   69 Ist Text?
    1766             :         NULL,                       //   70 Len()
    1767             :         NULL,                       //   71 Val()
    1768             :         NULL,                       //   72 String()    ocFixed ersatzweise + Spezialfall
    1769             :         NULL,                       //   73 Mid()
    1770             :         NULL,                       //   74 Char()
    1771             :         NULL,                       //   75 Ascii()
    1772             :         NULL,                       //   76 Find()
    1773             :         NULL,                       //   77 Datevalue
    1774             :         NULL,                       //   78 Timevalue
    1775             :         "ZELLZEIGER",               //   79 Cellpointer
    1776             :         NULL,                       //   80 Sum()
    1777             :         NULL,                       //   81 Avg()
    1778             :         NULL,                       //   82 Cnt()
    1779             :         NULL,                       //   83 Min()
    1780             :         NULL,                       //   84 Max()
    1781             :         NULL,                       //   85 Vlookup()
    1782             :         NULL,                       //   86 Npv()
    1783             :         NULL,                       //   87 Var()
    1784             :         NULL,                       //   88 Std()
    1785             :         NULL,                       //   89 Irr()
    1786             :         NULL,                       //   90 Hlookup()
    1787             :         NULL,                       //   91 XlfDsum
    1788             :         NULL,                       //   92 XlfDaverage
    1789             :         NULL,                       //   93 XlfDcount
    1790             :         NULL,                       //   94 XlfDmin
    1791             :         NULL,                       //   95 XlfDmax
    1792             :         NULL,                       //   96 XlfDvar
    1793             :         NULL,                       //   97 XlfDstdev
    1794             :         NULL,                       //   98 Index()
    1795             :         NULL,                       //   99 Cols()
    1796             :         NULL,                       //  100 Rows()
    1797             :         NULL,                       //  101 Repeat()
    1798             :         NULL,                       //  102 Upper()
    1799             :         NULL,                       //  103 Lower()
    1800             :         NULL,                       //  104 Left()
    1801             :         NULL,                       //  105 Right()
    1802             :         NULL,                       //  106 Replace()
    1803             :         NULL,                       //  107 Proper()
    1804             :         "ZELLE",                    //  108 Cell()
    1805             :         NULL,                       //  109 Trim()
    1806             :         NULL,                       //  110 Clean()
    1807             :         "F",                        //  111 F()     (Excel: T()?)
    1808             :         "W",                        //  112 W()
    1809             :         NULL,                       //  113 Exact()
    1810             :         NULL,                       //  114 Call()
    1811             :         NULL,                       //  115 @@()
    1812             :         NULL,                       //  116 Rate()
    1813             :         "ANN",                      //  117 Term()
    1814             :         NULL,                       //  118 Cterm()
    1815             :         NULL,                       //  119 Sln()
    1816             :         NULL,                       //  120 Syd(), Soy()
    1817             :         NULL,                       //  121 Ddb()
    1818             :         "SplFunc",                  //  122 Splfunc
    1819             :         "BLAETTER",                 //  123 Sheets
    1820             :         "INFO",                     //  124 Info
    1821             :         NULL,                       //  125 Sumproduct
    1822             :         "ISTBEREICH",               //  126 Isrange
    1823             :         NULL,                       //  127 Dget
    1824             :         "DABFRAGE",                 //  128 Dquery
    1825             :         "KOORD",                    //  129 Coord
    1826             :         NULL,                       //  130 Reserved (internal)
    1827             :         NULL,                       //  131 Today
    1828             :         NULL,                       //  132 Vdb
    1829             :         NULL,                       //  133 Dvars
    1830             :         NULL,                       //  134 Dstds
    1831             :         NULL,                       //  135 Vars
    1832             :         NULL,                       //  136 Stds
    1833             :         NULL,                       //  137 D360
    1834             :         NULL,                       //  138 Reserved (internal)
    1835             :         NULL,                       //  139 Isapp
    1836             :         "ISTDEFZUS",                //  140 Isaaf
    1837             :         NULL,                       //  141 Weekday
    1838             :         NULL,                       //  142 Datedif
    1839             :         NULL,                       //  143 Rank
    1840             :         NULL,                       //  144 Numberstring
    1841             :         "DATUMFOLGE",               //  145 Datestring
    1842             :         "DEZIMAL",                  //  146 Decimal
    1843             :         "HEX",                      //  147 Hex
    1844             :         NULL,                       //  148 Db
    1845             :         NULL,                       //  149 Pmti
    1846             :         NULL,                       //  150 Spi
    1847             :         NULL,                       //  151 Fullp
    1848             :         NULL,                       //  152 Halfp
    1849             :         "PURMITTELWERT",            //  153 Pureavg
    1850             :         "PURquantity",                //  154 Purecount
    1851             :         "PURMAX",                   //  155 Puremax
    1852             :         "PURMIN",                   //  156 Puremin
    1853             :         "PURSTDABW",                //  157 Purestd
    1854             :         "PURVAR",                   //  158 Purevar
    1855             :         "PURSTDABWP",               //  159 Purestds
    1856             :         "PURVARP",                  //  160 Purevars
    1857             :         NULL,                       //  161 Pmt2
    1858             :         NULL,                       //  162 Pv2
    1859             :         NULL,                       //  163 Fv2
    1860             :         NULL,                       //  164 Term2
    1861             :         NULL,                       //  165--                  <- new quantity ?
    1862             :         NULL,                       //  166 D360 (US-Version, ersatzweise wie ander D360-Funktion)
    1863             :         NULL,                       //  167
    1864             :         NULL,                       //  168
    1865             :         NULL,                       //  169
    1866             :         NULL,                       //  170
    1867             :         NULL,                       //  171
    1868             :         NULL,                       //  172
    1869             :         NULL,                       //  173
    1870             :         NULL,                       //  174
    1871             :         NULL,                       //  175
    1872             :         NULL,                       //  176
    1873             :         NULL,                       //  177
    1874             :         NULL,                       //  178
    1875             :         NULL,                       //  179
    1876             :         NULL,                       //  180
    1877             :         NULL,                       //  181
    1878             :         NULL,                       //  182
    1879             :         NULL,                       //  183
    1880             :         NULL,                       //  184
    1881             :         NULL,                       //  185
    1882             :         NULL,                       //  186
    1883             :         NULL,                       //  187
    1884             :         NULL,                       //  188
    1885             :         NULL,                       //  189
    1886             :         NULL,                       //  190
    1887             :         NULL,                       //  191
    1888             :         NULL,                       //  192
    1889             :         NULL,                       //  193
    1890             :         NULL,                       //  194
    1891             :         NULL,                       //  195
    1892             :         NULL,                       //  196
    1893             :         NULL,                       //  197
    1894             :         NULL,                       //  198
    1895             :         NULL,                       //  199
    1896             :         NULL,                       //  200
    1897             :         NULL,                       //  201
    1898             :         NULL,                       //  202
    1899             :         NULL,                       //  203
    1900             :         NULL,                       //  204
    1901             :         NULL,                       //  205
    1902             :         NULL,                       //  206 ?
    1903             :         NULL,                       //  207
    1904             :         NULL,                       //  208
    1905             :         NULL,                       //  209
    1906             :         NULL,                       //  210
    1907             :         NULL,                       //  211
    1908             :         NULL,                       //  212
    1909             :         NULL,                       //  213
    1910             :         NULL,                       //  214
    1911             :         NULL,                       //  215
    1912             :         NULL,                       //  216
    1913             :         NULL,                       //  217
    1914             :         NULL,                       //  218
    1915             :         NULL,                       //  219
    1916             :         NULL,                       //  220
    1917             :         NULL,                       //  221
    1918             :         NULL,                       //  222
    1919             :         NULL,                       //  223
    1920             :         NULL,                       //  224
    1921             :         NULL,                       //  225
    1922             :         NULL,                       //  226
    1923             :         NULL,                       //  227
    1924             :         NULL,                       //  228
    1925             :         NULL,                       //  229
    1926             :         NULL,                       //  230
    1927             :         NULL,                       //  231
    1928             :         NULL,                       //  232
    1929             :         NULL,                       //  233
    1930             :         NULL,                       //  234
    1931             :         NULL,                       //  235
    1932             :         NULL,                       //  236
    1933             :         NULL,                       //  237
    1934             :         NULL,                       //  238
    1935             :         NULL,                       //  239
    1936             :         NULL,                       //  240
    1937             :         NULL,                       //  241
    1938             :         NULL,                       //  242
    1939             :         NULL,                       //  243
    1940             :         NULL,                       //  244
    1941             :         NULL,                       //  245
    1942             :         NULL,                       //  246
    1943             :         NULL,                       //  247
    1944             :         NULL,                       //  248
    1945             :         NULL,                       //  249
    1946             :         NULL,                       //  250
    1947             :         NULL,                       //  251
    1948             :         NULL,                       //  252
    1949             :         NULL,                       //  253
    1950             :         NULL,                       //  254
    1951             :         NULL                        //  255 ?
    1952             :     };
    1953             : 
    1954           0 :     return pNames[ n ];
    1955             : }
    1956             : 
    1957             : 
    1958           0 : static DefTokenId lcl_KnownAddIn( const OString& rTest )
    1959             : {
    1960           0 :     DefTokenId  eId = ocNoName;
    1961             : 
    1962           0 :     if (rTest == "FACT")
    1963           0 :             eId = ocFact;
    1964           0 :     else if (rTest == "ISEMPTY")
    1965           0 :             eId=ocIsEmpty;
    1966           0 :     else if (rTest == "DEGTORAD")
    1967           0 :             eId=ocRad;
    1968           0 :     else if (rTest == "RADTODEG")
    1969           0 :             eId=ocDeg;
    1970           0 :     else if (rTest == "SIGN")
    1971           0 :             eId=ocPlusMinus;
    1972           0 :     else if (rTest == "ACOSH")
    1973           0 :             eId=ocArcCosHyp;
    1974           0 :     else if (rTest == "ACOTH")
    1975           0 :             eId=ocArcCotHyp;
    1976           0 :     else if (rTest == "ASINH")
    1977           0 :             eId=ocArcSinHyp;
    1978           0 :     else if (rTest == "ATANH")
    1979           0 :             eId=ocArcTanHyp;
    1980           0 :     else if (rTest == "COSH")
    1981           0 :             eId=ocCosHyp;
    1982           0 :     else if (rTest == "COTH")
    1983           0 :             eId=ocCotHyp;
    1984           0 :     else if (rTest == "SINH")
    1985           0 :             eId=ocSinHyp;
    1986           0 :     else if (rTest == "TANH")
    1987           0 :             eId=ocTanHyp;
    1988           0 :     else if (rTest == "EVEN")
    1989           0 :             eId=ocIsEven;
    1990           0 :     else if (rTest == "ODD")
    1991           0 :             eId=ocIsOdd;
    1992           0 :     else if (rTest == "ACOT")
    1993           0 :             eId=ocArcCot;
    1994           0 :     else if (rTest == "COT")
    1995           0 :             eId=ocCot;
    1996           0 :     else if (rTest == "TRUNC")
    1997           0 :             eId=ocTrunc;
    1998           0 :     else if (rTest == "GEOMEAN")
    1999           0 :             eId=ocGeoMean;
    2000           0 :     else if (rTest == "HARMEAN")
    2001           0 :             eId=ocHarMean;
    2002           0 :     else if (rTest == "CORREL")
    2003           0 :             eId=ocCorrel;
    2004           0 :     else if (rTest == "MEDIAN")
    2005           0 :             eId=ocMedian;
    2006           0 :     else if (rTest == "COV")
    2007           0 :             eId=ocCovar;
    2008           0 :     else if (rTest == "SKEWNESS")
    2009           0 :             eId=ocSchiefe;
    2010           0 :     else if (rTest == "CHITEST")
    2011           0 :             eId=ocChiTest;
    2012           0 :     else if (rTest == "FTEST")
    2013           0 :             eId=ocFTest;
    2014           0 :     else if (rTest == "AVEDEV")
    2015           0 :             eId=ocAveDev;
    2016           0 :     else if (rTest == "PRODUCT")
    2017           0 :             eId=ocProduct;
    2018           0 :     else if (rTest == "PERMUT")
    2019           0 :             eId=ocVariationen;
    2020           0 :     else if (rTest == "GAMMALN")
    2021           0 :             eId=ocGammaLn;
    2022           0 :     else if (rTest =="POISSON")
    2023           0 :             eId=ocPoissonDist;
    2024           0 :     else if (rTest == "NORMAL")
    2025           0 :             eId=ocNormDist;
    2026           0 :     else if (rTest == "CRITBINOMIAL")
    2027           0 :             eId=ocKritBinom;
    2028           0 :     return eId;
    2029             : }
    2030             : 
    2031             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10