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