diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-06-17 10:43:44 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-06-17 10:46:53 +0100 |
commit | 799eef80581f2b39025ab1f388d6f4d741eabeac (patch) | |
tree | eca7de77764811a63aa9b565c1736dc598cdc0a7 | |
parent | 133e04fc1a870c0aad207e82eefeeeceaba5dc6d (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)
Change-Id: I90cea4c8566460f614d9a1143a638597d5ab8ce6
-rw-r--r-- | sw/source/uibase/dochdl/swdtflvr.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index 765ab0f0d5ae..70dbd74d4b0d 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -2172,6 +2172,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 ) + ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SW_RESSTR(STR_NO_TABLE), VCL_MESSAGE_INFO)->Execute(); + pDDETyp = 0; + break; + } + // at least one column & row must be there if( !nRows || !nCols ) { |