LibreOffice Module sc (master)  1
simpleformulacalc.hxx
Go to the documentation of this file.
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 
10 #ifndef INCLUDED_SC_INC_SIMPLEFORMULACALC_HXX
11 #define INCLUDED_SC_INC_SIMPLEFORMULACALC_HXX
12 
13 #include <memory>
14 #include <formula/grammar.hxx>
15 
16 #include "address.hxx"
17 #include "formularesult.hxx"
18 
19 class ScDocument;
20 class ScTokenArray;
21 
23 {
24 private:
26 
28  std::unique_ptr<ScTokenArray> mpCode;
37 
38 public:
40  const OUString& rFormula, bool bMatrixFormula,
43 
44  void Calculate();
45  bool IsValue();
46  bool IsMatrix();
48  double GetValue();
51 
52  bool HasColRowName() const;
53 
55 
56  void SetLimitString(bool bLimitString);
57 };
58 
59 #endif
60 
61 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Store a variable formula cell result, balancing between runtime performance and memory consumption...
SvNumFormatType GetFormatType() const
SvNumFormatType
FormulaError
formula::FormulaGrammar::Grammar maGram
std::unique_ptr< ScTokenArray > mpCode
ScSimpleFormulaCalculator(ScDocument &rDoc, const ScAddress &rAddr, const OUString &rFormula, bool bMatrixFormula, formula::FormulaGrammar::Grammar eGram=formula::FormulaGrammar::GRAM_DEFAULT)
svl::SharedString GetString()
void SetLimitString(bool bLimitString)