diff options
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapperTableManager.cxx | 5 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx index 448d6e18fb4d..52fbd0ccb749 100644 --- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx @@ -222,7 +222,10 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm) break; case NS_ooxml::LN_CT_TblGridBase_gridCol: { - getCurrentGrid()->push_back( ConversionHelper::convertTwipToMM100( nIntValue ) ); + if (nIntValue == -1) + getCurrentGrid()->clear(); + else + getCurrentGrid()->push_back( ConversionHelper::convertTwipToMM100( nIntValue ) ); } break; case NS_ooxml::LN_CT_TcPrBase_vMerge : //vertical merge diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 325ff4f6eb8c..9d5de81a8404 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -1719,8 +1719,7 @@ int RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword) case RTF_NESTROW: { // If the right edge of the last cell (row width) is smaller than the width of some other row, mimic the WW8 import: add a fake cell. - RTFValue::Pointer_t pLastCellx = m_aStates.top().aTableRowSprms.find(NS_ooxml::LN_CT_TblGridBase_gridCol, false); - if (pLastCellx.get() && pLastCellx->getInt() < m_nCellxMax) + if (nKeyword == RTF_ROW && m_aStates.top().nCellX < m_nCellxMax) dispatchValue(RTF_CELLX, m_nCellxMax); if (m_aStates.top().nCells) @@ -2140,6 +2139,7 @@ int RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword) break; case RTF_TROWD: m_aStates.top().aTableRowSprms = m_aDefaultState.aTableRowSprms; + m_aStates.top().aTableRowSprms.set(NS_ooxml::LN_CT_TblGridBase_gridCol, RTFValue::Pointer_t(new RTFValue(-1)), false); m_aStates.top().aTableRowAttributes = m_aDefaultState.aTableRowAttributes; m_aStates.top().nCellX = 0; // In case the table definition is in the middle of the row |