[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - sw/qa sw/source

Luke Deller luke at deller.id.au
Tue Jul 10 09:46:58 UTC 2018


 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 3fbb1d03110018c1ffe96c01b35b62e9b0742ded
Author: Luke Deller <luke at 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 <luke at deller.id.au>
    (cherry picked from commit 9f331575ad8d371c95a18e33a245d404e873ca8a)
    Reviewed-on: https://gerrit.libreoffice.org/57055
    Tested-by: Xisco FaulĂ­ <xiscofauli at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

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 aa6879fa139d..6cb358bf81ab 100644
--- a/sw/qa/extras/ww8export/ww8export2.cxx
+++ b/sw/qa/extras/ww8export/ww8export2.cxx
@@ -870,6 +870,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 227fe8937a0f..3d543b74bc97 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() )
     {


More information about the Libreoffice-commits mailing list