sw/qa/extras/ww8export/data/tdf122460_header.odt |binary sw/qa/extras/ww8export/ww8export3.cxx | 7 +++++++ sw/source/filter/ww8/wrtw8sty.cxx | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-)
New commits: commit 13ed75dd3f84d38cce8f46792af560a5090ec180 Author: Justin Luth <justin_l...@sil.org> AuthorDate: Fri Jan 4 19:28:28 2019 +0300 Commit: Justin Luth <justin_l...@sil.org> CommitDate: Tue Jan 8 20:19:25 2019 +0100 tdf#122460 ww8export: always export H/F to first section Normally the first section is considered a BreakCode == 2, which guarantees that the headers/footers will attempt to be written. In the cases where it isn't, the very first section definitely needs to include any possible Headers/Footers. This was already done for DOCX via bug 78606 in LO 5.0. Both DOCX and RTF seem to ignore this first aSect, so this change won't affect them. Change-Id: Ie08eedea9202f0922e0e505a92fe4a66ef6c4a24 Reviewed-on: https://gerrit.libreoffice.org/65859 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_l...@sil.org> diff --git a/sw/qa/extras/ww8export/data/tdf122460_header.odt b/sw/qa/extras/ww8export/data/tdf122460_header.odt new file mode 100644 index 000000000000..420121dc9a4d Binary files /dev/null and b/sw/qa/extras/ww8export/data/tdf122460_header.odt differ diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx index ccf79c83e300..60bf801b25ef 100644 --- a/sw/qa/extras/ww8export/ww8export3.cxx +++ b/sw/qa/extras/ww8export/ww8export3.cxx @@ -54,6 +54,13 @@ DECLARE_WW8EXPORT_TEST(testTdf122429_header, "tdf122429_header.doc") CPPUNIT_ASSERT(headerIsOn); } +DECLARE_WW8EXPORT_TEST(testTdf122460_header, "tdf122460_header.odt") +{ + uno::Reference<container::XNameAccess> pageStyles = getStyles("PageStyles"); + uno::Reference<style::XStyle> pageStyle(pageStyles->getByName("Default Style"), uno::UNO_QUERY); + bool headerIsOn = getProperty<bool>(pageStyle, "HeaderIsOn"); + CPPUNIT_ASSERT(headerIsOn); +} DECLARE_WW8EXPORT_TEST(testFdo53985, "fdo53985.doc") { diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index b5ee75531701..af39bf4ef063 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -1012,7 +1012,7 @@ MSWordSections::MSWordSections( MSWordExportBase& rExport ) AppendSection( *static_cast<const SwFormatPageDesc*>(pI), *pNd, pFormat, nRstLnNum ); } else - AppendSection( rExport.m_pCurrentPageDesc, pFormat, nRstLnNum ); + AppendSection( rExport.m_pCurrentPageDesc, pFormat, nRstLnNum, /*bIsFirstParagraph=*/true ); } WW8_WrPlcSepx::WW8_WrPlcSepx( MSWordExportBase& rExport ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits