summaryrefslogtreecommitdiff
path: root/sc/inc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-06-26 20:05:54 +0200
committerAndras Timar <andras.timar@collabora.com>2015-08-06 12:52:26 +0200
commit04aaec02d315b5e78299aa611fe40c76e1b94e3f (patch)
tree5997393b4e81a795865aee9ae706cb58e23609fd /sc/inc
parente65f718b984a44919f251ffa1adcb7524f892356 (diff)
use ScComplexRefData::IsEntireCol() and IsEntireRow()
Change-Id: I4287019f5492825f6d295c4e364405f0d7329eb7 (cherry picked from commit dcbceb945b7a282c1a1309cf07e62ecc925e98f6)
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/refdata.hxx14
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 );