diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2011-12-18 04:19:31 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2011-12-19 23:40:53 +0100 |
commit | 2cc7b083386dec73b353c0bd187dfe3a58906c10 (patch) | |
tree | e9d1e9531f04482de59a99d85d930f0a865f9612 | |
parent | 3584cb1906ee96c11fbd5040bf57538cf0543254 (diff) |
Copy Absolute Formulas between Documents: Part II
adjust named ranges formulas too
little problem here:
tab absolute and col/row relative is tricky, the col/row is calculated
relative to the cell where the range name is used but we don't know in
which cells the range name is used
The other office solves that by making only references pointing to
sheets that are not copied external (this solution is not perfect)
-rw-r--r-- | sc/source/core/data/cell.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx index f86d8987e3f0..e85d984a98d0 100644 --- a/sc/source/core/data/cell.cxx +++ b/sc/source/core/data/cell.cxx @@ -179,6 +179,8 @@ void adjustRangeName(ScToken* pToken, ScDocument& rNewDoc, const ScDocument* pOl { bNewGlobal = bOldGlobal; pRangeData = new ScRangeData(*pOldRangeData, &rNewDoc); + ScTokenArray* pRangeNameToken = pRangeData->GetCode(); + pRangeNameToken->ReadjusteAbsolute3DReferences(pOldDoc, &rNewDoc, pRangeData->GetPos()); bool bInserted; if (bNewGlobal) bInserted = rNewDoc.GetRangeName()->insert(pRangeData); |