From b1dd670876cfdd3522de546e6eb4925bcde35a6b Mon Sep 17 00:00:00 2001 From: László Németh Date: Sat, 1 Dec 2018 10:39:54 +0100 Subject: tdf#58944: comment DOCX table header row limit better MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I725dce3754d5234c4f1398ef5392e72e0249d70f Reviewed-on: https://gerrit.libreoffice.org/64388 Reviewed-by: László Németh Tested-by: László Németh --- .../source/dmapper/DomainMapperTableManager.cxx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'writerfilter/source') 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))); -- cgit v1.2.3