diff options
author | dante <dante19031999@gmail.com> | 2021-03-08 17:35:42 +0100 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-03-09 17:47:12 +0100 |
commit | 2dc105d9742814f9627d91232a47913ee105b103 (patch) | |
tree | 56f60d93ee955d694a8f4a7fede1aea17dfa890d | |
parent | 3dfe1df0f1084b06c7d4c95df387253b2e058cd6 (diff) |
Rename SmParser to SmParser5
Change-Id: I6983dd4c187fc7114546e87c66dc2c011fccd3e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112176
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | starmath/inc/parse5.hxx | 12 | ||||
-rw-r--r-- | starmath/qa/cppunit/test_cursor.cxx | 8 | ||||
-rw-r--r-- | starmath/qa/cppunit/test_node.cxx | 2 | ||||
-rw-r--r-- | starmath/qa/cppunit/test_nodetotextvisitors.cxx | 20 | ||||
-rw-r--r-- | starmath/qa/cppunit/test_parse.cxx | 4 | ||||
-rw-r--r-- | starmath/source/cursor.cxx | 2 | ||||
-rw-r--r-- | starmath/source/parse.cxx | 4 | ||||
-rw-r--r-- | starmath/source/parse5.cxx | 88 |
8 files changed, 70 insertions, 70 deletions
diff --git a/starmath/inc/parse5.hxx b/starmath/inc/parse5.hxx index 053202a56d10..1d312351fb36 100644 --- a/starmath/inc/parse5.hxx +++ b/starmath/inc/parse5.hxx @@ -25,7 +25,7 @@ #include "parsebase.hxx" -class SmParser : public AbstractSmParser +class SmParser5 : public AbstractSmParser { OUString m_aBufferString; SmToken m_aCurToken; @@ -45,8 +45,8 @@ class SmParser : public AbstractSmParser // pointer to System locale's CharClass, which is alive inside SM_MOD() const CharClass* m_pSysCC; - SmParser(const SmParser&) = delete; - SmParser& operator=(const SmParser&) = delete; + SmParser5(const SmParser5&) = delete; + SmParser5& operator=(const SmParser5&) = delete; // Moves between tokens inside starmath code. void NextToken(); @@ -94,8 +94,8 @@ class SmParser : public AbstractSmParser // end of grammar public: - SmParser(); - virtual ~SmParser(); + SmParser5(); + virtual ~SmParser5(); /** Parse rBuffer to formula tree */ std::unique_ptr<SmTableNode> Parse(const OUString& rBuffer); @@ -115,6 +115,6 @@ public: const std::set<OUString>& GetUsedSymbols() const { return m_aUsedSymbols; } }; -inline bool SmParser::TokenInGroup(TG nGroup) { return bool(m_aCurToken.nGroup & nGroup); } +inline bool SmParser5::TokenInGroup(TG nGroup) { return bool(m_aCurToken.nGroup & nGroup); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/starmath/qa/cppunit/test_cursor.cxx b/starmath/qa/cppunit/test_cursor.cxx index 720a885be3a3..1d5e5fad6d04 100644 --- a/starmath/qa/cppunit/test_cursor.cxx +++ b/starmath/qa/cppunit/test_cursor.cxx @@ -67,7 +67,7 @@ void Test::tearDown() void Test::testCopyPaste() { - auto xTree = SmParser().Parse("a * b + c"); + auto xTree = SmParser5().Parse("a * b + c"); xTree->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0); SmCursor aCursor(xTree.get(), xDocShRef.get()); @@ -89,7 +89,7 @@ void Test::testCopyPaste() void Test::testCopySelectPaste() { - auto xTree = SmParser().Parse("a * b + c"); + auto xTree = SmParser5().Parse("a * b + c"); xTree->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0); SmCursor aCursor(xTree.get(), xDocShRef.get()); @@ -115,7 +115,7 @@ void Test::testCopySelectPaste() void Test::testCutPaste() { - auto xTree = SmParser().Parse("a * b + c"); + auto xTree = SmParser5().Parse("a * b + c"); xTree->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0); SmCursor aCursor(xTree.get(), xDocShRef.get()); @@ -137,7 +137,7 @@ void Test::testCutPaste() void Test::testCutSelectPaste() { - auto xTree = SmParser().Parse("a * b + c"); + auto xTree = SmParser5().Parse("a * b + c"); xTree->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0); SmCursor aCursor(xTree.get(), xDocShRef.get()); diff --git a/starmath/qa/cppunit/test_node.cxx b/starmath/qa/cppunit/test_node.cxx index e543ac04027c..c51b86759879 100644 --- a/starmath/qa/cppunit/test_node.cxx +++ b/starmath/qa/cppunit/test_node.cxx @@ -64,7 +64,7 @@ void NodeTest::tearDown() void NodeTest::testTdf47813() { - SmParser aParser; + SmParser5 aParser; #define MATRIX "matrix {-2#33##4#-5##6,0#7}" auto pNodeA = aParser.Parse(MATRIX); auto pNodeC = aParser.Parse("alignc " MATRIX); diff --git a/starmath/qa/cppunit/test_nodetotextvisitors.cxx b/starmath/qa/cppunit/test_nodetotextvisitors.cxx index 70cc01512f92..5d1694197b30 100644 --- a/starmath/qa/cppunit/test_nodetotextvisitors.cxx +++ b/starmath/qa/cppunit/test_nodetotextvisitors.cxx @@ -442,12 +442,12 @@ void Test::parseandparseagain(const char* formula, const char* test_name) // parse 1 OUString input = OUString::createFromAscii(formula); - auto pNode1 = SmParser().ParseExpression(input); + auto pNode1 = SmParser5().ParseExpression(input); pNode1->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0); SmNodeToTextVisitor(pNode1.get(), output1); // parse 2 - auto pNode2 = SmParser().ParseExpression(output1); + auto pNode2 = SmParser5().ParseExpression(output1); pNode2->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0); SmNodeToTextVisitor(pNode2.get(), output2); @@ -466,7 +466,7 @@ void Test::ParseAndCheck(const char* formula, const char* expected, const char* // parse OUString sInput = OUString::createFromAscii(formula); - auto pNode = SmParser().ParseExpression(sInput); + auto pNode = SmParser5().ParseExpression(sInput); pNode->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0); SmNodeToTextVisitor(pNode.get(), sOutput); @@ -486,13 +486,13 @@ void Test::ParseAndCompare(const char* formula1, const char* formula2, const cha // parse formula1 OUString sInput1(formula1, strlen(formula1), RTL_TEXTENCODING_UTF8); - auto pNode1 = SmParser().ParseExpression(sInput1); + auto pNode1 = SmParser5().ParseExpression(sInput1); pNode1->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0); SmNodeToTextVisitor(pNode1.get(), sOutput1); // parse formula2 OUString sInput2(formula2, strlen(formula2), RTL_TEXTENCODING_UTF8); - auto pNode2 = SmParser().ParseExpression(sInput2); + auto pNode2 = SmParser5().ParseExpression(sInput2); pNode2->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0); SmNodeToTextVisitor(pNode2.get(), sOutput2); @@ -510,7 +510,7 @@ void Test::testBinomInBinHor() // set up a binom (table) node sInput += "binom a b + c"; - auto pTree = SmParser().Parse(sInput); + auto pTree = SmParser5().Parse(sInput); pTree->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0); SmCursor aCursor(pTree.get(), xDocShRef.get()); @@ -535,7 +535,7 @@ void Test::testBinVerInUnary() // set up a unary operator with operand sInput += "- 1"; - auto pTree = SmParser().Parse(sInput); + auto pTree = SmParser5().Parse(sInput); pTree->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0); SmCursor aCursor(pTree.get(), xDocShRef.get()); @@ -561,7 +561,7 @@ void Test::testBinVerInUnary() void Test::testBinHorInSubSup() { // set up a blank formula - auto pTree = SmParser().Parse(OUString()); + auto pTree = SmParser5().Parse(OUString()); pTree->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0); SmCursor aCursor(pTree.get(), xDocShRef.get()); @@ -586,7 +586,7 @@ void Test::testBinHorInSubSup() void Test::testUnaryInMixedNumberAsNumerator() { // set up a unary operator - auto pTree = SmParser().Parse("- 1"); + auto pTree = SmParser5().Parse("- 1"); pTree->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0); SmCursor aCursor(pTree.get(), xDocShRef.get()); @@ -652,7 +652,7 @@ void Test::testMiscEquivalent() void Test::testParser() { OUString sOutput; - auto pNode = SmParser().ParseExpression(u"{ \U0001D44E }"); // non-BMP Unicode + auto pNode = SmParser5().ParseExpression(u"{ \U0001D44E }"); // non-BMP Unicode pNode->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0); SmNodeToTextVisitor(pNode.get(), sOutput); CPPUNIT_ASSERT_EQUAL(OUString(u"\U0001D44E"), sOutput); diff --git a/starmath/qa/cppunit/test_parse.cxx b/starmath/qa/cppunit/test_parse.cxx index ccc0f5478c2c..daa236105b9f 100644 --- a/starmath/qa/cppunit/test_parse.cxx +++ b/starmath/qa/cppunit/test_parse.cxx @@ -65,7 +65,7 @@ void ParseTest::tearDown() */ void ParseTest::testMinus() { - auto pNode = SmParser().Parse("-1.2"); + auto pNode = SmParser5().Parse("-1.2"); CPPUNIT_ASSERT_EQUAL(size_t(1), pNode->GetNumSubNodes()); const SmNode *pNode0 = pNode->GetSubNode(0); CPPUNIT_ASSERT(pNode0); @@ -98,7 +98,7 @@ void ParseTest::testMinus() */ void ParseTest::testNospace() { - auto pNode = SmParser().Parse("nospace{ nitalic d {F(x) G(x)} }"); + auto pNode = SmParser5().Parse("nospace{ nitalic d {F(x) G(x)} }"); CPPUNIT_ASSERT_EQUAL(size_t(1), pNode->GetNumSubNodes()); const SmNode *pNode0 = pNode->GetSubNode(0); CPPUNIT_ASSERT(pNode0); diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx index 32ee10c60f06..3698c9d2ddb5 100644 --- a/starmath/source/cursor.cxx +++ b/starmath/source/cursor.cxx @@ -1010,7 +1010,7 @@ void SmCursor::InsertSpecial(const OUString& _aString) void SmCursor::InsertCommandText(const OUString& aCommandText) { //Parse the sub expression - auto xSubExpr = SmParser().ParseExpression(aCommandText); + auto xSubExpr = mpDocShell->GetParser()->ParseExpression(aCommandText); //Prepare the subtree xSubExpr->Prepare(mpDocShell->GetFormat(), *mpDocShell, 0); diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx index 45cb75d9a942..14d42334c61e 100644 --- a/starmath/source/parse.cxx +++ b/starmath/source/parse.cxx @@ -27,7 +27,7 @@ AbstractSmParser* starmathdatabase::GetDefaultSmParser() { case 5: { - AbstractSmParser* aParser = new SmParser(); + AbstractSmParser* aParser = new SmParser5(); return aParser; } default: @@ -41,7 +41,7 @@ AbstractSmParser* starmathdatabase::GetVersionSmParser(sal_uInt16 nVersion) { case 5: { - AbstractSmParser* aParser = new SmParser(); + AbstractSmParser* aParser = new SmParser5(); return aParser; } default: diff --git a/starmath/source/parse5.cxx b/starmath/source/parse5.cxx index 34953e8dafdf..afafdd3b21c1 100644 --- a/starmath/source/parse5.cxx +++ b/starmath/source/parse5.cxx @@ -372,7 +372,7 @@ static bool lcl_IsNotWholeNumber16(const OUString& rText) } //Text replace onto m_aBufferString -void SmParser::Replace(sal_Int32 nPos, sal_Int32 nLen, const OUString& rText) +void SmParser5::Replace(sal_Int32 nPos, sal_Int32 nLen, const OUString& rText) { assert(nPos + nLen <= m_aBufferString.getLength()); //checks if length allows text replace @@ -382,7 +382,7 @@ void SmParser::Replace(sal_Int32 nPos, sal_Int32 nLen, const OUString& rText) m_nTokenIndex = m_nTokenIndex + nChg; } -void SmParser::NextToken() //Central part of the parser +void SmParser5::NextToken() //Central part of the parser { sal_Int32 nBufLen = m_aBufferString.getLength(); ParseResult aRes; @@ -942,7 +942,7 @@ void SmParser::NextToken() //Central part of the parser m_nBufferIndex = aRes.EndPos; } -void SmParser::NextTokenColor(SmTokenType dvipload) +void SmParser5::NextTokenColor(SmTokenType dvipload) { sal_Int32 nBufLen = m_aBufferString.getLength(); ParseResult aRes; @@ -1021,7 +1021,7 @@ void SmParser::NextTokenColor(SmTokenType dvipload) m_nBufferIndex = aRes.EndPos; } -void SmParser::NextTokenFontSize() +void SmParser5::NextTokenFontSize() { sal_Int32 nBufLen = m_aBufferString.getLength(); ParseResult aRes; @@ -1147,7 +1147,7 @@ SmNodeArray buildNodeArray(std::vector<std::unique_ptr<SmNode>>& rSubNodes) // grammar /*************************************************************************************************/ -std::unique_ptr<SmTableNode> SmParser::DoTable() +std::unique_ptr<SmTableNode> SmParser5::DoTable() { DepthProtect aDepthGuard(m_nParseDepth); @@ -1164,7 +1164,7 @@ std::unique_ptr<SmTableNode> SmParser::DoTable() return xSNode; } -std::unique_ptr<SmNode> SmParser::DoAlign(bool bUseExtraSpaces) +std::unique_ptr<SmNode> SmParser5::DoAlign(bool bUseExtraSpaces) // parse alignment info (if any), then go on with rest of expression { DepthProtect aDepthGuard(m_nParseDepth); @@ -1193,7 +1193,7 @@ std::unique_ptr<SmNode> SmParser::DoAlign(bool bUseExtraSpaces) } // Postcondition: m_aCurToken.eType == TEND || m_aCurToken.eType == TNEWLINE -std::unique_ptr<SmNode> SmParser::DoLine() +std::unique_ptr<SmNode> SmParser5::DoLine() { DepthProtect aDepthGuard(m_nParseDepth); @@ -1223,7 +1223,7 @@ std::unique_ptr<SmNode> SmParser::DoLine() return xSNode; } -std::unique_ptr<SmNode> SmParser::DoExpression(bool bUseExtraSpaces) +std::unique_ptr<SmNode> SmParser5::DoExpression(bool bUseExtraSpaces) { DepthProtect aDepthGuard(m_nParseDepth); @@ -1246,7 +1246,7 @@ std::unique_ptr<SmNode> SmParser::DoExpression(bool bUseExtraSpaces) } } -std::unique_ptr<SmNode> SmParser::DoRelation() +std::unique_ptr<SmNode> SmParser5::DoRelation() { DepthProtect aDepthGuard(m_nParseDepth); @@ -1270,7 +1270,7 @@ std::unique_ptr<SmNode> SmParser::DoRelation() return xFirst; } -std::unique_ptr<SmNode> SmParser::DoSum() +std::unique_ptr<SmNode> SmParser5::DoSum() { DepthProtect aDepthGuard(m_nParseDepth); @@ -1294,7 +1294,7 @@ std::unique_ptr<SmNode> SmParser::DoSum() return xFirst; } -std::unique_ptr<SmNode> SmParser::DoProduct() +std::unique_ptr<SmNode> SmParser5::DoProduct() { DepthProtect aDepthGuard(m_nParseDepth); @@ -1368,7 +1368,7 @@ std::unique_ptr<SmNode> SmParser::DoProduct() return xFirst; } -std::unique_ptr<SmNode> SmParser::DoSubSup(TG nActiveGroup, std::unique_ptr<SmNode> xGivenNode) +std::unique_ptr<SmNode> SmParser5::DoSubSup(TG nActiveGroup, std::unique_ptr<SmNode> xGivenNode) { DepthProtect aDepthGuard(m_nParseDepth); @@ -1453,7 +1453,7 @@ std::unique_ptr<SmNode> SmParser::DoSubSup(TG nActiveGroup, std::unique_ptr<SmNo return pNode; } -std::unique_ptr<SmNode> SmParser::DoSubSupEvaluate(std::unique_ptr<SmNode> xGivenNode) +std::unique_ptr<SmNode> SmParser5::DoSubSupEvaluate(std::unique_ptr<SmNode> xGivenNode) { DepthProtect aDepthGuard(m_nParseDepth); @@ -1505,7 +1505,7 @@ std::unique_ptr<SmNode> SmParser::DoSubSupEvaluate(std::unique_ptr<SmNode> xGive return pNode; } -std::unique_ptr<SmNode> SmParser::DoOpSubSup() +std::unique_ptr<SmNode> SmParser5::DoOpSubSup() { DepthProtect aDepthGuard(m_nParseDepth); @@ -1519,7 +1519,7 @@ std::unique_ptr<SmNode> SmParser::DoOpSubSup() return xNode; } -std::unique_ptr<SmNode> SmParser::DoPower() +std::unique_ptr<SmNode> SmParser5::DoPower() { DepthProtect aDepthGuard(m_nParseDepth); @@ -1531,7 +1531,7 @@ std::unique_ptr<SmNode> SmParser::DoPower() return xNode; } -std::unique_ptr<SmBlankNode> SmParser::DoBlank() +std::unique_ptr<SmBlankNode> SmParser5::DoBlank() { DepthProtect aDepthGuard(m_nParseDepth); @@ -1554,7 +1554,7 @@ std::unique_ptr<SmBlankNode> SmParser::DoBlank() return pBlankNode; } -std::unique_ptr<SmNode> SmParser::DoTerm(bool bGroupNumberIdent) +std::unique_ptr<SmNode> SmParser5::DoTerm(bool bGroupNumberIdent) { DepthProtect aDepthGuard(m_nParseDepth); @@ -1781,7 +1781,7 @@ std::unique_ptr<SmNode> SmParser::DoTerm(bool bGroupNumberIdent) } } -std::unique_ptr<SmNode> SmParser::DoEscape() +std::unique_ptr<SmNode> SmParser5::DoEscape() { DepthProtect aDepthGuard(m_nParseDepth); @@ -1819,7 +1819,7 @@ std::unique_ptr<SmNode> SmParser::DoEscape() } } -std::unique_ptr<SmOperNode> SmParser::DoOperator() +std::unique_ptr<SmOperNode> SmParser5::DoOperator() { DepthProtect aDepthGuard(m_nParseDepth); @@ -1840,7 +1840,7 @@ std::unique_ptr<SmOperNode> SmParser::DoOperator() return xSNode; } -std::unique_ptr<SmNode> SmParser::DoOper() +std::unique_ptr<SmNode> SmParser5::DoOper() { DepthProtect aDepthGuard(m_nParseDepth); @@ -1885,7 +1885,7 @@ std::unique_ptr<SmNode> SmParser::DoOper() return pNode; } -std::unique_ptr<SmStructureNode> SmParser::DoUnOper() +std::unique_ptr<SmStructureNode> SmParser5::DoUnOper() { DepthProtect aDepthGuard(m_nParseDepth); @@ -1972,7 +1972,7 @@ std::unique_ptr<SmStructureNode> SmParser::DoUnOper() return xSNode; } -std::unique_ptr<SmStructureNode> SmParser::DoAttribute() +std::unique_ptr<SmStructureNode> SmParser5::DoAttribute() { DepthProtect aDepthGuard(m_nParseDepth); @@ -2011,7 +2011,7 @@ std::unique_ptr<SmStructureNode> SmParser::DoAttribute() return xSNode; } -std::unique_ptr<SmStructureNode> SmParser::DoFontAttribute() +std::unique_ptr<SmStructureNode> SmParser5::DoFontAttribute() { DepthProtect aDepthGuard(m_nParseDepth); @@ -2045,7 +2045,7 @@ std::unique_ptr<SmStructureNode> SmParser::DoFontAttribute() } } -std::unique_ptr<SmStructureNode> SmParser::DoColor() +std::unique_ptr<SmStructureNode> SmParser5::DoColor() { DepthProtect aDepthGuard(m_nParseDepth); @@ -2135,7 +2135,7 @@ std::unique_ptr<SmStructureNode> SmParser::DoColor() return xNode; } -std::unique_ptr<SmStructureNode> SmParser::DoFont() +std::unique_ptr<SmStructureNode> SmParser5::DoFont() { DepthProtect aDepthGuard(m_nParseDepth); @@ -2163,7 +2163,7 @@ std::unique_ptr<SmStructureNode> SmParser::DoFont() return xNode; } -std::unique_ptr<SmStructureNode> SmParser::DoFontSize() +std::unique_ptr<SmStructureNode> SmParser5::DoFontSize() { DepthProtect aDepthGuard(m_nParseDepth); std::unique_ptr<SmFontNode> pFontNode(new SmFontNode(m_aCurToken)); @@ -2225,7 +2225,7 @@ std::unique_ptr<SmStructureNode> SmParser::DoFontSize() return pFontNode; } -std::unique_ptr<SmStructureNode> SmParser::DoBrace() +std::unique_ptr<SmStructureNode> SmParser5::DoBrace() { DepthProtect aDepthGuard(m_nParseDepth); @@ -2338,7 +2338,7 @@ std::unique_ptr<SmStructureNode> SmParser::DoBrace() return DoError(eError); } -std::unique_ptr<SmBracebodyNode> SmParser::DoBracebody(bool bIsLeftRight) +std::unique_ptr<SmBracebodyNode> SmParser5::DoBracebody(bool bIsLeftRight) { DepthProtect aDepthGuard(m_nParseDepth); @@ -2386,7 +2386,7 @@ std::unique_ptr<SmBracebodyNode> SmParser::DoBracebody(bool bIsLeftRight) return pBody; } -std::unique_ptr<SmNode> SmParser::DoEvaluate() +std::unique_ptr<SmNode> SmParser5::DoEvaluate() { DepthProtect aDepthGuard(m_nParseDepth); @@ -2421,7 +2421,7 @@ std::unique_ptr<SmNode> SmParser::DoEvaluate() return xSNode; } -std::unique_ptr<SmTextNode> SmParser::DoFunction() +std::unique_ptr<SmTextNode> SmParser5::DoFunction() { DepthProtect aDepthGuard(m_nParseDepth); @@ -2436,7 +2436,7 @@ std::unique_ptr<SmTextNode> SmParser::DoFunction() return pNode; } -std::unique_ptr<SmTableNode> SmParser::DoBinom() +std::unique_ptr<SmTableNode> SmParser5::DoBinom() { DepthProtect aDepthGuard(m_nParseDepth); @@ -2450,7 +2450,7 @@ std::unique_ptr<SmTableNode> SmParser::DoBinom() return xSNode; } -std::unique_ptr<SmBinVerNode> SmParser::DoFrac() +std::unique_ptr<SmBinVerNode> SmParser5::DoFrac() { DepthProtect aDepthGuard(m_nParseDepth); @@ -2465,7 +2465,7 @@ std::unique_ptr<SmBinVerNode> SmParser::DoFrac() return xSNode; } -std::unique_ptr<SmStructureNode> SmParser::DoStack() +std::unique_ptr<SmStructureNode> SmParser5::DoStack() { DepthProtect aDepthGuard(m_nParseDepth); @@ -2489,7 +2489,7 @@ std::unique_ptr<SmStructureNode> SmParser::DoStack() return xSNode; } -std::unique_ptr<SmStructureNode> SmParser::DoMatrix() +std::unique_ptr<SmStructureNode> SmParser5::DoMatrix() { DepthProtect aDepthGuard(m_nParseDepth); @@ -2542,7 +2542,7 @@ std::unique_ptr<SmStructureNode> SmParser::DoMatrix() return std::unique_ptr<SmStructureNode>(xMNode.release()); } -std::unique_ptr<SmSpecialNode> SmParser::DoSpecial() +std::unique_ptr<SmSpecialNode> SmParser5::DoSpecial() { DepthProtect aDepthGuard(m_nParseDepth); @@ -2585,7 +2585,7 @@ std::unique_ptr<SmSpecialNode> SmParser::DoSpecial() return pNode; } -std::unique_ptr<SmGlyphSpecialNode> SmParser::DoGlyphSpecial() +std::unique_ptr<SmGlyphSpecialNode> SmParser5::DoGlyphSpecial() { DepthProtect aDepthGuard(m_nParseDepth); @@ -2594,7 +2594,7 @@ std::unique_ptr<SmGlyphSpecialNode> SmParser::DoGlyphSpecial() return pNode; } -std::unique_ptr<SmExpressionNode> SmParser::DoError(SmParseError eError) +std::unique_ptr<SmExpressionNode> SmParser5::DoError(SmParseError eError) { DepthProtect aDepthGuard(m_nParseDepth); @@ -2621,7 +2621,7 @@ std::unique_ptr<SmExpressionNode> SmParser::DoError(SmParseError eError) // end grammar -SmParser::SmParser() +SmParser5::SmParser5() : AbstractSmParser() , m_nCurError(0) , m_nBufferIndex(0) @@ -2636,9 +2636,9 @@ SmParser::SmParser() { } -SmParser::~SmParser() {} +SmParser5::~SmParser5() {} -std::unique_ptr<SmTableNode> SmParser::Parse(const OUString& rBuffer) +std::unique_ptr<SmTableNode> SmParser5::Parse(const OUString& rBuffer) { m_aUsedSymbols.clear(); @@ -2655,7 +2655,7 @@ std::unique_ptr<SmTableNode> SmParser::Parse(const OUString& rBuffer) return DoTable(); } -std::unique_ptr<SmNode> SmParser::ParseExpression(const OUString& rBuffer) +std::unique_ptr<SmNode> SmParser5::ParseExpression(const OUString& rBuffer) { m_aBufferString = convertLineEnd(rBuffer, LINEEND_LF); m_nBufferIndex = 0; @@ -2670,7 +2670,7 @@ std::unique_ptr<SmNode> SmParser::ParseExpression(const OUString& rBuffer) return DoExpression(); } -const SmErrorDesc* SmParser::NextError() +const SmErrorDesc* SmParser5::NextError() { if (!m_aErrDescList.empty()) if (m_nCurError > 0) @@ -2684,7 +2684,7 @@ const SmErrorDesc* SmParser::NextError() return nullptr; } -const SmErrorDesc* SmParser::PrevError() +const SmErrorDesc* SmParser5::PrevError() { if (!m_aErrDescList.empty()) if (m_nCurError < static_cast<int>(m_aErrDescList.size() - 1)) @@ -2698,7 +2698,7 @@ const SmErrorDesc* SmParser::PrevError() return nullptr; } -const SmErrorDesc* SmParser::GetError() const +const SmErrorDesc* SmParser5::GetError() const { if (m_aErrDescList.empty()) return nullptr; |