diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-03-26 08:45:21 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2018-04-07 17:45:25 +0200 |
commit | 1d4ebb79a6483ea7450171e631e7418fad8a4cfc (patch) | |
tree | dc1f02ebb29d1294db54d17026759cbd0ded54af /sw | |
parent | 175f2ec7d83629dba1cba30d3b3541ac5b239c6a (diff) |
forcepoint #28 missing cell on abw import
Change-Id: I7633a17afab5aa2eb9e47a552bd5d92c87d383c7
Reviewed-on: https://gerrit.libreoffice.org/51853
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
(cherry picked from commit 671e9453ed07f1cf537ee507d63976f54be8e465)
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/xml/xmltbli.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx index b44a68cb47ce..8125a26ff86b 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> @@ -1646,8 +1647,10 @@ void SwXMLTableContext::InsertCell( const OUString& rStyleName, for( sal_uInt32 j=nRowSpan; j>0UL; --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 ); } |