LibreOffice Module sc (master) 1
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
ScSingleRefData Struct Reference

Single reference (one address) into the sheet. More...

#include <refdata.hxx>

Public Member Functions

void InitFlags ()
 No default ctor, because used in ScRawToken union, set InitFlags! More...
 
void InitAddress (const ScAddress &rAdr)
 InitAddress: InitFlags and set address. More...
 
void InitAddress (SCCOL nCol, SCROW nRow, SCTAB nTab)
 
void InitAddressRel (const ScDocument &rDoc, const ScAddress &rAdr, const ScAddress &rPos)
 InitAddressRel: InitFlags and set address, everything relative to rPos. More...
 
void InitFromRefAddress (const ScDocument &rDoc, const ScRefAddress &rRef, const ScAddress &rPos)
 InitFlags and set address, relative to rPos if rRef says so. More...
 
sal_uInt8 FlagValue () const
 
void SetColRel (bool bVal)
 
bool IsColRel () const
 
void SetRowRel (bool bVal)
 
bool IsRowRel () const
 
void SetTabRel (bool bVal)
 
bool IsTabRel () const
 
void SetAbsCol (SCCOL nVal)
 
void SetRelCol (SCCOL nVal)
 
void IncCol (SCCOL nInc)
 
void SetAbsRow (SCROW nVal)
 
void SetRelRow (SCROW nVal)
 
void IncRow (SCROW nInc)
 
void SetAbsTab (SCTAB nVal)
 
void SetRelTab (SCTAB nVal)
 
void IncTab (SCTAB nInc)
 
void SetColDeleted (bool bVal)
 
bool IsColDeleted () const
 
void SetRowDeleted (bool bVal)
 
bool IsRowDeleted () const
 
void SetTabDeleted (bool bVal)
 
bool IsTabDeleted () const
 
bool IsDeleted () const
 
void SetFlag3D (bool bVal)
 
bool IsFlag3D () const
 
void SetRelName (bool bVal)
 
bool IsRelName () const
 
bool Valid (const ScDocument &rDoc) const
 
bool ColValid (const ScDocument &rDoc) const
 
bool RowValid (const ScDocument &rDoc) const
 
bool TabValid (const ScDocument &rDoc) const
 
bool ValidExternal (const ScDocument &rDoc) const
 In external references nTab is -1 if the external document was not loaded but the sheet was cached, or >=0 if the external document was loaded. More...
 
ScAddress toAbs (const ScSheetLimits &rLimits, const ScAddress &rPos) const
 
ScAddress toAbs (const ScDocument &rDoc, const ScAddress &rPos) const
 
void SetAddress (const ScSheetLimits &rLimits, const ScAddress &rAddr, const ScAddress &rPos)
 
SCROW Row () const
 
SCCOL Col () const
 
SCTAB Tab () const
 
bool operator== (const ScSingleRefData &) const
 
bool operator!= (const ScSingleRefData &) const
 

Static Public Member Functions

static void PutInOrder (ScSingleRefData &rRef1, ScSingleRefData &rRef2, const ScAddress &rPos)
 Adjust ordering (front-top-left/rear-bottom-right) to a new position. More...
 

Private Attributes

SCCOL mnCol
 
SCROW mnRow
 
SCTAB mnTab
 
union {
   sal_uInt8   mnFlagValue
 
   struct {
      bool   bColRel:1
 
      bool   bColDeleted:1
 
      bool   bRowRel:1
 
      bool   bRowDeleted:1
 
      bool   bTabRel:1
 
      bool   bTabDeleted:1
 
      bool   bFlag3D:1
 3D-Ref More...
 
      bool   bRelName:1
 Reference derived from RangeName with relative values. More...
 
   }   Flags
 
}; 
 

Detailed Description

Single reference (one address) into the sheet.

Definition at line 29 of file refdata.hxx.

Member Function Documentation

◆ Col()

