[Libreoffice-commits] core.git: starmath/source
dante (via logerrit)
logerrit at kemper.freedesktop.org
Sun Feb 14 19:47:48 UTC 2021
starmath/source/parse.cxx | 17 +++--------------
1 file changed, 3 insertions(+), 14 deletions(-)
New commits:
commit 197f3a97842a9fb75788ba891de652591edd73d4
Author: dante <dante19031999 at gmail.com>
AuthorDate: Mon Feb 8 23:07:49 2021 +0100
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sun Feb 14 20:46:51 2021 +0100
Simplify code for starmath operator symbol parsing
Change-Id: I4fb05191e1d027f9809ac2324299ff2e2861fd73
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110600
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index 80922cfdf6e3..3a9ad138e409 100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -1889,20 +1889,9 @@ std::unique_ptr<SmNode> SmParser::DoOper()
case TLIM :
case TLIMSUP :
case TLIMINF :
- {
- const char* pLim = nullptr;
- switch (eType)
- {
- case TLIM : pLim = "lim"; break;
- case TLIMSUP : pLim = "lim sup"; break;
- case TLIMINF : pLim = "lim inf"; break;
- default:
- break;
- }
- if( pLim )
- m_aCurToken.aText = OUString::createFromAscii(pLim);
- pNode.reset(new SmTextNode(m_aCurToken, FNT_TEXT));
- }
+ m_aCurToken.aText = eType == TLIMSUP ? u"lim sup"
+ : eType == TLIMINF ? u"lim inf" : u"lim";
+ pNode.reset(new SmTextNode(m_aCurToken, FNT_TEXT));
break;
case TOPER :
More information about the Libreoffice-commits
mailing list