[Libreoffice-commits] core.git: sw/source
Caolán McNamara
caolanm at redhat.com
Mon Mar 26 09:28:15 UTC 2018
sw/source/filter/xml/xmltbli.cxx | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
New commits:
commit 177944b0baae3c2663df53f91814d00587a403a7
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Mar 26 08:45:21 2018 +0100
forcepoint #28 missing cell on abw import
Change-Id: I7633a17afab5aa2eb9e47a552bd5d92c87d383c7
Reviewed-on: https://gerrit.libreoffice.org/51851
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
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 );
}
More information about the Libreoffice-commits
mailing list