summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell
diff options
context:
space:
mode:
authorPranav Kant <pranavk@collabora.com>2016-06-03 00:46:48 +0530
committerPranav Kant <pranavk@collabora.com>2016-06-03 00:55:41 +0530
commit432b27ec73940738bb0b4f9d3d749c70a2525700 (patch)
tree5fd96c837c7f117dc83dcc04a6e90989002d9243 /sc/source/ui/docshell
parent020d395b59b4c631491ded910c0405584ef46e1c (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
Diffstat (limited to 'sc/source/ui/docshell')
-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 104002539744..038a53dd3a01 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -1600,7 +1600,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 aCellStr;