summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorDowwdyJ <joeldowdy12@gmail.com>2023-02-16 04:27:40 +0000
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-02-21 12:11:06 +0000
commitac0e3e11d14d31b66e0f9a08f96d0233ec55951d (patch)
treedd184643626fc6372873bd832f2b799967955519 /starmath
parent00194781efcafa231ac53ba26c84e2df847cf5e7 (diff)
tdf#152850: Fix bad scoping of MathML frac command
Change-Id: I4f5d0290e522fa6f3faccd26f74540abf848629b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147153 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/qa/extras/mmlimport-test.cxx18
-rw-r--r--starmath/source/visitors.cxx4
2 files changed, 12 insertions, 10 deletions
diff --git a/starmath/qa/extras/mmlimport-test.cxx b/starmath/qa/extras/mmlimport-test.cxx
index 0f80f375acea..d6411f8ff406 100644
--- a/starmath/qa/extras/mmlimport-test.cxx
+++ b/starmath/qa/extras/mmlimport-test.cxx
@@ -160,17 +160,19 @@ void Test::testtdf99556()
void Test::testTdf103430()
{
loadURL(m_directories.getURLFromSrc(u"starmath/qa/extras/data/tdf103430.mml"));
- CPPUNIT_ASSERT_EQUAL(OUString("frac { { nitalic d ^ 2 nitalic color blue y } } { { color dvip "
- "apricot nitalic d font sans bold italic color red x } }"),
- mxDocShell->GetText());
+ CPPUNIT_ASSERT_EQUAL(
+ OUString("{ frac { { nitalic d ^ 2 nitalic color blue y } } { { color dvip "
+ "apricot nitalic d font sans bold italic color red x } } }"),
+ mxDocShell->GetText());
}
void Test::testTdf103500()
{
loadURL(m_directories.getURLFromSrc(u"starmath/qa/extras/data/tdf103500.mml"));
- CPPUNIT_ASSERT_EQUAL(OUString("{ { int csup b csub a { frac { 1 } { x } ` nitalic d x } } = { "
- "intd csup b csub a { frac { 1 } { y } ` nitalic d y } } }"),
- mxDocShell->GetText());
+ CPPUNIT_ASSERT_EQUAL(
+ OUString("{ { int csup b csub a { { frac { 1 } { x } } ` nitalic d x } } = { "
+ "intd csup b csub a { { frac { 1 } { y } } ` nitalic d y } } }"),
+ mxDocShell->GetText());
}
void Test::testTdf137008()
@@ -200,8 +202,8 @@ void Test::testMathmlEntities()
}
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
-}
+} // namespace
CPPUNIT_PLUGIN_IMPLEMENT();
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/starmath/source/visitors.cxx b/starmath/source/visitors.cxx
index 6efe9936b948..42257925d38e 100644
--- a/starmath/source/visitors.cxx
+++ b/starmath/source/visitors.cxx
@@ -2305,11 +2305,11 @@ void SmNodeToTextVisitor::Visit( SmBinVerNode* pNode )
} else{
SmNode *pNum = pNode->GetSubNode( 0 ),
*pDenom = pNode->GetSubNode( 2 );
- Append(u"frac {");
+ Append(u"{ frac {");
LineToText( pNum );
Append(u"} {");
LineToText( pDenom );
- Append(u"}");
+ Append(u"} }");
}
}