[Libreoffice-commits] core.git: sw/inc sw/source
Caolán McNamara
caolanm at redhat.com
Wed Jun 17 02:44:53 PDT 2015
sw/inc/dochdl.hrc | 3 ++-
sw/source/ui/dochdl/dochdl.src | 6 ++++++
sw/source/uibase/dochdl/swdtflvr.cxx | 8 ++++++++
3 files changed, 16 insertions(+), 1 deletion(-)
New commits:
commit 550cff762d816c336adaf015f481443af1c6edab
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jun 17 10:43:44 2015 +0100
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
diff --git a/sw/inc/dochdl.hrc b/sw/inc/dochdl.hrc
index e6dd89f..4e4f7f6 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 2f64780..e303d5a 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 08d28b3..2cf4786 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 )
{
More information about the Libreoffice-commits
mailing list