diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-07-27 10:16:26 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-07-27 11:54:56 +0200 |
commit | c0bd973c5ef749efbb794c87a9e2920b85533ca5 (patch) | |
tree | 84bd143d9a9726f92fd109a3d0f5536a4189d39b /sw | |
parent | 8182f7d393bc60c693a1c509b3e8edcc87484968 (diff) |
test rtf import/export of math placeholders
Change-Id: Ie6864f152fae90e993e4ec127079491100029fa2
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/rtfexport/data/math-placeholders.rtf | 26 | ||||
-rw-r--r-- | sw/qa/extras/rtfexport/rtfexport.cxx | 9 |
2 files changed, 35 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfexport/data/math-placeholders.rtf b/sw/qa/extras/rtfexport/data/math-placeholders.rtf new file mode 100644 index 000000000000..31e995af619b --- /dev/null +++ b/sw/qa/extras/rtfexport/data/math-placeholders.rtf @@ -0,0 +1,26 @@ +{\rtf1
+{\mmath
+{\*\moMathPara
+{\*\moMath
+{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid13982551 }
+{\mnary
+{\mnaryPr
+{\mchr \u8721 ?}
+{\mctrlPr\f34 }
+}
+{\msub
+{\rtlch\fcs1 \af1
+\ltrch\fcs0 \f34\insrsid13982551 }
+}
+{\msup
+{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid13982551 }
+}
+{\me
+{\rtlch\fcs1 \af1 \ltrch\fcs0 \f34\insrsid13982551 }
+}
+}
+}
+}
+}
+\par
+}
diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx index 443b5866e8f4..6d1bceb1fa4f 100644 --- a/sw/qa/extras/rtfexport/rtfexport.cxx +++ b/sw/qa/extras/rtfexport/rtfexport.cxx @@ -62,6 +62,7 @@ public: void testMathNary(); void testMathLimupp(); void testMathStrikeh(); + void testMathPlaceholders(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -86,6 +87,7 @@ public: CPPUNIT_TEST(testMathNary); CPPUNIT_TEST(testMathLimupp); CPPUNIT_TEST(testMathStrikeh); + CPPUNIT_TEST(testMathPlaceholders); #endif #endif CPPUNIT_TEST_SUITE_END(); @@ -349,6 +351,13 @@ void Test::testMathStrikeh() CPPUNIT_ASSERT_EQUAL(OUString("overstrike {abc}"), aActual); } +void Test::testMathPlaceholders() +{ + roundtrip("math-placeholders.rtf"); + OUString aActual = getFormula(getRun(getParagraph(1), 1)); + CPPUNIT_ASSERT_EQUAL(OUString("sum from <?> to <?> <?>"), aActual); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); |