diff options
-rw-r--r-- | sc/inc/cell.hxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/cell.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/colorscale.cxx | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/sc/inc/cell.hxx b/sc/inc/cell.hxx index 5de013037fbe..3bf2dfe7d87f 100644 --- a/sc/inc/cell.hxx +++ b/sc/inc/cell.hxx @@ -79,6 +79,8 @@ const int SC_CLONECELL_ADJUST3DREL = 0x0002; copying cells to undo document, where captions are handled in drawing undo). */ const int SC_CLONECELL_NOCAPTION = 0x0004; +/** If set, absolute refs will not transformed to external references */ +const int SC_CLONECELL_NOMAKEABS_EXTERNAL = 0x0008; // ============================================================================ class SC_DLLPUBLIC ScBaseCell diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx index 3af1a1bf2581..5fbcbb9f42af 100644 --- a/sc/source/core/data/cell.cxx +++ b/sc/source/core/data/cell.cxx @@ -812,7 +812,7 @@ ScFormulaCell::ScFormulaCell( const ScFormulaCell& rCell, ScDocument& rDoc, cons } bool bCopyBetweenDocs = pDocument->GetPool() != rCell.pDocument->GetPool(); - if (bCopyBetweenDocs) + if (bCopyBetweenDocs && !(nCloneFlags & SC_CLONECELL_NOMAKEABS_EXTERNAL)) { pCode->ReadjustAbsolute3DReferences( rCell.pDocument, &rDoc, rCell.aPos); } diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx index 35cdb2000154..bad6a1495b65 100644 --- a/sc/source/core/data/colorscale.cxx +++ b/sc/source/core/data/colorscale.cxx @@ -60,7 +60,7 @@ ScColorScaleEntry::ScColorScaleEntry(ScDocument* pDoc, const ScColorScaleEntry& { if(rEntry.mpCell) { - mpCell.reset(static_cast<ScFormulaCell*>(rEntry.mpCell->Clone(*pDoc))); + mpCell.reset(static_cast<ScFormulaCell*>(rEntry.mpCell->Clone(*pDoc, SC_CLONECELL_NOMAKEABS_EXTERNAL))); } } |