diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2015-02-24 13:55:58 +0900 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-02-27 12:05:12 +0000 |
commit | fe43c9227bd77c6471126b2553820c14b4721d6f (patch) | |
tree | 58e3673e4189cbfee9dc00abc78142be27cd038b /starmath/qa/extras | |
parent | 543b432f132ef928216526854aa0df4d94b76dca (diff) |
starmath: render the selected subexpression of MathML's <maction>
... specified by the selection attribute.
For its expected behavior, see the section <maction> in MathML 1.01:
<http://www.w3.org/TR/REC-MathML/chap3_6.html#sec3.6.1>
Change-Id: I70c1b2cfe1afec730f3e67ba0938bbaf8ada8e23
Reviewed-on: https://gerrit.libreoffice.org/14600
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'starmath/qa/extras')
-rw-r--r-- | starmath/qa/extras/data/maction.mml | 10 | ||||
-rw-r--r-- | starmath/qa/extras/mmlimport-test.cxx | 9 |
2 files changed, 19 insertions, 0 deletions
diff --git a/starmath/qa/extras/data/maction.mml b/starmath/qa/extras/data/maction.mml new file mode 100644 index 000000000000..3650087999a1 --- /dev/null +++ b/starmath/qa/extras/data/maction.mml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<math xmlns="http://www.w3.org/1998/Math/MathML"> + <mrow> + <mtable> + <mtr><maction actiontype="toggle"><mn>1</mn><mn>0</mn><mn>0</mn></maction></mtr> + <mtr><maction actiontype="toggle" selection="2"><mn>0</mn><mn>2</mn><mn>0</mn></maction></mtr> + <mtr><maction actiontype="toggle" selection="3"><mn>0</mn><mn>0</mn><mn>3</mn></maction></mtr> + </mtable> + </mrow> +</math> diff --git a/starmath/qa/extras/mmlimport-test.cxx b/starmath/qa/extras/mmlimport-test.cxx index 2fbeda7928dc..adf80aabf7b2 100644 --- a/starmath/qa/extras/mmlimport-test.cxx +++ b/starmath/qa/extras/mmlimport-test.cxx @@ -30,9 +30,11 @@ public: virtual void tearDown() SAL_OVERRIDE; void testSimple(); + void testMaction(); CPPUNIT_TEST_SUITE(Test); CPPUNIT_TEST(testSimple); + CPPUNIT_TEST(testMaction); CPPUNIT_TEST_SUITE_END(); private: @@ -83,6 +85,13 @@ void Test::testSimple() loadURL(getURLFromSrc("starmath/qa/extras/data/simple.mml")); } +void Test::testMaction() +{ + loadURL(getURLFromSrc("starmath/qa/extras/data/maction.mml")); + OUString sExpected("matrix {italic \"1\" ## italic \"2\" ## italic \"3\"}"); + CPPUNIT_ASSERT_EQUAL_MESSAGE("loaded text", sExpected, mxDocShell->GetText()); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); } |