[Libreoffice-commits] core.git: writerfilter/source
Justin Luth (via logerrit)
logerrit at kemper.freedesktop.org
Sat Jul 11 06:52:54 UTC 2020
writerfilter/source/dmapper/DomainMapperTableManager.cxx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 2356f36927dc326060a42803b763d3cf768dbbf0
Author: Justin Luth <justin.luth at collabora.com>
AuthorDate: Fri Jul 10 13:47:50 2020 +0300
Commit: Justin Luth <justin_luth at sil.org>
CommitDate: Sat Jul 11 08:52:29 2020 +0200
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 at sil.org>
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,
More information about the Libreoffice-commits
mailing list