diff options
-rw-r--r-- | writerfilter/source/rtftok/rtfdispatchsymbol.cxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/writerfilter/source/rtftok/rtfdispatchsymbol.cxx b/writerfilter/source/rtftok/rtfdispatchsymbol.cxx index 9d10c7a03362..b40fd55dde9b 100644 --- a/writerfilter/source/rtftok/rtfdispatchsymbol.cxx +++ b/writerfilter/source/rtftok/rtfdispatchsymbol.cxx @@ -140,18 +140,19 @@ RTFError RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword) } else { - if (m_bNeedCr) - { // tdf#158586 don't dispatch \par here, it eats deferred page breaks - setNeedPar(true); - } - + bool bPendingFloatingTable = false; RTFValue::Pointer_t pTblpPr = m_aStates.top().getTableRowSprms().find(NS_ooxml::LN_CT_TblPrBase_tblpPr); if (pTblpPr) { // We have a pending floating table, provide an anchor for it still in this // section. - dispatchSymbol(RTFKeyword::PAR); + bPendingFloatingTable = true; + } + + if (m_bNeedCr || bPendingFloatingTable) + { // tdf#158586 don't dispatch \par here, it eats deferred page breaks + setNeedPar(true); } sectBreak(); |