Kaydet (Commit) 550cff76 authored tarafından Caolán McNamara's avatar Caolán McNamara

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

Change-Id: I90cea4c8566460f614d9a1143a638597d5ab8ce6
üst e93a7cff
......@@ -23,11 +23,12 @@
#include "rcid.hrc"
#define STR_NOGLOS (RC_DOCHDL_BEGIN + 1)
#define STR_ERR_INSERT_GLOS (RC_DOCHDL_BEGIN + 3)
#define STR_CLPBRD_FORMAT_ERROR (RC_DOCHDL_BEGIN + 4)
#define STR_TABLE_TOO_LARGE (RC_DOCHDL_BEGIN + 6)
#define STR_NO_TABLE (RC_DOCHDL_BEGIN + 7)
#define STR_PRIVATETEXT (RC_DOCHDL_BEGIN + 8)
#define STR_PRIVATEGRAPHIC (RC_DOCHDL_BEGIN + 9)
#define STR_PRIVATEOLE (RC_DOCHDL_BEGIN + 10)
......
......@@ -24,11 +24,17 @@ String STR_NOGLOS
{
Text [ en-US ] = "AutoText for Shortcut '%1' not found." ;
};
String STR_NO_TABLE
{
Text [ en-US ] = "A table cannot be inserted into another table. However, you can paste the data into the document when the cursor is not in a table.";
};
String STR_TABLE_TOO_LARGE
{
Text [ en-US ] = "The table cannot be inserted because it is too large";
};
String STR_ERR_INSERT_GLOS
{
Text [ en-US ] = "AutoText could not be created." ;
......
......@@ -2168,6 +2168,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_TABLE_TOO_LARGE), VCL_MESSAGE_INFO)->Execute();
pDDETyp = 0;
break;
}
// at least one column & row must be there
if( !nRows || !nCols )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment