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

Kohei Yoshida kohei.yoshida at collabora.com
Fri May 16 20:24:40 PDT 2014


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

New commits:
commit 8549d1dbe648ce01e4a351eb301dcf146c62676d
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Fri May 16 23:06:33 2014 -0400

    fdo#77735: Don't proceed when all cells in the range are empty.
    
    That means there is nothing to delete, and proceeding would cause Calc
    to freeze.
    
    Change-Id: I2a8fb5736870ba459082873c8f864283d8b9c664
    (cherry picked from commit bc7e0967be52f5eb7948fbb1c30edc7dd5acc18d)
    Reviewed-on: https://gerrit.libreoffice.org/9388
    Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx
index 7996cd8..9a3ef12 100644
--- a/sc/source/core/data/column4.cxx
+++ b/sc/source/core/data/column4.cxx
@@ -53,6 +53,10 @@ void ScColumn::DeleteBeforeCopyFromClip( sc::CopyFromClipContext& rCxt, const Sc
     sc::SingleColumnSpanSet::SpansType aSpans;
     aSpanSet.getSpans(aSpans);
 
+    if (aSpans.empty())
+        // All cells in the range in the clip are empty.  Nothing to delete.
+        return;
+
     // Translate the clip column spans into the destination column, and repeat as needed.
     std::vector<sc::RowSpan> aDestSpans;
     SCROW nDestOffset = aRange.mnRow1 - nClipRow1;


More information about the Libreoffice-commits mailing list