diff options
Diffstat (limited to 'sc/inc/refdata.hxx')
-rw-r--r-- | sc/inc/refdata.hxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sc/inc/refdata.hxx b/sc/inc/refdata.hxx index e0d9b807a78b..c49682f67534 100644 --- a/sc/inc/refdata.hxx +++ b/sc/inc/refdata.hxx @@ -146,6 +146,20 @@ struct ScComplexRefData tab if one sheet, or >=0 if more than one sheets. */ bool ValidExternal() const; + /** Whether this references entire columns, A:A */ + inline bool IsEntireCol() const + { + // Both row anchors must be absolute. + return Ref1.Row() == 0 && Ref2.Row() == MAXROW && !Ref1.IsRowRel() && !Ref2.IsRowRel(); + } + + /** Whether this references entire rows, 1:1 */ + inline bool IsEntireRow() const + { + // Both column anchors must be absolute. + return Ref1.Col() == 0 && Ref2.Col() == MAXCOL && !Ref1.IsColRel() && !Ref2.IsColRel(); + } + SC_DLLPUBLIC ScRange toAbs( const ScAddress& rPos ) const; void SetRange( const ScRange& rRange, const ScAddress& rPos ); |