diff options
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/inc/resourcemodel/TableManager.hxx | 8 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper.cxx | 6 |
2 files changed, 14 insertions, 0 deletions
diff --git a/writerfilter/inc/resourcemodel/TableManager.hxx b/writerfilter/inc/resourcemodel/TableManager.hxx index 72841ff25ee5..ed512509a1ec 100644 --- a/writerfilter/inc/resourcemodel/TableManager.hxx +++ b/writerfilter/inc/resourcemodel/TableManager.hxx @@ -531,6 +531,14 @@ public: virtual void endLevel(); /** + * Signal that the next paragraph definitely won't be part of any table. + */ + void endTable() + { + setRowEnd(false); + } + + /** Tells whether a table has been started or not */ bool isInTable(); diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index e5726901abdd..d4061aa1aee7 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -3558,6 +3558,12 @@ void DomainMapper::lcl_endShape( ) { if (m_pImpl->GetTopContext()) { + // End the current table, if there are any. Otherwise the unavoidable + // empty paragraph at the end of the shape text will cause problems: if + // the shape text ends with a table, the extra paragraph will be + // handled as an additional row of the ending table. + m_pImpl->getTableManager().endTable(); + lcl_endParagraphGroup(); m_pImpl->PopShapeContext( ); } |