diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-05-01 01:15:02 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-05-01 01:18:50 -0400 |
commit | 3c4fb52d8fc89fe43983991ed2339295b2e0ef8c (patch) | |
tree | e1f5f8f6f047edad2d610394c737ff2f1ceca44c /sc/inc/tokenarray.hxx | |
parent | 0e443b773454fa153827753812757d88eea932c5 (diff) |
fdo#78079: Re-work sort by column to get it to do the right thing.
Also fixed reference update problem.
Change-Id: I06e6115ef969a011fdd5c92d5eb1927fb7ae789b
Diffstat (limited to 'sc/inc/tokenarray.hxx')
-rw-r--r-- | sc/inc/tokenarray.hxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sc/inc/tokenarray.hxx b/sc/inc/tokenarray.hxx index 72447904cf89..c7ff3dcb1b93 100644 --- a/sc/inc/tokenarray.hxx +++ b/sc/inc/tokenarray.hxx @@ -157,6 +157,18 @@ public: const ScAddress& rPos, const ScRange& rMovedRange, const ScAddress& rDelta ); /** + * Move reference positions in response to column reordering. A range + * reference gets moved only when the whole range fits in a single column. + * + * @param rPos position of this formula cell + * @param nTab sheet where columns are reordered. + * @param nRow1 top row of reordered range. + * @param nRow2 bottom row of reordered range. + * @param rColMap old-to-new column mapping. + */ + void MoveReference( const ScAddress& rPos, SCTAB nTab, SCROW nRow1, SCROW nRow2, const sc::ColReorderMapType& rColMap ); + + /** * Adjust all references in named expression. In named expression, we only * update absolute positions, and leave relative positions intact. * @@ -184,6 +196,11 @@ public: sc::RefUpdateResult AdjustReferenceOnMovedTab( sc::RefUpdateMoveTabContext& rCxt, const ScAddress& rOldPos ); /** + * Adjust all internal references on base position change. + */ + void AdjustReferenceOnMovedOrigin( const ScAddress& rOldPos, 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 @@ -198,6 +215,9 @@ public: void CheckRelativeReferenceBounds( const sc::RefUpdateContext& rCxt, const ScAddress& rPos, SCROW nGroupLen, std::vector<SCROW>& rBounds ) const; + void CheckRelativeReferenceBounds( + const ScAddress& rPos, SCROW nGroupLen, const ScRange& rRange, std::vector<SCROW>& rBounds ) const; + /** * Create a string representation of formula token array without modifying * the internal state of the token array. |