summaryrefslogtreecommitdiffstats
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2011-12-18 04:19:31 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2011-12-19 23:40:53 +0100
commit2cc7b083386dec73b353c0bd187dfe3a58906c10 (patch)
treee9d1e9531f04482de59a99d85d930f0a865f9612 /sc
parentNeed gb_CXXFLAGS, too (diff)
downloadcore-2cc7b083386dec73b353c0bd187dfe3a58906c10.tar.gz
core-2cc7b083386dec73b353c0bd187dfe3a58906c10.zip
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)
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/cell.cxx2
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);