Kaydet (Commit) 12ecd304 authored tarafından Eike Rathke's avatar Eike Rathke

handle paste special of single formula cell with error result

This apparently was never implemented, unlike in the block pasting code that
handles it fine. Formula cells with error results were always copied as is if
numeric was requested, even if formulas weren't requested.

Change-Id: Id550c4e757b6bb2c06aa0637328216383cdf3d6b
üst 9ae8e4d3
...@@ -211,6 +211,13 @@ void CopyFromClipContext::setSingleCell( const ScAddress& rSrcPos, const ScColum ...@@ -211,6 +211,13 @@ void CopyFromClipContext::setSingleCell( const ScAddress& rSrcPos, const ScColum
if (!bNumeric) if (!bNumeric)
// Error code is treated as numeric value. Don't paste it. // Error code is treated as numeric value. Don't paste it.
rSrcCell.clear(); rSrcCell.clear();
else
{
// Turn this into a formula cell with just the error code.
ScFormulaCell* pErrCell = new ScFormulaCell(mpClipDoc, rSrcPos);
pErrCell->SetErrCode(nErr);
rSrcCell.set(pErrCell);
}
} }
else if (rSrcCell.mpFormula->IsValue()) else if (rSrcCell.mpFormula->IsValue())
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment