diff options
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/refdata.hxx | 3 | ||||
-rw-r--r-- | sc/source/core/tool/refdata.cxx | 21 |
2 files changed, 24 insertions, 0 deletions
diff --git a/sc/inc/refdata.hxx b/sc/inc/refdata.hxx index d79590cf8988..d619f4f1b3c7 100644 --- a/sc/inc/refdata.hxx +++ b/sc/inc/refdata.hxx @@ -83,6 +83,9 @@ struct SC_DLLPUBLIC ScSingleRefData ScAddress toAbs( const ScAddress& rPos ) const; void SetAddress( const ScAddress& rAddr, const ScAddress& rPos ); + SCROW GetRow() const; + SCCOL GetCol() const; + SCTAB GetTab() const; void CalcRelFromAbs( const ScAddress& rPos ); void CalcAbsIfRel( const ScAddress& rPos ); diff --git a/sc/source/core/tool/refdata.cxx b/sc/source/core/tool/refdata.cxx index aaca90361d7b..9988b8750291 100644 --- a/sc/source/core/tool/refdata.cxx +++ b/sc/source/core/tool/refdata.cxx @@ -61,6 +61,27 @@ void ScSingleRefData::SetAddress( const ScAddress& rAddr, const ScAddress& rPos nTab = rAddr.Tab(); } +SCROW ScSingleRefData::GetRow() const +{ + if (Flags.bRowDeleted) + return -1; + return Flags.bRowRel ? nRelRow : nRow; +} + +SCCOL ScSingleRefData::GetCol() const +{ + if (Flags.bColDeleted) + return -1; + return Flags.bColRel ? nRelCol : nCol; +} + +SCTAB ScSingleRefData::GetTab() const +{ + if (Flags.bTabDeleted) + return -1; + return Flags.bTabRel ? nRelTab : nTab; +} + void ScSingleRefData::CalcAbsIfRel( const ScAddress& rPos ) { if ( Flags.bColRel ) |