summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-06-17 10:43:44 +0100
committerMichael Stahl <mstahl@redhat.com>2015-06-18 11:38:57 +0000
commitae4d51b8d835b47e70bc6a0d2f92c2f4057bce16 (patch)
treecc7a5c718a38e27dc4e4d661d351b5dea65b0515 /sw/source/uibase
parent62c0d1e5530b84f3d5b2de5b744ec1a1caa6b659 (diff)
Resolves: tdf#86017 calc has more rows than writer tables can support
as things stand right now in writer if the table doesn't fit it doesn't fit and don't try for back-ports reuse same bogus error used for 0 rows/cells (cherry picked from commit 550cff762d816c336adaf015f481443af1c6edab) (cherry picked from commit 799eef80581f2b39025ab1f388d6f4d741eabeac) Change-Id: I90cea4c8566460f614d9a1143a638597d5ab8ce6 Reviewed-on: https://gerrit.libreoffice.org/16338 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 7d458b21c945..e7a4fa01562d 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -2167,6 +2167,14 @@ bool SwTransferable::_PasteDDE( TransferableDataHelper& rData,
sTmp = sTmp.getToken( 0, '\n' );
sal_Int32 nCols = comphelper::string::getTokenCount(sTmp, '\t');
+ if (nRows > USHRT_MAX || nCols > USHRT_MAX)
+ {
+ if( bMsg )
+ MessageDialog(0, SW_RESSTR(STR_NO_TABLE), VCL_MESSAGE_INFO).Execute();
+ pDDETyp = 0;
+ break;
+ }
+
// at least one column & row must be there
if( !nRows || !nCols )
{