sc/source/ui/docshell/impex.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 14a27ac51d52c7741c8597a2603d2683572e5254 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 (cherry picked from commit 432b27ec73940738bb0b4f9d3d749c70a2525700) diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index 6e75c9b..afb77b7 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; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits