Kaydet (Commit) f533b3f3 authored tarafından Takeshi Abe's avatar Takeshi Abe

tdf#103500 Import stretchy integral symbol from MathML

as "intd".

Change-Id: Ic8a4feef7a3a19c8ed5bca2f09f80901e2b6d343
Reviewed-on: https://gerrit.libreoffice.org/30953Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarTakeshi Abe <tabe@fixedpoint.jp>
üst 8d613870
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<mrow>
<munderover>
<mo stretchy="false">∫</mo>
<mi>a</mi>
<mi>b</mi>
</munderover>
<mrow>
<mfrac>
<mn>1</mn>
<mi>x</mi>
</mfrac>
<mspace width="0.5em"/>
<mstyle mathvariant="normal">
<mi mathvariant="normal">d</mi>
</mstyle>
<mi>x</mi>
</mrow>
</mrow>
<mo stretchy="false">=</mo>
<mrow>
<munderover>
<mo stretchy="true">∫</mo>
<mi>a</mi>
<mi>b</mi>
</munderover>
<mrow>
<mfrac>
<mn>1</mn>
<mi>y</mi>
</mfrac>
<mspace width="0.5em"/>
<mstyle mathvariant="normal">
<mi mathvariant="normal">d</mi>
</mstyle>
<mi>y</mi>
</mrow>
</mrow>
</mrow>
</math>
......@@ -34,6 +34,7 @@ public:
void testMaction();
void testMspace();
void testtdf99556();
void testTdf103500();
CPPUNIT_TEST_SUITE(Test);
CPPUNIT_TEST(testSimple);
......@@ -41,6 +42,7 @@ public:
CPPUNIT_TEST(testMaction);
CPPUNIT_TEST(testMspace);
CPPUNIT_TEST(testtdf99556);
CPPUNIT_TEST(testTdf103500);
CPPUNIT_TEST_SUITE_END();
private:
......@@ -120,6 +122,13 @@ void Test::testtdf99556()
CPPUNIT_ASSERT_EQUAL_MESSAGE("loaded text", sExpected, mxDocShell->GetText());
}
void Test::testTdf103500()
{
loadURL(m_directories.getURLFromSrc("starmath/qa/extras/data/tdf103500.mml"));
CPPUNIT_ASSERT_EQUAL(OUString("{{ int csub a csup b {1 over x ` d x}} = {intd csub a csup b {1 over y ` d y}}}"),
mxDocShell->GetText());
}
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
......
......@@ -2447,7 +2447,11 @@ void SmMathSymbolNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
void SmMathSymbolNode::CreateTextFromNode(OUString &rText)
{
OUString sStr;
MathType::LookupChar(GetToken().cMathChar, sStr, 3);
sal_Unicode cChar = GetToken().cMathChar;
if (cChar == MS_INT && GetScaleMode() == SCALE_HEIGHT)
sStr = "intd ";
else
MathType::LookupChar(cChar, sStr, 3);
rText += sStr;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment