LibreOffice Module sw (master)  1
Classes | Functions | Variables
calc.cxx File Reference
#include <config_features.h>
#include <calc.hxx>
#include <cfloat>
#include <climits>
#include <memory>
#include <string_view>
#include <comphelper/processfactory.hxx>
#include <comphelper/string.hxx>
#include <cstdlib>
#include <dbmgr.hxx>
#include <docfld.hxx>
#include <docstat.hxx>
#include <doc.hxx>
#include <IDocumentFieldsAccess.hxx>
#include <IDocumentStatistics.hxx>
#include <editeng/langitem.hxx>
#include <expfld.hxx>
#include <hintids.hxx>
#include <o3tl/temporary.hxx>
#include <osl/diagnose.h>
#include <rtl/math.hxx>
#include <shellres.hxx>
#include <svl/languageoptions.hxx>
#include <svl/zforlist.hxx>
#include <swmodule.hxx>
#include <swtypes.hxx>
#include <unotools/charclass.hxx>
#include <unotools/localedatawrapper.hxx>
#include <unotools/useroptions.hxx>
#include <usrfld.hxx>
#include <viewsh.hxx>
#include <com/sun/star/i18n/KParseTokens.hpp>
#include <com/sun/star/i18n/KParseType.hpp>
Include dependency graph for calc.cxx:

Go to the source code of this file.

Classes

struct  CalcOp
 

Functions

static int OperatorCompare (const void *pFirst, const void *pSecond)
 
CalcOpFindOperator (const OUString &rSrch)
 
static LanguageType GetDocAppScriptLang (SwDoc const &rDoc)
 
static double lcl_ConvertToDateValue (SwDoc &rDoc, sal_Int32 nDate)
 

Variables

const sal_Char sCalc_Add [] = "add"
 
const sal_Char sCalc_Sub [] = "sub"
 
const sal_Char sCalc_Mul [] = "mul"
 
const sal_Char sCalc_Div [] = "div"
 
const sal_Char sCalc_Phd [] = "phd"
 
const sal_Char sCalc_Sqrt [] = "sqrt"
 
const sal_Char sCalc_Pow [] = "pow"
 
const sal_Char sCalc_Or [] = "or"
 
const sal_Char sCalc_Xor [] = "xor"
 
const sal_Char sCalc_And [] = "and"
 
const sal_Char sCalc_Not [] = "not"
 
const sal_Char sCalc_Eq [] = "eq"
 
const sal_Char sCalc_Neq [] = "neq"
 
const sal_Char sCalc_Leq [] = "leq"
 
const sal_Char sCalc_Geq [] = "geq"
 
const sal_Char sCalc_L [] = "l"
 
const sal_Char sCalc_G [] = "g"
 
const sal_Char sCalc_Sum [] = "sum"
 
const sal_Char sCalc_Mean [] = "mean"
 
const sal_Char sCalc_Min [] = "min"
 
const sal_Char sCalc_Max [] = "max"
 
const sal_Char sCalc_Sin [] = "sin"
 
const sal_Char sCalc_Cos [] = "cos"
 
const sal_Char sCalc_Tan [] = "tan"
 
const sal_Char sCalc_Asin [] = "asin"
 
const sal_Char sCalc_Acos [] = "acos"
 
const sal_Char sCalc_Atan [] = "atan"
 
const sal_Char sCalc_Round [] = "round"
 
const sal_Char sCalc_Date [] = "date"
 
CalcOp const aOpTable []
 
double const nRoundVal []
 
const sal_Int32 coStartFlags
 
const sal_Int32 coContFlags
 

Function Documentation

CalcOp* FindOperator ( const OUString &  rSrch)
static LanguageType GetDocAppScriptLang ( SwDoc const &  rDoc)
static
static double lcl_ConvertToDateValue ( SwDoc rDoc,
sal_Int32  nDate 
)
static

Definition at line 193 of file calc.cxx.

References SvNumberFormatter::GetNullDate(), and SwDoc::GetNumberFormatter().

Referenced by SwCalc::Term().

static int OperatorCompare ( const void pFirst,
const void pSecond 
)
static

Definition at line 147 of file calc.cxx.

References CALC_NAME.

Referenced by FindOperator().

Variable Documentation

CalcOp const aOpTable[]

