sw/qa/extras/ww8export/data/tdf118412.doc |binary
 sw/qa/extras/ww8export/ww8export2.cxx     |   10 ++++++++++
 sw/source/filter/ww8/ww8par6.cxx          |    2 +-
 3 files changed, 11 insertions(+), 1 deletion(-)

New commits:
commit 9f331575ad8d371c95a18e33a245d404e873ca8a
Author: Luke Deller <l...@deller.id.au>
Date:   Fri Jun 29 00:40:14 2018 +1000

    tdf#118412: DOC incorrect bottom page margin
    
    Fix a silly typo when determining if the page has a bottom margin
    
    Change-Id: I96857951725d00978c43d850d0e1bc64ab61d965
    Reviewed-on: https://gerrit.libreoffice.org/56602
    Tested-by: Jenkins
    Reviewed-by: Luke Deller <l...@deller.id.au>

diff --git a/sw/qa/extras/ww8export/data/tdf118412.doc 
b/sw/qa/extras/ww8export/data/tdf118412.doc
new file mode 100644
index 000000000000..ef9b26cb3af8
Binary files /dev/null and b/sw/qa/extras/ww8export/data/tdf118412.doc differ
diff --git a/sw/qa/extras/ww8export/ww8export2.cxx 
b/sw/qa/extras/ww8export/ww8export2.cxx
index 83eaac7b9de5..c4d552393899 100644
--- a/sw/qa/extras/ww8export/ww8export2.cxx
+++ b/sw/qa/extras/ww8export/ww8export2.cxx
@@ -871,6 +871,16 @@ DECLARE_WW8EXPORT_TEST(testTdf118133, "tdf118133.docx")
     CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(15240), 
getShape(1)->getSize().Width);
 }
 
+DECLARE_WW8EXPORT_TEST(testTdf118412, "tdf118412.doc")
+{
+    /* Check that the first page's bottom margin is 1.251cm (not 2.540cm) */
+    OUString sPageStyleName = getProperty<OUString>(getParagraph(1), 
"PageStyleName");
+    uno::Reference<style::XStyle> xPageStyle(
+        getStyles("PageStyles")->getByName(sPageStyleName), uno::UNO_QUERY);
+    sal_Int32 nBottomMargin = getProperty<sal_Int32>(xPageStyle, 
"BottomMargin");
+    CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1251), nBottomMargin);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 2f81599eb5b6..f53501c2485c 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -498,7 +498,7 @@ void wwSectionManager::GetPageULData(const wwSection 
&rSection,
 
     /* Check whether this section has headers / footers */
     sal_uInt16 nHeaderMask = WW8_HEADER_EVEN | WW8_HEADER_ODD;
-    sal_uInt16 nFooterMask = WW8_HEADER_EVEN | WW8_HEADER_ODD;
+    sal_uInt16 nFooterMask = WW8_FOOTER_EVEN | WW8_FOOTER_ODD;
     /* Ignore the presence of a first-page header/footer unless it is enabled 
*/
     if( rSection.HasTitlePage() )
     {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to