diff options
author | Eike Rathke <erack@redhat.com> | 2015-07-07 01:45:41 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-08-03 17:51:08 +0200 |
commit | e24d775c0d8d355f9cd41f081991d2fe6f24017d (patch) | |
tree | 2488b740d34cd62eb7bea26bfd2d0fd77892e8e8 /sc/inc | |
parent | 679651baff32e7971724ec0c1844a227f7f759a9 (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
Backported.
Change-Id: Id69c58800d28f1733777f7931a20d8ee7bdf034f
Reviewed-on: https://gerrit.libreoffice.org/16829
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 e0d9b807a78b..75c94a1d89cf 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; @@ -147,8 +150,14 @@ struct ScComplexRefData bool ValidExternal() const; 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 cd32952c47eb..01d7a52fbd1c 100644 --- a/sc/inc/tokenarray.hxx +++ b/sc/inc/tokenarray.hxx @@ -216,6 +216,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 |