SCCOL ScSingleRefData::Col ( ) const

◆ ColValid()

bool ScSingleRefData::ColValid ( const ScDocument rDoc) const

Definition at line 135 of file refdata.cxx.

References Flags, ScDocument::MaxCol(), and mnCol.

Referenced by Valid(), ValidExternal(), and ScComplexRefData::ValidExternal().

◆ FlagValue()

sal_uInt8 ScSingleRefData::FlagValue ( ) const
inline

Definition at line 62 of file refdata.hxx.

◆ IncCol()

void ScSingleRefData::IncCol ( SCCOL  nInc)

◆ IncRow()

void ScSingleRefData::IncRow ( SCROW  nInc)

◆ IncTab()

void ScSingleRefData::IncTab ( SCTAB  nInc)

◆ InitAddress() [1/2]

void ScSingleRefData::InitAddress ( const ScAddress rAdr)

◆ InitAddress() [2/2]

void ScSingleRefData::InitAddress ( SCCOL  nCol,
SCROW  nRow,
SCTAB  nTab 
)

Definition at line 32 of file refdata.cxx.

References InitFlags(), mnCol, mnRow, and mnTab.

◆ InitAddressRel()

void ScSingleRefData::InitAddressRel ( const ScDocument rDoc,
const ScAddress rAdr,
const ScAddress rPos 
)

InitAddressRel: InitFlags and set address, everything relative to rPos.

Definition at line 40 of file refdata.cxx.

References ScDocument::GetSheetLimits(), InitFlags(), SetAddress(), SetColRel(), SetRowRel(), and SetTabRel().

Referenced by ScComplexRefData::InitRangeRel().

◆ InitFlags()

void ScSingleRefData::InitFlags ( )
inline

◆ InitFromRefAddress()

void ScSingleRefData::InitFromRefAddress ( const ScDocument rDoc,
const ScRefAddress rRef,
const ScAddress rPos 
)

◆ IsColDeleted()

bool ScSingleRefData::IsColDeleted ( ) const
inline

◆ IsColRel()

bool ScSingleRefData::IsColRel ( ) const
inline

◆ IsDeleted()

bool ScSingleRefData::IsDeleted ( ) const

◆ IsFlag3D()

bool ScSingleRefData::IsFlag3D ( ) const
inline

◆ IsRelName()

bool ScSingleRefData::IsRelName ( ) const
inline

Definition at line 92 of file refdata.hxx.

References Flags.

Referenced by ScComplexRefData::Extend(), and lcl_SingleRefToApi().

◆ IsRowDeleted()

bool ScSingleRefData::IsRowDeleted ( ) const
inline

◆ IsRowRel()

bool ScSingleRefData::IsRowRel ( ) const
inline

◆ IsTabDeleted()

bool ScSingleRefData::IsTabDeleted ( ) const
inline

◆ IsTabRel()

bool ScSingleRefData::IsTabRel ( ) const
inline

◆ operator!=()

bool ScSingleRefData::operator!= ( const ScSingleRefData r) const

Definition at line 357 of file refdata.cxx.

References operator==().

◆ operator==()

bool ScSingleRefData::operator== ( const ScSingleRefData r) const

Definition at line 352 of file refdata.cxx.

References mnCol, mnFlagValue, mnRow, and mnTab.

Referenced by operator!=().

◆ PutInOrder()

void ScSingleRefData::PutInOrder ( ScSingleRefData rRef1,
ScSingleRefData rRef2,
const ScAddress rPos 
)
static

Adjust ordering (front-top-left/rear-bottom-right) to a new position.

Definition at line 262 of file refdata.cxx.

References bColDeleted, bColRel, bRelName, bRowDeleted, bRowRel, bTabDeleted, bTabRel, ScAddress::Col(), Flags, mnCol, mnRow, mnTab, ScAddress::Row(), and ScAddress::Tab().

Referenced by ScComplexRefData::PutInOrder().

◆ Row()

