diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-04-06 18:05:43 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-04-06 18:14:03 +0200 |
commit | dcb88d170b6ced0ee805b787c1e9be820ff90d25 (patch) | |
tree | c3a75e590114d49c14610ec7ba6cde64d70960f7 | |
parent | 69c950ae862f9ea9c5f56d8bdba895fb9a07ff0f (diff) |
Testcase for RtfAttributeOutput::SectionLineNumbering()
lcov pointed out this method wasn't ever invoked in any of the tests.
Change-Id: I6cccf4fc1d870938a2f218bedc0b8d195a299cd1
-rw-r--r-- | sw/qa/extras/rtfexport/data/linenumbering.rtf | 8 | ||||
-rw-r--r-- | sw/qa/extras/rtfexport/rtfexport.cxx | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfexport/data/linenumbering.rtf b/sw/qa/extras/rtfexport/data/linenumbering.rtf new file mode 100644 index 000000000000..7cafe2a3f0fc --- /dev/null +++ b/sw/qa/extras/rtfexport/data/linenumbering.rtf @@ -0,0 +1,8 @@ +{\rtf1 +\linemod5\linex283\linecont +1\par +2\par +3\par +4\par +5\par +} diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx index 0aba10b3bf02..3f277cb110b0 100644 --- a/sw/qa/extras/rtfexport/rtfexport.cxx +++ b/sw/qa/extras/rtfexport/rtfexport.cxx @@ -611,6 +611,14 @@ DECLARE_RTFEXPORT_TEST(testRelsize, "relsize.rtf") CPPUNIT_ASSERT_EQUAL(text::RelOrientation::FRAME, getProperty<sal_Int16>(xShape, "RelativeHeightRelation")); } +DECLARE_RTFEXPORT_TEST(testLineNumbering, "linenumbering.rtf") +{ + uno::Reference<text::XLineNumberingProperties> xLineNumberingProperties(mxComponent, uno::UNO_QUERY_THROW); + uno::Reference<beans::XPropertySet> xPropertySet = xLineNumberingProperties->getLineNumberingProperties(); + CPPUNIT_ASSERT_EQUAL(true, bool(getProperty<sal_Bool>(xPropertySet, "IsOn"))); + CPPUNIT_ASSERT_EQUAL(sal_Int32(5), getProperty<sal_Int32>(xPropertySet, "Interval")); +} + #endif CPPUNIT_PLUGIN_IMPLEMENT(); |