sc/source/ui/docshell/impex.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 432b27ec73940738bb0b4f9d3d749c70a2525700 Author: Pranav Kant <pran...@collabora.com> Date: Fri Jun 3 00:46:48 2016 +0530 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 diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index 10400253..038a53d 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; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits