writerfilter/source/dmapper/DomainMapperTableManager.cxx | 20 +++++++-------- 1 file changed, 10 insertions(+), 10 deletions(-)
New commits: commit b1dd670876cfdd3522de546e6eb4925bcde35a6b Author: László Németh <nem...@numbertext.org> AuthorDate: Sat Dec 1 10:39:54 2018 +0100 Commit: László Németh <nem...@numbertext.org> CommitDate: Sat Dec 1 11:26:25 2018 +0100 tdf#58944: comment DOCX table header row limit better Change-Id: I725dce3754d5234c4f1398ef5392e72e0249d70f Reviewed-on: https://gerrit.libreoffice.org/64388 Reviewed-by: László Németh <nem...@numbertext.org> Tested-by: László Németh <nem...@numbertext.org> diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx index b1b08b72c8d2..e610a32deb1e 100644 --- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx @@ -205,16 +205,16 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm) { TablePropertyMapPtr pPropMap( new TablePropertyMap ); - // Repeating header lines are not visible in MSO, if there is no space for them. - // OOXML (and ODF) standards don't specify this exception, and unfortunately, - // it's easy to create tables with invisible repeating headers in MSO, resulting - // OOXML files with non-standardized layout. To show the same or a similar layout - // in LibreOffice (instead of a broken table with invisible content), we use a - // reasonable 10-row limit to apply header repetition, as a workaround. - // Later it's still possible to switch on header repetition or create a better - // compatible repeating table header in Writer for (pretty unlikely) tables with - // really repeating headers consisted of more than 10 table rows. - if ( m_nHeaderRepeat == 10 ) + // FIXME: DOCX tables with more than 10 repeating header lines imported + // without repeating header lines to mimic an MSO workaround for its usability bug. + // Explanation: it's very hard to set and modify repeating header rows in Word, + // often resulting tables with a special workaround: setting all table rows as + // repeating header, because exceeding the pages by "unlimited" header rows turns off the + // table headers automatically in MSO. 10-row limit is a reasonable temporary limit + // to handle DOCX tables with "unlimited" repeating header, till the same "turn off + // exceeding header" feature is ready (see tdf#88496). +#define HEADER_ROW_LIMIT_FOR_MSO_WORKAROUND 10 + if ( m_nHeaderRepeat == HEADER_ROW_LIMIT_FOR_MSO_WORKAROUND ) { m_nHeaderRepeat = -1; pPropMap->Insert( PROP_HEADER_ROW_COUNT, uno::makeAny(sal_Int32(0))); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits