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 : #ifndef INCLUDED_SC_SOURCE_FILTER_INC_QPROFORM_HXX
21 : #define INCLUDED_SC_SOURCE_FILTER_INC_QPROFORM_HXX
22 :
23 : #include <sal/config.h>
24 : #include "formel.hxx"
25 : #include "qpro.hxx"
26 :
27 : #include <compiler.hxx>
28 : typedef OpCode DefTokenId;
29 :
30 : enum FUNC_TYPE
31 : {
32 : FT_Return,
33 : FT_FuncFix0,
34 : FT_FuncFix1,
35 : FT_FuncFix2,
36 : FT_FuncFix3,
37 : FT_FuncFix4,
38 : FT_FuncFix5,
39 : FT_FuncFix6,
40 : FT_FuncVar,
41 : FT_DLL,
42 : FT_Neg,
43 : FT_Op,
44 : FT_NotImpl,
45 : FT_ConstFloat,
46 : FT_Range,
47 : FT_Braces,
48 : FT_ConstInt,
49 : FT_ConstString,
50 : FT_NOP,
51 : FT_Cref
52 : };
53 :
54 : class QProToSc : public ConverterBase
55 : {
56 : private:
57 : TokenId mnAddToken;
58 : TokenId mnSubToken;
59 : TokenId mn0Token;
60 : SvStream& maIn;
61 :
62 : public:
63 : static const size_t nBufSize = 256;
64 : QProToSc( SvStream &aStr, svl::SharedStringPool& rSPool, const ScAddress& rRefPos );
65 1 : virtual ~QProToSc(){ };
66 : ConvErr Convert( const ScTokenArray*& pArray, sal_uInt16 nLen,
67 : const FORMULA_TYPE eFT = FT_CellFormula );
68 : void DoFunc( DefTokenId eOc, sal_uInt16 nArgs, const sal_Char* pExtString );
69 : void ReadSRD( ScSingleRefData& rR, sal_Int8 nPage, sal_Int8 nCol, sal_uInt16 rRel );
70 : void IncToken( TokenId &aParam );
71 : static DefTokenId IndexToToken( sal_uInt16 nToken );
72 : static FUNC_TYPE IndexToType( sal_uInt8 nToken );
73 : static DefTokenId IndexToDLLId( sal_uInt16 nIndex );
74 : static const sal_Char* getString( sal_uInt8 nIndex );
75 : };
76 : #endif
77 :
78 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|