1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
10 #ifndef INCLUDED_SC_INC_SIMPLEFORMULACALC_HXX
11 #define INCLUDED_SC_INC_SIMPLEFORMULACALC_HXX
14 #include <formula/grammar.hxx>
16 #include "address.hxx"
17 #include "formularesult.hxx"
22 class ScSimpleFormulaCalculator
25 SvNumFormatType mnFormatType
;
28 std::unique_ptr
<ScTokenArray
> mpCode
;
29 ScAddress
const maAddr
;
31 ScFormulaResult maResult
;
32 formula::FormulaGrammar::Grammar
const maGram
;
34 OUString maMatrixFormulaResult
;
36 bool const mbMatrixFormula
;
39 ScSimpleFormulaCalculator(ScDocument
* pDoc
, const ScAddress
& rAddr
,
40 const OUString
& rFormula
, bool bMatrixFormula
,
41 formula::FormulaGrammar::Grammar eGram
= formula::FormulaGrammar::GRAM_DEFAULT
);
42 ~ScSimpleFormulaCalculator();
47 FormulaError
GetErrCode();
49 svl::SharedString
GetString();
50 SvNumFormatType
GetFormatType() const { return mnFormatType
; }
52 bool HasColRowName() const;
54 ScTokenArray
* GetCode();
56 void SetLimitString(bool bLimitString
);
61 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */