diff options
author | Justin Luth <justin_luth@sil.org> | 2018-03-30 21:36:42 +0300 |
---|---|---|
committer | Justin Luth <justin_luth@sil.org> | 2018-04-28 06:14:58 +0200 |
commit | a3783c0af4bd21eb9c001aadc60c660c06a47779 (patch) | |
tree | 0ed0a5b17ac2d3207113f1d9c73b843b0fa76e18 /sw/qa/extras | |
parent | a6a38c6de9c18fd1269fc8cfc0e070ef429c8e2f (diff) |
tdf#106062 ww8import: skip fake tab only on hanging indent
Export has changed, so that it only exports a tab when the
footnote paragraph has a hanging indent. Adjusting the import
code to match that change.
Please test with MSO before flagging this patch as a regression.
Certainly there will be some documents previously saved by LO
which will now, in LO, show an extra tab character after the footnote.
Any previously saved document without a hanging indent will display
this extra tab. However, MSO has always seen that extra tab, so
these patches are enhancing compatibility.
Change-Id: Id074ca0f3246eaee9807b907757cbeb6f1bbe7b4
Reviewed-on: https://gerrit.libreoffice.org/52173
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'sw/qa/extras')
-rw-r--r-- | sw/qa/extras/ww8export/data/tdf106062_nonHangingFootnote.odt | bin | 0 -> 14255 bytes | |||
-rw-r--r-- | sw/qa/extras/ww8export/ww8export2.cxx | 9 |
2 files changed, 9 insertions, 0 deletions
diff --git a/sw/qa/extras/ww8export/data/tdf106062_nonHangingFootnote.odt b/sw/qa/extras/ww8export/data/tdf106062_nonHangingFootnote.odt Binary files differnew file mode 100644 index 000000000000..af5e225ea08c --- /dev/null +++ b/sw/qa/extras/ww8export/data/tdf106062_nonHangingFootnote.odt diff --git a/sw/qa/extras/ww8export/ww8export2.cxx b/sw/qa/extras/ww8export/ww8export2.cxx index bca0d6b745fb..bc9a104740bb 100644 --- a/sw/qa/extras/ww8export/ww8export2.cxx +++ b/sw/qa/extras/ww8export/ww8export2.cxx @@ -209,6 +209,15 @@ DECLARE_WW8EXPORT_TEST(testTdf108448_endNote, "tdf108448_endNote.odt") CPPUNIT_ASSERT_EQUAL_MESSAGE( "Number of paragraphs in Endnote i", 1, getParagraphs(xEndnote) ); } +DECLARE_WW8EXPORT_TEST(testTdf106062_nonHangingFootnote, "tdf106062_nonHangingFootnote.odt") +{ + uno::Reference<text::XFootnotesSupplier> xFootnotesSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xFootnotes(xFootnotesSupplier->getFootnotes(), uno::UNO_QUERY); + uno::Reference<text::XTextRange> xTextRange(xFootnotes->getByIndex(0), uno::UNO_QUERY); + // This failed, tab between the footnote number and the footnote content was lost on import. + CPPUNIT_ASSERT_MESSAGE( "Footnote starts with a tab", xTextRange->getString().startsWith("\t") ); +} + DECLARE_WW8EXPORT_TEST(testTdf116570_exportFootnote, "tdf116570_exportFootnote.odt") { uno::Reference<text::XFootnotesSupplier> xFootnotesSupplier(mxComponent, uno::UNO_QUERY); |