summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/wrtww8.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/filter/ww8/wrtww8.cxx')
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 2e33088414bf..a005cbeae738 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -1839,8 +1839,16 @@ void MSWordExportBase::WriteSpecialText( sal_uLong nStart, sal_uLong nEnd, sal_u
// clear linked textboxes since old ones can't be linked to frames in this section
m_aLinkedTextboxesHelper.clear();
+ // tdf#106261 Reset table infos, otherwise the depth of the cells will be
+ // incorrect, in case the header/footer had table(s) and we try to export
+ // the same table second time.
+ ww8::WW8TableInfo::Pointer_t pOldTableInfo = m_pTableInfo;
+ m_pTableInfo = std::make_shared<ww8::WW8TableInfo>();
+
WriteText();
+ m_pTableInfo = pOldTableInfo;
+
m_bOutPageDescs = bOldPageDescs;
delete m_pCurPam; // delete Pam
m_pCurPam = pOldPam;