summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorPranav Kant <pranavk@collabora.com>2016-06-03 00:46:48 +0530
committerAndras Timar <andras.timar@collabora.com>2016-06-06 12:17:08 +0200
commit14a27ac51d52c7741c8597a2603d2683572e5254 (patch)
tree9a7e32614db7ebd151bd7a40f1efa6c0ecb109f3 /sc
parent72d1b6663a340e745af42aaf94541e4c1309b434 (diff)
sc: Don't export in case of invalid range
For example, copying an empty column or row range, and then pasting as unformatted text exports all the newline characters inspite of the fact that this is an invalid data range. The problem becomes worse when someone tries to copy an entire column which implies exporting MAXROW times newline characters. Change-Id: Ie0a09890e2d0cd5f44d89d520959248e65365ad7 (cherry picked from commit 432b27ec73940738bb0b4f9d3d749c70a2525700)
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/docshell/impex.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 6e75c9bacc0d..afb77b76c96c 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -1599,7 +1599,8 @@ bool ScImportExport::Doc2Text( SvStream& rStrm )
SCTAB nEndTab = aRange.aEnd.Tab();
if (!pDoc->GetClipParam().isMultiRange() && nStartTab == nEndTab)
- pDoc->ShrinkToDataArea( nStartTab, nStartCol, nStartRow, nEndCol, nEndRow );
+ if (!pDoc->ShrinkToDataArea( nStartTab, nStartCol, nStartRow, nEndCol, nEndRow ))
+ return false;
OUString aCell;