diff options
author | Justin Luth <justin.luth@collabora.com> | 2018-08-23 21:15:23 +0300 |
---|---|---|
committer | Justin Luth <justin_luth@sil.org> | 2018-08-25 07:49:51 +0200 |
commit | 7413216e02be9b2f8eb39d550c297021e92ef299 (patch) | |
tree | 02c2ece380f8f7f6e57b907b8019bd9dcbd769ef | |
parent | af579ed7d1482df5cfa7e12e8af2603917d40602 (diff) |
tdf#70195 docx export: default header/footer at 720
This only impacts MSWord, which otherwise suggests
a new header start at 0. LO ignores that 0 and uses
a sane default.
Change-Id: Id9790038086de1e20918d4ab498a0ce93ca53b5c
Reviewed-on: https://gerrit.libreoffice.org/59523
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth@sil.org>
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport4.cxx | 3 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx index beaa1b936cc4..ba02516709c4 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx @@ -971,6 +971,9 @@ DECLARE_OOXMLEXPORT_TEST(test76108, "test76108.docx") if (!pXmlDoc) return; //docx file after RT is getting corrupted. assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[1]/w:r[1]/w:fldChar[1]", "fldCharType", "begin"); + + // tdf#70195 the default header should start at 720, not 0 + assertXPath(pXmlDoc, "//w:pgMar", "header", "720"); } DECLARE_OOXMLEXPORT_TEST(testTCTagMisMatch, "TCTagMisMatch.docx") diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 4c6aba493ce7..e9ae6c5fd588 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -7982,14 +7982,14 @@ void DocxAttributeOutput::FormatULSpace( const SvxULSpaceItem& rULSpace ) HdFtDistanceGlue aDistances( *m_rExport.GetCurItemSet() ); - sal_Int32 nHeader = 0; + sal_Int32 nHeader = 720; if ( aDistances.HasHeader() ) nHeader = sal_Int32( aDistances.dyaHdrTop ); // Page top m_pageMargins.nTop = aDistances.dyaTop; - sal_Int32 nFooter = 0; + sal_Int32 nFooter = 720; if ( aDistances.HasFooter() ) nFooter = sal_Int32( aDistances.dyaHdrBottom ); |