starmath: Reenable a test case for SmNodeToTextVisitor
by fixing a regression which seems introduced at
4f294a9087
.
Change-Id: If47f7528f5b5fd04432da134f345d69c25a1ca77
Reviewed-on: https://gerrit.libreoffice.org/32665
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
This commit is contained in:
@@ -228,7 +228,7 @@ void Test::SimpleOperators()
|
|||||||
parseandparseagain("coprod{a}", "Coproduct");
|
parseandparseagain("coprod{a}", "Coproduct");
|
||||||
parseandparseagain("int from {r_0} to {r_t} a", "Upper and lower bounds shown with integral (from & to)");
|
parseandparseagain("int from {r_0} to {r_t} a", "Upper and lower bounds shown with integral (from & to)");
|
||||||
ParseAndCheck("int csup {r_0} csub {r_t} a", "int csup { r _ 0 } csub { r _ t } a ", "Upper and lower bounds shown with integral (csub & csup)");
|
ParseAndCheck("int csup {r_0} csub {r_t} a", "int csup { r _ 0 } csub { r _ t } a ", "Upper and lower bounds shown with integral (csub & csup)");
|
||||||
//FIXME ParseAndCheck("sum csup { size 8 { x - 1 } } csub { size 8 a } b ", "sum csup { size 8 { x - 1 } } csub { size 8 a } b ", "Sum with sized upper and lower bounds");
|
ParseAndCheck("sum csup { size 8 { x - 1 } } csub { size 8 a } b ", "sum csup { size 8 { x - 1 } } csub { size 8 a } b ", "Sum with sized upper and lower bounds");
|
||||||
parseandparseagain("int{a}", "Integral");
|
parseandparseagain("int{a}", "Integral");
|
||||||
parseandparseagain("intd_{1}^{2}{x dx}", "Dynamically-sized integral");
|
parseandparseagain("intd_{1}^{2}{x dx}", "Dynamically-sized integral");
|
||||||
parseandparseagain("iint{a}", "Double integral");
|
parseandparseagain("iint{a}", "Double integral");
|
||||||
|
@@ -2189,16 +2189,22 @@ void SmNodeToTextVisitor::Visit( SmUnHorNode* pNode )
|
|||||||
|
|
||||||
void SmNodeToTextVisitor::Visit( SmBinHorNode* pNode )
|
void SmNodeToTextVisitor::Visit( SmBinHorNode* pNode )
|
||||||
{
|
{
|
||||||
|
const SmNode *pParent = pNode->GetParent();
|
||||||
|
bool bBraceNeeded = pParent && pParent->GetType() == NFONT;
|
||||||
SmNode *pLeft = pNode->LeftOperand(),
|
SmNode *pLeft = pNode->LeftOperand(),
|
||||||
*pOper = pNode->Symbol(),
|
*pOper = pNode->Symbol(),
|
||||||
*pRight = pNode->RightOperand();
|
*pRight = pNode->RightOperand();
|
||||||
Separate( );
|
Separate( );
|
||||||
|
if (bBraceNeeded)
|
||||||
|
Append( "{ " );
|
||||||
pLeft->Accept( this );
|
pLeft->Accept( this );
|
||||||
Separate( );
|
Separate( );
|
||||||
pOper->Accept( this );
|
pOper->Accept( this );
|
||||||
Separate( );
|
Separate( );
|
||||||
pRight->Accept( this );
|
pRight->Accept( this );
|
||||||
Separate( );
|
Separate( );
|
||||||
|
if (bBraceNeeded)
|
||||||
|
Append( "} " );
|
||||||
}
|
}
|
||||||
|
|
||||||
void SmNodeToTextVisitor::Visit( SmBinVerNode* pNode )
|
void SmNodeToTextVisitor::Visit( SmBinVerNode* pNode )
|
||||||
|
Reference in New Issue
Block a user