summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorAndras Timar <andras.timar@collabora.com>2014-11-24 11:33:17 +0100
committerAndras Timar <andras.timar@collabora.com>2014-11-24 17:33:22 +0100
commit064ae0887e7c215cb078e5cc4d73f23dcf3be5ef (patch)
treef39769a454cce6386829c03cf84b18e6cd770f6a /sw/qa
parentbc24a8514b4b7301c2100ff4d938392e270d908f (diff)
fdo#85889 handle pc, pca and mac rtf keywords in writerfilter
Change-Id: Ic54f2233a37562bdc516e440af0b4b7973f56342 (cherry picked from commit 7839633fb356285652ed96f4bf3f85bcd5b561a4)
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/rtfimport/data/fdo85889-mac.rtf3
-rw-r--r--sw/qa/extras/rtfimport/data/fdo85889-pc.rtf3
-rw-r--r--sw/qa/extras/rtfimport/data/fdo85889-pca.rtf3
-rw-r--r--sw/qa/extras/rtfimport/rtfimport.cxx26
4 files changed, 35 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/data/fdo85889-mac.rtf b/sw/qa/extras/rtfimport/data/fdo85889-mac.rtf
new file mode 100644
index 000000000000..8056d47aacce
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/fdo85889-mac.rtf
@@ -0,0 +1,3 @@
+{\rtf1\mac \deff0{\fonttbl{\f0\fmodern Helvetica;}}
+\pard\f0\fs20 \'f1\'f2\'f3\par
+}
diff --git a/sw/qa/extras/rtfimport/data/fdo85889-pc.rtf b/sw/qa/extras/rtfimport/data/fdo85889-pc.rtf
new file mode 100644
index 000000000000..a3b9d2745397
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/fdo85889-pc.rtf
@@ -0,0 +1,3 @@
+{\rtf1\pc \deff0{\fonttbl{\f0\fmodern Helvetica;}}
+\pard\f0\fs20 \'f1\'f2\'f3\par
+}
diff --git a/sw/qa/extras/rtfimport/data/fdo85889-pca.rtf b/sw/qa/extras/rtfimport/data/fdo85889-pca.rtf
new file mode 100644
index 000000000000..34eeb18ef29d
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/fdo85889-pca.rtf
@@ -0,0 +1,3 @@
+{\rtf1\pca \deff0{\fonttbl{\f0\fmodern Helvetica;}}
+\pard\f0\fs20 \'f1\'f2\'f3\par
+}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index b89472a35ff5..7dc67c346473 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -2181,6 +2181,32 @@ DECLARE_RTFIMPORT_TEST(testChtOutlineNumberingRtf, "chtoutline.rtf")
CPPUNIT_ASSERT_EQUAL(OUString(aExpectedPrefix,SAL_N_ELEMENTS(aExpectedPrefix)), aPrefix);
CPPUNIT_ASSERT_EQUAL(OUString(aExpectedSuffix,SAL_N_ELEMENTS(aExpectedSuffix)), aSuffix);
}
+
+DECLARE_RTFIMPORT_TEST(testFdo85889pc, "fdo85889-pc.rtf")
+{
+ uno::Reference<text::XTextRange> xTextRange = getRun(getParagraph(1), 1);
+
+ OUString aExpected("\xc2\xb1\xe2\x89\xa5\xe2\x89\xa4", 8, RTL_TEXTENCODING_UTF8);
+ CPPUNIT_ASSERT_EQUAL(aExpected, xTextRange->getString());
+}
+
+DECLARE_RTFIMPORT_TEST(testFdo85889pca, "fdo85889-pca.rtf")
+{
+ uno::Reference<text::XTextRange> xTextRange = getRun(getParagraph(1), 1);
+
+ OUString aExpected("\xc2\xb1\xe2\x80\x97\xc2\xbe", 7, RTL_TEXTENCODING_UTF8);
+ CPPUNIT_ASSERT_EQUAL(aExpected, xTextRange->getString());
+}
+
+DECLARE_RTFIMPORT_TEST(testFdo85889mac, "fdo85889-mac.rtf")
+{
+ uno::Reference<text::XTextRange> xTextRange = getRun(getParagraph(1), 1);
+
+ OUString aExpected("\xc3\x92\xc3\x9a\xc3\x9b", 6, RTL_TEXTENCODING_UTF8);
+ CPPUNIT_ASSERT_EQUAL(aExpected, xTextRange->getString());
+}
+
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */