formulas in color scales should not be changed to external references

Change-Id: Ie85bd4320324ef932102576ca4ccf32c3527796c
This commit is contained in:
Markus Mohrhard
2012-05-14 09:35:23 +02:00
parent a233a98a90
commit 28062c6281
3 changed files with 4 additions and 2 deletions

View File

@@ -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

View File

@@ -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);
}

View File

@@ -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)));
}
}