diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-06-11 12:39:33 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-06-11 13:35:10 +0200 |
commit | 4d120b6ab181f530d3fedc963b1c6ec777f2608a (patch) | |
tree | d21775874a65b6ee70af85cfc5624c94ae7980cc /sw | |
parent | 3a72f4ba07458ee9c4c726486304f31900d89044 (diff) |
DOCX import: fix additional empty paragraphs around footnote text
Regression from commit abe1e852a232e3bdab7b9177d099fe3929f5a4aa (handle
properly page breaks even if a page contains only a frame (fdo#55381),
2014-04-21), DomainMapper::lcl_endSectionGroup() inserted an empty
paragraph before and after the real footnote text. Disable addition of
the dummy paragraph for footnotes.
Change-Id: I6e1954c9bd5520ac284d66244ce1c9004e970305
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlimport/data/footnote.docx | bin | 0 -> 15779 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 10 |
2 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/footnote.docx b/sw/qa/extras/ooxmlimport/data/footnote.docx Binary files differnew file mode 100644 index 000000000000..f5c94bd27004 --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/footnote.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 1102c29a71da..770c239b99c4 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -2210,6 +2210,16 @@ DECLARE_OOXMLIMPORT_TEST(testFdo78939, "fdo78939.docx") CPPUNIT_ASSERT_EQUAL(OUString(), getProperty<OUString>(getParagraph(1), "NumberingStyleName")); } +DECLARE_OOXMLIMPORT_TEST(testFootnote, "footnote.docx") +{ + uno::Reference<text::XFootnotesSupplier> xFootnotesSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xFootnotes(xFootnotesSupplier->getFootnotes(), uno::UNO_QUERY); + uno::Reference<text::XTextRange> xFootnote(xFootnotes->getByIndex(0), uno::UNO_QUERY); + OUString aFootnote = xFootnote->getString(); + // Ensure there are no additional newlines after "bar". + CPPUNIT_ASSERT(aFootnote.endsWith("bar")); +} + #endif CPPUNIT_PLUGIN_IMPLEMENT(); |