[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - sc/source

Julien Nabet serval2412 at yahoo.fr
Thu Feb 7 13:31:04 PST 2013


 sc/source/core/data/column.cxx |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 9fe8668203eae2f66c837b266847d639a5dac42c
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Thu Feb 7 22:22:12 2013 +0100

    Resolves: fdo#60420 Copy chart leads to crash
    
    Thank you Kohei for the better patch you proposed to me
    
    Change-Id: I145aaf6fd139a29373c41cc2ea81dadc9160f0fe
    (cherry picked from commit 7e2f34a3172a756a0fd70cae1294250206945a6e)
    
    Signed-off-by: Kohei Yoshida <kohei.yoshida at gmail.com>

diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 5fb98a2..ac4850e 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -1258,8 +1258,11 @@ void ScColumn::CopyStaticToDocument(SCROW nRow1, SCROW nRow2, ScColumn& rDestCol
 
     // Determine the range of cells in the original column that need to be copied.
     it = std::find_if(maItems.begin(), maItems.end(), FindInRows(nRow1, nRow2));
-    if (it != maItems.end())
-        itEnd = std::find_if(it, maItems.end(), FindAboveRow(nRow2));
+    if (it == maItems.end())
+        // Nothing to copy.
+        return;
+
+    itEnd = std::find_if(it, maItems.end(), FindAboveRow(nRow2));
 
     // Clone and staticize all cells that need to be copied.
     std::vector<ColEntry> aCopied;


More information about the Libreoffice-commits mailing list