summaryrefslogtreecommitdiff
path: root/sw/qa/extras
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-07-27 17:40:39 +0200
committerMiklos Vajna <vmiklos@suse.cz>2012-07-30 09:57:33 +0200
commit334989a3b87eba4882bd6b67b84c443816b361c3 (patch)
tree3cacdc08ca80f20b1b219b77f14080514788bd49 /sw/qa/extras
parent42f17f3f62471d5be4fe7db7334db09c3b8cbe08 (diff)
Related: fdo#36089 improve import of EQ field in writerfilter
This moves the FIELD_EQ parsing where it belongs + improves it, so a custom "lower by" value is handled on import. Change-Id: I0459042d7a610c397ce90ec3dba5ff49ce9ef60f
Diffstat (limited to 'sw/qa/extras')
-rw-r--r--sw/qa/extras/rtfimport/data/fdo36089.rtf9
-rw-r--r--sw/qa/extras/rtfimport/rtfimport.cxx8
2 files changed, 17 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/data/fdo36089.rtf b/sw/qa/extras/rtfimport/data/fdo36089.rtf
new file mode 100644
index 000000000000..035d74f6cec6
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/fdo36089.rtf
@@ -0,0 +1,9 @@
+{\rtf1
+{\fonttbl{\f0\fnil\fcharset0 Times New Roman;}
+}
+{\stylesheet
+{\s0\fs20 Normal ;}
+}
+{\pard\plain\s0 Subscript{{\field{\*\fldinst{ EQ \\s\\do5({\fs16 1})}}{\fldrslt }}
+}\par
+}}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index 229dec870ff6..753505e514c8 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -100,6 +100,7 @@ public:
void testFdo46966();
void testFdo52066();
void testFdo48033();
+ void testFdo36089();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -142,6 +143,7 @@ public:
CPPUNIT_TEST(testFdo46966);
CPPUNIT_TEST(testFdo52066);
CPPUNIT_TEST(testFdo48033);
+ CPPUNIT_TEST(testFdo36089);
#endif
CPPUNIT_TEST_SUITE_END();
@@ -854,6 +856,12 @@ void Test::testFdo48033()
CPPUNIT_ASSERT_EQUAL(OUString("Frame"), getProperty<OUString>(getRun(xPara, 1), "TextPortionType"));
}
+void Test::testFdo36089()
+{
+ load("fdo36089.rtf");
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(-50), getProperty<sal_Int16>(getRun(getParagraph(1), 2), "CharEscapement"));
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();