1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 25 #ifndef SC_QPROFORM_HXX 26 #define SC_QPROFORM_HXX 27 28 #include <sal/config.h> 29 #include "formel.hxx" 30 #include <tools/string.hxx> 31 #include "qpro.hxx" 32 33 #include <compiler.hxx> 34 typedef OpCode DefTokenId; 35 36 enum FUNC_TYPE 37 { 38 FT_Return, 39 FT_FuncFix0, 40 FT_FuncFix1, 41 FT_FuncFix2, 42 FT_FuncFix3, 43 FT_FuncFix4, 44 FT_FuncFix5, 45 FT_FuncFix6, 46 FT_FuncVar, 47 FT_DLL, 48 FT_Neg, 49 FT_Op, 50 FT_NotImpl, 51 FT_ConstFloat, 52 FT_Range, 53 FT_Braces, 54 FT_ConstInt, 55 FT_ConstString, 56 FT_NOP, 57 FT_Cref 58 }; 59 60 class QProToSc : public ConverterBase 61 { 62 private: 63 TokenId mnAddToken; 64 TokenId mnSubToken; 65 TokenId mn0Token; 66 SvStream& maIn; 67 68 public: 69 static const size_t nBufSize = 256; 70 QProToSc( SvStream &aStr, const ScAddress& rRefPos ); ~QProToSc()71 ~QProToSc(){ }; 72 ConvErr Convert( const ScTokenArray*& pArray, sal_uInt16 nLen, 73 const FORMULA_TYPE eFT = FT_CellFormula ); 74 void DoFunc( DefTokenId eOc, sal_uInt16 nArgs, const sal_Char* pExtString ); 75 void ReadSRD( ScSingleRefData& rR, sal_Int8 nPage, sal_Int8 nCol, sal_uInt16 rRel ); 76 void IncToken( TokenId &aParam ); 77 DefTokenId IndexToToken( sal_uInt16 nToken ); 78 FUNC_TYPE IndexToType( sal_uInt8 nToken ); 79 DefTokenId IndexToDLLId( sal_uInt16 nIndex ); 80 const sal_Char* getString( sal_uInt8 nIndex ); 81 }; 82 #endif 83