summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-03-15 22:22:10 +0100
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-03-16 15:17:28 -0400
commit14ed2c61066b38d812bb68c4c1f02f8cb7c97f4d (patch)
treed6a4d0acb3b99a8c8bc5500457c5564256567813
parent70b5ab86907bb0ee75b2e70505cca1d386ae0025 (diff)
update the relatice refs after the absolute refs, fdo#47285
The algoithm for updating absolute refs needs to calculate the old position based on the information before any updates to the RefData Signed-off-by: Kohei Yoshida <kohei.yoshida@gmail.com>
-rw-r--r--sc/source/core/data/cell.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx
index 9b431fa26a5e..4ed94b9cfb76 100644
--- a/sc/source/core/data/cell.cxx
+++ b/sc/source/core/data/cell.cxx
@@ -861,9 +861,6 @@ ScFormulaCell::ScFormulaCell( const ScFormulaCell& rCell, ScDocument& rDoc, cons
{
pCode = rCell.pCode->Clone();
- if ( nCloneFlags & SC_CLONECELL_ADJUST3DREL )
- pCode->ReadjustRelative3DReferences( rCell.aPos, aPos );
-
// evtl. Fehler zuruecksetzen und neu kompilieren
// nicht im Clipboard - da muss das Fehlerflag erhalten bleiben
// Spezialfall Laenge=0: als Fehlerzelle erzeugt, dann auch Fehler behalten
@@ -900,6 +897,9 @@ ScFormulaCell::ScFormulaCell( const ScFormulaCell& rCell, ScDocument& rDoc, cons
pCode->AdjustAbsoluteRefs( rCell.pDocument, rCell.aPos, aPos );
}
+ if ( nCloneFlags & SC_CLONECELL_ADJUST3DREL )
+ pCode->ReadjustRelative3DReferences( rCell.aPos, aPos );
+
if( !bCompile )
{ // Name references with references and ColRowNames
pCode->Reset();