starmath/qa/extras/mmlimport-test.cxx | 6 +++--- starmath/source/node.cxx | 9 ++------- 2 files changed, 5 insertions(+), 10 deletions(-)
New commits: commit 9fbf4fd5292f6a3c28a092f7bb02541ceb61351f Author: Takeshi Abe <[email protected]> Date: Sun Aug 9 23:08:28 2015 +0900 Related: tdf#75171 wrong "italic" happens on importing MathML As of 4f294a90877d2f91bb88c7d6cd5b74e8e546a025, a SmTextNode can be the sole child of a SmLineNode without being wrapped in a SmExpressionNode. Change-Id: I3779eb90e216a70566c1151a9b8cb91a9fa36519 Reviewed-on: https://gerrit.libreoffice.org/17613 Reviewed-by: Regina Henschel <[email protected]> Tested-by: Jenkins <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/starmath/qa/extras/mmlimport-test.cxx b/starmath/qa/extras/mmlimport-test.cxx index 3effb31..d0cccd7 100644 --- a/starmath/qa/extras/mmlimport-test.cxx +++ b/starmath/qa/extras/mmlimport-test.cxx @@ -85,21 +85,21 @@ void Test::tearDown() void Test::testSimple() { loadURL(getURLFromSrc("starmath/qa/extras/data/simple.mml")); - OUString sExpected("left ( {italic \"a\" + italic \"b\"} right )^italic \"2\""); + OUString sExpected("left ( {a + b} right )^2"); CPPUNIT_ASSERT_EQUAL_MESSAGE("loaded text", sExpected, mxDocShell->GetText()); } void Test::testNsPrefixMath() { loadURL(getURLFromSrc("starmath/qa/extras/data/ns-prefix-math.mml")); - OUString sExpected("left ( {italic \"a\" + italic \"b\"} right )^italic \"2\""); + OUString sExpected("left ( {a + b} right )^2"); CPPUNIT_ASSERT_EQUAL_MESSAGE("loaded text", sExpected, mxDocShell->GetText()); } void Test::testMaction() { loadURL(getURLFromSrc("starmath/qa/extras/data/maction.mml")); - OUString sExpected("matrix {italic \"1\" ## italic \"2\" ## italic \"3\"}"); + OUString sExpected("matrix {1 ## 2 ## 3}"); CPPUNIT_ASSERT_EQUAL_MESSAGE("loaded text", sExpected, mxDocShell->GetText()); } diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx index 9e66810..f8a7ae1 100644 --- a/starmath/source/node.cxx +++ b/starmath/source/node.cxx @@ -2367,13 +2367,8 @@ void SmTextNode::CreateTextFromNode(OUString &rText) (pResult->GetNumSubNodes() == 1) ) { pResult = pResult->GetSubNode(0); - if ( (pResult->GetType() == NEXPRESSION) && - (pResult->GetNumSubNodes() == 1) ) - { - pResult = pResult->GetSubNode(0); - if (pResult->GetType() == NTEXT) - bQuoted=false; - } + if (pResult->GetType() == NTEXT) + bQuoted=false; } } delete pTable;
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
