[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sc/source

Eike Rathke erack at redhat.com
Sun Jan 8 23:27:32 UTC 2017


 sc/source/core/data/clipcontext.cxx |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit 9fa92265bbbb95958410b4ca7d790e8e3dd27345
Author: Eike Rathke <erack at redhat.com>
Date:   Wed Jan 4 21:23:40 2017 +0100

    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/32744
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sc/source/core/data/clipcontext.cxx b/sc/source/core/data/clipcontext.cxx
index b0ac301..c355f9b 100644
--- a/sc/source/core/data/clipcontext.cxx
+++ b/sc/source/core/data/clipcontext.cxx
@@ -210,6 +210,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())
             {


More information about the Libreoffice-commits mailing list