LibreOffice Module sc (master)
1
sc
inc
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
#pragma once
11
12
#include <memory>
13
#include <
formula/grammar.hxx
>
14
15
#include "
address.hxx
"
16
#include "
formularesult.hxx
"
17
18
class
ScDocument
;
19
class
ScTokenArray
;
20
21
class
ScSimpleFormulaCalculator
22
{
23
private
:
24
SvNumFormatType
mnFormatType
;
25
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
;
36
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
();
42
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
; }
50
51
bool
HasColRowName
()
const
;
52
53
ScTokenArray
*
GetCode
();
54
55
void
SetLimitString
(
bool
bLimitString);
56
};
57
58
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
address.hxx
ScAddress
Definition:
address.hxx:207
ScDocument
Definition:
document.hxx:323
ScFormulaResult
Store a variable formula cell result, balancing between runtime performance and memory consumption.
Definition:
formularesult.hxx:53
ScSimpleFormulaCalculator
Definition:
simpleformulacalc.hxx:22
ScSimpleFormulaCalculator::HasColRowName
bool HasColRowName() const
Definition:
simpleformulacalc.cxx:140
ScSimpleFormulaCalculator::IsValue
bool IsValue()
Definition:
simpleformulacalc.cxx:88
ScSimpleFormulaCalculator::mrDoc
ScDocument & mrDoc
Definition:
simpleformulacalc.hxx:29
ScSimpleFormulaCalculator::GetErrCode
FormulaError GetErrCode()
Definition:
simpleformulacalc.cxx:105
ScSimpleFormulaCalculator::mnFormatType
SvNumFormatType mnFormatType
Definition:
simpleformulacalc.hxx:24
ScSimpleFormulaCalculator::GetString
svl::SharedString GetString()
Definition:
simpleformulacalc.cxx:126
ScSimpleFormulaCalculator::maAddr
ScAddress maAddr
Definition:
simpleformulacalc.hxx:28
ScSimpleFormulaCalculator::mbLimitString
bool mbLimitString
Definition:
simpleformulacalc.hxx:34
ScSimpleFormulaCalculator::mpCode
std::unique_ptr< ScTokenArray > mpCode
Definition:
simpleformulacalc.hxx:27
ScSimpleFormulaCalculator::mbMatrixResult
bool mbMatrixResult
Definition:
simpleformulacalc.hxx:32
ScSimpleFormulaCalculator::maGram
formula::FormulaGrammar::Grammar maGram
Definition:
simpleformulacalc.hxx:31
ScSimpleFormulaCalculator::mbMatrixFormula
bool mbMatrixFormula
Definition:
simpleformulacalc.hxx:35
ScSimpleFormulaCalculator::GetFormatType
SvNumFormatType GetFormatType() const
Definition:
simpleformulacalc.hxx:49
ScSimpleFormulaCalculator::Calculate
void Calculate()
Definition:
simpleformulacalc.cxx:42
ScSimpleFormulaCalculator::GetValue
double GetValue()
Definition:
simpleformulacalc.cxx:115
ScSimpleFormulaCalculator::maResult
ScFormulaResult maResult
Definition:
simpleformulacalc.hxx:30
ScSimpleFormulaCalculator::GetCode
ScTokenArray * GetCode()
Definition:
simpleformulacalc.cxx:145
ScSimpleFormulaCalculator::IsMatrix
bool IsMatrix()
Definition:
simpleformulacalc.cxx:98
ScSimpleFormulaCalculator::SetLimitString
void SetLimitString(bool bLimitString)
Definition:
simpleformulacalc.cxx:150
ScSimpleFormulaCalculator::ScSimpleFormulaCalculator
ScSimpleFormulaCalculator(ScDocument &rDoc, const ScAddress &rAddr, const OUString &rFormula, bool bMatrixFormula, formula::FormulaGrammar::Grammar eGram=formula::FormulaGrammar::GRAM_DEFAULT)
Definition:
simpleformulacalc.cxx:20
ScSimpleFormulaCalculator::~ScSimpleFormulaCalculator
~ScSimpleFormulaCalculator()
Definition:
simpleformulacalc.cxx:38
ScSimpleFormulaCalculator::maMatrixFormulaResult
OUString maMatrixFormulaResult
Definition:
simpleformulacalc.hxx:33
ScSimpleFormulaCalculator::mbCalculated
bool mbCalculated
Definition:
simpleformulacalc.hxx:26
ScTokenArray
Definition:
tokenarray.hxx:49
formula::FormulaGrammar::Grammar
Grammar
formula::FormulaGrammar::GRAM_DEFAULT
GRAM_DEFAULT
svl::SharedString
FormulaError
FormulaError
formularesult.hxx
grammar.hxx
SvNumFormatType
SvNumFormatType
Generated on Sun Jul 30 2023 04:27:49 for LibreOffice Module sc (master) by
1.9.3