summaryrefslogtreecommitdiff
path: root/starmath/inc/token.hxx
diff options
context:
space:
mode:
authordante <dante19031999@gmail.com>2021-02-01 13:25:51 +0100
committerStephan Bergmann <sbergman@redhat.com>2021-02-02 11:30:47 +0100
commit52dc0879e48afb2be1bebb567b34ad9d8fbd3314 (patch)
tree0041dbb2fe87ed192e03c8d2e1bd7b74a1fdb72c /starmath/inc/token.hxx
parent28d65bb877c193b3fa53a038f3b896e4ba2f7ee4 (diff)
SmToken use u16string_view pIdent
The idea is to use 16 bits characters for node identities. Avoids some intermediate createTextFromAscii Will simplify the use of unicode 16 math identifiers Change-Id: Ie084477f00219ba3bab0c4b53d3a4a5a310fa452 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110252 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'starmath/inc/token.hxx')
-rw-r--r--starmath/inc/token.hxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/starmath/inc/token.hxx b/starmath/inc/token.hxx
index 374e23876a9f..c7d26e1efe0b 100644
--- a/starmath/inc/token.hxx
+++ b/starmath/inc/token.hxx
@@ -149,7 +149,7 @@ enum SmTokenType
struct SmTokenTableEntry
{
- const char* pIdent;
+ const std::u16string_view pIdent;
SmTokenType eType;
sal_Unicode cMathChar;
TG nGroup;
@@ -264,7 +264,7 @@ struct SmToken
void operator=(const SmTokenTableEntry& aTokenTableEntry)
{
- aText = OUString::createFromAscii(aTokenTableEntry.pIdent);
+ aText = aTokenTableEntry.pIdent;
eType = aTokenTableEntry.eType;
cMathChar = aTokenTableEntry.cMathChar;
nGroup = aTokenTableEntry.nGroup;
@@ -275,7 +275,7 @@ struct SmToken
void operator=(const SmTokenTableEntry* aTokenTableEntry)
{
- aText = OUString::createFromAscii(aTokenTableEntry->pIdent);
+ aText = aTokenTableEntry->pIdent;
eType = aTokenTableEntry->eType;
cMathChar = aTokenTableEntry->cMathChar;
nGroup = aTokenTableEntry->nGroup;