SCROW ScSingleRefData::Row ( ) const

◆ RowValid()

bool ScSingleRefData::RowValid ( const ScDocument rDoc) const

Definition at line 151 of file refdata.cxx.

References Flags, ScDocument::MaxRow(), and mnRow.

Referenced by Valid(), ValidExternal(), and ScComplexRefData::ValidExternal().

◆ SetAbsCol()

void ScSingleRefData::SetAbsCol ( SCCOL  nVal)

◆ SetAbsRow()

void ScSingleRefData::SetAbsRow ( SCROW  nVal)

◆ SetAbsTab()

void ScSingleRefData::SetAbsTab ( SCTAB  nVal)

◆ SetAddress()

void ScSingleRefData::SetAddress ( const ScSheetLimits rLimits,
const ScAddress rAddr,
const ScAddress rPos 
)

◆ SetColDeleted()

void ScSingleRefData::SetColDeleted ( bool  bVal)

◆ SetColRel()

void ScSingleRefData::SetColRel ( bool  bVal)
inline

◆ SetFlag3D()

void ScSingleRefData::SetFlag3D ( bool  bVal)
inline

◆ SetRelCol()

void ScSingleRefData::SetRelCol ( SCCOL  nVal)

◆ SetRelName()

void ScSingleRefData::SetRelName ( bool  bVal)
inline

◆ SetRelRow()

void ScSingleRefData::SetRelRow ( SCROW  nVal)

◆ SetRelTab()

void ScSingleRefData::SetRelTab ( SCTAB  nVal)

◆ SetRowDeleted()

void ScSingleRefData::SetRowDeleted ( bool  bVal)

◆ SetRowRel()

void ScSingleRefData::SetRowRel ( bool  bVal)
inline

◆ SetTabDeleted()

void ScSingleRefData::SetTabDeleted ( bool  bVal)

◆ SetTabRel()

void ScSingleRefData::SetTabRel ( bool  bVal)
inline

◆ Tab()

SCTAB ScSingleRefData::Tab ( ) const

◆ TabValid()

bool ScSingleRefData::TabValid ( const ScDocument rDoc) const

Definition at line 167 of file refdata.cxx.

References Flags, ScDocument::GetTableCount(), MAXTAB, and mnTab.

Referenced by Valid().

◆ toAbs() [1/2]

ScAddress ScSingleRefData::toAbs ( const ScDocument rDoc,
const ScAddress rPos 
) const

Definition at line 188 of file refdata.cxx.

References ScDocument::GetSheetLimits(), and toAbs().

◆ toAbs() [2/2]

ScAddress ScSingleRefData::toAbs ( const ScSheetLimits rLimits,
const ScAddress rPos 
) const

Definition at line 193 of file refdata.cxx.

References ScAddress::Col(), Flags, ScAddress::INITIALIZE_INVALID, mnCol, mnRow, mnTab, ScAddress::Row(), ScAddress::SetCol(), ScAddress::SetRow(), ScAddress::SetTab(), ScAddress::Tab(), ScSheetLimits::ValidCol(), ScSheetLimits::ValidRow(), and ValidTab().

