diff options
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/lwpcelllayout.cxx | 1 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwpfribsection.cxx | 4 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwprowlayout.cxx | 1 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwptablelayout.cxx | 16 |
4 files changed, 15 insertions, 7 deletions
diff --git a/lotuswordpro/source/filter/lwpcelllayout.cxx b/lotuswordpro/source/filter/lwpcelllayout.cxx index 373656132adb..17f516a7897a 100644 --- a/lotuswordpro/source/filter/lwpcelllayout.cxx +++ b/lotuswordpro/source/filter/lwpcelllayout.cxx @@ -348,6 +348,7 @@ LwpPara* LwpCellLayout::GetLastParaOfPreviousStory() if (pPreStoryID && !(pPreStoryID->IsNull())) { LwpStory* pPreStory = dynamic_cast<LwpStory*>(pPreStoryID->obj(VO_STORY).get()); + assert(pPreStory); return dynamic_cast<LwpPara*>(pPreStory->GetLastPara().obj(VO_PARA).get()); } else diff --git a/lotuswordpro/source/filter/lwpfribsection.cxx b/lotuswordpro/source/filter/lwpfribsection.cxx index ccb7307b4fe7..de536253f24e 100644 --- a/lotuswordpro/source/filter/lwpfribsection.cxx +++ b/lotuswordpro/source/filter/lwpfribsection.cxx @@ -132,8 +132,8 @@ void LwpFribSection::SetSectionName() */ LwpPageLayout* LwpFribSection::GetPageLayout() { - if(GetSection()) - return GetSection()->GetPageLayout(); + if (LwpSection* pSection = GetSection()) + return pSection->GetPageLayout(); return nullptr; } diff --git a/lotuswordpro/source/filter/lwprowlayout.cxx b/lotuswordpro/source/filter/lwprowlayout.cxx index a0a90a417c69..4140385bf8af 100644 --- a/lotuswordpro/source/filter/lwprowlayout.cxx +++ b/lotuswordpro/source/filter/lwprowlayout.cxx @@ -191,6 +191,7 @@ void LwpRowLayout::Read() void LwpRowLayout::ConvertRow(rtl::Reference<XFTable> const & pXFTable,sal_uInt8 nStartCol,sal_uInt8 nEndCol) { LwpTableLayout* pTableLayout = GetParentTableLayout(); + assert(pTableLayout); LwpTable* pTable = pTableLayout->GetTable(); //calculate the connected cell position diff --git a/lotuswordpro/source/filter/lwptablelayout.cxx b/lotuswordpro/source/filter/lwptablelayout.cxx index f14990156d01..48e4ee97837b 100644 --- a/lotuswordpro/source/filter/lwptablelayout.cxx +++ b/lotuswordpro/source/filter/lwptablelayout.cxx @@ -757,8 +757,8 @@ void LwpTableLayout::RegisterStyle() // the old code doesn't check if the LwpFoundry pointer is NULL, // so the NULL pointer cause sodc freeze. Add code to check the pointer. - if (GetFoundry() && GetTable()) - PutCellVals(GetFoundry(), GetTable()->GetObjectID()); + if (GetFoundry()) + PutCellVals(GetFoundry(), pTable->GetObjectID()); } /** * @short read table layout @@ -847,7 +847,9 @@ sal_uInt16 LwpTableLayout::ConvertHeadingRow( rtl::Reference<XFTable> const & pXFTable, sal_uInt16 nStartHeadRow, sal_uInt16 nEndHeadRow) { sal_uInt16 nContentRow; - sal_uInt8 nCol = static_cast<sal_uInt8>(GetTable()->GetColumn()); + LwpTable* pTable = GetTable(); + assert(pTable); + sal_uInt8 nCol = static_cast<sal_uInt8>(pTable->GetColumn()); rtl::Reference<XFTable> pTmpTable( new XFTable ); ConvertTable(pTmpTable.get(),nStartHeadRow,nEndHeadRow,0,nCol); @@ -888,7 +890,9 @@ void LwpTableLayout::SplitRowToCells(XFTable* pTmpTable, rtl::Reference<XFTable> { sal_uInt16 i; sal_uInt16 nRowNum = pTmpTable->GetRowCount(); - sal_uInt8 nCol = static_cast<sal_uInt8>(GetTable()->GetColumn()); + LwpTable* pTable = GetTable(); + assert(pTable); + sal_uInt8 nCol = static_cast<sal_uInt8>(pTable->GetColumn()); rtl::Reference<XFRow> xXFRow(new XFRow); @@ -1360,8 +1364,10 @@ void LwpTableLayout::ConvertDefaultRow(rtl::Reference<XFTable> const & pXFTable, rtl::Reference<XFCell> xCell; if (m_pDefaultCellLayout) { + LwpTable* pTable = GetTable(); + assert(pTable); xCell = m_pDefaultCellLayout->DoConvertCell( - GetTable()->GetObjectID(),nRowID,j+nStartCol); + pTable->GetObjectID(),nRowID,j+nStartCol); } else { |