summaryrefslogtreecommitdiff
path: root/writerfilter/source
diff options
context:
space:
mode:
authorJustin Luth <justin.luth@collabora.com>2020-07-10 13:47:50 +0300
committerJustin Luth <justin_luth@sil.org>2020-07-11 08:52:29 +0200
commit2356f36927dc326060a42803b763d3cf768dbbf0 (patch)
treee88149b034b01d519cad600f383ece7d660830d2 /writerfilter/source
parentb179383df08a9f1e3c8e58e6e41dddb7de85266e (diff)
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 + <ref name="CT_DecimalNumber"/> - <ref name="CT_TrPrBaseGridAfter"/> 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 <justin_luth@sil.org>
Diffstat (limited to 'writerfilter/source')
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableManager.cxx6
1 files changed, 3 insertions, 3 deletions
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,