LibreOffice Module formula (master) 1
Classes | Typedefs | Enumerations | Functions | Variables
formula Namespace Reference

Classes

class  ArgEdit
 
class  ArgInput
 
class  DoubleVectorRefToken
 This token represents a range reference in a vectorized formula calculation context. More...
 
class  ExternalReferenceHelper
 
class  FormEditData
 
struct  FormulaArrayStack
 
class  FormulaByteToken
 
class  FormulaCompiler
 
class  FormulaDlg
 
class  FormulaDlg_Impl
 
class  FormulaDoubleToken
 
class  FormulaErrorToken
 
class  FormulaExternalToken
 
class  FormulaFAPToken
 
class  FormulaGrammar
 Grammars digested by ScCompiler. More...
 
class  FormulaHelper
 
class  FormulaIndexToken
 
class  FormulaJumpToken
 
class  FormulaMissingToken
 
class  FormulaModalDialog
 
class  FormulaOpCodeMapperObj
 
class  FormulaSpaceToken
 
class  FormulaStringOpToken
 Identical to FormulaStringToken, but with explicit OpCode instead of implicit ocPush, and an optional sal_uInt8 for ocBad tokens. More...
 
class  FormulaStringToken
 
class  FormulaToken
 
class  FormulaTokenArray
 
class  FormulaTokenArrayPlainIterator
 
class  FormulaTokenArrayReferencesIterator
 
class  FormulaTokenArrayReferencesRange
 
class  FormulaTokenArrayStandardRange
 
class  FormulaTokenIterator
 
class  FormulaTypedDoubleToken
 
class  FormulaUnknownToken
 
class  FuncPage
 
class  IControlReferenceHandler
 
class  IFormulaEditorHelper
 
class  IFunctionCategory
 
class  IFunctionDescription
 
class  IFunctionManager
 
class  MissingConvention
 
class  MissingConventionODF
 
class  MissingConventionOOXML
 
class  ParaWin
 
class  RefButton
 
class  RefEdit
 
class  SingleVectorRefToken
 This token represents a single cell reference in a vectorized formula calculation context. More...
 
class  StructPage
 
struct  VectorRefArray
 Single unit of vector reference consists of two physical arrays. More...
 

Typedefs

typedef const IFunctionDescriptionTFunctionDesc
 
typedef std::unordered_map< OUString, OpCodeOpCodeHashMap
 
typedef std::unordered_map< OUString, OUString > ExternalHashMap
 
typedef std::unordered_set< OpCode, std::hash< std::underlying_type< OpCode >::type > > unordered_opcode_set
 
typedef ::boost::intrusive_ptr< FormulaTokenFormulaTokenRef
 
typedef ::boost::intrusive_ptr< const FormulaTokenFormulaConstTokenRef
 

Enumerations

enum class  FormulaDlgMode {
  Formula ,
  Edit
}
 
enum  ParamClass : sal_uInt8 {
  Unknown = 0 ,
  Bounds ,
  Value ,
  Reference ,
  ReferenceOrRefArray ,
  Array ,
  ForceArray ,
  ReferenceOrForceArray ,
  SuppressedReferenceOrForceArray ,
  ForceArrayReturn
}
 
enum  StackVar : sal_uInt8 {
  svByte ,
  svDouble ,
  svString ,
  svSingleRef ,
  svDoubleRef ,
  svMatrix ,
  svIndex ,
  svJump ,
  svExternal ,
  svFAP ,
  svJumpMatrix ,
  svRefList ,
  svEmptyCell ,
  svMatrixCell ,
  svHybridCell ,
  svExternalSingleRef ,
  svExternalDoubleRef ,
  svExternalName ,
  svSingleVectorRef ,
  svDoubleVectorRef ,
  svError ,
  svMissing ,
  svSep ,
  svUnknown
}
 

Functions

static bool lcl_fillNativeSymbols (FormulaCompiler::NonConstOpCodeMapPtr &xMap, FormulaCompiler::InitSymbols eWhat=FormulaCompiler::InitSymbols::INIT)
 
