[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - sw/source
Caolán McNamara
caolanm at redhat.com
Thu Apr 5 14:16:09 UTC 2018
sw/source/filter/xml/xmltbli.cxx | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
New commits:
commit 7d99214d77ea0300cd149655bac70012a57278fe
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/51852
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index 7025f9efb2f1..2b56be867328 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>
@@ -1591,8 +1592,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