Referenced by RangeNameBufferWK3::Add(), ScTokenArray::AdjustReferenceInMovedName(), ScTokenArray::AdjustReferenceInName(), ScTokenArray::AdjustReferenceOnMove(), ScTokenArray::AdjustReferenceOnMovedOrigin(), ScTokenArray::AdjustReferenceOnMovedOriginIfOtherSheet(), ScTokenArray::AdjustReferenceOnMovedTab(), ScTokenArray::AdjustReferenceOnShift(), ScGroupTokenConverter::convert(), ExcelToSc::Convert(), ExcelToSc8::Convert(), XclExpChSourceLink::ConvertDataSequence(), XclExpFmlaCompImpl::ConvertRefData(), ScCompiler::CreateStringFromSingleRef(), ScComplexRefData::Extend(), XclExpArrayBuffer::FindArray(), ScTokenArray::GetAdjacentExtendOfOuterFuncRefs(), XclImpChSourceLink::GetCellCount(), ScFormulaCell::GetFormula(), ScFormulaCell::GetMatrixOrigin(), ScDetectiveRefIter::GetNextRef(), ScRefTokenHelper::getRangeFromToken(), XclExpFmlaCompImpl::GetScTab(), ScConditionEntry::GetValidSrcPos(), ScCompiler::HandleColRowName(), ScFormulaCell::HasOneReference(), ScTokenArray::ImplGetReference(), ScFormulaCell::InterpretInvariantFormulaGroup(), lcl_ScDetectiveRefIter_SkipRef(), ScTokenArray::MoveReferenceColReorder(), ScTokenArray::MoveReferenceRowReorder(), ScInterpreter::PopExternalSingleRef(), XclExpFmlaCompImpl::ProcessExternalCellRef(), XclExpFmlaCompImpl::ProcessExternalName(), QProToSc::ReadSRD(), ScInterpreter::ScColumn(), ScInterpreter::ScOffset(), ScInterpreter::ScRow(), ScFormulaReferenceHelper::ShowFormulaReference(), ScFormulaListener::startListening(), sc::SharedFormulaUtil::startListeningAsGroup(), toAbs(), ScComplexRefData::toAbs(), ScRangeData::ValidateTabRefs(), and ScTokenArray::WrapReference().

◆ Valid()

bool ScSingleRefData::Valid ( const ScDocument rDoc) const

Definition at line 130 of file refdata.cxx.

References ColValid(), IsDeleted(), RowValid(), and TabValid().

Referenced by ScRawToken::IsValidReference(), and ScComplexRefData::Valid().

◆ ValidExternal()

bool ScSingleRefData::ValidExternal ( const ScDocument rDoc) const

In external references nTab is -1 if the external document was not loaded but the sheet was cached, or >=0 if the external document was loaded.

Definition at line 183 of file refdata.cxx.

References ColValid(), mnTab, and RowValid().

Referenced by ScComplexRefData::ValidExternal().

Member Data Documentation

◆ 

union { ... } ScSingleRefData::@35

◆ bColDeleted

bool ScSingleRefData::bColDeleted

Definition at line 42 of file refdata.hxx.

Referenced by PutInOrder().

◆ bColRel

bool ScSingleRefData::bColRel

Definition at line 41 of file refdata.hxx.

Referenced by PutInOrder().

◆ bFlag3D

bool ScSingleRefData::bFlag3D

3D-Ref

Definition at line 47 of file refdata.hxx.

◆ bRelName

bool ScSingleRefData::bRelName

Reference derived from RangeName with relative values.

Definition at line 48 of file refdata.hxx.

Referenced by PutInOrder().

◆ bRowDeleted

bool ScSingleRefData::bRowDeleted

Definition at line 44 of file refdata.hxx.

Referenced by PutInOrder().

◆ bRowRel

bool ScSingleRefData::bRowRel

Definition at line 43 of file refdata.hxx.

Referenced by PutInOrder().

◆ bTabDeleted

bool ScSingleRefData::bTabDeleted

Definition at line 46 of file refdata.hxx.

Referenced by PutInOrder().

◆ bTabRel

bool ScSingleRefData::bTabRel

Definition at line 45 of file refdata.hxx.

Referenced by PutInOrder().

◆ 

struct { ... } ScSingleRefData::Flags

◆ mnCol

SCCOL ScSingleRefData::mnCol
private

◆ mnFlagValue

sal_uInt8 ScSingleRefData::mnFlagValue

Definition at line 38 of file refdata.hxx.

Referenced by operator==().

◆ mnRow

SCROW ScSingleRefData::mnRow
private

◆ mnTab

SCTAB ScSingleRefData::mnTab
private

The documentation for this struct was generated from the following files: