diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-01-05 12:52:42 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-01-05 13:04:35 +0100 |
commit | e1afe4318787425dc40f2d0b1f02fa17e925c8da (patch) | |
tree | 3daa72ba07dc4cb274632be3a43cb36588923b06 /sw | |
parent | 16adb05eb347fc17e80883e2930432857c945fbb (diff) |
RTF import: handle RTF_FTNSEP and RTF_CHFTNSEP
Commit 330b860205c7ba69dd6603f65324d0f89ad9cd5f (fdo#68787 DOCX import:
handle when w:separator is missing for footnotes, 2013-09-04) disabled
footnote separator by default in dmapper, as the OOXML tokenizer always
provided a uFtnEdnSep in case a separator was wanted.
Let the RTF tokenizer do the same, this way we're in sync with Word
again: if RTF_CHFTNSEP is in RTF_FTNSEP, then we show the separator,
otherwise we don't.
Change-Id: I74b46c5d71227682e093695336dc9eb6fde22121
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/rtfimport/data/fdo68787.rtf | 9 | ||||
-rw-r--r-- | sw/qa/extras/rtfimport/rtfimport.cxx | 7 |
2 files changed, 16 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/data/fdo68787.rtf b/sw/qa/extras/rtfimport/data/fdo68787.rtf new file mode 100644 index 000000000000..4c8a68f1db8e --- /dev/null +++ b/sw/qa/extras/rtfimport/data/fdo68787.rtf @@ -0,0 +1,9 @@ +{\rtf1 +\ftnbj +{\*\ftnsep \chftnsep \par} +\pard\plain +This will have a separator +\chftn +{\footnote \chftn Footnote.} +\par +} diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index a5ab93d3df15..0ad517738405 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -1405,6 +1405,13 @@ DECLARE_RTFIMPORT_TEST(testBackground, "background.rtf") CPPUNIT_ASSERT_EQUAL(false, bool(getProperty<sal_Bool>(getShape(2), "Opaque"))); } +DECLARE_RTFIMPORT_TEST(testFdo68787, "fdo68787.rtf") +{ + uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName(DEFAULT_STYLE), uno::UNO_QUERY); + // This was 0, the 'lack of \chftnsep' <-> '0 line width' mapping was missing in the RTF tokenizer. + CPPUNIT_ASSERT_EQUAL(sal_Int32(25), getProperty<sal_Int32>(xPageStyle, "FootnoteLineRelativeWidth")); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |