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

Caolán McNamara caolanm at redhat.com
Wed Jun 17 02:50:51 PDT 2015


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

New commits:
commit 799eef80581f2b39025ab1f388d6f4d741eabeac
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)
    
    Change-Id: I90cea4c8566460f614d9a1143a638597d5ab8ce6

diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 765ab0f..70dbd74 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 )
                 {


More information about the Libreoffice-commits mailing list