summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-04-21 12:53:22 +0200
committerMiklos Vajna <vmiklos@suse.cz>2012-04-21 14:38:03 +0200
commit99b875aee04a808fb28715fb0e143a2b00332832 (patch)
treebb646cef4a8847e1d04b965d76defc974ef26046 /sw
parent29042d096a2c5812ae179e1553367afd21b0f71e (diff)
fdo#48876 fix RTF import of \sl without \slmult
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/rtftok/data/fdo48876.rtf5
-rw-r--r--sw/qa/extras/rtftok/rtftok.cxx17
2 files changed, 22 insertions, 0 deletions
diff --git a/sw/qa/extras/rtftok/data/fdo48876.rtf b/sw/qa/extras/rtftok/data/fdo48876.rtf
new file mode 100644
index 000000000000..49a6eb0bf6a9
--- /dev/null
+++ b/sw/qa/extras/rtftok/data/fdo48876.rtf
@@ -0,0 +1,5 @@
+{\rtf
+\sl54
+C
+\par
+}
diff --git a/sw/qa/extras/rtftok/rtftok.cxx b/sw/qa/extras/rtftok/rtftok.cxx
index 6870f0202e86..0bb45e47d0d7 100644
--- a/sw/qa/extras/rtftok/rtftok.cxx
+++ b/sw/qa/extras/rtftok/rtftok.cxx
@@ -29,6 +29,8 @@
#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/style/CaseMap.hpp>
+#include <com/sun/star/style/LineSpacing.hpp>
+#include <com/sun/star/style/LineSpacingMode.hpp>
#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
#include <com/sun/star/table/BorderLine2.hpp>
#include <com/sun/star/table/BorderLineStyle.hpp>
@@ -83,6 +85,7 @@ public:
void testFdo39053();
void testFdo48356();
void testFdo48023();
+ void testFdo48876();
CPPUNIT_TEST_SUITE(RtfModelTest);
#if !defined(MACOSX) && !defined(WNT)
@@ -108,6 +111,7 @@ public:
CPPUNIT_TEST(testFdo39053);
CPPUNIT_TEST(testFdo48356);
CPPUNIT_TEST(testFdo48023);
+ CPPUNIT_TEST(testFdo48876);
#endif
CPPUNIT_TEST_SUITE_END();
@@ -599,6 +603,19 @@ void RtfModelTest::testFdo48023()
CPPUNIT_ASSERT_EQUAL(aExpected, xTextRange->getString());
}
+void RtfModelTest::testFdo48876()
+{
+ load("fdo48876.rtf");
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xTextDocument->getText(), uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xParaEnum = xParaEnumAccess->createEnumeration();
+ CPPUNIT_ASSERT(xParaEnum->hasMoreElements());
+ uno::Reference<beans::XPropertySet> xPropertySet(xParaEnum->nextElement(), uno::UNO_QUERY);
+ style::LineSpacing aSpacing;
+ xPropertySet->getPropertyValue("ParaLineSpacing") >>= aSpacing;
+ CPPUNIT_ASSERT_EQUAL(style::LineSpacingMode::MINIMUM, aSpacing.Mode);
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(RtfModelTest);
CPPUNIT_PLUGIN_IMPLEMENT();