diff options
author | Eike Rathke <erack@redhat.com> | 2015-07-07 01:45:41 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-08-06 12:55:46 +0200 |
commit | da80a5ff3faeb8697aa3eea3e70bd4b3e1dd2029 (patch) | |
tree | 64ba98769d5655be24d92da3fb3a5db7b16717e0 /sc/inc | |
parent | bf8ba3fd3a5f76290afceac9c758cd7b01d0af0a (diff) |
always justify a referenced range in order, tdf#92468
(cherry picked from commit d24c6a0280b0287ee6c23ca89068323c6b7c3dd7)
(re-)introduce ScComplexRefData::PutInOrder(), tdf#92468
(cherry picked from commit ad3d2b6c2e88d191d76f90eb5be927f7ca76c670)
introduce ScTokenArray::AdjustReferenceOnCopy(), tdf#92468
(cherry picked from commit 369ee0b1faf79f1bd23c75ee04dd0dcc5bf283af)
call ScTokenArray::AdjustReferenceOnCopy() in ScFormulaCell clone, tdf#92468
(cherry picked from commit 3ddaeaab37d585971e376de6ad7b0f06f55f2e1a)
f551e02a77a416b95f74266de896391d1d72eb3c
0a7ac0d9d10e96223cd5f095a771aa6f9d271417
0dc0c3528b35bc6ea2525bafb94d72ee65e4791a
Change-Id: Id69c58800d28f1733777f7931a20d8ee7bdf034f
Reviewed-on: https://gerrit.libreoffice.org/16815
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/inc')
-rw-r--r-- | sc/inc/refdata.hxx | 9 | ||||
-rw-r--r-- | sc/inc/tokenarray.hxx | 6 |
2 files changed, 15 insertions, 0 deletions
diff --git a/sc/inc/refdata.hxx b/sc/inc/refdata.hxx index c49682f67534..b96acb7a7eec 100644 --- a/sc/inc/refdata.hxx +++ b/sc/inc/refdata.hxx @@ -104,6 +104,9 @@ public: SCCOL Col() const; SCTAB Tab() const; + /** Adjust ordering (front-top-left/rear-bottom-right) to a new position. */ + static void PutInOrder( ScSingleRefData& rRef1, ScSingleRefData& rRef2, const ScAddress& rPos ); + bool operator==( const ScSingleRefData& ) const; bool operator!=( const ScSingleRefData& ) const; @@ -161,8 +164,14 @@ struct ScComplexRefData } SC_DLLPUBLIC ScRange toAbs( const ScAddress& rPos ) const; + + /** Set a new range, assuming that the ordering of the range matches the + ordering of the reference data flags already set. */ void SetRange( const ScRange& rRange, const ScAddress& rPos ); + /** Adjust ordering (front-top-left/rear-bottom-right) to a new position. */ + void PutInOrder( const ScAddress& rPos ); + inline bool operator==( const ScComplexRefData& r ) const { return Ref1 == r.Ref1 && Ref2 == r.Ref2; } /** Enlarge range if reference passed is not within existing range. diff --git a/sc/inc/tokenarray.hxx b/sc/inc/tokenarray.hxx index 0d3fa0245f50..8ed86971beec 100644 --- a/sc/inc/tokenarray.hxx +++ b/sc/inc/tokenarray.hxx @@ -217,6 +217,12 @@ public: void AdjustReferenceOnMovedOriginIfOtherSheet( const ScAddress& rOldPos, const ScAddress& rNewPos ); /** + * Adjust internal range references on base position change to justify / + * put in order the relative references. + */ + void AdjustReferenceOnCopy( const ScAddress& rNewPos ); + + /** * Clear sheet deleted flag from internal reference tokens if the sheet * index falls within specified range. Note that when a reference is on a * sheet that's been deleted, its referenced sheet index retains the |