diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2009-07-28 10:04:47 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2009-07-28 10:04:47 +0000 |
commit | 5099046dccb69af04e2a3adafad8e06c0832bd06 (patch) | |
tree | bf9a7b20c84fec1a18a65c66b6a0a25d6bc7e2f7 /sc/inc/refdata.hxx | |
parent | 6189b25c86e18ef0021ea2f3ba256be36d0fb4be (diff) |
CWS-TOOLING: integrate CWS calc51
2009-07-17 15:47:46 +0200 er r274098 : #i101544# more thorough reference checking in chart data ranges; also prevent some possible crash if invalid ranges were to be passed to document/cell access.
2009-07-16 14:20:11 +0200 er r274051 : #i101544# let ScRefTokenHelper::compileRangeRepresentation() fail on all possible non-reference occasions
2009-07-07 10:11:40 +0200 nn r273776 : #i35579# don't use long instead of sal_Int32
2009-07-03 16:41:39 +0200 nn r273711 : msvc warnings
2009-07-03 14:18:45 +0200 nn r273698 : msvc warning
2009-07-03 11:30:41 +0200 nn r273685 : #i35579# move new tokens to the end
2009-07-03 10:12:55 +0200 nn r273681 : CWS-TOOLING: rebase CWS calc51 to trunk@273468 (milestone: DEV300:m51)
2009-06-30 17:57:30 +0200 nn r273529 : #i103027# EnterData: if it's a formula, don't pass EditTextObject to undo
2009-06-29 14:31:18 +0200 er r273474 : #i101544# #i101645# #i102388# applied diff from CWS dr68ooo311
2009-06-29 10:30:20 +0200 nn r273457 : #i103161# DeleteCells: always leave list action
2009-06-24 16:16:34 +0200 nn r273353 : gcc warnings
2009-06-17 11:50:28 +0200 tbe r273055 : #i35579# Standard filter requires more options
2009-06-17 11:44:22 +0200 tbe r273054 : #i35579# Standard filter requires more options
2009-06-17 11:22:23 +0200 tbe r273052 : #i35579# Standard filter requires more options
2009-06-15 18:29:32 +0200 nn r273006 : #160063# UseFormulaData: check parenthesis position
2009-06-12 15:41:16 +0200 nn r272923 : #i99250# handle range lists in DoAutoOutline (patch from dtardon)
2009-06-11 15:07:05 +0200 nn r272874 : #i86943# GetNextPos: skip overlapped cells
2009-06-11 11:17:37 +0200 nn r272856 : #i97726# EnterData: get text from EditTextObject for repeat string of undo action
2009-06-10 20:45:07 +0200 nn r272839 : #i102566# minimum amount of code between updates of calculation progress (patch by cmc)
2009-06-10 20:22:02 +0200 nn r272838 : #i69524# PasteFile: specify target for SID_OPENDOC
2009-06-09 17:33:08 +0200 nn r272789 : #i16615# absolute/relative reference conversion for cell ranges (patch by gaojingmei)
Diffstat (limited to 'sc/inc/refdata.hxx')
-rw-r--r-- | sc/inc/refdata.hxx | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/sc/inc/refdata.hxx b/sc/inc/refdata.hxx index 6a51d66fdc07..12f29943fce0 100644 --- a/sc/inc/refdata.hxx +++ b/sc/inc/refdata.hxx @@ -109,6 +109,8 @@ struct SC_DLLPUBLIC ScSingleRefData // Single reference (one address) int inline BOOL IsRelName() const { return Flags.bRelName; } inline BOOL Valid() const; + /// In external references nTab is -1 + inline bool ValidExternal() const; void SmartRelAbs( const ScAddress& rPos ); void CalcRelFromAbs( const ScAddress& rPos ); @@ -147,6 +149,13 @@ inline BOOL ScSingleRefData::Valid() const nTab >= 0 && nTab <= MAXTAB; } +inline bool ScSingleRefData::ValidExternal() const +{ + return nCol >= 0 && nCol <= MAXCOL && + nRow >= 0 && nRow <= MAXROW && + nTab == -1; +} + struct ScComplexRefData // Complex reference (a range) into the sheet { @@ -181,6 +190,10 @@ struct ScComplexRefData // Complex reference (a range) into the sheet { return Ref1.IsDeleted() || Ref2.IsDeleted(); } inline BOOL Valid() const { return Ref1.Valid() && Ref2.Valid(); } + /** In external references nTab is -1 for the start tab and -1 for the end + tab if one sheet, or >=0 if more than one sheets. */ + inline bool ValidExternal() const; + /// Absolute references have to be up-to-date when calling this! void PutInOrder(); inline BOOL operator==( const ScComplexRefData& r ) const @@ -192,4 +205,12 @@ struct ScComplexRefData // Complex reference (a range) into the sheet ScComplexRefData& Extend( const ScComplexRefData & rRef, const ScAddress & rPos ); }; +inline bool ScComplexRefData::ValidExternal() const +{ + return Ref1.ValidExternal() && + Ref2.nCol >= 0 && Ref2.nCol <= MAXCOL && + Ref2.nRow >= 0 && Ref2.nRow <= MAXROW && + Ref2.nTab >= Ref1.nTab; +} + #endif |