diff options
author | Luke Deller <luke@deller.id.au> | 2018-06-29 00:40:14 +1000 |
---|---|---|
committer | Luke Deller <luke@deller.id.au> | 2018-07-03 14:44:03 +0200 |
commit | 9f331575ad8d371c95a18e33a245d404e873ca8a (patch) | |
tree | d5293d5fc031bc9b513600c0b635439644a32476 /sw | |
parent | 63f0dbdd61df0bf390d201b4ea4215b0077a2f9d (diff) |
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@deller.id.au>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ww8export/data/tdf118412.doc | bin | 0 -> 51200 bytes | |||
-rw-r--r-- | sw/qa/extras/ww8export/ww8export2.cxx | 10 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par6.cxx | 2 |
3 files changed, 11 insertions, 1 deletions
diff --git a/sw/qa/extras/ww8export/data/tdf118412.doc b/sw/qa/extras/ww8export/data/tdf118412.doc Binary files differnew file mode 100644 index 000000000000..ef9b26cb3af8 --- /dev/null +++ b/sw/qa/extras/ww8export/data/tdf118412.doc 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() ) { |