summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lotuswordpro/source/filter/lwprowlayout.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/lotuswordpro/source/filter/lwprowlayout.cxx b/lotuswordpro/source/filter/lwprowlayout.cxx
index 811b7abb762e..2cc3bd59bbf9 100644
--- a/lotuswordpro/source/filter/lwprowlayout.cxx
+++ b/lotuswordpro/source/filter/lwprowlayout.cxx
@@ -403,7 +403,10 @@ void LwpRowLayout::ConvertCommonRow(rtl::Reference<XFTable> const & pXFTable, sa
if (pCellLayout->GetLayoutType() == LWP_CONNECTED_CELL_LAYOUT)
{
LwpConnectedCellLayout* pConnCell = static_cast<LwpConnectedCellLayout*>(pCellLayout);
- nCellEndCol = i+pConnCell->GetNumcols()-1;
+ auto nNumCols = pConnCell->GetNumcols();
+ if (!nNumCols)
+ throw std::runtime_error("loop in conversion");
+ nCellEndCol = i + nNumCols - 1;
i = nCellEndCol;
}
xCell = pCellLayout->DoConvertCell(pTable->GetObjectID(),crowid,i);