summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-03-26 08:45:21 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-03-26 11:27:55 +0200
commit177944b0baae3c2663df53f91814d00587a403a7 (patch)
tree4598ae2c70443b170e56d5dc9e11e2d1e814173d
parent939b90f12684d3c6c394b182e9c134bb9150ab24 (diff)
forcepoint #28 missing cell on abw import
Change-Id: I7633a17afab5aa2eb9e47a552bd5d92c87d383c7 Reviewed-on: https://gerrit.libreoffice.org/51851 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sw/source/filter/xml/xmltbli.cxx7
1 files changed, 5 insertions, 2 deletions
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 <hintids.hxx>
+#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/text/XTextTable.hpp>
#include <com/sun/star/table/XCellRange.hpp>
@@ -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 );
}