static bool lcl_IsReference (OpCode eOp, StackVar eType)
 
 IMPL_LINK (FormulaDlg_Impl, BtnHdl, weld::Button &, rBtn, void)
 
 IMPL_LINK_NOARG (FormulaDlg_Impl, DblClkHdl, FuncPage &, void)
 
 IMPL_LINK (FormulaDlg_Impl, FxHdl, ParaWin &, rPtr, void)
 
 IMPL_LINK (FormulaDlg_Impl, ModifyHdl, ParaWin &, rPtr, void)
 
 IMPL_LINK_NOARG (FormulaDlg_Impl, FormulaHdl, weld::TextView &, void)
 
 IMPL_LINK_NOARG (FormulaDlg_Impl, FormulaCursorHdl, weld::TextView &, void)
 
 IMPL_LINK_NOARG (FormulaDlg_Impl, StructSelHdl, StructPage &, void)
 
 IMPL_LINK_NOARG (FormulaDlg_Impl, MatrixHdl, weld::Toggleable &, void)
 
 IMPL_LINK_NOARG (FormulaDlg_Impl, FuncSelHdl, FuncPage &, void)
 
static bool IsFormulaText (const CharClass &rCharClass, const OUString &rStr, sal_Int32 nPos)
 
 IMPL_LINK (FuncPage, KeyInputHdl, const KeyEvent &, rKEvt, bool)
 
 IMPL_LINK_NOARG (FuncPage, SelComboBoxHdl, weld::ComboBox &, void)
 
 IMPL_LINK_NOARG (FuncPage, SelTreeViewHdl, weld::TreeView &, void)
 
 IMPL_LINK_NOARG (FuncPage, DblClkHdl, weld::TreeView &, bool)
 
 IMPL_LINK_NOARG (FuncPage, ModifyHdl, weld::Entry &, void)
 
 IMPL_LINK (ArgInput, FxBtnClickHdl, weld::Button &, rBtn, void)
 
 IMPL_LINK (ArgInput, FxBtnFocusHdl, weld::Widget &, rControl, void)
 
 IMPL_LINK (ArgInput, EdFocusHdl, RefEdit &, rControl, void)
 
 IMPL_LINK (ArgInput, EdModifyHdl, RefEdit &, rEdit, void)
 
 IMPL_LINK_NOARG (RefEdit, Modify, weld::Entry &, void)
 
 IMPL_LINK (RefEdit, KeyInputHdl, const KeyEvent &, rKEvt, bool)
 
 IMPL_LINK_NOARG (RefEdit, GetFocusHdl, weld::Widget &, void)
 
 IMPL_LINK_NOARG (RefEdit, LoseFocusHdl, weld::Widget &, void)
 
 IMPL_LINK_NOARG (RefEdit, AsyncFocusInHdl, void *, void)
 
 IMPL_LINK_NOARG (RefEdit, AsyncFocusOutHdl, void *, void)
 
 IMPL_LINK_NOARG (RefEdit, UpdateHdl, Timer *, void)
 
 IMPL_LINK_NOARG (RefButton, Click, weld::Button &, void)
 
 IMPL_LINK (RefButton, KeyInput, const KeyEvent &, rKEvt, bool)
 
 IMPL_LINK_NOARG (RefButton, GetFocus, weld::Widget &, void)
 
 IMPL_LINK_NOARG (RefButton, LoseFocus, weld::Widget &, void)
 
 IMPL_LINK (ParaWin, GetFxHdl, ArgInput &, rPtr, void)
 
 IMPL_LINK (ParaWin, GetFxFocusHdl, ArgInput &, rPtr, void)
 
 IMPL_LINK (ParaWin, GetEdFocusHdl, ArgInput &, rPtr, void)
 
 IMPL_LINK_NOARG (ParaWin, ScrollHdl, weld::ScrolledWindow &, void)
 
 IMPL_LINK (ParaWin, ModifyHdl, ArgInput &, rPtr, void)
 
 IMPL_LINK (StructPage, SelectHdl, weld::TreeView &, rTlb, void)
 
