diff options
author | Serge Krot <Serge.Krot@cib.de> | 2018-06-27 11:18:41 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2018-09-19 10:50:05 +0200 |
commit | fa8b2c533265a6d74e16ffae55673d6aa0fbf6a5 (patch) | |
tree | 950f239d1375f48a17a8bdfc308e70e8928b7623 /sw/source/filter/ww8/wrtw8sty.cxx | |
parent | 0bc059f2a893d812e29d6a72d4f988428b5ea346 (diff) |
tdf#118393: FILESAVE: DOCX Export loses header/footer
Change-Id: If47a2e4953e4b98f41c9115779522a755eea8192
Reviewed-on: https://gerrit.libreoffice.org/56522
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'sw/source/filter/ww8/wrtw8sty.cxx')
-rw-r--r-- | sw/source/filter/ww8/wrtw8sty.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index 5d9e55758b93..c92a5f9b1957 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -976,7 +976,7 @@ MSWordSections::MSWordSections( MSWordExportBase& rExport ) sal_uLong nRstLnNum = pSet ? pSet->Get( RES_LINENUMBER ).GetStartValue() : 0; const SwTableNode* pTableNd = rExport.m_pCurPam->GetNode().FindTableNode(); - const SwSectionNode* pSectNd; + const SwSectionNode* pSectNd = nullptr; if ( pTableNd ) { pSet = &pTableNd->GetTable().GetFrameFormat()->GetAttrSet(); @@ -1000,6 +1000,11 @@ MSWordSections::MSWordSections( MSWordExportBase& rExport ) pFormat = pSectNd->GetSection().GetFormat(); } + // tdf#118393: FILESAVE: DOCX Export loses header/footer + rExport.m_bFirstTOCNodeWithSection = pSectNd && + ( TOX_HEADER_SECTION == pSectNd->GetSection().GetType() || + TOX_CONTENT_SECTION == pSectNd->GetSection().GetType() ); + // Try to get page descriptor of the first node if ( pSet && SfxItemState::SET == pSet->GetItemState( RES_PAGEDESC, true, &pI ) && |