diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-08-21 16:01:12 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-08-21 17:04:46 +0200 |
commit | d4d0df13bd4291b7f988bdce68a087a58bb4c70f (patch) | |
tree | 0b1dd7256001cd975d8c8a42238fbabc8a5edab1 /writerfilter | |
parent | Updated core (diff) | |
download | core-d4d0df13bd4291b7f988bdce68a087a58bb4c70f.tar.gz core-d4d0df13bd4291b7f988bdce68a087a58bb4c70f.zip |
DOCX import: fix handling of textframes having shape text ending with a table
Change-Id: I82ef1072bfeb1195152ef7f1ea743653ac102b37
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( ); } |