Kaydet (Commit) 0c876483 authored tarafından Caolán McNamara's avatar Caolán McNamara

guard against missing table layout

Change-Id: I4bc7a7283f63124ccb50957ea64791644e01e267
üst 22ee3194
...@@ -696,6 +696,9 @@ void LwpConnectedCellLayout::SetCellMap() ...@@ -696,6 +696,9 @@ void LwpConnectedCellLayout::SetCellMap()
{ {
// this function is called from LwpTableLayout, so it can't be NULL // this function is called from LwpTableLayout, so it can't be NULL
LwpTableLayout * pTableLayout = GetTableLayout(); LwpTableLayout * pTableLayout = GetTableLayout();
if (!pTableLayout)
return;
sal_uInt16 nRowSpan = m_nRealrowspan; sal_uInt16 nRowSpan = m_nRealrowspan;
for (sal_uInt16 iLoop = 0; iLoop < nRowSpan; iLoop ++) for (sal_uInt16 iLoop = 0; iLoop < nRowSpan; iLoop ++)
......
...@@ -363,11 +363,14 @@ sal_uInt16 LwpRowLayout::GetCurMaxSpannedRows(sal_uInt8 nStartCol,sal_uInt8 nEnd ...@@ -363,11 +363,14 @@ sal_uInt16 LwpRowLayout::GetCurMaxSpannedRows(sal_uInt8 nStartCol,sal_uInt8 nEnd
*/ */
void LwpRowLayout::ConvertCommonRow(XFTable* pXFTable,sal_uInt8 nStartCol,sal_uInt8 nEndCol) void LwpRowLayout::ConvertCommonRow(XFTable* pXFTable,sal_uInt8 nStartCol,sal_uInt8 nEndCol)
{ {
LwpTableLayout* pTableLayout = GetParentTableLayout();
if (!pTableLayout)
return;
XFRow* pRow = new XFRow; XFRow* pRow = new XFRow;
pRow->SetStyleName(m_StyleName); pRow->SetStyleName(m_StyleName);
XFCell * pCell = nullptr; XFCell * pCell = nullptr;
LwpTableLayout* pTableLayout = GetParentTableLayout();
LwpTable* pTable = pTableLayout->GetTable(); LwpTable* pTable = pTableLayout->GetTable();
sal_uInt8 nCellStartCol,nCellEndCol; sal_uInt8 nCellStartCol,nCellEndCol;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment