diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2016-08-29 16:24:01 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2016-08-30 00:41:17 +0000 |
commit | 1f46cbf32a668e80f520d27093f56d6b61550852 (patch) | |
tree | 87618f130315e3fa239a43229884b56fb297ee68 | |
parent | 163bb0a6527fdd3c16da3afcff8ab4d7c8f8921a (diff) |
VisitChildren() only for SmStructureNode
Change-Id: I94167dd1b37198eab8e1f92049c094ac7a29e31f
Reviewed-on: https://gerrit.libreoffice.org/28455
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
-rw-r--r-- | starmath/qa/cppunit/mock-visitor.hxx | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/starmath/qa/cppunit/mock-visitor.hxx b/starmath/qa/cppunit/mock-visitor.hxx index aa1639ee7519..5c7c7af08884 100644 --- a/starmath/qa/cppunit/mock-visitor.hxx +++ b/starmath/qa/cppunit/mock-visitor.hxx @@ -105,43 +105,36 @@ public: void Visit( SmPlaceNode* pNode ) override { CPPUNIT_ASSERT_EQUAL_MESSAGE("SmPlaceNode should have type NPLACE", NPLACE, pNode->GetType()); - VisitChildren( pNode ); } void Visit( SmTextNode* pNode ) override { CPPUNIT_ASSERT_EQUAL_MESSAGE("SmTextNode should have type NTEXT", NTEXT, pNode->GetType()); - VisitChildren( pNode ); } void Visit( SmSpecialNode* pNode ) override { CPPUNIT_ASSERT_EQUAL_MESSAGE("SmSpecialNode should have type NSPECIAL", NSPECIAL, pNode->GetType()); - VisitChildren( pNode ); } void Visit( SmGlyphSpecialNode* pNode ) override { CPPUNIT_ASSERT_EQUAL_MESSAGE("SmGlyphSpecialNode should have type NGLYPH_SPECIAL", NGLYPH_SPECIAL, pNode->GetType()); - VisitChildren( pNode ); } void Visit( SmMathSymbolNode* pNode ) override { CPPUNIT_ASSERT_MESSAGE("SmMathSymbolNode should have type NMATH or NMATHIDENT", pNode->GetType() == NMATH || pNode->GetType() == NMATHIDENT); - VisitChildren( pNode ); } void Visit( SmBlankNode* pNode ) override { CPPUNIT_ASSERT_EQUAL_MESSAGE("SmBlankNode should have type NBLANK", NBLANK, pNode->GetType()); - VisitChildren( pNode ); } void Visit( SmErrorNode* pNode ) override { CPPUNIT_ASSERT_EQUAL_MESSAGE("SmErrorNode should have type NERROR", NERROR, pNode->GetType()); - VisitChildren( pNode ); } void Visit( SmLineNode* pNode ) override { @@ -159,7 +152,6 @@ public: void Visit( SmPolyLineNode* pNode ) override { CPPUNIT_ASSERT_EQUAL_MESSAGE("SmPolyLineNode should have type NPOLYLINE", NPOLYLINE, pNode->GetType()); - VisitChildren( pNode ); } void Visit( SmRootNode* pNode ) override { @@ -171,7 +163,6 @@ public: void Visit( SmRootSymbolNode* pNode ) override { CPPUNIT_ASSERT_EQUAL_MESSAGE("SmRootSymbolNode should have type NROOTSYMBOL", NROOTSYMBOL, pNode->GetType()); - VisitChildren( pNode ); } void Visit( SmDynIntegralNode* pNode ) override { @@ -183,13 +174,11 @@ public: void Visit( SmDynIntegralSymbolNode* pNode ) override { CPPUNIT_ASSERT_EQUAL_MESSAGE("SmDynIntegralSymbolNode should have type NDYNINTSYMBOL", NDYNINTSYMBOL, pNode->GetType()); - VisitChildren( pNode ); } void Visit( SmRectangleNode* pNode ) override { CPPUNIT_ASSERT_EQUAL_MESSAGE("SmRectangleNode should have type NRECTANGLE", NRECTANGLE, pNode->GetType()); - VisitChildren( pNode ); } void Visit( SmVerticalBraceNode* pNode ) override { @@ -200,7 +189,7 @@ public: private: /** Auxiliary method for visiting the children of a pNode */ - void VisitChildren( SmNode* pNode ) { + void VisitChildren( SmStructureNode* pNode ) { SmNodeIterator it( pNode ); while( it.Next() ) it->Accept( this ); |