summaryrefslogtreecommitdiff
path: root/sw/qa/extras
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-07-27 16:47:07 +0200
committerMiklos Vajna <vmiklos@suse.cz>2012-07-27 17:28:09 +0200
commit2d422d868a717adf735ef45a6bf5e4af0efb1a0c (patch)
tree3c06698fc3300561e9b65579a134238f6b697f57 /sw/qa/extras
parentdba6b5151e26ea0bc88f8d30a70859fcbbd2e81f (diff)
SmOoxmlImport::handleR: escape brackets in math runs
Also remove the previous escaping that took care of RTF only. Change-Id: Ie9a019912f83a3f56ef52429855cd72cf2c8f463
Diffstat (limited to 'sw/qa/extras')
-rw-r--r--sw/qa/extras/ooxmlexport/data/math-escape.docxbin0 -> 13422 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx11
2 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/math-escape.docx b/sw/qa/extras/ooxmlexport/data/math-escape.docx
new file mode 100644
index 000000000000..e935a83f570e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/math-escape.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index c426c372c9ec..02f66a280144 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -41,12 +41,17 @@ public:
void testZoom();
void defaultTabStopNotInStyles();
void testFdo38244();
+ void testMathEscape();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
CPPUNIT_TEST(testZoom);
CPPUNIT_TEST(defaultTabStopNotInStyles);
CPPUNIT_TEST(testFdo38244);
+ // See rtfexport test on why this is blacklisted.
+#if !(__GNUC__ == 4 && __GNUC_MINOR__ == 4)
+ CPPUNIT_TEST(testMathEscape);
+#endif
#endif
CPPUNIT_TEST_SUITE_END();
@@ -159,6 +164,12 @@ void Test::testFdo38244()
CPPUNIT_ASSERT_EQUAL(true, bCaught);
}
+void Test::testMathEscape()
+{
+ roundtrip("math-escape.docx");
+ CPPUNIT_ASSERT_EQUAL(OUString("\\{ left [ right ] left ( right ) \\}"), getFormula(getRun(getParagraph(1), 1)));
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();