summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableManager.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
index 80ffb4873c29..ac75e073fc85 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
@@ -483,7 +483,16 @@ void DomainMapperTableManager::endLevel( )
{
m_aTableGrid.pop_back( );
m_aGridSpans.pop_back( );
+
+ // Do the same trick as in startLevel(): pop the value that was pushed too early.
+ boost::optional<sal_Int32> oCurrentWidth;
+ if (m_bPushCurrentWidth && !m_aCellWidths.empty() && !m_aCellWidths.back()->empty())
+ oCurrentWidth.reset(m_aCellWidths.back()->back());
m_aCellWidths.pop_back( );
+ // And push it back to the right level.
+ if (oCurrentWidth)
+ m_aCellWidths.back()->push_back(*oCurrentWidth);
+
m_nCell.pop_back( );
m_nTableWidth = 0;
m_nLayoutType = 0;