diff options
author | Eike Rathke <erack@redhat.com> | 2017-01-04 21:23:40 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-01-05 11:09:28 +0000 |
commit | 328d9f9781a3114693dbfbda442a28f9dc354b92 (patch) | |
tree | 024a1538f3c01cf054f32fc9a002a1ff86389747 /sc/source | |
parent | 3d5ccc1577ff89bd13c26a8cde787a39482a8b81 (diff) |
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
(cherry picked from commit 12ecd30476f17c6f6efde976f8e56d604eda0f1e)
Reviewed-on: https://gerrit.libreoffice.org/32742
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/core/data/clipcontext.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sc/source/core/data/clipcontext.cxx b/sc/source/core/data/clipcontext.cxx index 8b0ce0df315b..784437f9f45a 100644 --- a/sc/source/core/data/clipcontext.cxx +++ b/sc/source/core/data/clipcontext.cxx @@ -211,6 +211,13 @@ void CopyFromClipContext::setSingleCell( const ScAddress& rSrcPos, const ScColum if (!bNumeric) // Error code is treated as numeric value. Don't paste it. 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()) { |