diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-07-27 16:32:13 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-07-27 17:28:09 +0200 |
commit | dba6b5151e26ea0bc88f8d30a70859fcbbd2e81f (patch) | |
tree | 8ad1d8ee91cddd9d474e8e2fbc4cd1aaf00a91e9 /sw | |
parent | fb66fd63d4a1ea26d0191d3b39cb7e25abf2e714 (diff) |
fix import of nested RTF_MF groups
Change-Id: Ibd4f93663d27d997c44f73e201c355a34d6452d3
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/rtfexport/data/math-runs.rtf | 12 | ||||
-rw-r--r-- | sw/qa/extras/rtfexport/rtfexport.cxx | 9 |
2 files changed, 21 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfexport/data/math-runs.rtf b/sw/qa/extras/rtfexport/data/math-runs.rtf new file mode 100644 index 000000000000..7a4ae2dc5ea1 --- /dev/null +++ b/sw/qa/extras/rtfexport/data/math-runs.rtf @@ -0,0 +1,12 @@ +{\rtf1
+{\mmath
+{\*\moMath
+{\rtlch\fcs1 \af31507 \ltrch\fcs0 \i\loch\af34\hich\af34\dbch\af31505\insrsid7024409 \{\hich\af34\dbch\af31505\loch\f34
+{\mr\mscr0\msty2
+[]()}
+}
+{\rtlch\fcs1 \af31507 \ltrch\fcs0 \i\f34\insrsid7024409 \}}
+}
+}
+\par
+}
diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx index 7cf93df6bee3..ca72d9b408b1 100644 --- a/sw/qa/extras/rtfexport/rtfexport.cxx +++ b/sw/qa/extras/rtfexport/rtfexport.cxx @@ -67,6 +67,7 @@ public: void testMathSepchr(); void testMathSubscripts(); void testMathVerticalstacks(); + void testMathRuns(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -96,6 +97,7 @@ public: CPPUNIT_TEST(testMathSepchr); CPPUNIT_TEST(testMathSubscripts); CPPUNIT_TEST(testMathVerticalstacks); + CPPUNIT_TEST(testMathRuns); #endif #endif CPPUNIT_TEST_SUITE_END(); @@ -397,6 +399,13 @@ void Test::testMathVerticalstacks() CPPUNIT_ASSERT_EQUAL(OUString("stack { a # stack { b # c } }"), getFormula(getRun(getParagraph(4), 1))); } +void Test::testMathRuns() +{ + roundtrip("math-runs.rtf"); + // was [](){}, i.e. first curly bracket had an incorrect position + CPPUNIT_ASSERT_EQUAL(OUString("\\{ left [ right ] left ( right ) \\}"), getFormula(getRun(getParagraph(1), 1))); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); |