diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-03-01 17:24:21 +0000 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2017-03-06 17:57:26 +0100 |
commit | 701d1dc040399e02ab83e6011d8e254c60dd5497 (patch) | |
tree | 0fc17a2ef19527fb90a28c1743bb14ba20019343 /sw | |
parent | b779e000d979b61ad0d238cb14365151fdb2622b (diff) |
Resolves: tdf#106261 throw away old node map for table
when generating a new one, otherwise on exporting the same table
twice to two consecutive .doc footnotes will think the second
export of the table is a level lower because it will find it
in the map and
WW8TableNodeInfo::Pointer_t WW8TableInfo::insertTableNodeInfo
does pNodeInfo->setDepth(nDepth + pNodeInfo->getDepth());
using the cached pNodeInfo depth and not a new fresh pNodeInfo of
depth 0
Change-Id: I7aa7ac6a19814910c1d19d78f04cfd9886c444c5
(cherry picked from commit 6f3e24ad64dd40b3ef8def7d879ba395a16874a1)
Reviewed-on: https://gerrit.libreoffice.org/34766
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
(cherry picked from commit c496b67a52ee4b5c7f9053cfe3dc54290e8d6392)
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ww8/wrtww8.cxx | 8 |
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; |