std::string StackVarEnumToString (StackVar const e)
 
void intrusive_ptr_add_ref (const FormulaToken *p)
 
void intrusive_ptr_release (const FormulaToken *p)
 
template<typename charT , typename traits >
std::basic_ostream< charT, traits > & operator<< (std::basic_ostream< charT, traits > &stream, const FormulaTokenArray &point)
 

Variables

static const char * pInternal [2] = { "TTT", "__DEBUG_VAR" }
 
constexpr short nRecursionMax = 100
 
const svl::SharedString INVALID_STRING
 
constexpr sal_uInt16 kMaxArgCount = 255
 
constexpr sal_uInt16 kMaxArgOffset = kMaxArgCount - 1
 

Typedef Documentation

◆ ExternalHashMap

typedef std::unordered_map< OUString, OUString > formula::ExternalHashMap

Definition at line 69 of file FormulaCompiler.hxx.

◆ FormulaConstTokenRef

typedef ::boost::intrusive_ptr<const FormulaToken> formula::FormulaConstTokenRef

Definition at line 29 of file types.hxx.

◆ FormulaTokenRef

typedef ::boost::intrusive_ptr<FormulaToken> formula::FormulaTokenRef

Definition at line 28 of file types.hxx.

◆ OpCodeHashMap

typedef std::unordered_map< OUString, OpCode > formula::OpCodeHashMap

Definition at line 68 of file FormulaCompiler.hxx.

◆ TFunctionDesc

Definition at line 32 of file funcpage.hxx.

◆ unordered_opcode_set

typedef std::unordered_set<OpCode, std::hash<std::underlying_type<OpCode>::type> > formula::unordered_opcode_set

Definition at line 117 of file tokenarray.hxx.

Enumeration Type Documentation

◆ FormulaDlgMode

enum class formula::FormulaDlgMode
strong
Enumerator
Formula 
Edit 

Definition at line 45 of file formula.hxx.

◆ ParamClass

Enumerator
Unknown 
Bounds 

Out of bounds, function doesn't expect that many parameters.

However, not necessarily returned if a module specific definition for example returns type Value for an unlisted function.

Value 

In array formula: single value to be passed.

Results in JumpMatrix being created and multiple calls to function. Functions handling a formula::svDoubleRef by means of DoubleRefToPosSingleRef() or PopDoubleRefOrSingleRef() or GetDouble() or GetString() should have this.

Reference 

In array formula: area reference must stay reference.

Otherwise don't care. Functions handling a formula::svDoubleRef by means of PopDoubleRefOrSingleRef() should not have this.

ReferenceOrRefArray 

Like Reference but the function accepts also a list of references (ocUnion svRefList) as one argument AND handles the special case of an array of references in array mode.

Then the resulting argument for a parameter in JumpMatrix context may be an array of references which then is to be preferred over a result matrix. This final behaviour is the opposite of SuppressedReferenceOrForceArray.

Array 

In array formula: convert area reference to array.

Function will be called only once if no Value type is involved. Functions able to handle a svMatrix parameter but not a formula::svDoubleRef parameter as area should have this.

ForceArray 

Area reference must be converted to array in any case, and must also be propagated to subsequent operators and functions being part of a parameter of this function.

ReferenceOrForceArray 

Area reference is not converted to array, but ForceArray must be propagated to subsequent operators and functions being part of a parameter of this function.

Used with functions that treat references separately from arrays, but need the forced array calculation of parameters that are not references.

SuppressedReferenceOrForceArray 

Same as ReferenceOrForceArray but suppressed / not inherited in the compiler's ForceArray context to indicate that a result of Reference in JumpMatrix context should use the result matrix instead of the array of references.

Never used as initial parameter classification.

ForceArrayReturn 

A function return forces the caller into array mode for this one call, making it behave like it had ForceArray but not propagated to any further operators in the same parameter.

Definition at line 18 of file paramclass.hxx.

◆ StackVar

