summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Deller <luke@deller.id.au>2018-06-29 00:40:14 +1000
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-07-10 11:46:35 +0200
commit3fbb1d03110018c1ffe96c01b35b62e9b0742ded (patch)
treec3cc70687860c8d98f56d61b493ed45942bfeb90
parent355e601523a2288e826cc7a4bdccdfc7510977fd (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> (cherry picked from commit 9f331575ad8d371c95a18e33a245d404e873ca8a) Reviewed-on: https://gerrit.libreoffice.org/57055 Tested-by: Xisco FaulĂ­ <xiscofauli@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r--sw/qa/extras/ww8export/data/tdf118412.docbin0 -> 51200 bytes
-rw-r--r--sw/qa/extras/ww8export/ww8export2.cxx10
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx2
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
new file mode 100644
index 000000000000..ef9b26cb3af8
--- /dev/null
+++ b/sw/qa/extras/ww8export/data/tdf118412.doc
Binary files 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() )
{