From 177944b0baae3c2663df53f91814d00587a403a7 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 26 Mar 2018 08:45:21 +0100 Subject: forcepoint #28 missing cell on abw import MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I7633a17afab5aa2eb9e47a552bd5d92c87d383c7 Reviewed-on: https://gerrit.libreoffice.org/51851 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- sw/source/filter/xml/xmltbli.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'sw') diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx index c82d15e75919..b6ca8c3848a7 100644 --- a/sw/source/filter/xml/xmltbli.cxx +++ b/sw/source/filter/xml/xmltbli.cxx @@ -19,6 +19,7 @@ #include +#include #include #include #include @@ -1626,8 +1627,10 @@ void SwXMLTableContext::InsertCell( const OUString& rStyleName, for( sal_uInt32 j=nRowSpan; j>0; --j ) { const bool bCovered = i != nColSpan || j != nRowSpan; - GetCell( nRowsReq-j, nColsReq-i ) - ->Set( sStyleName, j, i, pStartNode, + SwXMLTableCell_Impl *pCell = GetCell( nRowsReq-j, nColsReq-i ); + if (!pCell) + throw css::lang::IndexOutOfBoundsException(); + pCell->Set( sStyleName, j, i, pStartNode, pTable, bProtect, pFormula, bHasValue, bCovered, fValue, pStringValue, i_rXmlId ); } -- cgit