LibreOffice Module sc (master) 1
Macros | Functions
token.cxx File Reference
#include <functional>
#include <string.h>
#include <osl/diagnose.h>
#include <sal/log.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/opcode.hxx>
#include <jumpmatrix.hxx>
#include <rangeseq.hxx>
#include <rangeutl.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!")
 

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

◆ IF_NOT_OPCODE_ERROR

#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!")

Function Documentation

◆ checkArraySep()

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

Definition at line 2055 of file token.cxx.

Referenced by ScTokenArray::MergeArray().

◆ extendRangeReference()

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 504 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(), i, ScSingleRefData::IsFlag3D(), p, pt, ScComplexRefData::Ref1, ScComplexRefData::Ref2, ScSingleRefData::SetFlag3D(), svDoubleRef, svExternalDoubleRef, svExternalSingleRef, svRefList, svSingleRef, and svUnknown.

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