diff options
author | László Németh <nemeth@numbertext.org> | 2020-02-03 13:54:57 +0100 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-02-04 10:07:46 +0100 |
commit | 213d6390a2cc59d174173f4359c161625a9c4bdc (patch) | |
tree | 642a1738abdcc4bd3a0fc28cb2c6f850b08921ff /writerfilter/source/dmapper/DomainMapperTableManager.cxx | |
parent | f0860d59dfa5cc951cfdb74f9342678e9acfdc24 (diff) |
tdf#108272 DOCX table-only header: fix SAX parser error
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 <nemeth@numbertext.org>
Diffstat (limited to 'writerfilter/source/dmapper/DomainMapperTableManager.cxx')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapperTableManager.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
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<Properties>::Pointer_t pProperties = rSprm.getProps(); - // Ignore <w:tblpPr> in shape text, those tables should be always non-floating ones. - if (!m_bIsInShape && pProperties.get()) + // Ignore <w:tblpPr> 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( ) |