lotuswordpro/source/filter/lwptablelayout.cxx | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-)
New commits: commit 7a7cd044887ce6801791e1cf7eb18ac1a0e68e07 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Fri Sep 9 11:22:10 2022 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Fri Sep 9 13:40:23 2022 +0200 rearrange to have a single ConvertTable call Change-Id: Ic48ebac04d6e95df8748f38b1f23a8295fba77b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139718 Tested-by: Caolán McNamara <caol...@redhat.com> Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/lotuswordpro/source/filter/lwptablelayout.cxx b/lotuswordpro/source/filter/lwptablelayout.cxx index c3d027e91008..7624664964d7 100644 --- a/lotuswordpro/source/filter/lwptablelayout.cxx +++ b/lotuswordpro/source/filter/lwptablelayout.cxx @@ -790,6 +790,8 @@ void LwpTableLayout::ParseTable() sal_uInt16 nRow = m_nRows; sal_uInt8 nCol = static_cast<sal_uInt8>(m_nCols); + sal_uInt16 nContentRow = 0; + //process header rows LwpTableHeadingLayout* pTableHeading; pTableHeading = pSuper->GetTableHeadingLayout(); @@ -798,16 +800,11 @@ void LwpTableLayout::ParseTable() sal_uInt16 nStartHeadRow; sal_uInt16 nEndHeadRow; pTableHeading->GetStartEndRow(nStartHeadRow,nEndHeadRow); - if (nStartHeadRow != 0) - ConvertTable(m_pXFTable,0,nRow,0,nCol); - else - { - sal_uInt16 nContentRow = ConvertHeadingRow(m_pXFTable,nStartHeadRow,nEndHeadRow+1); - ConvertTable(m_pXFTable,nContentRow,nRow,0,nCol); - } + if (nStartHeadRow == 0) + nContentRow = ConvertHeadingRow(m_pXFTable,nStartHeadRow,nEndHeadRow+1); } - else - ConvertTable(m_pXFTable,0,nRow,0,nCol); + + ConvertTable(m_pXFTable, nContentRow, nRow, 0, nCol); } /**