[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - sw/qa sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Jan 31 09:27:30 UTC 2019
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 dd5743f18ba9a32695bbc92c21dee2ff87d41308
Author: Justin Luth <justin_luth at sil.org>
AuthorDate: Fri Jan 4 19:28:28 2019 +0300
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Thu Jan 31 10:27:05 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_luth at sil.org>
Reviewed-on: https://gerrit.libreoffice.org/66060
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
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 )
More information about the Libreoffice-commits
mailing list