From 2356f36927dc326060a42803b763d3cf768dbbf0 Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Fri, 10 Jul 2020 13:47:50 +0300 Subject: NFC writerfilter: cleanup gridAfter dead code Since commit 1d1748d14 in 2016, DomainMapper has never processed property LN_CT_TrPrBase_gridAfter, and so it has always been its initialized value of zero. However, gridAfter still DOES create fake cells in ooxml. With recent changes, those fake cells are now included in nGrids (i.e. they have a gridspan of 1) and so the nGrids + m_nGridAfter would no longer be appropriate in case gridAfter is ever processed again with + - The row SHOULD know about gridAfter, so I'm not removing the foundational bits, even though they are currently still unused. Change-Id: I9b8b1006d528590c4621ce86564e007399b07d70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98533 Tested-by: Jenkins Reviewed-by: Justin Luth --- writerfilter/source/dmapper/DomainMapperTableManager.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'writerfilter') diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx index e80bc418ddaf..a17a736504e4 100644 --- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx @@ -531,10 +531,10 @@ bool DomainMapperTableManager::shouldInsertRow(IntVectorPtr pCellWidths, IntVect return false; if (m_nLayoutType == NS_ooxml::LN_Value_doc_ST_TblLayout_fixed) return true; - if (pCellWidths->size() == (nGrids + m_nGridAfter)) + if (pCellWidths->size() == nGrids) return true; rIsIncompleteGrid = true; - return nGrids + m_nGridAfter > pTableGrid->size(); + return nGrids > pTableGrid->size(); } void DomainMapperTableManager::endOfRowAction() @@ -656,7 +656,7 @@ void DomainMapperTableManager::endOfRowAction() nFullWidthRelative = o3tl::saturating_add(nFullWidthRelative, i); bool bIsIncompleteGrid = false; - if( pTableGrid->size() == ( nGrids + m_nGridAfter ) && m_nCell.back( ) > 0 ) + if( pTableGrid->size() == nGrids && m_nCell.back( ) > 0 ) { /* * If table width property set earlier is smaller than the current table width, -- cgit v1.2.3