diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2017-04-26 18:27:43 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2017-04-27 02:35:16 +0200 |
commit | 437105b940d997d742bd5e31cfa0ce4b949b29f2 (patch) | |
tree | c2bab71a63cd0646a8ff20b295f0fe683612a68e /starmath/source/mathmlimport.cxx | |
parent | 597a2f5d5bd37443262b0775b8439bc3502aef1b (diff) |
starmath: Convert SmScaleMode to scoped enum
Change-Id: I88024e9cc1147cc44a087315968c3462ab5baf73
Reviewed-on: https://gerrit.libreoffice.org/36978
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
Diffstat (limited to 'starmath/source/mathmlimport.cxx')
-rw-r--r-- | starmath/source/mathmlimport.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx index 96c2aa05ae70..583c0b925821 100644 --- a/starmath/source/mathmlimport.cxx +++ b/starmath/source/mathmlimport.cxx @@ -1160,7 +1160,7 @@ void SmXMLFencedContext_Impl::EndElement() pSNode->SetSubNodes(pLeft,pBody,pRight); - pSNode->SetScaleMode(SCALE_HEIGHT); + pSNode->SetScaleMode(SmScaleMode::Height); GetSmImport().GetNodeStack().push_front(std::move(pSNode)); } @@ -1438,7 +1438,7 @@ void SmXMLOperatorContext_Impl::EndElement() //and applied to the expression itself so as to get the expression //to scale the operator to the height of the expression itself if (bIsStretchy) - pNode->SetScaleMode(SCALE_HEIGHT); + pNode->SetScaleMode(SmScaleMode::Height); GetSmImport().GetNodeStack().push_front(std::move(pNode)); // TODO: apply to non-alphabetic characters too @@ -1716,7 +1716,7 @@ void SmXMLUnderContext_Impl::HandleAccent() SmNode *pSecond = popOrZero(rNodeStack); pNode->SetSubNodes(pFirst, pSecond); - pNode->SetScaleMode(SCALE_WIDTH); + pNode->SetScaleMode(SmScaleMode::Width); rNodeStack.push_front(std::move(pNode)); } @@ -1779,7 +1779,7 @@ void SmXMLOverContext_Impl::HandleAccent() SmNode *pFirst = popOrZero(rNodeStack); SmNode *pSecond = popOrZero(rNodeStack); pNode->SetSubNodes(pFirst, pSecond); - pNode->SetScaleMode(SCALE_WIDTH); + pNode->SetScaleMode(SmScaleMode::Width); rNodeStack.push_front(std::move(pNode)); } @@ -2410,9 +2410,9 @@ void SmXMLRowContext_Impl::EndElement() //removing the stretchness from the operators and applying it to //ourselves, and creating the appropriate dummy StarMath none bracket //to balance the arrangement - if (((aRelationArray[0]->GetScaleMode() == SCALE_HEIGHT) + if (((aRelationArray[0]->GetScaleMode() == SmScaleMode::Height) && (aRelationArray[0]->GetType() == SmNodeType::Math)) - || ((aRelationArray[nSize-1]->GetScaleMode() == SCALE_HEIGHT) + || ((aRelationArray[nSize-1]->GetScaleMode() == SmScaleMode::Height) && (aRelationArray[nSize-1]->GetType() == SmNodeType::Math))) { SmToken aToken; @@ -2420,7 +2420,7 @@ void SmXMLRowContext_Impl::EndElement() aToken.nLevel = 5; int nLeft=0,nRight=0; - if ((aRelationArray[0]->GetScaleMode() == SCALE_HEIGHT) + if ((aRelationArray[0]->GetScaleMode() == SmScaleMode::Height) && (aRelationArray[0]->GetType() == SmNodeType::Math)) { aToken = aRelationArray[0]->GetToken(); @@ -2432,7 +2432,7 @@ void SmXMLRowContext_Impl::EndElement() aToken.eType = TLPARENT; SmNode *pLeft = new SmMathSymbolNode(aToken); - if ((aRelationArray[nSize-1]->GetScaleMode() == SCALE_HEIGHT) + if ((aRelationArray[nSize-1]->GetScaleMode() == SmScaleMode::Height) && (aRelationArray[nSize-1]->GetType() == SmNodeType::Math)) { aToken = aRelationArray[nSize-1]->GetToken(); @@ -2461,7 +2461,7 @@ void SmXMLRowContext_Impl::EndElement() pBody->SetSubNodes(aRelationArray2); pSNode->SetSubNodes(pLeft,pBody,pRight); - pSNode->SetScaleMode(SCALE_HEIGHT); + pSNode->SetScaleMode(SmScaleMode::Height); rNodeStack.push_front(std::move(pSNode)); return; } |