summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2016-09-25 19:56:52 +0900
committerKhaled Hosny <khaledhosny@eglug.org>2016-09-29 20:13:26 +0000
commit663e26f24f1fa1abadc37838983bebd7407d65f8 (patch)
tree27217b4520199f2fb3eff00d3c02b223563cad44
parent38d61128467aedc2935443be21c38168f5e00df6 (diff)
tdf#53472, tdf#102268: Reimplement "intd"
This reverts its original implementation introduced with 93e6291c29d547c0c29c6e43b2ca4b36a3e8506f partially, and improves the patch proposed at 746633bd0315939fd5e0b50c90692d356d2ed678 (but reverted at e265ea36df02310881e959a031b74578b323bfa5). Change-Id: If0aa5b985cac45a1cd9ea87bae293243af9d12b2 Reviewed-on: https://gerrit.libreoffice.org/29271 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
-rw-r--r--starmath/inc/node.hxx73
-rw-r--r--starmath/inc/visitors.hxx12
-rw-r--r--starmath/qa/cppunit/mock-visitor.hxx11
-rw-r--r--starmath/qa/cppunit/test_nodetotextvisitors.cxx1
-rw-r--r--starmath/source/mathmlexport.cxx24
-rw-r--r--starmath/source/mathmlexport.hxx1
-rw-r--r--starmath/source/mathtype.hxx2
-rw-r--r--starmath/source/node.cxx94
-rw-r--r--starmath/source/parse.cxx13
-rw-r--r--starmath/source/visitors.cxx95
10 files changed, 25 insertions, 301 deletions
diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx
index bd92aa86b41a..61a8c4225850 100644
--- a/starmath/inc/node.hxx
+++ b/starmath/inc/node.hxx
@@ -98,7 +98,7 @@ enum SmNodeType
/*10*/ NBINDIAGONAL, NSUBSUP, NMATRIX, NPLACE, NTEXT,
/*15*/ NSPECIAL, NGLYPH_SPECIAL, NMATH, NBLANK, NERROR,
/*20*/ NLINE, NEXPRESSION, NPOLYLINE, NROOT, NROOTSYMBOL,
-/*25*/ NRECTANGLE, NVERTICAL_BRACE, NMATHIDENT, NDYNINT, NDYNINTSYMBOL
+/*25*/ NRECTANGLE, NVERTICAL_BRACE, NMATHIDENT
};
@@ -545,29 +545,6 @@ public:
};
-/** Dynamic Integral symbol node
- *
- * Node for drawing dynamically sized integral symbols.
- *
- * TODO: It might be created a parent class SmDynamicSizedNode
- (for both dynamic integrals, roots and other dynamic symbols)
-
- */
-class SmDynIntegralSymbolNode : public SmMathSymbolNode
-{
-
-
-public:
- explicit SmDynIntegralSymbolNode(const SmToken &rNodeToken)
- : SmMathSymbolNode(NDYNINTSYMBOL, rNodeToken)
- {}
-
- virtual void AdaptToY(OutputDevice &rDev, sal_uLong nHeight) override;
-
- void Accept(SmVisitor* pVisitor) override;
-};
-
-
/** Place node
*
* Used to create the <?> command, that denotes place where something can be
@@ -740,33 +717,6 @@ public:
};
-/** Dynamic Integral node
- *
- * Used to create Dynamically sized integrals
- *
- * Children:<BR>
- * 0: Symbol (instance of DynIntegralSymbolNode)<BR>
- * 1: Body<BR>
- */
-class SmDynIntegralNode : public SmStructureNode
-{
-public:
- explicit SmDynIntegralNode(const SmToken &rNodeToken)
- : SmStructureNode(NDYNINT, rNodeToken, 2)
- {
- }
-
- virtual void Arrange(OutputDevice &rDev, const SmFormat &rFormat) override;
- void CreateTextFromNode(OUString &rText) override;
- void Accept(SmVisitor* pVisitor) override;
-
- SmDynIntegralSymbolNode* Symbol();
- const SmDynIntegralSymbolNode* Symbol() const;
- SmNode* Body();
- const SmNode* Body() const;
-};
-
-
/** Binary horizontal node
*
* This node is used for binary operators. In a formula such as "A + B".
@@ -1219,27 +1169,6 @@ inline const SmNode* SmRootNode::Body() const
}
-inline SmDynIntegralSymbolNode* SmDynIntegralNode::Symbol()
-{
- assert( GetNumSubNodes() == 2 );
- assert( GetSubNode( 0 )->GetType() == NDYNINTSYMBOL );
- return static_cast< SmDynIntegralSymbolNode* >( GetSubNode( 0 ));
-}
-inline const SmDynIntegralSymbolNode* SmDynIntegralNode::Symbol() const
-{
- return const_cast< SmDynIntegralNode* >( this )->Symbol();
-}
-inline SmNode* SmDynIntegralNode::Body()
-{
- assert( GetNumSubNodes() == 2 );
- return GetSubNode( 1 );
-}
-inline const SmNode* SmDynIntegralNode::Body() const
-{
- return const_cast< SmDynIntegralNode* >( this )->Body();
-}
-
-
inline SmNode* SmBinHorNode::Symbol()
{
assert( GetNumSubNodes() == 3 );
diff --git a/starmath/inc/visitors.hxx b/starmath/inc/visitors.hxx
index 3a1a0c0a6bb9..cde5fce2b8e7 100644
--- a/starmath/inc/visitors.hxx
+++ b/starmath/inc/visitors.hxx
@@ -47,8 +47,6 @@ public:
virtual void Visit( SmLineNode* pNode ) = 0;
virtual void Visit( SmExpressionNode* pNode ) = 0;
virtual void Visit( SmPolyLineNode* pNode ) = 0;
- virtual void Visit( SmDynIntegralNode* pNode ) = 0;
- virtual void Visit( SmDynIntegralSymbolNode* pNode ) = 0;
virtual void Visit( SmRootNode* pNode ) = 0;
virtual void Visit( SmRootSymbolNode* pNode ) = 0;
virtual void Visit( SmRectangleNode* pNode ) = 0;
@@ -94,8 +92,6 @@ public:
void Visit( SmPolyLineNode* pNode ) override;
void Visit( SmRootNode* pNode ) override;
void Visit( SmRootSymbolNode* pNode ) override;
- void Visit( SmDynIntegralNode* pNode ) override;
- void Visit( SmDynIntegralSymbolNode* pNode ) override;
void Visit( SmRectangleNode* pNode ) override;
void Visit( SmVerticalBraceNode* pNode ) override;
protected:
@@ -201,8 +197,6 @@ public:
void Visit( SmPolyLineNode* pNode ) override;
void Visit( SmRootNode* pNode ) override;
void Visit( SmRootSymbolNode* pNode ) override;
- void Visit( SmDynIntegralNode* pNode ) override;
- void Visit( SmDynIntegralSymbolNode* pNode ) override;
void Visit( SmRectangleNode* pNode ) override;
void Visit( SmVerticalBraceNode* pNode ) override;
private:
@@ -320,8 +314,6 @@ public:
void Visit( SmPolyLineNode* pNode ) override;
void Visit( SmRootNode* pNode ) override;
void Visit( SmRootSymbolNode* pNode ) override;
- void Visit( SmDynIntegralNode* pNode ) override;
- void Visit( SmDynIntegralSymbolNode* pNode ) override;
void Visit( SmRectangleNode* pNode ) override;
void Visit( SmVerticalBraceNode* pNode ) override;
SmCaretPosGraph* takeGraph()
@@ -369,8 +361,6 @@ public:
void Visit( SmPolyLineNode* pNode ) override;
void Visit( SmRootNode* pNode ) override;
void Visit( SmRootSymbolNode* pNode ) override;
- void Visit( SmDynIntegralNode* pNode ) override;
- void Visit( SmDynIntegralSymbolNode* pNode ) override;
void Visit( SmRectangleNode* pNode ) override;
void Visit( SmVerticalBraceNode* pNode ) override;
/** Clone a pNode */
@@ -443,8 +433,6 @@ public:
void Visit( SmPolyLineNode* pNode ) override;
void Visit( SmRootNode* pNode ) override;
void Visit( SmRootSymbolNode* pNode ) override;
- void Visit( SmDynIntegralNode* pNode ) override;
- void Visit( SmDynIntegralSymbolNode* pNode ) override;
void Visit( SmRectangleNode* pNode ) override;
void Visit( SmVerticalBraceNode* pNode ) override;
private:
diff --git a/starmath/qa/cppunit/mock-visitor.hxx b/starmath/qa/cppunit/mock-visitor.hxx
index 2c7f6bf77efc..b3ed74803cbe 100644
--- a/starmath/qa/cppunit/mock-visitor.hxx
+++ b/starmath/qa/cppunit/mock-visitor.hxx
@@ -165,17 +165,6 @@ public:
NROOTSYMBOL, pNode->GetType());
}
- void Visit( SmDynIntegralNode* pNode ) override {
- CPPUNIT_ASSERT_EQUAL_MESSAGE("SmDynIntegralNode should have type NDYNINT",
- NDYNINT, pNode->GetType());
- VisitChildren( pNode );
- }
-
- void Visit( SmDynIntegralSymbolNode* pNode ) override {
- CPPUNIT_ASSERT_EQUAL_MESSAGE("SmDynIntegralSymbolNode should have type NDYNINTSYMBOL",
- NDYNINTSYMBOL, pNode->GetType());
- }
-
void Visit( SmRectangleNode* pNode ) override {
CPPUNIT_ASSERT_EQUAL_MESSAGE("SmRectangleNode should have type NRECTANGLE",
NRECTANGLE, pNode->GetType());
diff --git a/starmath/qa/cppunit/test_nodetotextvisitors.cxx b/starmath/qa/cppunit/test_nodetotextvisitors.cxx
index ffa3f599f932..8b1e2153cb94 100644
--- a/starmath/qa/cppunit/test_nodetotextvisitors.cxx
+++ b/starmath/qa/cppunit/test_nodetotextvisitors.cxx
@@ -230,6 +230,7 @@ void Test::SimpleOperators()
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");
parseandparseagain("int{a}", "Integral");
+ parseandparseagain("intd_{1}^{2}{x dx}", "Dynamically-sized integral");
parseandparseagain("iint{a}", "Double integral");
parseandparseagain("iiint{a}", "Triple integral");
parseandparseagain("sum from{3}b", "Lower bound shown with summation symbol");
diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx
index 2aab22693fa4..8a12511a1971 100644
--- a/starmath/source/mathmlexport.cxx
+++ b/starmath/source/mathmlexport.cxx
@@ -811,11 +811,6 @@ void SmXMLExport::ExportMath(const SmNode *pNode, int /*nLevel*/)
AddAttribute(XML_NAMESPACE_MATH, XML_MATHVARIANT, XML_NORMAL);
pMath = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MI, true, false);
}
- else if (pNode->GetType() == NDYNINTSYMBOL)
- {
- AddAttribute(XML_NAMESPACE_MATH, XML_STRETCHY, XML_TRUE);
- pMath = new SvXMLElementExport(*this, XML_NAMESPACE_MATH, XML_MO, true, false);
- }
else
{
// Export NMATHIDENT and NPLACE symbols as <mi> elements:
@@ -1461,13 +1456,6 @@ void SmXMLExport::ExportMatrix(const SmNode *pNode, int nLevel)
}
}
-void SmXMLExport::ExportDynIntegral(const SmDynIntegralNode *pNode, int nLevel)
-{
- SvXMLElementExport aRow(*this, XML_NAMESPACE_MATH, XML_MROW, true, true);
- ExportNodes(pNode->Symbol(), nLevel+1);
- ExportNodes(pNode->Body(), nLevel+1);
-}
-
void SmXMLExport::ExportNodes(const SmNode *pNode, int nLevel)
{
if (!pNode)
@@ -1503,6 +1491,14 @@ void SmXMLExport::ExportNodes(const SmNode *pNode, int nLevel)
}
else
{
+ switch (pNode->GetToken().eType)
+ {
+ case TINTD:
+ AddAttribute(XML_NAMESPACE_MATH, XML_STRETCHY, XML_TRUE);
+ break;
+ default:
+ break;
+ }
//To fully handle generic MathML we need to implement the full
//operator dictionary, we will generate MathML with explicit
//stretchiness for now.
@@ -1532,7 +1528,6 @@ void SmXMLExport::ExportNodes(const SmNode *pNode, int nLevel)
case NSPECIAL: //NSPECIAL requires some sort of Entity preservation in the XML engine.
case NMATHIDENT :
case NPLACE:
- case NDYNINTSYMBOL:
ExportMath(pNode, nLevel);
break;
case NBINHOR:
@@ -1574,9 +1569,6 @@ void SmXMLExport::ExportNodes(const SmNode *pNode, int nLevel)
case NBLANK:
ExportBlank(pNode, nLevel);
break;
- case NDYNINT:
- ExportDynIntegral(static_cast<const SmDynIntegralNode *>(pNode), nLevel);
- break;
default:
SAL_WARN("starmath", "Warning: failed to export a node?");
break;
diff --git a/starmath/source/mathmlexport.hxx b/starmath/source/mathmlexport.hxx
index 19a29cb35ef7..4581db8f6cf1 100644
--- a/starmath/source/mathmlexport.hxx
+++ b/starmath/source/mathmlexport.hxx
@@ -92,7 +92,6 @@ protected:
void ExportVerticalBrace(const SmVerticalBraceNode *pNode, int nLevel);
void ExportMatrix(const SmNode *pNode, int nLevel);
void ExportBlank(const SmNode *pNode, int nLevel);
- void ExportDynIntegral(const SmDynIntegralNode *pNode, int nLevel);
public:
SmXMLExport(
diff --git a/starmath/source/mathtype.hxx b/starmath/source/mathtype.hxx
index 8e25570383ec..6bf40f828724 100644
--- a/starmath/source/mathtype.hxx
+++ b/starmath/source/mathtype.hxx
@@ -188,7 +188,7 @@ private:
tmANGLE,tmPAREN,tmBRACE,tmBRACK,tmBAR,tmDBAR,tmFLOOR,tmCEILING,
tmLBLB,tmRBRB,tmRBLB,tmLBRP,tmLPRB,tmROOT,tmFRACT,tmSCRIPT,tmUBAR,
tmOBAR,tmLARROW,tmRARROW,tmBARROW,tmSINT,tmDINT,tmTINT,tmSSINT,
- tmDSINT,tmTSINT,tmUHBRACE,tmLHBRACE,tmSUM,tmTINTD
+ tmDSINT,tmTSINT,tmUHBRACE,tmLHBRACE,tmSUM
};
public:
static bool LookupChar(sal_Unicode nChar,OUString &rRet,
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index efd26e70b0fa..e6ee8834d5c9 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -775,53 +775,6 @@ void SmRootNode::CreateTextFromNode(OUString &rText)
/**************************************************************************/
-void SmDynIntegralNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
-{
- SmNode *pDynIntegralSym = Symbol(),
- *pBody = Body();
- assert(pDynIntegralSym);
- assert(pBody);
-
- pBody->Arrange(rDev, rFormat);
-
- long nHeight = pBody->GetHeight();
- pDynIntegralSym->AdaptToY(rDev, nHeight);
-
- pDynIntegralSym->Arrange(rDev, rFormat);
-
- Point aPos = pDynIntegralSym->AlignTo(*pBody, RectPos::Left, RectHorAlign::Center, RectVerAlign::Baseline);
- //! override calculated vertical position
- aPos.Y() = pDynIntegralSym->GetTop() + pBody->GetBottom() - pDynIntegralSym->GetBottom();
- pDynIntegralSym->MoveTo(aPos);
-
-
- // override its own rectangle with pBody's
- SmRect::operator = (*pBody);
- // extends this rectangle with the symbol's one
- ExtendBy(*pDynIntegralSym, RectCopyMBL::This);
-
-}
-
-
-void SmDynIntegralNode::CreateTextFromNode(OUString &rText)
-{
-
- rText += "intd ";
- SmNode *pBody = Body();
-
- if (pBody->GetNumSubNodes() > 1)
- rText += "{ ";
-
- pBody->CreateTextFromNode(rText);
-
- if (pBody->GetNumSubNodes() > 1)
- rText += "} ";
-}
-
-
-/**************************************************************************/
-
-
void SmBinHorNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
{
SmNode *pLeft = LeftOperand(),
@@ -1663,30 +1616,33 @@ void SmOperNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
assert(pOper);
assert(pBody);
- //patch pBody->Arrange(rDev,rFormat);
- //patch long nHeight = pBody->GetHeight();
SmNode *pSymbol = GetSymbol();
pSymbol->SetSize(Fraction(CalcSymbolHeight(*pSymbol, rFormat),
pSymbol->GetFont().GetFontSize().Height()));
pBody->Arrange(rDev, rFormat);
+ bool bDynamicallySized = false;
+ if (pSymbol->GetToken().eType == TINTD)
+ {
+ long nBodyHeight = pBody->GetHeight();
+ long nFontHeight = pSymbol->GetFont().GetFontSize().Height();
+ if (nFontHeight < nBodyHeight)
+ {
+ pSymbol->SetSize(Fraction(nBodyHeight, nFontHeight));
+ bDynamicallySized = true;
+ }
+ }
pOper->Arrange(rDev, rFormat);
- //patch pSymbol->AdaptToY(rDev,nHeight);
- //patch pSymbol->Arrange(rDev, rFormat);
- //patch Point aPos= pSymbol->AlignTo(*pBody, RectPos::Left, RectHorAlign::Center, RectVerAlign::Mid);
- //patch aPos.Y() = pSymbol->GetTop()+pBody->GetBottom() - pSymbol->GetBottom();
- //patch pSymbol->MoveTo(aPos);
long nOrigHeight = GetFont().GetFontSize().Height(),
nDist = nOrigHeight
* rFormat.GetDistance(DIS_OPERATORSPACE) / 100L;
- Point aPos = pOper->AlignTo(*pBody, RectPos::Left, RectHorAlign::Center, /*RectVerAlign::CenterY*/RectVerAlign::Mid);
+ Point aPos = pOper->AlignTo(*pBody, RectPos::Left, RectHorAlign::Center, bDynamicallySized ? RectVerAlign::CenterY : RectVerAlign::Mid);
aPos.X() -= nDist;
pOper->MoveTo(aPos);
SmRect::operator = (*pBody);
- //patch ExtendBy(*pSymbol, RectCopyMBL::This);
ExtendBy(*pOper, RectCopyMBL::This);
}
@@ -2040,23 +1996,6 @@ void SmRootSymbolNode::AdaptToY(OutputDevice &rDev, sal_uLong nHeight)
/**************************************************************************/
-void SmDynIntegralSymbolNode::AdaptToY(OutputDevice &rDev, sal_uLong nHeight)
-{
- static const long nFactor = 12L;
-
- // The new height equals (1 + nFactor) * oldHeight
- // nFactor was chosen for keeping the integral sign from becoming too "fat".
- SmMathSymbolNode::AdaptToY(rDev, nHeight + nHeight / nFactor);
-
- // keep the ratio
- long nCurWidth = GetSize().Width();
- SmMathSymbolNode::AdaptToX(rDev, nCurWidth + nCurWidth / nFactor);
-}
-
-
-/**************************************************************************/
-
-
void SmRectangleNode::AdaptToX(OutputDevice &/*rDev*/, sal_uLong nWidth)
{
aToSize.Width() = nWidth;
@@ -2938,15 +2877,6 @@ void SmRootSymbolNode::Accept(SmVisitor* pVisitor) {
pVisitor->Visit(this);
}
-void SmDynIntegralNode::Accept(SmVisitor* pVisitor) {
- pVisitor->Visit(this);
-}
-
-
-void SmDynIntegralSymbolNode::Accept(SmVisitor* pVisitor) {
- pVisitor->Visit(this);
-}
-
void SmRectangleNode::Accept(SmVisitor* pVisitor) {
pVisitor->Visit(this);
}
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index 1a441e0e9759..f04b177bff32 100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -151,7 +151,7 @@ static const SmTokenTableEntry aTokenTable[] =
{ "infinity" , TINFINITY, MS_INFINITY, TG::Standalone, 5},
{ "infty" , TINFINITY, MS_INFINITY, TG::Standalone, 5},
{ "int", TINT, MS_INT, TG::Oper, 5},
- { "intd", TINTD, MS_INT, TG::UnOper, 5},
+ { "intd", TINTD, MS_INT, TG::Oper, 5},
{ "intersection", TINTERSECT, MS_INTERSECT, TG::Product, 0},
{ "ital", TITALIC, '\0', TG::FontAttr, 5},
{ "italic", TITALIC, '\0', TG::FontAttr, 5},
@@ -1600,6 +1600,7 @@ void SmParser::DoOper()
case TPROD :
case TCOPROD :
case TINT :
+ case TINTD :
case TIINT :
case TIIINT :
case TLINT :
@@ -1659,10 +1660,6 @@ void SmParser::DoUnOper()
{
case TABS :
case TSQRT :
- /* Dynamic integrals are handled as unary operators so we can wrap
- the symbol together with the body in a upper level node and make
- proper graphic arrangements */
- case TINTD:
NextToken();
break;
@@ -1723,12 +1720,6 @@ void SmParser::DoUnOper()
pOper = new SmRootSymbolNode(aNodeToken);
pSNode->SetSubNodes(pExtra, pOper, pArg);
}
- else if(eType == TINTD)
- {
- pSNode.reset(new SmDynIntegralNode(aNodeToken));
- pOper = new SmDynIntegralSymbolNode(aNodeToken);
- pSNode->SetSubNodes(pOper, pArg);
- }
else
{
pSNode.reset(new SmUnHorNode(aNodeToken));
diff --git a/starmath/source/visitors.cxx b/starmath/source/visitors.cxx
index 0c3b0caaef0e..d9de2bed20a2 100644
--- a/starmath/source/visitors.cxx
+++ b/starmath/source/visitors.cxx
@@ -141,16 +141,6 @@ void SmDefaultingVisitor::Visit( SmRootSymbolNode* pNode )
DefaultVisit( pNode );
}
-void SmDefaultingVisitor::Visit( SmDynIntegralNode* pNode )
-{
- DefaultVisit( pNode );
-}
-
-void SmDefaultingVisitor::Visit( SmDynIntegralSymbolNode* pNode )
-{
- DefaultVisit( pNode );
-}
-
void SmDefaultingVisitor::Visit( SmRectangleNode* pNode )
{
DefaultVisit( pNode );
@@ -393,11 +383,6 @@ void SmDrawingVisitor::Visit( SmRootNode* pNode )
DrawChildren( pNode );
}
-void SmDrawingVisitor::Visit(SmDynIntegralNode* pNode)
-{
- DrawChildren( pNode );
-}
-
void SmDrawingVisitor::Visit( SmVerticalBraceNode* pNode )
{
DrawChildren( pNode );
@@ -436,22 +421,6 @@ void SmDrawingVisitor::Visit( SmRootSymbolNode* pNode )
mrDev.DrawRect( aBar );
}
-void SmDrawingVisitor::Visit( SmDynIntegralSymbolNode* pNode )
-{
- if ( pNode->IsPhantom( ) )
- return;
-
- // draw integral-sign itself
- DrawSpecialNode( pNode );
-
- //! the rest of this may not be needed at all
-
- // this should be something like:
- // instead of just drawing the node, take some information about the body.
- // This is also how SmRootSymbol does it (probably by means of SmRootNode)
- // NEXT: Check out SmRootNode
-}
-
void SmDrawingVisitor::Visit( SmPolyLineNode* pNode )
{
if ( pNode->IsPhantom( ) )
@@ -1444,39 +1413,6 @@ void SmCaretPosGraphBuildingVisitor::Visit( SmRootNode* pNode )
}
-void SmCaretPosGraphBuildingVisitor::Visit( SmDynIntegralNode* pNode )
-{
- //! To be changed: Integrals don't have args.
- SmNode *pBody = pNode->Body(); //Body of the root
- assert(pBody);
-
- SmCaretPosGraphEntry *left,
- *right,
- *bodyLeft,
- *bodyRight;
-
- //Get left and save it
- assert(mpRightMost);
- left = mpRightMost;
-
- //Create body left
- bodyLeft = mpGraph->Add( SmCaretPos( pBody, 0 ), left );
- left->SetRight( bodyLeft );
-
- //Create right
- right = mpGraph->Add( SmCaretPos( pNode, 1 ) );
-
- //Visit body
- mpRightMost = bodyLeft;
- pBody->Accept( this );
- bodyRight = mpRightMost;
- bodyRight->SetRight( right );
- right->SetLeft( bodyRight );
-
- mpRightMost = right;
-}
-
-
/** Build SmCaretPosGraph for SmPlaceNode
* Consider this a single character.
*/
@@ -1621,12 +1557,6 @@ void SmCaretPosGraphBuildingVisitor::Visit( SmRootSymbolNode* )
//Do nothing
}
-void SmCaretPosGraphBuildingVisitor::Visit( SmDynIntegralSymbolNode* )
-{
- //Do nothing
-}
-
-
void SmCaretPosGraphBuildingVisitor::Visit( SmRectangleNode* )
{
//Do nothing
@@ -1870,20 +1800,6 @@ void SmCloningVisitor::Visit( SmRootSymbolNode* pNode )
CloneNodeAttr( pNode, pResult );
}
-void SmCloningVisitor::Visit( SmDynIntegralNode* pNode )
-{
- SmDynIntegralNode* pClone = new SmDynIntegralNode( pNode->GetToken( ) );
- CloneNodeAttr( pNode, pClone );
- CloneKids( pNode, pClone );
- pResult = pClone;
-}
-
-void SmCloningVisitor::Visit( SmDynIntegralSymbolNode* pNode )
-{
- pResult = new SmDynIntegralSymbolNode( pNode->GetToken( ) );
- CloneNodeAttr( pNode, pResult );
-}
-
void SmCloningVisitor::Visit( SmRectangleNode* pNode )
{
pResult = new SmRectangleNode( pNode->GetToken( ) );
@@ -2443,17 +2359,6 @@ void SmNodeToTextVisitor::Visit( SmRootSymbolNode* )
{
}
-void SmNodeToTextVisitor::Visit( SmDynIntegralNode* pNode )
-{
- SmNode *pBody = pNode->Body();
- Append( "intd" );
- LineToText( pBody );
-}
-
-void SmNodeToTextVisitor::Visit( SmDynIntegralSymbolNode* )
-{
-}
-
void SmNodeToTextVisitor::Visit( SmRectangleNode* )
{
}