diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-08-27 20:01:33 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-08-27 22:53:13 +0200 |
commit | a7667f53c23bc88ed645f84a19896bc45f748f2a (patch) | |
tree | dae0bef947860594d48abde0de2b833e6795554e /lotuswordpro | |
parent | 8024118d5c9ac964e35e8c4163ca14a5cd78cc3d (diff) |
we are going to remove the entire row anyway
so don't iterate over the cells explicitly dropping them
Change-Id: If0de504ac9711d1e6a757cdd15574f15585ca928
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121180
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/inc/xfilter/xfrow.hxx | 11 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwptablelayout.cxx | 8 |
2 files changed, 3 insertions, 16 deletions
diff --git a/lotuswordpro/inc/xfilter/xfrow.hxx b/lotuswordpro/inc/xfilter/xfrow.hxx index 009bdad95326..f18e12b8c64b 100644 --- a/lotuswordpro/inc/xfilter/xfrow.hxx +++ b/lotuswordpro/inc/xfilter/xfrow.hxx @@ -57,8 +57,7 @@ * @file * Table row object. A table is consist by rows. ************************************************************************/ -#ifndef INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFROW_HXX -#define INCLUDED_LOTUSWORDPRO_INC_XFILTER_XFROW_HXX +#pragma once #include <xfilter/xfcell.hxx> #include <xfilter/xfcontent.hxx> @@ -93,8 +92,6 @@ public: virtual void ToXml(IXFStream *pStrm) override; - void RemoveCell(sal_Int32 cell); - private: XFTable *m_pOwnerTable; std::map<sal_Int32, rtl::Reference<XFCell>> m_aCells; @@ -127,10 +124,4 @@ inline XFTable* XFRow::GetOwnerTable() return m_pOwnerTable; } -inline void XFRow::RemoveCell(sal_Int32 cell) -{ - m_aCells.erase(cell); -} - -#endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/lwptablelayout.cxx b/lotuswordpro/source/filter/lwptablelayout.cxx index 4f2c4c8d30ca..2a72e1155cb0 100644 --- a/lotuswordpro/source/filter/lwptablelayout.cxx +++ b/lotuswordpro/source/filter/lwptablelayout.cxx @@ -942,12 +942,11 @@ void LwpTableLayout::SplitRowToCells(XFTable* pTmpTable, rtl::Reference<XFTable> rtl::Reference<XFCell> xXFCell2(new XFCell); rtl::Reference<XFTable> xSubTable1(new XFTable); rtl::Reference<XFTable> xSubTable2(new XFTable); - XFRow* pOldRow; rtl::Reference<XFCell> xNewCell; for (i=1;i<=nRowNum;i++) { - pOldRow = pTmpTable->GetRow(i); + XFRow* pOldRow = pTmpTable->GetRow(i); rtl::Reference<XFRow> xNewRow(new XFRow); xNewRow->SetStyleName(pOldRow->GetStyleName()); for (sal_uInt8 j=1;j<=pCellMark[i];j++) @@ -965,7 +964,7 @@ void LwpTableLayout::SplitRowToCells(XFTable* pTmpTable, rtl::Reference<XFTable> for (i=1;i<=nRowNum;i++) { - pOldRow = pTmpTable->GetRow(i); + XFRow* pOldRow = pTmpTable->GetRow(i); rtl::Reference<XFRow> xNewRow(new XFRow); xNewRow->SetStyleName(pOldRow->GetStyleName()); for(sal_Int32 j=pCellMark[i]+1;j<=pOldRow->GetCellCount();j++) @@ -986,9 +985,6 @@ void LwpTableLayout::SplitRowToCells(XFTable* pTmpTable, rtl::Reference<XFTable> //remove tmp table for (i=1;i<=nRowNum;i++) { - pOldRow = pTmpTable->GetRow(i); - for(sal_Int32 j=1;j<=pOldRow->GetCellCount();j++) - pOldRow->RemoveCell(j); pTmpTable->RemoveRow(i); } } |