LibreOffice Module sw (master) 1
Classes | Functions | Variables
calc.cxx File Reference
#include <config_features.h>
#include <config_fuzzers.h>
#include <calc.hxx>
#include <cfloat>
#include <climits>
#include <memory>
#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/numformat.hxx>
#include <svl/languageoptions.hxx>
#include <swmodule.hxx>
#include <swtypes.hxx>
#include <unotools/charclass.hxx>
#include <unotools/localedatawrapper.hxx>
#include <unotools/useroptions.hxx>
#include <usrfld.hxx>
#include <utility>
#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 double lcl_ConvertToDateValue (SwDoc &rDoc, sal_Int32 nDate)
 

Variables

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

Function Documentation

◆ FindOperator()

CalcOp * FindOperator ( const OUString &  rSrch)

◆ lcl_ConvertToDateValue()

static double lcl_ConvertToDateValue ( SwDoc rDoc,
sal_Int32  nDate 
)
static

Definition at line 207 of file calc.cxx.

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

Referenced by SwCalc::Term().

◆ OperatorCompare()

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

Definition at line 160 of file calc.cxx.

References CALC_NAME, CalcOp::eOp, pName, CalcOp::pName, and CalcOp::pUName.

Referenced by FindOperator().

Variable Documentation

◆ aOpTable

CalcOp const aOpTable[]

Definition at line 104 of file calc.cxx.

Referenced by FindOperator().

◆ coContFlags

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

Definition at line 155 of file calc.cxx.

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

◆ coStartFlags

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

Definition at line 149 of file calc.cxx.

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

◆ nRoundVal

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 142 of file calc.cxx.

Referenced by SwCalc::Term().

◆ sCalc_Abs

const char sCalc_Abs[] = "abs"

Definition at line 91 of file calc.cxx.

◆ sCalc_Acos

const char sCalc_Acos[] = "acos"

Definition at line 83 of file calc.cxx.

◆ sCalc_Add

const char sCalc_Add[] = "add"

Definition at line 58 of file calc.cxx.

◆ sCalc_And

const char sCalc_And[] = "and"

Definition at line 67 of file calc.cxx.

◆ sCalc_Asin

const char sCalc_Asin[] = "asin"

Definition at line 82 of file calc.cxx.

◆ sCalc_Atan

const char sCalc_Atan[] = "atan"

Definition at line 84 of file calc.cxx.

◆ sCalc_Average

const char sCalc_Average[] = "average"

Definition at line 88 of file calc.cxx.

◆ sCalc_Cos

const char sCalc_Cos[] = "cos"

Definition at line 80 of file calc.cxx.

◆ sCalc_Count

const char sCalc_Count[] = "count"

Definition at line 89 of file calc.cxx.

◆ sCalc_Date

const char sCalc_Date[] = "date"

Definition at line 86 of file calc.cxx.

◆ sCalc_Div

const char sCalc_Div[] = "div"

Definition at line 61 of file calc.cxx.

◆ sCalc_Eq

const char sCalc_Eq[] = "eq"

Definition at line 69 of file calc.cxx.

◆ sCalc_G

const char sCalc_G[] = "g"

Definition at line 74 of file calc.cxx.

◆ sCalc_Geq

const char sCalc_Geq[] = "geq"

Definition at line 72 of file calc.cxx.

◆ sCalc_Int

const char sCalc_Int[] = "int"

Definition at line 92 of file calc.cxx.

◆ sCalc_L

const char sCalc_L[] = "l"

Definition at line 73 of file calc.cxx.

◆ sCalc_Leq

const char sCalc_Leq[] = "leq"

Definition at line 71 of file calc.cxx.

◆ sCalc_Max

const char sCalc_Max[] = "max"

Definition at line 78 of file calc.cxx.

◆ sCalc_Mean

const char sCalc_Mean[] = "mean"

Definition at line 76 of file calc.cxx.

◆ sCalc_Min

const char sCalc_Min[] = "min"

Definition at line 77 of file calc.cxx.

◆ sCalc_Mul

const char sCalc_Mul[] = "mul"

Definition at line 60 of file calc.cxx.

◆ sCalc_Neq

const char sCalc_Neq[] = "neq"

Definition at line 70 of file calc.cxx.

◆ sCalc_Not

const char sCalc_Not[] = "not"

Definition at line 68 of file calc.cxx.

◆ sCalc_Or

const char sCalc_Or[] = "or"

Definition at line 65 of file calc.cxx.

◆ sCalc_Phd

const char sCalc_Phd[] = "phd"

Definition at line 62 of file calc.cxx.

◆ sCalc_Pow

const char sCalc_Pow[] = "pow"

Definition at line 64 of file calc.cxx.

◆ sCalc_Product

const char sCalc_Product[] = "product"

Definition at line 87 of file calc.cxx.

◆ sCalc_Round

const char sCalc_Round[] = "round"

Definition at line 85 of file calc.cxx.

◆ sCalc_Sign

const char sCalc_Sign[] = "sign"

Definition at line 90 of file calc.cxx.

◆ sCalc_Sin

const char sCalc_Sin[] = "sin"

Definition at line 79 of file calc.cxx.

◆ sCalc_Sqrt

const char sCalc_Sqrt[] = "sqrt"

Definition at line 63 of file calc.cxx.

◆ sCalc_Sub

const char sCalc_Sub[] = "sub"

Definition at line 59 of file calc.cxx.

◆ sCalc_Sum

const char sCalc_Sum[] = "sum"

Definition at line 75 of file calc.cxx.

Referenced by SwFEShell::GetAutoSum().

◆ sCalc_Tan

const char sCalc_Tan[] = "tan"

Definition at line 81 of file calc.cxx.

◆ sCalc_Xor

const char sCalc_Xor[] = "xor"

Definition at line 66 of file calc.cxx.