LibreOffice Module sc (master)  1
Macros | Enumerations | Functions
token.cxx File Reference
#include <cstddef>
#include <cstdio>
#include <functional>
#include <string.h>
#include <osl/diagnose.h>
#include <sal/log.hxx>
#include <sfx2/docfile.hxx>
#include <officecfg/Office/Calc.hxx>
#include <token.hxx>
#include <tokenarray.hxx>
#include <reftokenhelper.hxx>
#include <clipparam.hxx>
#include <compiler.hxx>
#include <interpre.hxx>
#include <formula/FormulaCompiler.hxx>
#include <formula/compiler.hxx>
#include <formula/grammar.hxx>
#include <formula/opcode.hxx>
#include <formulagroup.hxx>
#include <rechead.hxx>
#include <parclass.hxx>
#include <jumpmatrix.hxx>
#include <rangeseq.hxx>
#include <externalrefmgr.hxx>
#include <document.hxx>
#include <refupdatecontext.hxx>
#include <tokenstringcontext.hxx>
#include <types.hxx>
#include <addincol.hxx>
#include <dbdata.hxx>
#include <reordermap.hxx>
#include <svl/sharedstring.hxx>
#include <scmatrix.hxx>
#include <com/sun/star/sheet/ComplexReference.hpp>
#include <com/sun/star/sheet/ExternalReference.hpp>
#include <com/sun/star/sheet/FormulaToken.hpp>
#include <com/sun/star/sheet/ReferenceFlags.hpp>
#include <com/sun/star/sheet/NameToken.hpp>
#include <utility>
#include <o3tl/safeint.hxx>
#include <o3tl/sorted_vector.hxx>
Include dependency graph for token.cxx:

Go to the source code of this file.

Macros

#define IF_NOT_OPCODE_ERROR(o, c)   SAL_WARN_IF((eOp!=o), "sc.core", #c "::ctor: OpCode " << static_cast<int>(eOp) << " lost, converted to " #o "; maybe inherit from FormulaToken instead!")
 

Enumerations

enum  ShrinkResult
 

Functions

FormulaTokenRef extendRangeReference (ScSheetLimits &rLimits, FormulaToken &rTok1, FormulaToken &rTok2, const ScAddress &rPos, bool bReuseDoubleRef)
 If rTok1 and rTok2 both are SingleRef or DoubleRef tokens, extend/merge ranges as needed for ocRange. More...
 
static bool checkArraySep (bool &bPrevWasSep, bool bNewVal)
 

Macro Definition Documentation

#define IF_NOT_OPCODE_ERROR (   o,
 
)    SAL_WARN_IF((eOp!=o), "sc.core", #c "::ctor: OpCode " << static_cast<int>(eOp) << " lost, converted to " #o "; maybe inherit from FormulaToken instead!")

Referenced by ScRawToken::CreateToken().

Enumeration Type Documentation

Definition at line 2770 of file token.cxx.

Function Documentation

static bool checkArraySep ( bool &  bPrevWasSep,
bool  bNewVal 
)
static

Definition at line 1986 of file token.cxx.

Referenced by ScTokenArray::MergeArray().

FormulaTokenRef extendRangeReference ( ScSheetLimits rLimits,
formula::FormulaToken rTok1,
formula::FormulaToken rTok2,
const ScAddress rPos,
bool  bReuseDoubleRef 
)

If rTok1 and rTok2 both are SingleRef or DoubleRef tokens, extend/merge ranges as needed for ocRange.

Parameters
rPosThe formula's position, used to calculate absolute positions from relative references.
bReuseDoubleRefIf true, a DoubleRef token is reused if passed as rTok1 or rTok2, else a new DoubleRef token is created and returned.
Returns
A reused or new'ed ScDoubleRefToken, or a NULL TokenRef if rTok1 or rTok2 are not of sv(Single|Double)Ref

Definition at line 503 of file token.cxx.

References formula::FormulaToken::Clone(), ScComplexRefData::Extend(), formula::FormulaToken::GetIndex(), formula::FormulaToken::GetRef(), formula::FormulaToken::GetRefList(), formula::FormulaToken::GetSingleRef(), formula::FormulaToken::GetString(), formula::FormulaToken::GetType(), ScSingleRefData::IsFlag3D(), ScComplexRefData::Ref1, ScComplexRefData::Ref2, ScSingleRefData::SetFlag3D(), formula::svDoubleRef, formula::svExternalDoubleRef, formula::svExternalSingleRef, formula::svRefList, formula::svSingleRef, and formula::svUnknown.

Referenced by ScCompiler::ExtendRangeReference(), ScTokenArray::MergeRangeReference(), and ScInterpreter::ScRangeFunc().