Enumerator
svByte 
svDouble 
svString 
svSingleRef 
svDoubleRef 
svMatrix 
svIndex 
svJump 
svExternal 
svFAP 
svJumpMatrix 
svRefList 
svEmptyCell 
svMatrixCell 
svHybridCell 
svExternalSingleRef 
svExternalDoubleRef 
svExternalName 
svSingleVectorRef 
svDoubleVectorRef 
svError 
svMissing 
svSep 
svUnknown 

Definition at line 48 of file token.hxx.

Function Documentation

◆ IMPL_LINK() [1/15]

formula::IMPL_LINK ( ArgInput  ,
EdFocusHdl  ,
RefEdit ,
rControl  ,
void   
)

Definition at line 252 of file funcutl.cxx.

◆ IMPL_LINK() [2/15]

formula::IMPL_LINK ( ArgInput  ,
EdModifyHdl  ,
RefEdit ,
rEdit  ,
void   
)

Definition at line 258 of file funcutl.cxx.

◆ IMPL_LINK() [3/15]

formula::IMPL_LINK ( ArgInput  ,
FxBtnClickHdl  ,
weld::Button ,
rBtn  ,
void   
)

Definition at line 240 of file funcutl.cxx.

◆ IMPL_LINK() [4/15]

formula::IMPL_LINK ( ArgInput  ,
FxBtnFocusHdl  ,
weld::Widget ,
rControl  ,
void   
)

Definition at line 246 of file funcutl.cxx.

◆ IMPL_LINK() [5/15]

formula::IMPL_LINK ( FormulaDlg_Impl  ,
BtnHdl  ,
weld::Button ,
rBtn  ,
void   
)

Definition at line 1022 of file formula.cxx.

◆ IMPL_LINK() [6/15]

formula::IMPL_LINK ( FormulaDlg_Impl  ,
FxHdl  ,
ParaWin ,
rPtr  ,
void   
)

Definition at line 1252 of file formula.cxx.

References Formula, n1, and pData.

◆ IMPL_LINK() [7/15]

formula::IMPL_LINK ( FormulaDlg_Impl  ,
ModifyHdl  ,
ParaWin ,
rPtr  ,
void   
)

Definition at line 1286 of file formula.cxx.

◆ IMPL_LINK() [8/15]

formula::IMPL_LINK ( FuncPage  ,
KeyInputHdl  ,
const KeyEvent ,
rKEvt  ,
bool   
)

Definition at line 30 of file funcpage.cxx.

◆ IMPL_LINK() [9/15]

formula::IMPL_LINK ( ParaWin  ,
GetEdFocusHdl  ,
ArgInput ,
rPtr  ,
void   
)

Definition at line 537 of file parawin.cxx.

References NOT_FOUND, nPos, and SAL_N_ELEMENTS.

◆ IMPL_LINK() [10/15]

formula::IMPL_LINK ( ParaWin  ,
GetFxFocusHdl  ,
ArgInput ,
rPtr  ,
void   
)

Definition at line 516 of file parawin.cxx.

References NOT_FOUND, nPos, and SAL_N_ELEMENTS.

◆ IMPL_LINK() [11/15]

formula::IMPL_LINK ( ParaWin  ,
GetFxHdl  ,
ArgInput ,
rPtr  ,
void   
)

Definition at line 495 of file parawin.cxx.

References NOT_FOUND, nPos, and SAL_N_ELEMENTS.

◆ IMPL_LINK() [12/15]

formula::IMPL_LINK ( ParaWin  ,
ModifyHdl  ,
ArgInput ,
rPtr  ,
void   
)

Definition at line 566 of file parawin.cxx.

References NOT_FOUND, nPos, SAL_N_ELEMENTS, and SAL_WARN.

◆ IMPL_LINK() [13/15]

formula::IMPL_LINK ( RefButton  ,
KeyInput  ,
const KeyEvent ,
rKEvt  ,
bool   
)

◆ IMPL_LINK() [14/15]

