summaryrefslogtreecommitdiff
path: root/starmath/inc/token.hxx
diff options
context:
space:
mode:
authordante <dante19031999@gmail.com>2021-02-05 16:27:40 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-02-06 20:53:22 +0100
commit96e9870b3204eabc6bca1c92f714f80592a54102 (patch)
treebf0cdb9c3b94f924eab4ece2114ec96d3e370d87 /starmath/inc/token.hxx
parentd76b9cc0e96e06777c683ba172e04454c8893c84 (diff)
Use multichar operators
There are no functional changes, only type change. This patch unlocks other possibilities like: - Syntax highlight for errors - Visual editor for structure nodes - Implement some mathml features Change-Id: I76a1b62126ae5fcb6a7285b07b24e9defa63fd44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110481 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'starmath/inc/token.hxx')
-rw-r--r--starmath/inc/token.hxx14
1 files changed, 8 insertions, 6 deletions
diff --git a/starmath/inc/token.hxx b/starmath/inc/token.hxx
index 600c29b9f889..5b903cc7bc1c 100644
--- a/starmath/inc/token.hxx
+++ b/starmath/inc/token.hxx
@@ -211,7 +211,7 @@ struct SmToken
{
OUString aText; // token text
SmTokenType eType; // token info
- sal_Unicode cMathChar;
+ OUString cMathChar;
// parse-help info
TG nGroup;
@@ -247,7 +247,7 @@ struct SmToken
{
aText = aTokenTableEntry.pIdent;
eType = aTokenTableEntry.eType;
- cMathChar = aTokenTableEntry.cMathChar;
+ cMathChar = OUString(&aTokenTableEntry.cMathChar, 1);
nGroup = aTokenTableEntry.nGroup;
nLevel = aTokenTableEntry.nLevel;
nRow = 0;
@@ -258,7 +258,7 @@ struct SmToken
{
aText = aTokenTableEntry->pIdent;
eType = aTokenTableEntry->eType;
- cMathChar = aTokenTableEntry->cMathChar;
+ cMathChar = OUString(&aTokenTableEntry->cMathChar, 1);
nGroup = aTokenTableEntry->nGroup;
nLevel = aTokenTableEntry->nLevel;
nRow = 0;
@@ -269,7 +269,7 @@ struct SmToken
{
aText = OUString::number(static_cast<sal_uInt32>(aTokenTableEntry.cColor), 16);
eType = aTokenTableEntry.eType;
- cMathChar = MS_NULLCHAR;
+ cMathChar = u"";
nGroup = TG::Color;
nLevel = 0;
nRow = 0;
@@ -280,7 +280,7 @@ struct SmToken
{
aText = OUString::number(static_cast<sal_uInt32>(aTokenTableEntry->cColor), 16);
eType = aTokenTableEntry->eType;
- cMathChar = MS_NULLCHAR;
+ cMathChar = u"";
nGroup = TG::Color;
nLevel = 0;
nRow = 0;
@@ -291,12 +291,14 @@ struct SmToken
{
aText = OUString::number(static_cast<sal_uInt32>(aTokenTableEntry->cColor), 16);
eType = aTokenTableEntry->eType;
- cMathChar = MS_NULLCHAR;
+ cMathChar = u"";
nGroup = TG::Color;
nLevel = 0;
nRow = 0;
nCol = 0;
}
+
+ void setChar(sal_Unicode cChar) { cMathChar = OUString(&cChar, 1); }
};
#endif