summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ooxmlexport
diff options
context:
space:
mode:
authorJustin Luth <justin.luth@collabora.com>2018-08-31 11:57:31 +0300
committerLászló Németh <nemeth@numbertext.org>2018-09-03 07:43:18 +0200
commitdff829e863fd05bedd5bcb713cd80c10fa582932 (patch)
tree1f6ed5d7705392d278e06a4bc643e425bd4254e0 /sw/qa/extras/ooxmlexport
parent8854cf29682bc2f02fba1901f967c7a94bc706d5 (diff)
tdf#104354 writerfilter: not FirstParaInSection if InFootOrEndnote
or InComment. The first footnote does not get special treatment in autospacing either, so no exception needs to be made for it like in autospacing, unlike many other "firsts". The unit test is simply preventative. I'm a bit surprised, but the section isn't even marked as "IsFirstSection" until after the comment and footnote paragraphs are finished. That seems a bit odd to me, since they are in the FirstSection after all. Change-Id: Ib0107c969bf624e44f0c78b936bf9531fd25bfc2 Reviewed-on: https://gerrit.libreoffice.org/59858 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/qa/extras/ooxmlexport')
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf104354_firstParaInSection.docxbin0 -> 6828 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport11.cxx10
2 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf104354_firstParaInSection.docx b/sw/qa/extras/ooxmlexport/data/tdf104354_firstParaInSection.docx
new file mode 100644
index 000000000000..79ff44f256f8
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf104354_firstParaInSection.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index 6012d8039e91..e5ef60d164b6 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -390,6 +390,16 @@ DECLARE_OOXMLEXPORT_TEST(testTdf104354, "tdf104354.docx")
getProperty<sal_Int32>(xShape->getEnd(), "ParaTopMargin"));
}
+DECLARE_OOXMLEXPORT_TEST(testTdf104354_firstParaInSection, "tdf104354_firstParaInSection.docx")
+{
+ uno::Reference<text::XFootnotesSupplier> xFootnotesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xFootnotes(xFootnotesSupplier->getFootnotes(), uno::UNO_QUERY);
+ uno::Reference<text::XText> xText(xFootnotes->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(494),
+ getProperty<sal_Int32>(getParagraphOfText(1, xText), "ParaTopMargin"));
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
DECLARE_OOXMLEXPORT_TEST(testTdf107035, "tdf107035.docx")
{
// Select the second run containing the page number field