diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-03-26 08:45:21 +0100 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2019-08-27 14:12:26 +0200 |
commit | 13685842420a1d35a5f5336cd723ed6d566f2e13 (patch) | |
tree | 412216c5ed60323367b4b8f7fc20957d14beb670 | |
parent | forcepoint #35 handle odd number of dimension fragments (diff) | |
download | core-13685842420a1d35a5f5336cd723ed6d566f2e13.tar.gz core-13685842420a1d35a5f5336cd723ed6d566f2e13.zip |
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>
-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 d8f0d8d7ae60..8669290fa20b 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> @@ -1658,8 +1659,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 ); } |