Definition at line 97 of file calc.cxx.

const sal_Int32 coContFlags
Initial value:
=
( coStartFlags | i18n::KParseTokens::ASC_DOT )
& ~i18n::KParseTokens::IGNORE_LEADING_WS
const sal_Int32 coStartFlags
Definition: calc.cxx:136

Definition at line 142 of file calc.cxx.

Referenced by SwCalc::GetToken(), and SwCalc::IsValidVarName().

const sal_Int32 coStartFlags
Initial value:
=
i18n::KParseTokens::ANY_LETTER_OR_NUMBER |
i18n::KParseTokens::ASC_UNDERSCORE |
i18n::KParseTokens::IGNORE_LEADING_WS

Definition at line 136 of file calc.cxx.

Referenced by SwCalc::GetToken(), and SwCalc::IsValidVarName().

double const nRoundVal[]
Initial value:
= {
5.0e+0, 0.5e+0, 0.5e-1, 0.5e-2, 0.5e-3, 0.5e-4, 0.5e-5, 0.5e-6,
0.5e-7, 0.5e-8, 0.5e-9, 0.5e-10,0.5e-11,0.5e-12,0.5e-13,0.5e-14,
0.5e-15,0.5e-16
}

Definition at line 129 of file calc.cxx.

Referenced by SwCalc::Term().

const sal_Char sCalc_Acos[] = "acos"

Definition at line 82 of file calc.cxx.

const sal_Char sCalc_Add[] = "add"

Definition at line 57 of file calc.cxx.

const sal_Char sCalc_And[] = "and"

Definition at line 66 of file calc.cxx.

const sal_Char sCalc_Asin[] = "asin"

Definition at line 81 of file calc.cxx.

const sal_Char sCalc_Atan[] = "atan"

Definition at line 83 of file calc.cxx.

const sal_Char sCalc_Cos[] = "cos"

Definition at line 79 of file calc.cxx.

const sal_Char sCalc_Date[] = "date"

Definition at line 85 of file calc.cxx.

const sal_Char sCalc_Div[] = "div"

Definition at line 60 of file calc.cxx.

const sal_Char sCalc_Eq[] = "eq"

Definition at line 68 of file calc.cxx.

const sal_Char sCalc_G[] = "g"

Definition at line 73 of file calc.cxx.

const sal_Char sCalc_Geq[] = "geq"

Definition at line 71 of file calc.cxx.

const sal_Char sCalc_L[] = "l"

Definition at line 72 of file calc.cxx.

const sal_Char sCalc_Leq[] = "leq"

Definition at line 70 of file calc.cxx.

const sal_Char sCalc_Max[] = "max"

Definition at line 77 of file calc.cxx.

const sal_Char sCalc_Mean[] = "mean"

Definition at line 75 of file calc.cxx.

const sal_Char sCalc_Min[] = "min"

Definition at line 76 of file calc.cxx.

const sal_Char sCalc_Mul[] = "mul"

Definition at line 59 of file calc.cxx.

const sal_Char sCalc_Neq[] = "neq"

Definition at line 69 of file calc.cxx.

const sal_Char sCalc_Not[] = "not"

Definition at line 67 of file calc.cxx.

const sal_Char sCalc_Or[] = "or"

Definition at line 64 of file calc.cxx.

const sal_Char sCalc_Phd[] = "phd"

Definition at line 61 of file calc.cxx.

const sal_Char sCalc_Pow[] = "pow"

Definition at line 63 of file calc.cxx.

const sal_Char sCalc_Round[] = "round"

Definition at line 84 of file calc.cxx.

const sal_Char sCalc_Sin[] = "sin"

Definition at line 78 of file calc.cxx.

const sal_Char sCalc_Sqrt[] = "sqrt"

Definition at line 62 of file calc.cxx.

const sal_Char sCalc_Sub[] = "sub"

Definition at line 58 of file calc.cxx.

const sal_Char sCalc_Sum[] = "sum"

Definition at line 74 of file calc.cxx.

Referenced by SwFEShell::GetAutoSum().

const sal_Char sCalc_Tan[] = "tan"

Definition at line 80 of file calc.cxx.

const sal_Char sCalc_Xor[] = "xor"

Definition at line 65 of file calc.cxx.