formula::IMPL_LINK ( RefEdit  ,
KeyInputHdl  ,
const KeyEvent ,
rKEvt  ,
bool   
)

Definition at line 336 of file funcutl.cxx.

References KeyInput.

◆ IMPL_LINK() [15/15]

formula::IMPL_LINK ( StructPage  ,
SelectHdl  ,
weld::TreeView ,
rTlb  ,
void   
)

Definition at line 128 of file structpg.cxx.

◆ IMPL_LINK_NOARG() [1/20]

formula::IMPL_LINK_NOARG ( FormulaDlg_Impl  ,
DblClkHdl  ,
FuncPage ,
void   
)

Definition at line 1065 of file formula.cxx.

◆ IMPL_LINK_NOARG() [2/20]

formula::IMPL_LINK_NOARG ( FormulaDlg_Impl  ,
FormulaCursorHdl  ,
weld::TextView ,
void   
)

Definition at line 1442 of file formula.cxx.

◆ IMPL_LINK_NOARG() [3/20]

formula::IMPL_LINK_NOARG ( FormulaDlg_Impl  ,
FormulaHdl  ,
weld::TextView ,
void   
)

Definition at line 1298 of file formula.cxx.

References nPos, and pData.

◆ IMPL_LINK_NOARG() [4/20]

formula::IMPL_LINK_NOARG ( FormulaDlg_Impl  ,
FuncSelHdl  ,
FuncPage ,
void   
)

◆ IMPL_LINK_NOARG() [5/20]

formula::IMPL_LINK_NOARG ( FormulaDlg_Impl  ,
MatrixHdl  ,
weld::Toggleable ,
void   
)

Definition at line 1664 of file formula.cxx.

◆ IMPL_LINK_NOARG() [6/20]

formula::IMPL_LINK_NOARG ( FormulaDlg_Impl  ,
StructSelHdl  ,
StructPage ,
void   
)

Definition at line 1656 of file formula.cxx.

◆ IMPL_LINK_NOARG() [7/20]

formula::IMPL_LINK_NOARG ( FuncPage  ,
DblClkHdl  ,
weld::TreeView ,
bool   
)

Definition at line 210 of file funcpage.cxx.

◆ IMPL_LINK_NOARG() [8/20]

formula::IMPL_LINK_NOARG ( FuncPage  ,
ModifyHdl  ,
weld::Entry ,
void   
)

Definition at line 216 of file funcpage.cxx.

◆ IMPL_LINK_NOARG() [9/20]

formula::IMPL_LINK_NOARG ( FuncPage  ,
SelComboBoxHdl  ,
weld::ComboBox ,
void   
)

Definition at line 191 of file funcpage.cxx.

◆ IMPL_LINK_NOARG() [10/20]

formula::IMPL_LINK_NOARG ( FuncPage  ,
SelTreeViewHdl  ,
weld::TreeView ,
void   
)

Definition at line 198 of file funcpage.cxx.

References formula::IFunctionDescription::getHelpId().

◆ IMPL_LINK_NOARG() [11/20]

formula::IMPL_LINK_NOARG ( ParaWin  ,
ScrollHdl  ,
weld::ScrolledWindow ,
void   
)

Definition at line 561 of file parawin.cxx.

◆ IMPL_LINK_NOARG() [12/20]

formula::IMPL_LINK_NOARG ( RefButton  ,
Click  ,
weld::Button ,
void   
)

Definition at line 444 of file funcutl.cxx.

◆ IMPL_LINK_NOARG() [13/20]

formula::IMPL_LINK_NOARG ( RefButton  ,
GetFocus  ,
weld::Widget ,
void   
)

Definition at line 470 of file funcutl.cxx.

◆ IMPL_LINK_NOARG() [14/20]

formula::IMPL_LINK_NOARG ( RefButton  ,
LoseFocus  ,
weld::Widget ,
void   
)

Definition at line 477 of file funcutl.cxx.

◆ IMPL_LINK_NOARG() [15/20]

formula::IMPL_LINK_NOARG ( RefEdit  ,
AsyncFocusInHdl  ,
void *  ,
void   
)

