Bump version to 6.4-15
[LibreOffice.git] / sc / inc / simpleformulacalc.hxx
blobb75ab892340eb68f6b624e1570f860fb95d5befa
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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 */
10 #ifndef INCLUDED_SC_INC_SIMPLEFORMULACALC_HXX
11 #define INCLUDED_SC_INC_SIMPLEFORMULACALC_HXX
13 #include <memory>
14 #include <formula/grammar.hxx>
16 #include "address.hxx"
17 #include "formularesult.hxx"
19 class ScDocument;
20 class ScTokenArray;
22 class ScSimpleFormulaCalculator
24 private:
25 SvNumFormatType mnFormatType;
27 bool mbCalculated;
28 std::unique_ptr<ScTokenArray> mpCode;
29 ScAddress const maAddr;
30 ScDocument* mpDoc;
31 ScFormulaResult maResult;
32 formula::FormulaGrammar::Grammar const maGram;
33 bool mbMatrixResult;
34 OUString maMatrixFormulaResult;
35 bool mbLimitString;
36 bool const mbMatrixFormula;
38 public:
39 ScSimpleFormulaCalculator(ScDocument* pDoc, const ScAddress& rAddr,
40 const OUString& rFormula, bool bMatrixFormula,
41 formula::FormulaGrammar::Grammar eGram = formula::FormulaGrammar::GRAM_DEFAULT);
42 ~ScSimpleFormulaCalculator();
44 void Calculate();
45 bool IsValue();
46 bool IsMatrix();
47 FormulaError GetErrCode();
48 double GetValue();
49 svl::SharedString GetString();
50 SvNumFormatType GetFormatType() const { return mnFormatType; }
52 bool HasColRowName() const;
54 ScTokenArray* GetCode();
56 void SetLimitString(bool bLimitString);
59 #endif
61 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */