Fix build
[LibreOffice.git] / sc / inc / simpleformulacalc.hxx
blobf51a635622ed43ee81ec9b3c550c6231321f4f23
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 #pragma once
12 #include <memory>
13 #include <formula/grammar.hxx>
15 #include "address.hxx"
16 #include "formularesult.hxx"
18 class ScDocument;
19 class ScTokenArray;
21 class ScSimpleFormulaCalculator
23 private:
24 SvNumFormatType mnFormatType;
26 bool mbCalculated;
27 std::unique_ptr<ScTokenArray> mpCode;
28 ScAddress maAddr;
29 ScDocument& mrDoc;
30 ScFormulaResult maResult;
31 formula::FormulaGrammar::Grammar maGram;
32 bool mbMatrixResult;
33 OUString maMatrixFormulaResult;
34 bool mbLimitString;
35 bool mbMatrixFormula;
37 public:
38 ScSimpleFormulaCalculator(ScDocument& rDoc, const ScAddress& rAddr,
39 const OUString& rFormula, bool bMatrixFormula,
40 formula::FormulaGrammar::Grammar eGram = formula::FormulaGrammar::GRAM_DEFAULT);
41 ~ScSimpleFormulaCalculator();
43 void Calculate();
44 bool IsValue();
45 bool IsMatrix();
46 FormulaError GetErrCode();
47 double GetValue();
48 svl::SharedString GetString();
49 SvNumFormatType GetFormatType() const { return mnFormatType; }
51 bool HasColRowName() const;
53 ScTokenArray* GetCode();
55 void SetLimitString(bool bLimitString);
58 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */