25#include <document.hxx>
61 Flags.bColRel =
false;
78 Flags.bRowRel =
false;
95 Flags.bTabRel =
false;
101 Flags.bTabRel =
true;
112 Flags.bColDeleted = bVal;
117 Flags.bRowDeleted = bVal;
122 Flags.bTabDeleted = bVal;
242 if (
Flags.bRowDeleted)
249 if (
Flags.bColDeleted)
256 if (
Flags.bTabDeleted)
362#if DEBUG_FORMULA_COMPILER
363void ScSingleRefData::Dump(
int nIndent )
const
366 for (
int i = 0;
i < nIndent; ++
i)
369 cout << aIndent <<
"address type column: " << (
IsColRel()?
"relative":
"absolute")
370 <<
" row : " << (
IsRowRel()?
"relative":
"absolute") <<
" sheet: "
371 << (
IsTabRel()?
"relative":
"absolute") << endl;
372 cout << aIndent <<
"deleted column: " << (
IsColDeleted()?
"yes":
"no")
373 <<
" row : " << (
IsRowDeleted()?
"yes":
"no") <<
" sheet: "
375 cout << aIndent <<
"column: " <<
mnCol <<
" row: " <<
mnRow <<
" sheet: " <<
mnTab <<
endl;
376 cout << aIndent <<
"3d ref: " << (
IsFlag3D()?
"yes":
"no") << endl;
533 if (nCol2 == rDoc.
MaxCol())
537 if (nCol2 < rDoc.
MaxCol())
539 SCCOL nCol = ::std::min(
static_cast<SCCOL>(nCol2 + nDelta), rDoc.
MaxCol());
562 if (nRow2 == rDoc.
MaxRow())
566 if (nRow2 < rDoc.
MaxRow())
568 SCROW nRow = ::std::min(
static_cast<SCROW>(nRow2 + nDelta), rDoc.
MaxRow());
585#if DEBUG_FORMULA_COMPILER
586void ScComplexRefData::Dump(
int nIndent )
const
589 for (
int i = 0;
i < nIndent; ++
i)
592 cout << aIndent <<
"ref 1" <<
endl;
593 Ref1.Dump(nIndent+1);
594 cout << aIndent <<
"ref 2" <<
endl;
595 Ref2.Dump(nIndent+1);
bool ValidTab(SCTAB nTab)
ScSheetLimits & GetSheetLimits() const
SC_DLLPUBLIC SCCOL MaxCol() const
SC_DLLPUBLIC SCROW MaxRow() const
SC_DLLPUBLIC SCTAB GetTableCount() const
const ScAddress & GetAddress() const
TOOLS_DLLPUBLIC SvStream & endl(SvStream &rStr)
Complex reference (a range) into the sheet.
SC_DLLPUBLIC ScRange toAbs(const ScSheetLimits &rLimits, const ScAddress &rPos) const
bool Valid(const ScDocument &rDoc) const
bool IsEntireRow(const ScSheetLimits &rLimits) const
Whether this references entire rows, 1:1.
bool IncEndRowSticky(const ScDocument &rDoc, SCROW nDelta, const ScAddress &rPos)
Increment or decrement end row unless or until sticky.
void SetRange(const ScSheetLimits &rLimits, const ScRange &rRange, const ScAddress &rPos)
Set a new range, assuming that the ordering of the range matches the ordering of the reference data f...
bool ValidExternal(const ScDocument &rDoc) const
In external references nTab is -1 for the start tab and -1 for the end tab if one sheet and the exter...
bool IncEndColSticky(const ScDocument &rDoc, SCCOL nDelta, const ScAddress &rPos)
Increment or decrement end column unless or until sticky.
bool IsEntireCol(const ScSheetLimits &rLimits) const
Whether this references entire columns, A:A.
void InitFromRefAddresses(const ScDocument &rDoc, const ScRefAddress &rRef1, const ScRefAddress &rRef2, const ScAddress &rPos)
InitFlags and set range, relative to rPos if rRef1 and rRef2 say so.
ScComplexRefData & Extend(const ScSheetLimits &rLimits, const ScSingleRefData &rRef, const ScAddress &rPos)
Enlarge range if reference passed is not within existing range.
void PutInOrder(const ScAddress &rPos)
Adjust ordering (front-top-left/rear-bottom-right) to a new position.
bool ValidRow(SCROW nRow) const
bool ValidCol(SCCOL nCol) const
Single reference (one address) into the sheet.
void SetAbsCol(SCCOL nVal)
void SetAbsTab(SCTAB nVal)
void SetAddress(const ScSheetLimits &rLimits, const ScAddress &rAddr, const ScAddress &rPos)
void InitAddress(const ScAddress &rAdr)
InitAddress: InitFlags and set address.
bool operator==(const ScSingleRefData &) const
bool IsRowDeleted() const
void SetRowRel(bool bVal)
void InitAddressRel(const ScDocument &rDoc, const ScAddress &rAdr, const ScAddress &rPos)
InitAddressRel: InitFlags and set address, everything relative to rPos.
void SetTabRel(bool bVal)
void SetColDeleted(bool bVal)
static void PutInOrder(ScSingleRefData &rRef1, ScSingleRefData &rRef2, const ScAddress &rPos)
Adjust ordering (front-top-left/rear-bottom-right) to a new position.
void SetRelRow(SCROW nVal)
void SetRelTab(SCTAB nVal)
bool Valid(const ScDocument &rDoc) const
ScAddress toAbs(const ScSheetLimits &rLimits, const ScAddress &rPos) const
bool RowValid(const ScDocument &rDoc) const
void SetAbsRow(SCROW nVal)
bool bRelName
Reference derived from RangeName with relative values.
void SetRelCol(SCCOL nVal)
struct ScSingleRefData::@34::@36 Flags
bool ColValid(const ScDocument &rDoc) const
bool IsTabDeleted() 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,...
void InitFromRefAddress(const ScDocument &rDoc, const ScRefAddress &rRef, const ScAddress &rPos)
InitFlags and set address, relative to rPos if rRef says so.
bool TabValid(const ScDocument &rDoc) const
void SetFlag3D(bool bVal)
bool operator!=(const ScSingleRefData &) const
void InitFlags()
No default ctor, because used in ScRawToken union, set InitFlags!
void SetRelName(bool bVal)
void SetRowDeleted(bool bVal)
bool IsColDeleted() const
void SetColRel(bool bVal)
void SetTabDeleted(bool bVal)