[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - sw/source

Caolán McNamara caolanm at redhat.com
Thu Jun 18 04:39:18 PDT 2015


 sw/source/uibase/dochdl/swdtflvr.cxx |    8 ++++++++
 1 file changed, 8 insertions(+)

New commits:
commit ae4d51b8d835b47e70bc6a0d2f92c2f4057bce16
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
    
    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 at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>

diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 7d458b2..e7a4fa0 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 )
                 {


More information about the Libreoffice-commits mailing list