From 213d6390a2cc59d174173f4359c161625a9c4bdc Mon Sep 17 00:00:00 2001 From: László Németh Date: Mon, 3 Feb 2020 13:54:57 +0100 Subject: tdf#108272 DOCX table-only header: fix SAX parser error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Floating tables in table-only headers are imported as non-floating ones after a SAX parser error. Now we import them as non-floating ones from the beginning to avoid of the parser error. Change-Id: I0a816a7af642f402a25ed53d9766b1e8b82db789 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87874 Tested-by: Jenkins Reviewed-by: László Németh --- writerfilter/source/dmapper/DomainMapperTableManager.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'writerfilter/source/dmapper/DomainMapperTableManager.cxx') diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx index 313a918a3eb4..9847476618a0 100644 --- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx @@ -50,7 +50,7 @@ DomainMapperTableManager::DomainMapperTableManager() : m_nGridAfter(0), m_nHeaderRepeat(0), m_nTableWidth(0), - m_bIsInShape(false), + m_bIsUnfloatTable(false), m_aTmpPosition(), m_aTmpTableProperties(), m_bPushCurrentWidth(false), @@ -339,8 +339,8 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm) case NS_ooxml::LN_CT_TblPrBase_tblpPr: { writerfilter::Reference::Pointer_t pProperties = rSprm.getProps(); - // Ignore in shape text, those tables should be always non-floating ones. - if (!m_bIsInShape && pProperties.get()) + // Ignore in shape text or in table-only header, those tables should be always non-floating ones. + if (!m_bIsUnfloatTable && pProperties.get()) { TablePositionHandlerPtr pHandler = m_aTmpPosition.back(); if ( !pHandler ) @@ -425,9 +425,9 @@ TablePositionHandler* DomainMapperTableManager::getCurrentTableRealPosition() return nullptr; } -void DomainMapperTableManager::setIsInShape(bool bIsInShape) +void DomainMapperTableManager::setIsUnfloatTable(bool bIsUnfloatTable) { - m_bIsInShape = bIsInShape; + m_bIsUnfloatTable = bIsUnfloatTable; } void DomainMapperTableManager::startLevel( ) -- cgit v1.2.3