diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-05-16 23:06:33 -0400 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2014-05-18 22:15:12 +0200 |
commit | a72dabd2bd6273109518448eb2d917781f012af6 (patch) | |
tree | c832fb046da6f443d49a5b8c5f63e1bb4d56f7a3 /sc | |
parent | 8004bc6d3522b26b8746cc12f5c18e7324a05766 (diff) |
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@googlemail.com>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/column4.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx index 7996cd82441e..9a3ef12e6db3 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; |