diff options
author | László Németh <nemeth@numbertext.org> | 2018-09-19 13:36:57 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2018-09-20 07:54:22 +0200 |
commit | ace6bbf3da9ae27aca87865b6be887a3aed341fc (patch) | |
tree | 8547eff3bf25f58be2aabb021c6c74bc3fd2c384 /writerfilter/source | |
parent | 62cd86977ca41677c56fb2d1f97bb1c5cbdbd416 (diff) |
tdf#64264 DOCX import: fix row count of repeating table header
by ignoring isolated tblHeader settings, according to the standard.
(OOXML 17.4.49 tblHeader (Repeat Table Row on Every New Page)
"...if this row [with tblHeader property] is not contiguously connected
with the first row of the table (that is, if this table row is not
either the first row, or all rows between this row and the first row
are not marked as header rows) then this property shall be ignored.")
Note: with this fix, in a mixed environment, LibreOffice is able to
fix the known problems of MS Word 2013/2016 by removing the isolated
tblHeaders during DOCX import/export (such problems in MSO: missing
repeating headers in a few pages or in the whole table, despite the
correct settings; and non-modifiable repeat header row property in
the table settings).
Change-Id: I73e8394a75b77c937a4bac37d99ff747ad95a06e
Reviewed-on: https://gerrit.libreoffice.org/60765
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'writerfilter/source')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapperTableManager.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx index 37f07f21a556..ed7dfebe97c4 100644 --- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx @@ -200,7 +200,7 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm) case NS_ooxml::LN_CT_TrPrBase_tblHeader: // if nIntValue == 1 then the row is a repeated header line // to prevent later rows from increasing the repeating m_nHeaderRepeat is set to NULL when repeating stops - if( nIntValue > 0 && m_nHeaderRepeat >= 0 ) + if( nIntValue > 0 && m_nHeaderRepeat == static_cast<int>(m_nRow) ) { ++m_nHeaderRepeat; TablePropertyMapPtr pPropMap( new TablePropertyMap ); |