LibreOffice Module sc (master)  1
qproform.cxx
Go to the documentation of this file.
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 <sal/config.h>
21 #include <sal/macros.h>
22 #include <sal/log.hxx>
23 
24 #include <qproform.hxx>
25 #include <formel.hxx>
26 #include <tokstack.hxx>
27 
28 void QProToSc::ReadSRD( const ScDocument& rDoc, ScSingleRefData& rSRD, sal_Int8 nPage, sal_Int8 nCol, sal_uInt16 nRelBit )
29 {
30  sal_uInt16 nTmp = nRelBit & 0x1fff;
31  rSRD.InitAddress( ScAddress( nCol, (~nTmp + 1), 0 ) );
32  if( nRelBit & 0x4000 )
33  {
34  rSRD.SetRelCol(nCol);
35  }
36  else
37  {
38  rSRD.SetAbsCol(nCol);
39  }
40 
41  if( nRelBit & 0x2000 )
42  {
43  SCROW nRelRow = static_cast<sal_Int16>(nTmp << 3); // This looks weird... Mistake?
44  nRelRow /= 8;
45  rSRD.SetRelRow(nRelRow);
46  }
47  else
48  {
49  rSRD.SetAbsRow(nTmp);
50  }
51  if( nRelBit & 0x8000 )
52  {
53  rSRD.SetRelTab(nPage);
54  }
55  else
56  {
57  rSRD.SetAbsTab(nPage);
58  }
59  if (rSRD.toAbs(rDoc, aEingPos).Tab() != aEingPos.Tab())
60  rSRD.SetFlag3D(true);
61 }
62 
63 QProToSc::QProToSc( SvStream& rStream, svl::SharedStringPool& rSPool, const ScAddress& rRefPos ) :
64  ConverterBase(rSPool),
65  maIn( rStream )
66 {
67  aEingPos = rRefPos;
68 }
69 
70 void QProToSc::DoFunc( DefTokenId eOc, sal_uInt16 nArgs, const char* pExtString )
71 {
72  TokenId eParam[ nBufSize ];
73  sal_Int32 nCount;
74  TokenId nPush;
75 
76  bool bAddIn = false;
77 
78  if( eOc == ocNoName )
79  {
80  bAddIn = true;
81  if( pExtString )
82  {
83  OString s = OString::Concat("QPRO_") + pExtString;
84  nPush = aPool.Store(eOc, OStringToOUString(s, maIn.GetStreamCharSet()));
85  aPool << nPush;
86  }
87  else
88  aPool << ocNoName;
89  }
90 
91  if( nArgs < nBufSize )
92  {
93  for( nCount = 0; nCount < nArgs && aStack.HasMoreTokens() ; nCount++ )
94  aStack >> eParam[ nCount ];
95 
96  if (nCount < nArgs)
97  // Adapt count to reality. All sort of binary crap is possible.
98  nArgs = static_cast<sal_uInt16>(nCount);
99  }
100  else
101  return;
102 
103  switch( eOc )
104  {
105  case ocIndex:
106  nPush = eParam[ 0 ];
107  eParam[ 0 ] = eParam[ 1 ];
108  eParam[ 1 ] = nPush;
109  IncToken( eParam[ 0 ] );
110  IncToken( eParam[ 1 ] );
111  break;
112 
113  case ocIRR:
114  nPush = eParam[ 0 ];
115  eParam[ 0 ] = eParam[ 1 ];
116  eParam[ 1 ] = nPush;
117  break;
118 
119  case ocGetYear:
120  nPush = aPool.Store( 1900.0 );
121  aPool << ocOpen;
122  break;
123 
124  default:
125  break;
126  }
127 
128  if( !bAddIn )
129  aPool << eOc;
130 
131  aPool << ocOpen;
132 
133  if( nArgs> 0 )
134  {
135  if( eOc == ocRRI )
136  {
137  // There should be at least 3 arguments, but with binary crap may not...
138  SAL_WARN_IF( nArgs < 3, "sc.filter","QProToSc::DoFunc - ocRRI expects 3 parameters but got " << nArgs);
139  // Store first 3 parameters to pool in order 2,1,0
140  if (nArgs > 3)
141  nArgs = 3;
142  }
143  else if( eOc == ocIpmt )
144  {
145  // There should be at least 4 arguments, but with binary crap may not...
146  SAL_WARN_IF( nArgs < 4, "sc.filter","QProToSc::DoFunc - ocIpmt expects 4 parameters but got " << nArgs);
147  // Store first 4 parameters to pool in order 3,2,1,0
148  if (nArgs > 4)
149  nArgs = 4;
150  }
151 
152  sal_Int16 nLast = nArgs - 1;
153  aPool << eParam[ nLast ];
154  for( nCount = nLast - 1 ; nCount >= 0 ; nCount-- )
155  {
156  aPool << ocSep << eParam[ nCount ];
157  }
158  }
159 
160  if( eOc == ocGetYear )
161  aPool << ocClose << ocSub << nPush;
162  else if( eOc == ocFixed )
163  aPool << ocSep << ocTrue << ocOpen << ocClose;
164 
165  aPool << ocClose;
166  aPool >> aStack;
167 }
168 
170 {
171  aPool << ocOpen << rParam << mnAddToken;
172  rParam = aPool.Store();
173 }
174 
175 #define SAFEDEC_OR_RET(nRef, amt, ret) \
176 do { \
177  if (nRef < amt)\
178  return ret; \
179  nRef-=amt; \
180 } while(false)
181 
182 #define SAFEREAD_OR_BREAK( aStream, i, nRef, eRet, ret ) \
183  if (!aStream.good()) \
184  { \
185  i = nRef-1; /* will be incremented at end of while */ \
186  eRet = ret; \
187  break; /* switch */ \
188  }
189 
190 ConvErr QProToSc::Convert( const ScDocument& rDoc, std::unique_ptr<ScTokenArray>& pArray )
191 {
192  sal_uInt8 nFmla[ nBufSize ] = {0};
193  sal_uInt8 nArgArray[ nBufSize ] = {0};
194  sal_Int8 nCol, nPage;
195  sal_uInt16 nIntCount = 0, nStringCount = 0, nFloatCount = 0, nDLLCount = 0, nArgCount = 0;
196  sal_uInt16 nIntArray[ nBufSize ] = {0};
197  OUString sStringArray[ nBufSize ];
198  sal_uInt16 nDLLArray[ nBufSize ] = {0};
199  sal_uInt16 nNote, nRelBits;
200  TokenId nPush;
201  ScComplexRefData aCRD;
202  ScSingleRefData aSRD;
204  DefTokenId eOc;
205  double nFloatArray[ nBufSize ] = {0};
206  const char* pExtString = nullptr;
207 
208  aCRD.InitFlags();
209  aSRD.InitFlags();
210  sal_uInt16 nRef = 0;
211  maIn.ReadUInt16( nRef );
212 
213  if( nRef < nBufSize )
214  {
215  for( sal_uInt16 i=0; i < nRef; i++)
216  {
217  maIn.ReadUChar( nFmla[i] );
218 
219  if( nFmla[ i ] == 0x05 )
220  {
221  sal_uInt16 nInt = 0;
222  maIn.ReadUInt16( nInt );
223  nIntArray[ nIntCount ] = nInt;
224  SAFEDEC_OR_RET(nRef, 2, ConvErr::Count);
225  nIntCount++;
226  }
227 
228  if( nFmla[ i ] == 0x00 )
229  {
230  double nFloat = 0;
231  maIn.ReadDouble( nFloat );
232  nFloatArray[ nFloatCount ] = nFloat;
233  SAFEDEC_OR_RET(nRef, 8, ConvErr::Count);
234  nFloatCount++;
235  }
236 
237  if( nFmla[ i ] == 0x1a )
238  {
239  sal_uInt8 nArg = 0;
240  sal_uInt16 nDummy, nDLLId = 0;
241  maIn.ReadUChar( nArg ).ReadUInt16( nDummy ).ReadUInt16( nDLLId );
242  nArgArray[ nArgCount ] = nArg;
243  nDLLArray[ nDLLCount ] = nDLLId;
244  SAFEDEC_OR_RET(nRef, 5, ConvErr::Count);
245  nDLLCount++;
246  nArgCount++;
247  }
248  if( nFmla[ i ] == 0x06 )
249  {
251  sStringArray[ nStringCount ] = aTmp;
252  nStringCount++;
253  SAFEDEC_OR_RET(nRef, aTmp.getLength() + 1, ConvErr::Count);
254  }
255  }
256  }
257  else
258  return ConvErr::Count;
259 
260  sal_uInt16 i = 0;
261  nIntCount = 0;
262  nFloatCount = 0;
263  nDLLCount = 0;
264  nArgCount = 0;
265  nStringCount = 0;
266  ConvErr eRet = ConvErr::OK;
267 
268  while( i < nRef && ( nFmla[ i ] != 0x03 ) )
269  {
270  eType = IndexToType( nFmla[ i ] );
271  eOc = IndexToToken( nFmla[ i ] );
272  if( eOc == ocNoName )
273  pExtString = getString( nFmla[ i ] );
274 
275  switch( eType )
276  {
277  case FT_NotImpl:
278  DoFunc( ocNoName, 0, pExtString );
279  break;
280 
281  case FT_FuncFix0:
282  DoFunc( eOc, 0, nullptr );
283  break;
284 
285  case FT_FuncFix1:
286  DoFunc( eOc, 1, nullptr );
287  break;
288 
289  case FT_FuncFix2:
290  DoFunc( eOc, 2, nullptr );
291  break;
292 
293  case FT_FuncFix3:
294  DoFunc( eOc, 3, nullptr );
295  break;
296 
297  case FT_FuncFix4:
298  DoFunc( eOc, 4, nullptr );
299  break;
300 
301  case FT_FuncFix5:
302  DoFunc( eOc, 5, nullptr );
303  break;
304 
305  case FT_FuncFix6:
306  DoFunc( eOc, 6, nullptr );
307  break;
308 
309  case FT_DLL:{
310  eOc = IndexToDLLId( nDLLArray[ nDLLCount ] );
311  sal_uInt8 nPar = nArgArray[ nArgCount ];
312  DoFunc( eOc, nPar, nullptr );
313  nDLLCount++;
314  nArgCount++;
315  }
316  break;
317 
318  case FT_Cref : // Single cell reference
319  maIn.ReadUInt16( nNote ).ReadSChar( nCol ).ReadSChar( nPage ).ReadUInt16( nRelBits );
320  SAFEREAD_OR_BREAK( maIn, i, nRef, eRet, ConvErr::Count);
321  ReadSRD( rDoc, aSRD, nPage, nCol, nRelBits );
322  aStack << aPool.Store( aSRD );
323  break;
324 
325  case FT_Range: // Block reference
326  maIn.ReadUInt16( nNote ).ReadSChar( nCol ).ReadSChar( nPage ).ReadUInt16( nRelBits );
327  SAFEREAD_OR_BREAK( maIn, i, nRef, eRet, ConvErr::Count);
328  ReadSRD( rDoc, aCRD.Ref1, nPage, nCol, nRelBits );
329  maIn.ReadSChar( nCol ).ReadSChar( nPage ).ReadUInt16( nRelBits );
330  SAFEREAD_OR_BREAK( maIn, i, nRef, eRet, ConvErr::Count);
331  ReadSRD( rDoc, aCRD.Ref2, nPage, nCol, nRelBits );
332  // Sheet name of second corner is not displayed if identical
333  if (aCRD.Ref1.IsFlag3D() && aCRD.Ref1.Tab() == aCRD.Ref2.Tab() &&
334  aCRD.Ref1.IsTabRel() == aCRD.Ref2.IsTabRel())
335  aCRD.Ref2.SetFlag3D( false);
336  aStack << aPool.Store( aCRD );
337  break;
338 
339  case FT_FuncVar:{ // Sum of a sequence of numbers
340  i++;
341  sal_uInt8 nArgs = nFmla[ i ];
342  DoFunc( eOc, nArgs, nullptr );
343  }
344  break;
345 
346  case FT_Op: // operators
347  aStack >> nPush;
348  aPool << aStack << eOc << nPush;
349  aPool >> aStack;
350  break;
351 
352  case FT_Braces:
353  aPool << ocOpen << aStack << ocClose;
354  aPool >> aStack;
355  break;
356 
357  case FT_ConstInt:{
358  sal_uInt16 nVal;
359  nVal = nIntArray[ nIntCount ];
360  aStack << aPool.Store( static_cast<double>(nVal) );
361  nIntCount++;
362  }
363  break;
364 
365  case FT_ConstFloat:{
366  double nVal;
367  nVal = nFloatArray[ nFloatCount ];
368  aStack << aPool.Store( nVal );
369  nFloatCount++;
370  }
371  break;
372 
373  case FT_ConstString:{
374  OUString aLabel(sStringArray[ nStringCount ]);
375  aStack << aPool.Store( aLabel );
376  nStringCount++;
377  }
378  break;
379 
380  case FT_Neg:
381  aPool << ocNegSub << aStack;
382  aPool >> aStack;
383  break;
384 
385  case FT_NOP: // indicates invalid opcode.
386  case FT_Return: // indicates end of formula
387  break;
388  }
389  i++;
390  }
391  pArray = aPool.GetTokenArray(rDoc, aStack.Get());
392  return eRet;
393 }
394 
395 const struct
396 {
399 } aFuncMap[] = {
400  { ocPush, FT_ConstFloat },
401  { ocPush, FT_Cref },
402  { ocPush, FT_Range },
403  { ocPush, FT_Return },
404  { ocPush, FT_Braces },
405  { ocPush, FT_ConstInt },
406  { ocPush, FT_ConstString },
407  { ocPush, FT_NOP },
408  { ocNegSub, FT_Neg }, // 0x08
409  { ocAdd, FT_Op },
410  { ocSub, FT_Op },
411  { ocMul, FT_Op },
412  { ocDiv, FT_Op },
413  { ocPow, FT_Op },
414  { ocEqual, FT_Op },
415  { ocNotEqual, FT_Op },
416  { ocLessEqual, FT_Op }, // 0x10
417  { ocGreaterEqual, FT_Op },
418  { ocLess, FT_Op },
419  { ocGreater, FT_Op },
420  { ocAnd, FT_Op },
421  { ocOr, FT_Op },
422  { ocNot, FT_FuncFix1 },
423  { ocPush, FT_NOP }, // Unary plus
424  { ocAddress, FT_FuncFix4 }, // Address of
425  { ocNoName, FT_NotImpl }, // Halt function
426  { ocNoName, FT_DLL }, // DLL function
427  { ocNoName, FT_NOP }, // Extended operands
428  { ocNoName, FT_NOP }, // Extended operands
429  { ocNoName, FT_NOP }, // Reserved
430  { ocNoName, FT_NOP }, // Reserved
431  { ocNotAvail, FT_FuncFix0 }, // NA
432  { ocNoName, FT_FuncFix0 }, // Error // 0x20
433  { ocAbs, FT_FuncFix1 },
434  { ocInt, FT_FuncFix1 },
435  { ocSqrt, FT_FuncFix1 },
436  { ocLog10, FT_FuncFix1 },
437  { ocLn, FT_FuncFix1 },
438  { ocPi, FT_FuncFix0 },
439  { ocSin, FT_FuncFix1 },
440  { ocCos, FT_FuncFix1 },
441  { ocTan, FT_FuncFix1 },
442  { ocArcTan2, FT_FuncFix2 },
443  { ocArcTan, FT_FuncFix1 },
444  { ocArcSin, FT_FuncFix1 },
445  { ocArcCos, FT_FuncFix1 },
446  { ocExp, FT_FuncFix1 },
447  { ocMod, FT_FuncFix2 },
448  { ocChoose, FT_FuncVar }, // 0x30
449  { ocIsNA, FT_FuncFix1 },
450  { ocIsError, FT_FuncFix1 },
451  { ocFalse, FT_FuncFix0 },
452  { ocTrue, FT_FuncFix0 },
453  { ocRandom, FT_FuncFix0 },
454  { ocGetDate, FT_FuncFix3 },
456  { ocNoName, FT_NotImpl }, // QPro Pmt
457  { ocNoName, FT_NotImpl }, // QPro Pv
458  { ocNoName, FT_NotImpl }, // QPro Fv
459  { ocIf, FT_FuncFix3 },
460  { ocGetDay, FT_FuncFix1 },
461  { ocGetMonth, FT_FuncFix1 },
462  { ocGetYear, FT_FuncFix1 },
463  { ocRound, FT_FuncFix2 },
464  { ocGetTime, FT_FuncFix3 }, // 0x40
465  { ocGetHour, FT_FuncFix1 },
466  { ocGetMin, FT_FuncFix1 },
467  { ocGetSec, FT_FuncFix1 },
468  { ocIsValue, FT_FuncFix1 },
469  { ocIsString, FT_FuncFix1 },
470  { ocLen, FT_FuncFix1 },
471  { ocValue, FT_FuncFix1 },
472  { ocFixed, FT_FuncFix2 },
473  { ocMid, FT_FuncFix3 },
474  { ocChar, FT_FuncFix1 },
475  { ocCode, FT_FuncFix1 },
476  { ocFind, FT_FuncFix3 },
479  { ocNoName, FT_NotImpl },
480  { ocSum, FT_FuncVar }, // 0x50
481  { ocAverage, FT_FuncVar },
482  { ocCount, FT_FuncVar },
483  { ocMin, FT_FuncVar },
484  { ocMax, FT_FuncVar },
485  { ocVLookup, FT_FuncFix3 },
486  { ocNPV, FT_FuncFix2 },
487  { ocVar, FT_FuncVar },
488  { ocNormDist, FT_FuncVar },
489  { ocIRR, FT_FuncFix2 },
490  { ocHLookup, FT_FuncFix3 },
491  { ocDBSum, FT_FuncFix3 },
493  { ocDBCount, FT_FuncFix3 },
494  { ocDBMin, FT_FuncFix3 },
495  { ocDBMax, FT_FuncFix3 },
496  { ocDBVar, FT_FuncFix3 }, // 0x60
497  { ocDBStdDev, FT_FuncFix3 },
498  { ocNoName, FT_NotImpl },
499  { ocColumns, FT_FuncFix1 },
500  { ocRows, FT_FuncFix1 },
501  { ocRept, FT_FuncFix2 },
502  { ocUpper, FT_FuncFix1 },
503  { ocLower, FT_FuncFix1 },
504  { ocLeft, FT_FuncFix2 },
505  { ocRight, FT_FuncFix2 },
506  { ocReplace, FT_FuncFix4 },
507  { ocProper, FT_FuncFix1 },
508  { ocCell, FT_FuncFix2 },
509  { ocTrim, FT_FuncFix1 },
510  { ocClean, FT_FuncFix1 },
511  { ocNoName, FT_NotImpl },
512  { ocNoName, FT_NotImpl }, // 0x70
513  { ocExact, FT_FuncFix2 },
514  { ocNoName, FT_NotImpl }, // Call()
515  { ocIndirect, FT_FuncFix1 },
516  { ocRRI, FT_FuncFix3 }, // Interest
517  { ocNoName, FT_NotImpl },
518  { ocNoName, FT_NotImpl },
519  { ocSLN, FT_FuncFix3 },
520  { ocSYD, FT_FuncFix4 },
521  { ocDDB, FT_FuncFix4 },
522  { ocStDevP, FT_FuncVar },
523  { ocVarP, FT_FuncVar },
524  { ocDBStdDevP, FT_FuncVar },
525  { ocDBVarP, FT_FuncVar },
526  { ocPV, FT_FuncFix3 }, // QPro Pval
527  { ocPMT, FT_FuncFix5 }, // QPro Paymt
528  { ocFV, FT_FuncFix3 }, // QPro Fval // 0x80
529  { ocNper, FT_FuncFix5 },
530  { ocRate, FT_FuncFix5 },
531  { ocIpmt, FT_FuncFix4 },
532  { ocPpmt, FT_FuncFix6 },
534  { ocNoName, FT_NotImpl },
535  { ocNoName, FT_NotImpl },
536  { ocNoName, FT_NotImpl },
537  { ocNoName, FT_NotImpl },
538  { ocDeg, FT_FuncFix1 },
539  { ocRad, FT_FuncFix1 },
540  { ocNoName, FT_NotImpl },
541  { ocNoName, FT_NotImpl },
543  { ocNPV, FT_FuncFix2 },
544  { ocNoName, FT_NotImpl }, // 0x90
545  { ocNoName, FT_NotImpl },
546  { ocNoName, FT_NOP },
547  { ocNoName, FT_NOP }, // 147
548  { ocNoName, FT_NOP }, // 148
549  { ocNoName, FT_NOP }, // 149
550  { ocNoName, FT_NOP }, // 150
551  { ocNoName, FT_NOP }, // 151
552  { ocNoName, FT_NOP }, // 152
553  { ocNoName, FT_NOP }, // 153
554  { ocSheet, FT_FuncFix1 },
555  { ocNoName, FT_NOP }, // 155 - opcodes do not represent any function.
556  { ocNoName, FT_NOP }, // 156
557  { ocIndex, FT_FuncFix4 },
558  { ocNoName, FT_NotImpl },
559  { ocNoName, FT_NotImpl }, // Gives the property of the particular object
560  { ocNoName, FT_NotImpl }, // Dynamic Data Exchange Link // 0x100
561  { ocNoName, FT_NotImpl } // gives properties of DOS menus
562 };
563 
565 
566 DefTokenId QProToSc::IndexToToken( sal_uInt16 nIndex )
567 {
568  if( nIndex < nIndexCount )
569  return aFuncMap[ nIndex ].nToken;
570  return ocNoName;
571 }
572 
574 {
575  if( nIndex < nIndexCount )
576  return aFuncMap[ nIndex ].nType;
577  return FT_NotImpl;
578 }
579 
580 DefTokenId QProToSc::IndexToDLLId( sal_uInt16 nIndex )
581 {
582  DefTokenId eId;
583  switch( nIndex )
584  {
585  case 0x0001:
586  eId = ocAveDev;
587  break;
588 
589  case 0x0024:
590  eId = ocGCD;
591  break;
592 
593  case 0x0025:
594  eId = ocLCM;
595  break;
596 
597  case 0x0027:
598  eId = ocCeil;
599  break;
600 
601  case 0x0028:
602  eId = ocEven;
603  break;
604 
605  case 0x0022:
606  eId = ocFact;
607  break;
608 
609  case 0x002a:
610  eId = ocFloor;
611  break;
612 
613  case 0x002d:
614  eId = ocOdd;
615  break;
616 
617  case 0x0006:
618  eId = ocBetaDist;
619  break;
620 
621  case 0x0008:
622  eId = ocBetaInv;
623  break;
624 
625  case 0x0010:
626  eId = ocCovar;
627  break;
628 
629  case 0x000b:
630  eId = ocChiInv;
631  break;
632 
633  case 0x003d:
634  eId = ocPDuration;
635  break;
636 
637  case 0x0019:
638  eId = ocFInv;
639  break;
640 
641  case 0x001a:
642  eId = ocFisher;
643  break;
644 
645  case 0x001b:
646  eId = ocFisherInv;
647  break;
648 
649  case 0x0030:
650  eId = ocMedian;
651  break;
652 
653  default:
654  eId = ocNoName;
655  break;
656  }
657  return eId;
658 }
659 
660 const char* QProToSc::getString( sal_uInt8 nIndex )
661 {
662  const char* pExtString = nullptr;
663  switch( nIndex )
664  {
665  case 57:
666  pExtString = "Pv";
667  break;
668 
669  case 58:
670  pExtString = "Fv";
671  break;
672 
673  case 98:
674  pExtString = "Index2D";
675  break;
676 
677  case 111:
678  pExtString = "S";
679  break;
680 
681  case 112:
682  pExtString = "N";
683  break;
684 
685  case 114:
686  pExtString = "CALL";
687  break;
688 
689  case 117:
690  pExtString = "TERM";
691  break;
692 
693  case 118:
694  pExtString = "CTERM";
695  break;
696 
697  case 134:
698  pExtString = "MEMAVAIL";
699  break;
700 
701  case 135:
702  pExtString = "MEMEMSAVAIL";
703  break;
704 
705  case 136:
706  pExtString = "FILEEXISTS";
707  break;
708 
709  case 137:
710  pExtString = "CURVALUE";
711  break;
712 
713  case 140:
714  pExtString = "HEX";
715  break;
716 
717  case 141:
718  pExtString = "NUM";
719  break;
720 
721  case 145:
722  pExtString = "VERSION";
723  break;
724 
725  case 157:
726  pExtString = "INDEX3D";
727  break;
728 
729  case 158:
730  pExtString = "CELLINDEX3D";
731  break;
732 
733  case 159:
734  pExtString = "PROPERTY";
735  break;
736 
737  case 160:
738  pExtString = "DDE";
739  break;
740 
741  case 161:
742  pExtString = "COMMAND";
743  break;
744 
745  default:
746  pExtString = nullptr;
747  break;
748  }
749  return pExtString;
750 }
751 
752 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool IsTabRel() const
Definition: refdata.hxx:69
ocChoose
ocDBCount
ocStDevP
ocSqrt
ocLeft
ocEven
ocCell
ConvErr
Definition: formel.hxx:39
ocVar
ocPi
SvStream & ReadUInt16(sal_uInt16 &rUInt16)
Single reference (one address) into the sheet.
Definition: refdata.hxx:29
ocFixed
#define SAFEREAD_OR_BREAK(aStream, i, nRef, eRet, ret)
Definition: qproform.cxx:182
ocCos
ocPDuration
signed char sal_Int8
ocUpper
void InitFlags()
Definition: refdata.hxx:128
ScAddress toAbs(const ScSheetLimits &rLimits, const ScAddress &rPos) const
Definition: refdata.cxx:193
void SetRelCol(SCCOL nVal)
Definition: refdata.cxx:65
ocPpmt
ocDBMin
ConvErr Convert(const ScDocument &rDoc, std::unique_ptr< ScTokenArray > &pArray)
Definition: qproform.cxx:190
ocDBAverage
ocRept
ocClean
void SetRelTab(SCTAB nVal)
Definition: refdata.cxx:99
ocOpen
ocGetActTime
ocDBSum
ocExp
static DefTokenId IndexToDLLId(sal_uInt16 nIndex)
Definition: qproform.cxx:580
ocSLN
void IncToken(TokenId &aParam)
Definition: qproform.cxx:169
void SetAbsRow(SCROW nVal)
Definition: refdata.cxx:76
ocGetSec
ocPV
ocIsString
ocCount
ocChiInv
ocRad
ocMin
QProToSc(SvStream &aStr, svl::SharedStringPool &rSPool, const ScAddress &rRefPos)
Definition: qproform.cxx:63
ocAddress
ScAddress aEingPos
Definition: formel.hxx:80
ocFInv
ocIf
ocGetTimeValue
ocSYD
ocFisherInv
ocLower
ocHLookup
void DoFunc(DefTokenId eOc, sal_uInt16 nArgs, const char *pExtString)
Definition: qproform.cxx:70
ocIndex
ocNegSub
TokenId Store()
Definition: tokstack.hxx:403
TokenId mnAddToken
Definition: qproform.hxx:54
ocBetaDist
TokenId Get()
Definition: tokstack.hxx:280
ocRound
ocGetMin
void ReadSRD(const ScDocument &rDoc, ScSingleRefData &rR, sal_Int8 nPage, sal_Int8 nCol, sal_uInt16 rRel)
Definition: qproform.cxx:28
OpCode
ocSumProduct
ocAbs
int nCount
ocGetTime
ocGreater
ocEqual
ocReplace
SCTAB Tab() const
Definition: address.hxx:270
ocIsValue
ocNot
bool HasMoreTokens() const
Definition: tokstack.hxx:276
ocGetDay
ocMid
ocMedian
ocTrim
ocCode
ocDDB
ocColumns
ocSep
#define SAL_N_ELEMENTS(arr)
DocumentType eType
ocVarP
void SetRelRow(SCROW nVal)
Definition: refdata.cxx:82
OUString read_zeroTerminated_uInt8s_ToOUString(SvStream &rStream, rtl_TextEncoding eEnc)
ocFisher
ocDBMax
sal_Int32 nRef
ocFind
ocArcCos
ocFV
int i
ocNPV
void SetFlag3D(bool bVal)
Definition: refdata.hxx:89
ocMul
void InitAddress(const ScAddress &rAdr)
InitAddress: InitFlags and set address.
Definition: refdata.cxx:27
ocSheet
ocGetMonth
ocDBVar
void SetAbsCol(SCCOL nVal)
Definition: refdata.cxx:59
ocPush
ocSub
ScSingleRefData Ref1
Definition: refdata.hxx:124
ocFloor
static DefTokenId IndexToToken(sal_uInt16 nToken)
Definition: qproform.cxx:566
ocNotAvail
ScSingleRefData Ref2
Definition: refdata.hxx:125
ocLog10
ocCeil
ocLCM
ocMax
ocGetDate
ocInt
SvStream & ReadUChar(unsigned char &rChar)
ocDBStdDevP
const int nIndexCount
Definition: qproform.cxx:564
ocSin
ocRows
#define SAFEDEC_OR_RET(nRef, amt, ret)
Definition: qproform.cxx:175
void SetAbsTab(SCTAB nVal)
Definition: refdata.cxx:93
ocChar
ocVLookup
ocRate
SvStream & ReadDouble(double &rDouble)
ocGetDateValue
ocLess
SCTAB Tab() const
Definition: refdata.cxx:254
bool IsFlag3D() const
Definition: refdata.hxx:90
ocFalse
ocGetHour
std::unique_ptr< ScTokenArray > GetTokenArray(const ScDocument &rDoc, const TokenId &rId)
Definition: tokstack.hxx:410
ocIsError
TokenPool aPool
Definition: formel.hxx:78
ocBetaInv
ocOdd
ocIndirect
ocOr
ocTrue
sal_Int32 SCROW
Definition: types.hxx:17
DefTokenId nToken
Definition: qproform.cxx:397
ocFact
ocAdd
ocNoName
ocArcTan
ocAverage
static const size_t nBufSize
Definition: qproform.hxx:58
QPRO_FUNC_TYPE
Definition: qproform.hxx:27
ocMod
#define SAL_WARN_IF(condition, area, stream)
unsigned char sal_uInt8
ocRandom
ocDBVarP
TokenStack aStack
Definition: formel.hxx:79
ocArcSin
ocNper
ocAnd
void InitFlags()
No default ctor, because used in ScRawToken union, set InitFlags!
Definition: refdata.hxx:54
ocLn
rtl_TextEncoding GetStreamCharSet() const
OUString aLabel
ocGetActDate
QPRO_FUNC_TYPE nType
Definition: qproform.cxx:398
ocRRI
ocDiv
ocAveDev
Complex reference (a range) into the sheet.
Definition: refdata.hxx:122
static const char * getString(sal_uInt8 nIndex)
Definition: qproform.cxx:660
ocPow
ocIRR
ocNormDist
ocNotEqual
SvStream & maIn
Definition: qproform.hxx:55
ocPMT
ocDeg
ocGetYear
ocLessEqual
ocValue
ocIpmt
ocCovar
ocRight
ocGCD
ocIsNA
ocTan
ocDBStdDev
ocClose
ocLen
static QPRO_FUNC_TYPE IndexToType(sal_uInt8 nToken)
Definition: qproform.cxx:573
ocGreaterEqual
const struct @6 aFuncMap[]
ocArcTan2
ocSum
SvStream & ReadSChar(signed char &rChar)
ocExact
ocProper