Definition at line 392 of file funcutl.cxx.

References GetFocus.

◆ IMPL_LINK_NOARG() [16/20]

formula::IMPL_LINK_NOARG ( RefEdit  ,
AsyncFocusOutHdl  ,
void *  ,
void   
)

Definition at line 398 of file funcutl.cxx.

References LoseFocus.

◆ IMPL_LINK_NOARG() [17/20]

formula::IMPL_LINK_NOARG ( RefEdit  ,
GetFocusHdl  ,
weld::Widget ,
void   
)

Definition at line 373 of file funcutl.cxx.

References LINK, Application::PostUserEvent(), and Application::RemoveUserEvent().

◆ IMPL_LINK_NOARG() [18/20]

formula::IMPL_LINK_NOARG ( RefEdit  ,
LoseFocusHdl  ,
weld::Widget ,
void   
)

Definition at line 383 of file funcutl.cxx.

References LINK, Application::PostUserEvent(), and Application::RemoveUserEvent().

◆ IMPL_LINK_NOARG() [19/20]

formula::IMPL_LINK_NOARG ( RefEdit  ,
Modify  ,
weld::Entry ,
void   
)

Definition at line 329 of file funcutl.cxx.

References maModifyHdl.

◆ IMPL_LINK_NOARG() [20/20]

formula::IMPL_LINK_NOARG ( RefEdit  ,
UpdateHdl  ,
Timer ,
void   
)

Definition at line 404 of file funcutl.cxx.

◆ intrusive_ptr_add_ref()

void formula::intrusive_ptr_add_ref ( const FormulaToken p)
inline

Definition at line 220 of file token.hxx.

References p.

◆ intrusive_ptr_release()

void formula::intrusive_ptr_release ( const FormulaToken p)
inline

Definition at line 225 of file token.hxx.

References p.

◆ IsFormulaText()

static bool formula::IsFormulaText ( const CharClass rCharClass,
const OUString &  rStr,
sal_Int32  nPos 
)
static

Definition at line 187 of file FormulaHelper.cxx.

References CharClass::isLetterNumeric(), and nPos.

Referenced by formula::FormulaHelper::GetFunctionStart().

◆ lcl_fillNativeSymbols()

static bool formula::lcl_fillNativeSymbols ( FormulaCompiler::NonConstOpCodeMapPtr xMap,
FormulaCompiler::InitSymbols  eWhat = FormulaCompiler::InitSymbols::INIT 
)
static

◆ lcl_IsReference()

static bool formula::lcl_IsReference ( OpCode  eOp,
StackVar  eType 
)
static

◆ operator<<()

template<typename charT , typename traits >
std::basic_ostream< charT, traits > & formula::operator<< ( std::basic_ostream< charT, traits > &  stream,
const FormulaTokenArray point 
)
inline

Definition at line 534 of file tokenarray.hxx.

◆ StackVarEnumToString()

std::string formula::StackVarEnumToString ( StackVar const  e)
inline

Variable Documentation

◆ INVALID_STRING

const svl::SharedString formula::INVALID_STRING

Definition at line 210 of file token.cxx.

Referenced by formula::FormulaToken::GetString().

◆ kMaxArgCount

constexpr sal_uInt16 formula::kMaxArgCount = 255
constexpr

Definition at line 35 of file parawin.cxx.

Referenced by formula::ParaWin::SetFunctionDesc().

◆ kMaxArgOffset

constexpr sal_uInt16 formula::kMaxArgOffset = kMaxArgCount - 1
constexpr

Definition at line 36 of file parawin.cxx.

Referenced by formula::ParaWin::UpdateArgInput().

◆ nRecursionMax

constexpr short formula::nRecursionMax = 100
constexpr

◆ pInternal

const char* formula::pInternal[2] = { "TTT", "__DEBUG_VAR" }
static

Definition at line 45 of file FormulaCompiler.cxx.

Referenced by formula::FormulaCompiler::CreateStringFromToken().