diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-09-12 09:50:04 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-09-12 10:20:23 +0200 |
commit | 52803dca4714494f58034c8636cb2d71ad32c2d0 (patch) | |
tree | 9e73ac0d37c5315c0cbbf8816bce6651424d0476 /sw | |
parent | 422f873ba8ec3ad7d4a6dd054cbde4d9d7d3a5cb (diff) |
fdo#44984 RTF import: handle form fields inside tables
Change-Id: I84b3d5186e99b8313cfb32398869de028a267b49
Diffstat (limited to 'sw')
-rwxr-xr-x | sw/qa/extras/rtfimport/data/fdo44984.rtf | 30 | ||||
-rw-r--r-- | sw/qa/extras/rtfimport/rtfimport.cxx | 10 |
2 files changed, 40 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/data/fdo44984.rtf b/sw/qa/extras/rtfimport/data/fdo44984.rtf new file mode 100755 index 000000000000..a61d9ee6fed2 --- /dev/null +++ b/sw/qa/extras/rtfimport/data/fdo44984.rtf @@ -0,0 +1,30 @@ +{\rtf1 +\pard\plain +{A\par \ltrrow} +\trowd \cellx954 +\pard \intbl +{\field\flddirty\fldpriv +{\*\fldinst +{\rtlch +\fcs1 \af4\afs16 \ltrch\fcs0 \f4\fs16\insrsid7932335 +\hich\af4\dbch\af31505\loch\f4 FORMCHECKBOX } +{ +\rtlch\fcs1 \af4\afs16 \ltrch\fcs0 \f4\fs16\insrsid7932335 +{\*\datafield 6500000014000000114b6f6e74726f6c6c6be473746368656e3100000000000000000000000000} +{\*\formfield +{\fftype1\ffres25\fftypetxt0\ffhps20 +{\*\ffname Kontrollk\'e4stchen1} +\ffdefres0} +} +} +} +{\fldrslt } +} +{B \cell } +\pard \intbl +\row +\pard +{ +C +\par } +} diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index 1dda1c45b972..e12464499b6c 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -1941,6 +1941,16 @@ DECLARE_RTFIMPORT_TEST(testFdo82114, "fdo82114.rtf") CPPUNIT_ASSERT_EQUAL(aExpected, aActual); } +DECLARE_RTFIMPORT_TEST(testFdo44984, "fdo44984.rtf") +{ + uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY); + uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY); + uno::Reference<text::XTextRange> xCell(xTable->getCellByName("A1"), uno::UNO_QUERY); + // This was Text, i.e. the checkbox field portion was missing. + CPPUNIT_ASSERT_EQUAL(OUString("TextFieldStartEnd"), getProperty<OUString>(getRun(getParagraphOfText(1, xCell->getText()), 1), "TextPortionType")); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |