summaryrefslogtreecommitdiffstats
path: root/sw/qa/extras
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/extras')
-rw-r--r--sw/qa/extras/ww8export/data/tdf139495_tinyHeader.docbin0 -> 22016 bytes
-rw-r--r--sw/qa/extras/ww8export/ww8export3.cxx6
-rw-r--r--sw/qa/extras/ww8import/ww8import.cxx4
3 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/ww8export/data/tdf139495_tinyHeader.doc b/sw/qa/extras/ww8export/data/tdf139495_tinyHeader.doc
new file mode 100644
index 000000000000..c45a6c25fd99
--- /dev/null
+++ b/sw/qa/extras/ww8export/data/tdf139495_tinyHeader.doc
Binary files differ
diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx
index dd7de5ff543a..c16272c2707d 100644
--- a/sw/qa/extras/ww8export/ww8export3.cxx
+++ b/sw/qa/extras/ww8export/ww8export3.cxx
@@ -202,6 +202,12 @@ DECLARE_WW8EXPORT_TEST(testTdf122460_header, "tdf122460_header.odt")
CPPUNIT_ASSERT(headerIsOn);
}
+DECLARE_WW8EXPORT_TEST(testTdf139495_tinyHeader, "tdf139495_tinyHeader.doc")
+{
+ // In Word 2003, this is one page, but definitely not six pages.
+ CPPUNIT_ASSERT(getPages() < 3);
+}
+
DECLARE_WW8EXPORT_TEST(testFdo53985, "fdo53985.doc")
{
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
diff --git a/sw/qa/extras/ww8import/ww8import.cxx b/sw/qa/extras/ww8import/ww8import.cxx
index 9cbae7f83a3a..0698c9578fa8 100644
--- a/sw/qa/extras/ww8import/ww8import.cxx
+++ b/sw/qa/extras/ww8import/ww8import.cxx
@@ -246,6 +246,10 @@ DECLARE_WW8IMPORT_TEST(testTdf122425_1, "tdf122425_1.doc")
CPPUNIT_ASSERT(!pBox->GetLine(eLine));
}
}
+
+ //tdf#139495: without the fix, a negative number was converted into a uInt16, overflowing to 115501
+ auto nDist = getProperty<sal_uInt32>(getStyles("PageStyles")->getByName("Standard"), "HeaderBodyDistance");
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(0), nDist);
}
DECLARE_WW8IMPORT_TEST(testTdf110987, "tdf110987")