diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2016-06-07 17:28:40 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2016-06-08 06:26:48 +0000 |
commit | 261f734b3c0e62ada51485ba81a535d32049c946 (patch) | |
tree | bb601110bd295659393ca00427888a27ec564ac4 /starmath/inc | |
parent | d106ffc5f1c611657e7ccd96ac9dab70cc7ebe53 (diff) |
starmath: The formula tree must be of type SmTableNode
This also omits the last push & pop on m_aNodeStack at the end
of parsing.
Change-Id: Iefff8fa801ea7cb9015d6cba0d5a972dee675cb7
Reviewed-on: https://gerrit.libreoffice.org/26003
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
Diffstat (limited to 'starmath/inc')
-rw-r--r-- | starmath/inc/document.hxx | 6 | ||||
-rw-r--r-- | starmath/inc/node.hxx | 4 | ||||
-rw-r--r-- | starmath/inc/parse.hxx | 4 |
3 files changed, 6 insertions, 8 deletions
diff --git a/starmath/inc/document.hxx b/starmath/inc/document.hxx index 1b519265a653..667102d5be44 100644 --- a/starmath/inc/document.hxx +++ b/starmath/inc/document.hxx @@ -91,7 +91,7 @@ class SM_DLLPUBLIC SmDocShell : public SfxObjectShell, public SfxListener SmFormat maFormat; SmParser maParser; OUString maAccText; - SmNode *mpTree; + SmTableNode *mpTree; SfxItemPool *mpEditEngineItemPool; EditEngine *mpEditEngine; VclPtr<SfxPrinter> mpPrinter; //q.v. comment to SmPrinter Access! @@ -177,8 +177,8 @@ public: void Parse(); SmParser & GetParser() { return maParser; } - const SmNode * GetFormulaTree() const { return mpTree; } - void SetFormulaTree(SmNode *&rTree) { mpTree = rTree; } + const SmTableNode *GetFormulaTree() const { return mpTree; } + void SetFormulaTree(SmTableNode *pTree) { mpTree = pTree; } const std::set< OUString > & GetUsedSymbols() const { return maUsedSymbols; } diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx index 9e092693a9bf..af03a7be183f 100644 --- a/starmath/inc/node.hxx +++ b/starmath/inc/node.hxx @@ -189,8 +189,6 @@ public: const SmNode * FindTokenAt(sal_uInt16 nRow, sal_uInt16 nCol) const; const SmNode * FindRectClosestTo(const Point &rPoint) const; - virtual long GetFormulaBaseline() const; - /** Accept a visitor * Calls the method for this class on the visitor */ @@ -678,7 +676,7 @@ public: virtual const SmNode * GetLeftMost() const override; virtual void Arrange(OutputDevice &rDev, const SmFormat &rFormat) override; - virtual long GetFormulaBaseline() const override; + long GetFormulaBaseline() const; void Accept(SmVisitor* pVisitor) override; }; diff --git a/starmath/inc/parse.hxx b/starmath/inc/parse.hxx index 3ebeb2c1e2ee..2c8e9b2ea0d9 100644 --- a/starmath/inc/parse.hxx +++ b/starmath/inc/parse.hxx @@ -59,7 +59,7 @@ class SmParser inline bool TokenInGroup( TG nGroup ); // grammar - void DoTable(); + SmTableNode *DoTable(); void DoLine(); void DoExpression(); void DoRelation(); @@ -99,7 +99,7 @@ public: SmParser(); /** Parse rBuffer to formula tree */ - SmNode *Parse(const OUString &rBuffer); + SmTableNode *Parse(const OUString &rBuffer); /** Parse rBuffer to formula subtree that constitutes an expression */ SmNode *ParseExpression(const OUString &rBuffer); |