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:44:25 +0100 |
commit | 550cff762d816c336adaf015f481443af1c6edab (patch) | |
tree | d863d6c46b6a9d8083556f3741300246ec563965 | |
parent | e93a7cff80f277a1b0e54dd4f94bd7b045c6a85c (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
Change-Id: I90cea4c8566460f614d9a1143a638597d5ab8ce6
-rw-r--r-- | sw/inc/dochdl.hrc | 3 | ||||
-rw-r--r-- | sw/source/ui/dochdl/dochdl.src | 6 | ||||
-rw-r--r-- | sw/source/uibase/dochdl/swdtflvr.cxx | 8 |
3 files changed, 16 insertions, 1 deletions
diff --git a/sw/inc/dochdl.hrc b/sw/inc/dochdl.hrc index e6dd89f5ed03..4e4f7f65ed63 100644 --- a/sw/inc/dochdl.hrc +++ b/sw/inc/dochdl.hrc @@ -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) diff --git a/sw/source/ui/dochdl/dochdl.src b/sw/source/ui/dochdl/dochdl.src index 2f647808f87f..e303d5a0b6ee 100644 --- a/sw/source/ui/dochdl/dochdl.src +++ b/sw/source/ui/dochdl/dochdl.src @@ -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." ; diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index 08d28b3b4528..2cf47869f70b 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -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 ) { |