diff options
-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(); |