diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-05-12 15:45:53 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-05-12 15:56:01 +0200 |
commit | 8931abc0b9fded1ee78eca6bf28e8d2438a76add (patch) | |
tree | 69636f30ad691a2e1dea223016a59fc6edbca506 | |
parent | 247d080b366083b3ee4054675b70af2ccbbb34bf (diff) |
tdf#90260 testcase
Change-Id: I06a5ff604e6782863c4a2d6e002c9d67d42912fb
-rw-r--r-- | sw/qa/extras/rtfimport/data/tdf90260-nopar.rtf | 2 | ||||
-rw-r--r-- | sw/qa/extras/rtfimport/data/tdf90260-par.rtf | 2 | ||||
-rw-r--r-- | sw/qa/extras/rtfimport/rtfimport.cxx | 18 |
3 files changed, 22 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/data/tdf90260-nopar.rtf b/sw/qa/extras/rtfimport/data/tdf90260-nopar.rtf new file mode 100644 index 000000000000..c54eedd28878 --- /dev/null +++ b/sw/qa/extras/rtfimport/data/tdf90260-nopar.rtf @@ -0,0 +1,2 @@ +{\rtf1\ansi\ansicpg1252\deff0\deflang1035{\fonttbl{\f0\fnil\fcharset0 Calibri;}}
+\uc1\pard\sa200\sl276\slmult1\lang11\f0\fs22 simple}
diff --git a/sw/qa/extras/rtfimport/data/tdf90260-par.rtf b/sw/qa/extras/rtfimport/data/tdf90260-par.rtf new file mode 100644 index 000000000000..e2115b634dfe --- /dev/null +++ b/sw/qa/extras/rtfimport/data/tdf90260-par.rtf @@ -0,0 +1,2 @@ +{\rtf1\ansi\ansicpg1252\deff0\deflang1035{\fonttbl{\f0\fnil\fcharset0 Calibri;}}
+\uc1\pard\sa200\sl276\slmult1\lang11\f0\fs22 simple\par}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index adbd74fee76b..fff3c7d547a4 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -2270,6 +2270,24 @@ DECLARE_RTFIMPORT_TEST(testTdf91074, "tdf91074.rtf") CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(COL_LIGHTRED), getProperty<table::BorderLine2>(xShape, "TopBorder").Color); } +DECLARE_RTFIMPORT_TEST(testTdf90260Nopar, "hello.rtf") +{ + uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); + uno::Reference<text::XTextRange> xText(xTextDocument->getText(), uno::UNO_QUERY); + uno::Reference<text::XTextRange> xEnd = xText->getEnd(); + paste("tdf90260-nopar.rtf", xEnd); + CPPUNIT_ASSERT_EQUAL(1, getParagraphs()); +} + +DECLARE_RTFIMPORT_TEST(testTdf90260Par, "hello.rtf") +{ + uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); + uno::Reference<text::XTextRange> xText(xTextDocument->getText(), uno::UNO_QUERY); + uno::Reference<text::XTextRange> xEnd = xText->getEnd(); + paste("tdf90260-par.rtf", xEnd); + CPPUNIT_ASSERT_EQUAL(2, getParagraphs()); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |