1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <starmathdatabase.hxx>
23 SmToken
starmathdatabase::Identify_SmXMLOperatorContext_Impl(std::u16string_view rText
,
24 bool bIsStretchy
, sal_Int32 nIndex
)
26 auto cChar
= o3tl::iterateCodePoints(rText
, &nIndex
);
30 return SmToken(TCOPROD
, MS_COPROD
, u
"coprod"_ustr
, TG::Oper
, 5);
32 return SmToken(TIIINT
, MS_IIINT
, u
"iiint"_ustr
, TG::Oper
, 5);
34 return SmToken(TIINT
, MS_IINT
, u
"iint"_ustr
, TG::Oper
, 5);
37 return SmToken(TINTD
, MS_INT
, u
"intd"_ustr
, TG::Oper
, 5);
39 return SmToken(TINT
, MS_INT
, u
"int"_ustr
, TG::Oper
, 5);
41 return SmToken(TLINT
, MS_LINT
, u
"lint"_ustr
, TG::Oper
, 5);
43 return SmToken(TLLINT
, MS_LLINT
, u
"llint"_ustr
, TG::Oper
, 5);
45 return SmToken(TLLLINT
, MS_LLLINT
, u
"lllint"_ustr
, TG::Oper
, 5);
47 return SmToken(TPROD
, MS_PROD
, u
"prod"_ustr
, TG::Oper
, 5);
49 return SmToken(TSUM
, MS_SUM
, u
"sum"_ustr
, TG::Oper
, 5);
51 return SmToken(TSUM
, MS_MAJ
, u
"maj"_ustr
, TG::Oper
, 5);
53 return SmToken(TFACT
, MS_FACT
, u
"!"_ustr
, TG::UnOper
, 5);
55 return SmToken(TNEG
, MS_NEG
, u
"neg"_ustr
, TG::UnOper
, 5);
57 return SmToken(TOMINUS
, MS_OMINUS
, u
"ominus"_ustr
, TG::Sum
, 0);
59 return SmToken(TOPLUS
, MS_OPLUS
, u
"oplus"_ustr
, TG::Sum
, 0);
61 return SmToken(TUNION
, MS_UNION
, u
"union"_ustr
, TG::Sum
, 0);
63 return SmToken(TOR
, MS_OR
, u
"|"_ustr
, TG::Sum
, 5);
65 return SmToken(TPLUSMINUS
, MS_PLUSMINUS
, u
"+-"_ustr
, TG::Sum
| TG::UnOper
, 5);
67 return SmToken(TMINUSPLUS
, MS_MINUSPLUS
, u
"-+"_ustr
, TG::Sum
| TG::UnOper
, 5);
70 return SmToken(TPLUS
, MS_PLUS
, u
"+"_ustr
, TG::Sum
| TG::UnOper
, 5);
72 return SmToken(TMINUS
, MS_MINUS
, u
"-"_ustr
, TG::Sum
| TG::UnOper
, 5);
75 return SmToken(TCDOT
, MS_CDOT
, u
"cdot"_ustr
, TG::Product
, 0);
77 return SmToken(TDIV
, MS_DIV
, u
"div"_ustr
, TG::Product
, 0);
79 return SmToken(TTIMES
, MS_TIMES
, u
"times"_ustr
, TG::Product
, 0);
81 return SmToken(TINTERSECT
, MS_INTERSECT
, u
"intersection"_ustr
, TG::Product
, 0);
83 return SmToken(TODIVIDE
, MS_ODIVIDE
, u
"odivide"_ustr
, TG::Product
, 0);
85 return SmToken(TODOT
, MS_ODOT
, u
"odot"_ustr
, TG::Product
, 0);
87 return SmToken(TOTIMES
, MS_OTIMES
, u
"otimes"_ustr
, TG::Product
, 0);
89 return SmToken(TAND
, MS_AND
, u
"&"_ustr
, TG::Product
, 0);
91 return SmToken(TMULTIPLY
, MS_MULTIPLY
, u
"*"_ustr
, TG::Product
, 0);
94 return SmToken(TWIDESLASH
, MS_SLASH
, u
"wideslash"_ustr
, TG::Product
, 0);
96 return SmToken(TSLASH
, MS_SLASH
, u
"slash"_ustr
, TG::Product
, 0);
99 return SmToken(TWIDEBACKSLASH
, MS_BACKSLASH
, u
"widebslash"_ustr
, TG::Product
, 0);
101 return SmToken(TBACKSLASH
, MS_BACKSLASH
, u
"bslash"_ustr
, TG::Product
, 0);
103 return SmToken(TDEF
, MS_DEF
, u
"def"_ustr
, TG::Relation
, 0);
105 return SmToken(TDIVIDES
, MS_LINE
, u
"divides"_ustr
, TG::Relation
, 0);
107 return SmToken(TEQUIV
, MS_EQUIV
, u
"equiv"_ustr
, TG::Relation
, 0);
109 return SmToken(TGE
, MS_GE
, u
">="_ustr
, TG::Relation
, 0);
111 return SmToken(TGESLANT
, MS_GESLANT
, u
"geslant"_ustr
, TG::Relation
, 0);
113 return SmToken(TGG
, MS_GG
, u
">>"_ustr
, TG::Relation
, 0);
115 return SmToken(TGT
, MS_GT
, u
">"_ustr
, TG::Relation
, 0);
117 return SmToken(TIN
, MS_IN
, u
"in"_ustr
, TG::Relation
, 0);
119 return SmToken(TLE
, MS_LE
, u
"<="_ustr
, TG::Relation
, 0);
121 return SmToken(TLESLANT
, MS_LESLANT
, u
"leslant"_ustr
, TG::Relation
, 0);
123 return SmToken(TLL
, MS_LL
, u
"<<"_ustr
, TG::Relation
, 0);
125 return SmToken(TLT
, MS_LT
, u
"<"_ustr
, TG::Relation
, 0);
127 return SmToken(TNDIVIDES
, MS_NDIVIDES
, u
"ndivides"_ustr
, TG::Relation
, 0);
129 return SmToken(TNEQ
, MS_NEQ
, u
"<>"_ustr
, TG::Relation
, 0);
131 return SmToken(TNOTIN
, MS_NOTIN
, u
"notin"_ustr
, TG::Relation
, 0);
133 return SmToken(TNOTPRECEDES
, MS_NOTPRECEDES
, u
"nprec"_ustr
, TG::Relation
, 0);
135 return SmToken(TNSUBSET
, MS_NSUBSET
, u
"nsubset"_ustr
, TG::Relation
, 0);
137 return SmToken(TNSUBSETEQ
, MS_NSUBSETEQ
, u
"nsubseteq"_ustr
, TG::Relation
, 0);
139 return SmToken(TNOTSUCCEEDS
, MS_NOTSUCCEEDS
, u
"nsucc"_ustr
, TG::Relation
, 0);
141 return SmToken(TNSUPSET
, MS_NSUPSET
, u
"nsupset"_ustr
, TG::Relation
, 0);
143 return SmToken(TNSUPSETEQ
, MS_NSUPSETEQ
, u
"nsupseteq"_ustr
, TG::Relation
, 0);
145 return SmToken(TORTHO
, MS_ORTHO
, u
"ortho"_ustr
, TG::Relation
, 0);
147 return SmToken(TNI
, MS_NI
, u
"owns"_ustr
, TG::Relation
, 0);
149 return SmToken(TPARALLEL
, MS_DLINE
, u
"parallel"_ustr
, TG::Relation
, 0);
151 return SmToken(TPRECEDES
, MS_PRECEDES
, u
"prec"_ustr
, TG::Relation
, 0);
152 case MS_PRECEDESEQUAL
:
153 return SmToken(TPRECEDESEQUAL
, MS_PRECEDESEQUAL
, u
"preccurlyeq"_ustr
, TG::Relation
, 0);
154 case MS_PRECEDESEQUIV
:
155 return SmToken(TPRECEDESEQUIV
, MS_PRECEDESEQUIV
, u
"precsim"_ustr
, TG::Relation
, 0);
157 return SmToken(TPROP
, MS_PROP
, u
"prop"_ustr
, TG::Relation
, 0);
159 return SmToken(TSIM
, MS_SIM
, u
"sim"_ustr
, TG::Relation
, 0);
162 return SmToken(TSIMEQ
, MS_SIMEQ
, u
"simeq"_ustr
, TG::Relation
, 0);
164 return SmToken(TSUBSET
, MS_SUBSET
, u
"subset"_ustr
, TG::Relation
, 0);
166 return SmToken(TSUBSETEQ
, MS_SUBSETEQ
, u
"subseteq"_ustr
, TG::Relation
, 0);
168 return SmToken(TSUCCEEDS
, MS_SUCCEEDS
, u
"succ"_ustr
, TG::Relation
, 0);
169 case MS_SUCCEEDSEQUAL
:
170 return SmToken(TSUCCEEDSEQUAL
, MS_SUCCEEDSEQUAL
, u
"succcurlyeq"_ustr
, TG::Relation
, 0);
171 case MS_SUCCEEDSEQUIV
:
172 return SmToken(TSUCCEEDSEQUIV
, MS_SUCCEEDSEQUIV
, u
"succsim"_ustr
, TG::Relation
, 0);
174 return SmToken(TSUPSET
, MS_SUPSET
, u
"supset"_ustr
, TG::Relation
, 0);
176 return SmToken(TSUPSETEQ
, MS_SUPSETEQ
, u
"supseteq"_ustr
, TG::Relation
, 0);
178 return SmToken(TTOWARD
, MS_RIGHTARROW
, u
"toward"_ustr
, TG::Relation
, 0);
180 return SmToken(TTRANSL
, MS_TRANSL
, u
"transl"_ustr
, TG::Relation
, 0);
182 return SmToken(TTRANSR
, MS_TRANSR
, u
"transr"_ustr
, TG::Relation
, 0);
184 return SmToken(TASSIGN
, MS_ASSIGN
, u
"="_ustr
, TG::Relation
, 0);
186 return SmToken(TLANGLE
, MS_LMATHANGLE
, u
"langle"_ustr
, TG::LBrace
, 5);
188 return SmToken(TLANGLE
, MS_LMATHANGLE
, u
"langle"_ustr
, TG::LBrace
, 5);
190 return SmToken(TLBRACE
, MS_LBRACE
, u
"lbrace"_ustr
, TG::LBrace
, 5);
192 return SmToken(TLCEIL
, MS_LCEIL
, u
"lceil"_ustr
, TG::LBrace
, 5);
194 return SmToken(TLFLOOR
, MS_LFLOOR
, u
"lfloor"_ustr
, TG::LBrace
, 5);
196 return SmToken(TLDBRACKET
, MS_LDBRACKET
, u
"ldbracket"_ustr
, TG::LBrace
, 5);
198 return SmToken(TLBRACKET
, MS_LBRACKET
, u
"["_ustr
, TG::LBrace
, 5);
200 return SmToken(TLPARENT
, MS_LPARENT
, u
"("_ustr
, TG::LBrace
, 5);
202 return SmToken(TRANGLE
, MS_RMATHANGLE
, u
"rangle"_ustr
, TG::RBrace
, 5);
204 return SmToken(TRANGLE
, MS_RMATHANGLE
, u
"rangle"_ustr
, TG::RBrace
, 5);
206 return SmToken(TRBRACE
, MS_RBRACE
, u
"rbrace"_ustr
, TG::RBrace
, 5);
208 return SmToken(TRCEIL
, MS_RCEIL
, u
"rceil"_ustr
, TG::RBrace
, 5);
210 return SmToken(TRFLOOR
, MS_RFLOOR
, u
"rfloor"_ustr
, TG::RBrace
, 5);
212 return SmToken(TRDBRACKET
, MS_RDBRACKET
, u
"rdbracket"_ustr
, TG::RBrace
, 5);
214 return SmToken(TRBRACKET
, MS_RBRACKET
, u
"]"_ustr
, TG::RBrace
, 5);
216 return SmToken(TRPARENT
, MS_RPARENT
, u
")"_ustr
, TG::RBrace
, 5);
218 return SmToken(TNONE
, MS_NONE
, u
"none"_ustr
, TG::RBrace
| TG::LBrace
, 5);
220 return SmToken(TERROR
, MS_NONE
, u
""_ustr
, TG::NONE
, SAL_MAX_UINT16
);
224 SmToken
starmathdatabase::Identify_Prefix_SmXMLOperatorContext_Impl(std::u16string_view rText
,
227 auto cChar
= o3tl::iterateCodePoints(rText
, &nIndex
);
231 return SmToken(TLLINE
, MS_VERTLINE
, u
"lline"_ustr
, TG::LBrace
, 5);
233 return SmToken(TLDLINE
, MS_DVERTLINE
, u
"ldline"_ustr
, TG::LBrace
, 5);
235 return SmToken(TLANGLE
, MS_LMATHANGLE
, u
"langle"_ustr
, TG::LBrace
, 5);
237 return SmToken(TLANGLE
, MS_LMATHANGLE
, u
"langle"_ustr
, TG::LBrace
, 5);
239 return SmToken(TLBRACE
, MS_LBRACE
, u
"lbrace"_ustr
, TG::LBrace
, 5);
241 return SmToken(TLCEIL
, MS_LCEIL
, u
"lceil"_ustr
, TG::LBrace
, 5);
243 return SmToken(TLFLOOR
, MS_LFLOOR
, u
"lfloor"_ustr
, TG::LBrace
, 5);
245 return SmToken(TLDBRACKET
, MS_LDBRACKET
, u
"ldbracket"_ustr
, TG::LBrace
, 5);
247 return SmToken(TLBRACKET
, MS_LBRACKET
, u
"["_ustr
, TG::LBrace
, 5);
249 return SmToken(TLPARENT
, MS_LPARENT
, u
"("_ustr
, TG::LBrace
, 5);
251 return SmToken(TRANGLE
, MS_RMATHANGLE
, u
"rangle"_ustr
, TG::RBrace
, 5);
253 return SmToken(TRANGLE
, MS_RMATHANGLE
, u
"rangle"_ustr
, TG::RBrace
, 5);
255 return SmToken(TRBRACE
, MS_RBRACE
, u
"rbrace"_ustr
, TG::RBrace
, 5);
257 return SmToken(TRCEIL
, MS_RCEIL
, u
"rceil"_ustr
, TG::RBrace
, 5);
259 return SmToken(TRFLOOR
, MS_RFLOOR
, u
"rfloor"_ustr
, TG::RBrace
, 5);
261 return SmToken(TRDBRACKET
, MS_RDBRACKET
, u
"rdbracket"_ustr
, TG::RBrace
, 5);
263 return SmToken(TRBRACKET
, MS_RBRACKET
, u
"]"_ustr
, TG::RBrace
, 5);
265 return SmToken(TRPARENT
, MS_RPARENT
, u
")"_ustr
, TG::RBrace
, 5);
267 return SmToken(TNONE
, MS_NONE
, u
"none"_ustr
, TG::LBrace
| TG::RBrace
, 5);
269 return SmToken(TERROR
, MS_NONE
, u
""_ustr
, TG::NONE
, SAL_MAX_UINT16
);
273 SmToken
starmathdatabase::Identify_Postfix_SmXMLOperatorContext_Impl(std::u16string_view rText
,
276 auto cChar
= o3tl::iterateCodePoints(rText
, &nIndex
);
280 return SmToken(TRLINE
, MS_VERTLINE
, u
"rline"_ustr
, TG::RBrace
, 5);
282 return SmToken(TRDLINE
, MS_DVERTLINE
, u
"rdline"_ustr
, TG::RBrace
, 5);
284 return SmToken(TLANGLE
, MS_LMATHANGLE
, u
"langle"_ustr
, TG::LBrace
, 5);
286 return SmToken(TLANGLE
, MS_LMATHANGLE
, u
"langle"_ustr
, TG::LBrace
, 5);
288 return SmToken(TLBRACE
, MS_LBRACE
, u
"lbrace"_ustr
, TG::LBrace
, 5);
290 return SmToken(TLCEIL
, MS_LCEIL
, u
"lceil"_ustr
, TG::LBrace
, 5);
292 return SmToken(TLFLOOR
, MS_LFLOOR
, u
"lfloor"_ustr
, TG::LBrace
, 5);
294 return SmToken(TLDBRACKET
, MS_LDBRACKET
, u
"ldbracket"_ustr
, TG::LBrace
, 5);
296 return SmToken(TLBRACKET
, MS_LBRACKET
, u
"["_ustr
, TG::LBrace
, 5);
298 return SmToken(TLPARENT
, MS_LPARENT
, u
"("_ustr
, TG::LBrace
, 5);
300 return SmToken(TRANGLE
, MS_RMATHANGLE
, u
"rangle"_ustr
, TG::RBrace
, 5);
302 return SmToken(TRANGLE
, MS_RMATHANGLE
, u
"rangle"_ustr
, TG::RBrace
, 5);
304 return SmToken(TRBRACE
, MS_RBRACE
, u
"rbrace"_ustr
, TG::RBrace
, 5);
306 return SmToken(TRCEIL
, MS_RCEIL
, u
"rceil"_ustr
, TG::RBrace
, 5);
308 return SmToken(TRFLOOR
, MS_RFLOOR
, u
"rfloor"_ustr
, TG::RBrace
, 5);
310 return SmToken(TRDBRACKET
, MS_RDBRACKET
, u
"rdbracket"_ustr
, TG::RBrace
, 5);
312 return SmToken(TRBRACKET
, MS_RBRACKET
, u
"]"_ustr
, TG::RBrace
, 5);
314 return SmToken(TRPARENT
, MS_RPARENT
, u
")"_ustr
, TG::RBrace
, 5);
316 return SmToken(TNONE
, MS_NONE
, u
"none"_ustr
, TG::LBrace
| TG::RBrace
, 5);
318 return SmToken(TERROR
, MS_NONE
, u
""_ustr
, TG::NONE
, SAL_MAX_UINT16
);
323 starmathdatabase::Identify_PrefixPostfix_SmXMLOperatorContext_Impl(std::u16string_view rText
,
326 auto cChar
= o3tl::iterateCodePoints(rText
, &nIndex
);
330 return SmToken(TLRLINE
, MS_VERTLINE
, u
"lrline"_ustr
, TG::LBrace
| TG::RBrace
, 5);
332 return SmToken(TLRDLINE
, MS_DVERTLINE
, u
"lrdline"_ustr
, TG::LBrace
| TG::RBrace
, 5);
334 return SmToken(TLANGLE
, MS_LMATHANGLE
, u
"langle"_ustr
, TG::LBrace
, 5);
336 return SmToken(TLANGLE
, MS_LMATHANGLE
, u
"langle"_ustr
, TG::LBrace
, 5);
338 return SmToken(TLBRACE
, MS_LBRACE
, u
"lbrace"_ustr
, TG::LBrace
, 5);
340 return SmToken(TLCEIL
, MS_LCEIL
, u
"lceil"_ustr
, TG::LBrace
, 5);
342 return SmToken(TLFLOOR
, MS_LFLOOR
, u
"lfloor"_ustr
, TG::LBrace
, 5);
344 return SmToken(TLDBRACKET
, MS_LDBRACKET
, u
"ldbracket"_ustr
, TG::LBrace
, 5);
346 return SmToken(TLBRACKET
, MS_LBRACKET
, u
"["_ustr
, TG::LBrace
, 5);
348 return SmToken(TLPARENT
, MS_LPARENT
, u
"("_ustr
, TG::LBrace
, 5);
350 return SmToken(TRANGLE
, MS_RMATHANGLE
, u
"rangle"_ustr
, TG::RBrace
, 5);
352 return SmToken(TRANGLE
, MS_RMATHANGLE
, u
"rangle"_ustr
, TG::RBrace
, 5);
354 return SmToken(TRBRACE
, MS_RBRACE
, u
"rbrace"_ustr
, TG::RBrace
, 5);
356 return SmToken(TRCEIL
, MS_RCEIL
, u
"rceil"_ustr
, TG::RBrace
, 5);
358 return SmToken(TRFLOOR
, MS_RFLOOR
, u
"rfloor"_ustr
, TG::RBrace
, 5);
360 return SmToken(TRDBRACKET
, MS_RDBRACKET
, u
"rdbracket"_ustr
, TG::RBrace
, 5);
362 return SmToken(TRBRACKET
, MS_RBRACKET
, u
"]"_ustr
, TG::RBrace
, 5);
364 return SmToken(TRPARENT
, MS_RPARENT
, u
")"_ustr
, TG::RBrace
, 5);
366 return SmToken(TNONE
, MS_NONE
, u
"none"_ustr
, TG::LBrace
| TG::RBrace
, 5);
368 return SmToken(TERROR
, MS_NONE
, u
""_ustr
, TG::NONE
, SAL_MAX_UINT16
);
372 const SmColorTokenTableEntry
starmathdatabase::aColorTokenTableParse
[]
373 = { { u
"aliceblue"_ustr
, THTMLCOL
, COL_SM_ALICEBLUE
},
374 { u
"antiquewhite"_ustr
, THTMLCOL
, COL_SM_ANTIQUEWHITE
},
375 { u
"aqua"_ustr
, TMATHMLCOL
, COL_SM_AQUA
},
376 { u
"aquamarine"_ustr
, THTMLCOL
, COL_SM_AQUAMARINE
},
377 { u
"azure"_ustr
, THTMLCOL
, COL_SM_AZURE
},
378 { u
"beige"_ustr
, THTMLCOL
, COL_SM_BEIGE
},
379 { u
"bisque"_ustr
, THTMLCOL
, COL_SM_BISQUE
},
380 { u
"black"_ustr
, TMATHMLCOL
, COL_SM_BLACK
},
381 { u
"blanchedalmond"_ustr
, THTMLCOL
, COL_SM_BLANCHEDALMOND
},
382 { u
"blue"_ustr
, TMATHMLCOL
, COL_SM_BLUE
},
383 { u
"blueviolet"_ustr
, THTMLCOL
, COL_SM_BLUEVIOLET
},
384 { u
"brown"_ustr
, THTMLCOL
, COL_SM_BROWN
},
385 { u
"burlywood"_ustr
, THTMLCOL
, COL_SM_BURLYWOOD
},
386 { u
"cadetblue"_ustr
, THTMLCOL
, COL_SM_CADETBLUE
},
387 { u
"chartreuse"_ustr
, THTMLCOL
, COL_SM_CHARTREUSE
},
388 { u
"chocolate"_ustr
, THTMLCOL
, COL_SM_CHOCOLATE
},
389 { u
"coral"_ustr
, THTMLCOL
, COL_SM_CORAL
},
390 { u
"cornflowerblue"_ustr
, THTMLCOL
, COL_SM_CORNFLOWERBLUE
},
391 { u
"cornsilk"_ustr
, THTMLCOL
, COL_SM_CORNSILK
},
392 { u
"crimson"_ustr
, THTMLCOL
, COL_SM_CRIMSON
},
393 { u
"cyan"_ustr
, TMATHMLCOL
, COL_SM_CYAN
},
394 { u
"darkblue"_ustr
, THTMLCOL
, COL_SM_DARKBLUE
},
395 { u
"darkcyan"_ustr
, THTMLCOL
, COL_SM_DARKCYAN
},
396 { u
"darkgoldenrod"_ustr
, THTMLCOL
, COL_SM_DARKGOLDENROD
},
397 { u
"darkgray"_ustr
, THTMLCOL
, COL_SM_DARKGRAY
},
398 { u
"darkgreen"_ustr
, THTMLCOL
, COL_SM_DARKGREEN
},
399 { u
"darkgrey"_ustr
, THTMLCOL
, COL_SM_DARKGREY
},
400 { u
"darkkhaki"_ustr
, THTMLCOL
, COL_SM_DARKKHAKI
},
401 { u
"darkmagenta"_ustr
, THTMLCOL
, COL_SM_DARKMAGENTA
},
402 { u
"darkolivegreen"_ustr
, THTMLCOL
, COL_SM_DARKOLIVEGREEN
},
403 { u
"darkorange"_ustr
, THTMLCOL
, COL_SM_DARKORANGE
},
404 { u
"darkorchid"_ustr
, THTMLCOL
, COL_SM_DARKORCHID
},
405 { u
"darkred"_ustr
, THTMLCOL
, COL_SM_DARKRED
},
406 { u
"darksalmon"_ustr
, THTMLCOL
, COL_SM_DARKSALMON
},
407 { u
"darkseagreen"_ustr
, THTMLCOL
, COL_SM_DARKSEAGREEN
},
408 { u
"darkslateblue"_ustr
, THTMLCOL
, COL_SM_DARKSLATEBLUE
},
409 { u
"darkslategray"_ustr
, THTMLCOL
, COL_SM_DARKSLATEGRAY
},
410 { u
"darkslategrey"_ustr
, THTMLCOL
, COL_SM_DARKSLATEGREY
},
411 { u
"darkturquoise"_ustr
, THTMLCOL
, COL_SM_DARKTURQUOISE
},
412 { u
"darkviolet"_ustr
, THTMLCOL
, COL_SM_DARKVIOLET
},
413 { u
"debian"_ustr
, TICONICCOL
, COL_SM_DEBIAN_MAGENTA
},
414 { u
"deeppink"_ustr
, THTMLCOL
, COL_SM_DEEPPINK
},
415 { u
"deepskyblue"_ustr
, THTMLCOL
, COL_SM_DEEPSKYBLUE
},
416 { u
"dimgray"_ustr
, THTMLCOL
, COL_SM_DIMGRAY
},
417 { u
"dimgrey"_ustr
, THTMLCOL
, COL_SM_DIMGREY
},
418 { u
"dodgerblue"_ustr
, THTMLCOL
, COL_SM_DODGERBLUE
},
419 { u
"dvip"_ustr
, TDVIPSNAMESCOL
, COL_SM_BLACK
},
420 { u
"firebrick"_ustr
, THTMLCOL
, COL_SM_FIREBRICK
},
421 { u
"floralwhite"_ustr
, THTMLCOL
, COL_SM_FLORALWHITE
},
422 { u
"forestgreen"_ustr
, THTMLCOL
, COL_SM_FORESTGREEN
},
423 { u
"fuchsia"_ustr
, TMATHMLCOL
, COL_SM_FUCHSIA
},
424 { u
"gainsboro"_ustr
, THTMLCOL
, COL_SM_GAINSBORO
},
425 { u
"ghostwhite"_ustr
, THTMLCOL
, COL_SM_GHOSTWHITE
},
426 { u
"gold"_ustr
, THTMLCOL
, COL_SM_GOLD
},
427 { u
"goldenrod"_ustr
, THTMLCOL
, COL_SM_GOLDENROD
},
428 { u
"gray"_ustr
, TMATHMLCOL
, COL_SM_GRAY
},
429 { u
"green"_ustr
, TMATHMLCOL
, COL_SM_GREEN
},
430 { u
"greenyellow"_ustr
, THTMLCOL
, COL_SM_GREENYELLOW
},
431 { u
"grey"_ustr
, THTMLCOL
, COL_SM_GREY
},
432 { u
"hex"_ustr
, THEX
, COL_SM_BLACK
},
433 { u
"honeydew"_ustr
, THTMLCOL
, COL_SM_HONEYDEW
},
434 { u
"hotpink"_ustr
, THTMLCOL
, COL_SM_HOTPINK
},
435 { u
"indianred"_ustr
, THTMLCOL
, COL_SM_INDIANRED
},
436 { u
"indigo"_ustr
, THTMLCOL
, COL_SM_INDIGO
},
437 { u
"ivory"_ustr
, THTMLCOL
, COL_SM_IVORY
},
438 { u
"khaki"_ustr
, THTMLCOL
, COL_SM_KHAKI
},
439 { u
"lavender"_ustr
, THTMLCOL
, COL_SM_LAVENDER
},
440 { u
"lavenderblush"_ustr
, THTMLCOL
, COL_SM_LAVENDERBLUSH
},
441 { u
"lawngreen"_ustr
, THTMLCOL
, COL_SM_LAWNGREEN
},
442 { u
"lemonchiffon"_ustr
, THTMLCOL
, COL_SM_LEMONCHIFFON
},
443 { u
"lightblue"_ustr
, THTMLCOL
, COL_SM_LIGHTBLUE
},
444 { u
"lightcoral"_ustr
, THTMLCOL
, COL_SM_LIGHTCORAL
},
445 { u
"lightcyan"_ustr
, THTMLCOL
, COL_SM_LIGHTCYAN
},
446 { u
"lightgoldenrodyellow"_ustr
, THTMLCOL
, COL_SM_LIGHTGOLDENRODYELLOW
},
447 { u
"lightgray"_ustr
, THTMLCOL
, COL_SM_LIGHTGRAY
},
448 { u
"lightgreen"_ustr
, THTMLCOL
, COL_SM_LIGHTGREEN
},
449 { u
"lightgrey"_ustr
, THTMLCOL
, COL_SM_LIGHTGREY
},
450 { u
"lightpink"_ustr
, THTMLCOL
, COL_SM_LIGHTPINK
},
451 { u
"lightsalmon"_ustr
, THTMLCOL
, COL_SM_LIGHTSALMON
},
452 { u
"lightseagreen"_ustr
, THTMLCOL
, COL_SM_LIGHTSEAGREEN
},
453 { u
"lightskyblue"_ustr
, THTMLCOL
, COL_SM_LIGHTSKYBLUE
},
454 { u
"lightslategray"_ustr
, THTMLCOL
, COL_SM_LIGHTSLATEGRAY
},
455 { u
"lightslategrey"_ustr
, THTMLCOL
, COL_SM_LIGHTSLATEGREY
},
456 { u
"lightsteelblue"_ustr
, THTMLCOL
, COL_SM_LIGHTSTEELBLUE
},
457 { u
"lightyellow"_ustr
, THTMLCOL
, COL_SM_LIGHTYELLOW
},
458 { u
"lime"_ustr
, TMATHMLCOL
, COL_SM_LIME
},
459 { u
"limegreen"_ustr
, THTMLCOL
, COL_SM_LIMEGREEN
},
460 { u
"linen"_ustr
, THTMLCOL
, COL_SM_LINEN
},
461 { u
"lo"_ustr
, TICONICCOL
, COL_SM_LO_GREEN
},
462 { u
"magenta"_ustr
, TMATHMLCOL
, COL_SM_MAGENTA
},
463 { u
"maroon"_ustr
, TMATHMLCOL
, COL_SM_MAROON
},
464 { u
"mediumaquamarine"_ustr
, THTMLCOL
, COL_SM_MEDIUMAQUAMARINE
},
465 { u
"mediumblue"_ustr
, THTMLCOL
, COL_SM_MEDIUMBLUE
},
466 { u
"mediumorchid"_ustr
, THTMLCOL
, COL_SM_MEDIUMORCHID
},
467 { u
"mediumpurple"_ustr
, THTMLCOL
, COL_SM_MEDIUMPURPLE
},
468 { u
"mediumseagreen"_ustr
, THTMLCOL
, COL_SM_MEDIUMSEAGREEN
},
469 { u
"mediumslateblue"_ustr
, THTMLCOL
, COL_SM_MEDIUMSLATEBLUE
},
470 { u
"mediumspringgreen"_ustr
, THTMLCOL
, COL_SM_MEDIUMSPRINGGREEN
},
471 { u
"mediumturquoise"_ustr
, THTMLCOL
, COL_SM_MEDIUMTURQUOISE
},
472 { u
"mediumvioletred"_ustr
, THTMLCOL
, COL_SM_MEDIUMVIOLETRED
},
473 { u
"midnightblue"_ustr
, THTMLCOL
, COL_SM_MIDNIGHTBLUE
},
474 { u
"mintcream"_ustr
, THTMLCOL
, COL_SM_MINTCREAM
},
475 { u
"mistyrose"_ustr
, THTMLCOL
, COL_SM_MISTYROSE
},
476 { u
"moccasin"_ustr
, THTMLCOL
, COL_SM_MOCCASIN
},
477 { u
"navajowhite"_ustr
, THTMLCOL
, COL_SM_NAVAJOWHITE
},
478 { u
"navy"_ustr
, TMATHMLCOL
, COL_SM_NAVY
},
479 { u
"oldlace"_ustr
, THTMLCOL
, COL_SM_OLDLACE
},
480 { u
"olive"_ustr
, TMATHMLCOL
, COL_SM_OLIVE
},
481 { u
"olivedrab"_ustr
, THTMLCOL
, COL_SM_OLIVEDRAB
},
482 { u
"orange"_ustr
, THTMLCOL
, COL_SM_ORANGE
},
483 { u
"orangered"_ustr
, THTMLCOL
, COL_SM_ORANGERED
},
484 { u
"orchid"_ustr
, THTMLCOL
, COL_SM_ORCHID
},
485 { u
"palegoldenrod"_ustr
, THTMLCOL
, COL_SM_PALEGOLDENROD
},
486 { u
"palegreen"_ustr
, THTMLCOL
, COL_SM_PALEGREEN
},
487 { u
"paleturquoise"_ustr
, THTMLCOL
, COL_SM_PALETURQUOISE
},
488 { u
"palevioletred"_ustr
, THTMLCOL
, COL_SM_PALEVIOLETRED
},
489 { u
"papayawhip"_ustr
, THTMLCOL
, COL_SM_PAPAYAWHIP
},
490 { u
"peachpuff"_ustr
, THTMLCOL
, COL_SM_PEACHPUFF
},
491 { u
"peru"_ustr
, THTMLCOL
, COL_SM_PERU
},
492 { u
"pink"_ustr
, THTMLCOL
, COL_SM_PINK
},
493 { u
"plum"_ustr
, THTMLCOL
, COL_SM_PLUM
},
494 { u
"powderblue"_ustr
, THTMLCOL
, COL_SM_POWDERBLUE
},
495 { u
"purple"_ustr
, TMATHMLCOL
, COL_SM_PURPLE
},
496 { u
"rebeccapurple"_ustr
, THTMLCOL
, COL_SM_REBECCAPURPLE
},
497 { u
"red"_ustr
, TMATHMLCOL
, COL_SM_RED
},
498 { u
"rgb"_ustr
, TRGB
, COL_AUTO
},
499 { u
"rgba"_ustr
, TRGBA
, COL_AUTO
},
500 { u
"rosybrown"_ustr
, THTMLCOL
, COL_SM_ROSYBROWN
},
501 { u
"royalblue"_ustr
, THTMLCOL
, COL_SM_ROYALBLUE
},
502 { u
"saddlebrown"_ustr
, THTMLCOL
, COL_SM_SADDLEBROWN
},
503 { u
"salmon"_ustr
, THTMLCOL
, COL_SM_SALMON
},
504 { u
"sandybrown"_ustr
, THTMLCOL
, COL_SM_SANDYBROWN
},
505 { u
"seagreen"_ustr
, THTMLCOL
, COL_SM_SEAGREEN
},
506 { u
"seashell"_ustr
, THTMLCOL
, COL_SM_SEASHELL
},
507 { u
"sienna"_ustr
, THTMLCOL
, COL_SM_SIENNA
},
508 { u
"silver"_ustr
, TMATHMLCOL
, COL_SM_SILVER
},
509 { u
"skyblue"_ustr
, THTMLCOL
, COL_SM_SKYBLUE
},
510 { u
"slateblue"_ustr
, THTMLCOL
, COL_SM_SLATEBLUE
},
511 { u
"slategray"_ustr
, THTMLCOL
, COL_SM_SLATEGRAY
},
512 { u
"slategrey"_ustr
, THTMLCOL
, COL_SM_SLATEGREY
},
513 { u
"snow"_ustr
, THTMLCOL
, COL_SM_SNOW
},
514 { u
"springgreen"_ustr
, THTMLCOL
, COL_SM_SPRINGGREEN
},
515 { u
"steelblue"_ustr
, THTMLCOL
, COL_SM_STEELBLUE
},
516 { u
"tan"_ustr
, THTMLCOL
, COL_SM_TAN
},
517 { u
"teal"_ustr
, TMATHMLCOL
, COL_SM_TEAL
},
518 { u
"thistle"_ustr
, THTMLCOL
, COL_SM_THISTLE
},
519 { u
"tomato"_ustr
, THTMLCOL
, COL_SM_TOMATO
},
520 { u
"turquoise"_ustr
, THTMLCOL
, COL_SM_TURQUOISE
},
521 { u
"ubuntu"_ustr
, TICONICCOL
, COL_SM_UBUNTU_ORANGE
},
522 { u
"violet"_ustr
, THTMLCOL
, COL_SM_VIOLET
},
523 { u
"wheat"_ustr
, THTMLCOL
, COL_SM_WHEAT
},
524 { u
"white"_ustr
, TMATHMLCOL
, COL_SM_WHITE
},
525 { u
"whitesmoke"_ustr
, THTMLCOL
, COL_SM_WHITESMOKE
},
526 { u
"yellow"_ustr
, TMATHMLCOL
, COL_SM_YELLOW
},
527 { u
"yellowgreen"_ustr
, THTMLCOL
, COL_SM_YELLOWGREEN
} };
529 const SmColorTokenTableEntry
starmathdatabase::aColorTokenTableHTML
[]
530 = { { u
"aliceblue"_ustr
, THTMLCOL
, COL_SM_ALICEBLUE
},
531 { u
"antiquewhite"_ustr
, THTMLCOL
, COL_SM_ANTIQUEWHITE
},
532 { u
"aqua"_ustr
, TMATHMLCOL
, COL_SM_AQUA
},
533 { u
"aquamarine"_ustr
, THTMLCOL
, COL_SM_AQUAMARINE
},
534 { u
"azure"_ustr
, THTMLCOL
, COL_SM_AZURE
},
535 { u
"beige"_ustr
, THTMLCOL
, COL_SM_BEIGE
},
536 { u
"bisque"_ustr
, THTMLCOL
, COL_SM_BISQUE
},
537 { u
"black"_ustr
, TMATHMLCOL
, COL_SM_BLACK
},
538 { u
"blanchedalmond"_ustr
, THTMLCOL
, COL_SM_BLANCHEDALMOND
},
539 { u
"blue"_ustr
, TMATHMLCOL
, COL_SM_BLUE
},
540 { u
"blueviolet"_ustr
, THTMLCOL
, COL_SM_BLUEVIOLET
},
541 { u
"brown"_ustr
, THTMLCOL
, COL_SM_BROWN
},
542 { u
"burlywood"_ustr
, THTMLCOL
, COL_SM_BURLYWOOD
},
543 { u
"cadetblue"_ustr
, THTMLCOL
, COL_SM_CADETBLUE
},
544 { u
"chartreuse"_ustr
, THTMLCOL
, COL_SM_CHARTREUSE
},
545 { u
"chocolate"_ustr
, THTMLCOL
, COL_SM_CHOCOLATE
},
546 { u
"coral"_ustr
, THTMLCOL
, COL_SM_CORAL
},
547 { u
"cornflowerblue"_ustr
, THTMLCOL
, COL_SM_CORNFLOWERBLUE
},
548 { u
"cornsilk"_ustr
, THTMLCOL
, COL_SM_CORNSILK
},
549 { u
"crimson"_ustr
, THTMLCOL
, COL_SM_CRIMSON
},
550 { u
"cyan"_ustr
, TMATHMLCOL
, COL_SM_CYAN
},
551 { u
"darkblue"_ustr
, THTMLCOL
, COL_SM_DARKBLUE
},
552 { u
"darkcyan"_ustr
, THTMLCOL
, COL_SM_DARKCYAN
},
553 { u
"darkgoldenrod"_ustr
, THTMLCOL
, COL_SM_DARKGOLDENROD
},
554 { u
"darkgray"_ustr
, THTMLCOL
, COL_SM_DARKGRAY
},
555 { u
"darkgreen"_ustr
, THTMLCOL
, COL_SM_DARKGREEN
},
556 { u
"darkgrey"_ustr
, THTMLCOL
, COL_SM_DARKGREY
},
557 { u
"darkkhaki"_ustr
, THTMLCOL
, COL_SM_DARKKHAKI
},
558 { u
"darkmagenta"_ustr
, THTMLCOL
, COL_SM_DARKMAGENTA
},
559 { u
"darkolivegreen"_ustr
, THTMLCOL
, COL_SM_DARKOLIVEGREEN
},
560 { u
"darkorange"_ustr
, THTMLCOL
, COL_SM_DARKORANGE
},
561 { u
"darkorchid"_ustr
, THTMLCOL
, COL_SM_DARKORCHID
},
562 { u
"darkred"_ustr
, THTMLCOL
, COL_SM_DARKRED
},
563 { u
"darksalmon"_ustr
, THTMLCOL
, COL_SM_DARKSALMON
},
564 { u
"darkseagreen"_ustr
, THTMLCOL
, COL_SM_DARKSEAGREEN
},
565 { u
"darkslateblue"_ustr
, THTMLCOL
, COL_SM_DARKSLATEBLUE
},
566 { u
"darkslategray"_ustr
, THTMLCOL
, COL_SM_DARKSLATEGRAY
},
567 { u
"darkslategrey"_ustr
, THTMLCOL
, COL_SM_DARKSLATEGREY
},
568 { u
"darkturquoise"_ustr
, THTMLCOL
, COL_SM_DARKTURQUOISE
},
569 { u
"darkviolet"_ustr
, THTMLCOL
, COL_SM_DARKVIOLET
},
570 { u
"deeppink"_ustr
, THTMLCOL
, COL_SM_DEEPPINK
},
571 { u
"deepskyblue"_ustr
, THTMLCOL
, COL_SM_DEEPSKYBLUE
},
572 { u
"dimgray"_ustr
, THTMLCOL
, COL_SM_DIMGRAY
},
573 { u
"dimgrey"_ustr
, THTMLCOL
, COL_SM_DIMGREY
},
574 { u
"dodgerblue"_ustr
, THTMLCOL
, COL_SM_DODGERBLUE
},
575 { u
"firebrick"_ustr
, THTMLCOL
, COL_SM_FIREBRICK
},
576 { u
"floralwhite"_ustr
, THTMLCOL
, COL_SM_FLORALWHITE
},
577 { u
"forestgreen"_ustr
, THTMLCOL
, COL_SM_FORESTGREEN
},
578 { u
"fuchsia"_ustr
, TMATHMLCOL
, COL_SM_FUCHSIA
},
579 { u
"gainsboro"_ustr
, THTMLCOL
, COL_SM_GAINSBORO
},
580 { u
"ghostwhite"_ustr
, THTMLCOL
, COL_SM_GHOSTWHITE
},
581 { u
"gold"_ustr
, THTMLCOL
, COL_SM_GOLD
},
582 { u
"goldenrod"_ustr
, THTMLCOL
, COL_SM_GOLDENROD
},
583 { u
"gray"_ustr
, TMATHMLCOL
, COL_SM_GRAY
},
584 { u
"green"_ustr
, TMATHMLCOL
, COL_SM_GREEN
},
585 { u
"greenyellow"_ustr
, THTMLCOL
, COL_SM_GREENYELLOW
},
586 { u
"grey"_ustr
, THTMLCOL
, COL_SM_GREY
},
587 { u
"honeydew"_ustr
, THTMLCOL
, COL_SM_HONEYDEW
},
588 { u
"hotpink"_ustr
, THTMLCOL
, COL_SM_HOTPINK
},
589 { u
"indianred"_ustr
, THTMLCOL
, COL_SM_INDIANRED
},
590 { u
"indigo"_ustr
, THTMLCOL
, COL_SM_INDIGO
},
591 { u
"ivory"_ustr
, THTMLCOL
, COL_SM_IVORY
},
592 { u
"khaki"_ustr
, THTMLCOL
, COL_SM_KHAKI
},
593 { u
"lavender"_ustr
, THTMLCOL
, COL_SM_LAVENDER
},
594 { u
"lavenderblush"_ustr
, THTMLCOL
, COL_SM_LAVENDERBLUSH
},
595 { u
"lawngreen"_ustr
, THTMLCOL
, COL_SM_LAWNGREEN
},
596 { u
"lemonchiffon"_ustr
, THTMLCOL
, COL_SM_LEMONCHIFFON
},
597 { u
"lightblue"_ustr
, THTMLCOL
, COL_SM_LIGHTBLUE
},
598 { u
"lightcoral"_ustr
, THTMLCOL
, COL_SM_LIGHTCORAL
},
599 { u
"lightcyan"_ustr
, THTMLCOL
, COL_SM_LIGHTCYAN
},
600 { u
"lightgoldenrodyellow"_ustr
, THTMLCOL
, COL_SM_LIGHTGOLDENRODYELLOW
},
601 { u
"lightgray"_ustr
, THTMLCOL
, COL_SM_LIGHTGRAY
},
602 { u
"lightgreen"_ustr
, THTMLCOL
, COL_SM_LIGHTGREEN
},
603 { u
"lightgrey"_ustr
, THTMLCOL
, COL_SM_LIGHTGREY
},
604 { u
"lightpink"_ustr
, THTMLCOL
, COL_SM_LIGHTPINK
},
605 { u
"lightsalmon"_ustr
, THTMLCOL
, COL_SM_LIGHTSALMON
},
606 { u
"lightseagreen"_ustr
, THTMLCOL
, COL_SM_LIGHTSEAGREEN
},
607 { u
"lightskyblue"_ustr
, THTMLCOL
, COL_SM_LIGHTSKYBLUE
},
608 { u
"lightslategray"_ustr
, THTMLCOL
, COL_SM_LIGHTSLATEGRAY
},
609 { u
"lightslategrey"_ustr
, THTMLCOL
, COL_SM_LIGHTSLATEGREY
},
610 { u
"lightsteelblue"_ustr
, THTMLCOL
, COL_SM_LIGHTSTEELBLUE
},
611 { u
"lightyellow"_ustr
, THTMLCOL
, COL_SM_LIGHTYELLOW
},
612 { u
"lime"_ustr
, TMATHMLCOL
, COL_SM_LIME
},
613 { u
"limegreen"_ustr
, THTMLCOL
, COL_SM_LIMEGREEN
},
614 { u
"linen"_ustr
, THTMLCOL
, COL_SM_LINEN
},
615 { u
"magenta"_ustr
, TMATHMLCOL
, COL_SM_MAGENTA
},
616 { u
"maroon"_ustr
, TMATHMLCOL
, COL_SM_MAROON
},
617 { u
"mediumaquamarine"_ustr
, THTMLCOL
, COL_SM_MEDIUMAQUAMARINE
},
618 { u
"mediumblue"_ustr
, THTMLCOL
, COL_SM_MEDIUMBLUE
},
619 { u
"mediumorchid"_ustr
, THTMLCOL
, COL_SM_MEDIUMORCHID
},
620 { u
"mediumpurple"_ustr
, THTMLCOL
, COL_SM_MEDIUMPURPLE
},
621 { u
"mediumseagreen"_ustr
, THTMLCOL
, COL_SM_MEDIUMSEAGREEN
},
622 { u
"mediumslateblue"_ustr
, THTMLCOL
, COL_SM_MEDIUMSLATEBLUE
},
623 { u
"mediumspringgreen"_ustr
, THTMLCOL
, COL_SM_MEDIUMSPRINGGREEN
},
624 { u
"mediumturquoise"_ustr
, THTMLCOL
, COL_SM_MEDIUMTURQUOISE
},
625 { u
"mediumvioletred"_ustr
, THTMLCOL
, COL_SM_MEDIUMVIOLETRED
},
626 { u
"midnightblue"_ustr
, THTMLCOL
, COL_SM_MIDNIGHTBLUE
},
627 { u
"mintcream"_ustr
, THTMLCOL
, COL_SM_MINTCREAM
},
628 { u
"mistyrose"_ustr
, THTMLCOL
, COL_SM_MISTYROSE
},
629 { u
"moccasin"_ustr
, THTMLCOL
, COL_SM_MOCCASIN
},
630 { u
"navajowhite"_ustr
, THTMLCOL
, COL_SM_NAVAJOWHITE
},
631 { u
"navy"_ustr
, TMATHMLCOL
, COL_SM_NAVY
},
632 { u
"oldlace"_ustr
, THTMLCOL
, COL_SM_OLDLACE
},
633 { u
"olive"_ustr
, TMATHMLCOL
, COL_SM_OLIVE
},
634 { u
"olivedrab"_ustr
, THTMLCOL
, COL_SM_OLIVEDRAB
},
635 { u
"orange"_ustr
, THTMLCOL
, COL_SM_ORANGE
},
636 { u
"orangered"_ustr
, THTMLCOL
, COL_SM_ORANGERED
},
637 { u
"orchid"_ustr
, THTMLCOL
, COL_SM_ORCHID
},
638 { u
"palegoldenrod"_ustr
, THTMLCOL
, COL_SM_PALEGOLDENROD
},
639 { u
"palegreen"_ustr
, THTMLCOL
, COL_SM_PALEGREEN
},
640 { u
"paleturquoise"_ustr
, THTMLCOL
, COL_SM_PALETURQUOISE
},
641 { u
"palevioletred"_ustr
, THTMLCOL
, COL_SM_PALEVIOLETRED
},
642 { u
"papayawhip"_ustr
, THTMLCOL
, COL_SM_PAPAYAWHIP
},
643 { u
"peachpuff"_ustr
, THTMLCOL
, COL_SM_PEACHPUFF
},
644 { u
"peru"_ustr
, THTMLCOL
, COL_SM_PERU
},
645 { u
"pink"_ustr
, THTMLCOL
, COL_SM_PINK
},
646 { u
"plum"_ustr
, THTMLCOL
, COL_SM_PLUM
},
647 { u
"powderblue"_ustr
, THTMLCOL
, COL_SM_POWDERBLUE
},
648 { u
"purple"_ustr
, TMATHMLCOL
, COL_SM_PURPLE
},
649 { u
"rebeccapurple"_ustr
, THTMLCOL
, COL_SM_REBECCAPURPLE
},
650 { u
"red"_ustr
, TMATHMLCOL
, COL_SM_RED
},
651 { u
"rosybrown"_ustr
, THTMLCOL
, COL_SM_ROSYBROWN
},
652 { u
"royalblue"_ustr
, THTMLCOL
, COL_SM_ROYALBLUE
},
653 { u
"saddlebrown"_ustr
, THTMLCOL
, COL_SM_SADDLEBROWN
},
654 { u
"salmon"_ustr
, THTMLCOL
, COL_SM_SALMON
},
655 { u
"sandybrown"_ustr
, THTMLCOL
, COL_SM_SANDYBROWN
},
656 { u
"seagreen"_ustr
, THTMLCOL
, COL_SM_SEAGREEN
},
657 { u
"seashell"_ustr
, THTMLCOL
, COL_SM_SEASHELL
},
658 { u
"sienna"_ustr
, THTMLCOL
, COL_SM_SIENNA
},
659 { u
"silver"_ustr
, TMATHMLCOL
, COL_SM_SILVER
},
660 { u
"skyblue"_ustr
, THTMLCOL
, COL_SM_SKYBLUE
},
661 { u
"slateblue"_ustr
, THTMLCOL
, COL_SM_SLATEBLUE
},
662 { u
"slategray"_ustr
, THTMLCOL
, COL_SM_SLATEGRAY
},
663 { u
"slategrey"_ustr
, THTMLCOL
, COL_SM_SLATEGREY
},
664 { u
"snow"_ustr
, THTMLCOL
, COL_SM_SNOW
},
665 { u
"springgreen"_ustr
, THTMLCOL
, COL_SM_SPRINGGREEN
},
666 { u
"steelblue"_ustr
, THTMLCOL
, COL_SM_STEELBLUE
},
667 { u
"tan"_ustr
, THTMLCOL
, COL_SM_TAN
},
668 { u
"teal"_ustr
, TMATHMLCOL
, COL_SM_TEAL
},
669 { u
"thistle"_ustr
, THTMLCOL
, COL_SM_THISTLE
},
670 { u
"tomato"_ustr
, THTMLCOL
, COL_SM_TOMATO
},
671 { u
"turquoise"_ustr
, THTMLCOL
, COL_SM_TURQUOISE
},
672 { u
"violet"_ustr
, THTMLCOL
, COL_SM_VIOLET
},
673 { u
"wheat"_ustr
, THTMLCOL
, COL_SM_WHEAT
},
674 { u
"white"_ustr
, TMATHMLCOL
, COL_SM_WHITE
},
675 { u
"whitesmoke"_ustr
, THTMLCOL
, COL_SM_WHITESMOKE
},
676 { u
"yellow"_ustr
, TMATHMLCOL
, COL_SM_YELLOW
},
677 { u
"yellowgreen"_ustr
, THTMLCOL
, COL_SM_YELLOWGREEN
} };
679 const SmColorTokenTableEntry
starmathdatabase::aColorTokenTableDVIPS
[]
680 = { { u
"apricot"_ustr
, TDVIPSNAMESCOL
, COL_SM_DIV_APRICOT
},
681 { u
"aquamarine"_ustr
, TDVIPSNAMESCOL
, COL_SM_DIV_AQUAMARINE
},
682 { u
"bittersweet"_ustr
, TDVIPSNAMESCOL
, COL_SM_DIV_BITTERSWEET
},
683 { u
"black"_ustr
, TDVIPSNAMESCOL
, COL_SM_BLACK
},
684 { u
"blue"_ustr
, TDVIPSNAMESCOL
, COL_SM_BLACK
} };
686 const SmColorTokenTableEntry
starmathdatabase::aColorTokenTableMATHML
[] = {
688 { u
"aqua"_ustr
, TMATHMLCOL
, COL_SM_AQUA
},
689 { u
"black"_ustr
, TMATHMLCOL
, COL_SM_BLACK
},
690 { u
"blue"_ustr
, TMATHMLCOL
, COL_SM_BLUE
},
691 { u
"fuchsia"_ustr
, TMATHMLCOL
, COL_SM_FUCHSIA
},
692 { u
"gray"_ustr
, TMATHMLCOL
, COL_SM_GRAY
},
693 { u
"green"_ustr
, TMATHMLCOL
, COL_SM_GREEN
},
694 { u
"lime"_ustr
, TMATHMLCOL
, COL_SM_LIME
},
695 { u
"maroon"_ustr
, TMATHMLCOL
, COL_SM_MAROON
},
696 { u
"navy"_ustr
, TMATHMLCOL
, COL_SM_NAVY
},
697 { u
"olive"_ustr
, TMATHMLCOL
, COL_SM_OLIVE
},
698 { u
"purple"_ustr
, TMATHMLCOL
, COL_SM_PURPLE
},
699 { u
"red"_ustr
, TMATHMLCOL
, COL_SM_RED
},
700 { u
"silver"_ustr
, TMATHMLCOL
, COL_SM_SILVER
},
701 { u
"teal"_ustr
, TMATHMLCOL
, COL_SM_TEAL
},
702 { u
"white"_ustr
, TMATHMLCOL
, COL_SM_WHITE
},
703 { u
"yellow"_ustr
, TMATHMLCOL
, COL_SM_YELLOW
}
707 const SmColorTokenTableEntry
starmathdatabase::aColorTokenTableERROR
[]
708 = { { u
""_ustr
, TERROR
, COL_SM_BLACK
} };
710 SmColorTokenTableEntry
starmathdatabase::Identify_Color_Parser(sal_uInt32 cColor
)
712 for (auto i
= std::begin(aColorTokenTableParse
); i
< std::end(aColorTokenTableParse
); ++i
)
713 if (i
->equals(cColor
))
714 return SmColorTokenTableEntry(i
);
715 for (auto i
= std::begin(aColorTokenTableDVIPS
); i
< std::end(aColorTokenTableDVIPS
); ++i
)
716 if (i
->equals(cColor
))
717 return SmColorTokenTableEntry(i
);
718 if ((cColor
& 0x00FFFFFF) == cColor
)
719 return SmColorTokenTableEntry(u
""_ustr
, TRGB
, cColor
);
721 return SmColorTokenTableEntry(u
""_ustr
, TRGBA
, cColor
);
724 SmColorTokenTableEntry
starmathdatabase::Identify_Color_MATHML(sal_uInt32 cColor
)
726 for (auto i
= std::begin(aColorTokenTableMATHML
); i
< std::end(aColorTokenTableMATHML
); ++i
)
727 if (i
->equals(cColor
))
728 return SmColorTokenTableEntry(i
);
729 if ((cColor
& 0x00FFFFFF) == cColor
)
730 return SmColorTokenTableEntry(u
""_ustr
, TRGB
, cColor
);
732 return SmColorTokenTableEntry(u
""_ustr
, TRGBA
, cColor
);
735 SmColorTokenTableEntry
starmathdatabase::Identify_Color_DVIPSNAMES(sal_uInt32 cColor
)
737 for (auto i
= std::begin(aColorTokenTableDVIPS
); i
< std::end(aColorTokenTableDVIPS
); ++i
)
738 if (i
->equals(cColor
))
739 return SmColorTokenTableEntry(i
);
740 if ((cColor
& 0x00FFFFFF) == cColor
)
741 return SmColorTokenTableEntry(u
""_ustr
, TRGB
, cColor
);
743 return SmColorTokenTableEntry(u
""_ustr
, TRGBA
, cColor
);
746 const SmColorTokenTableEntry
*
747 starmathdatabase::Identify_ColorName_Parser(std::u16string_view colorname
)
749 if (colorname
.empty())
750 return &aColorTokenTableERROR
[0];
751 for (auto i
= std::begin(aColorTokenTableParse
); i
< std::end(aColorTokenTableParse
); ++i
)
753 sal_Int32 matches
= o3tl::compareToIgnoreAsciiCase(colorname
, i
->aIdent
);
759 return &aColorTokenTableERROR
[0];
761 SmColorTokenTableEntry
starmathdatabase::Identify_ColorName_HTML(std::u16string_view colorname
)
763 if (colorname
.empty())
764 return SmColorTokenTableEntry(u
""_ustr
, TERROR
, COL_SM_BLACK
);
765 if (colorname
[0] == '#')
767 Color col
= Color::STRtoRGB(colorname
);
768 return SmColorTokenTableEntry(u
""_ustr
, TRGB
, col
);
770 for (auto i
= std::begin(aColorTokenTableHTML
); i
< std::end(aColorTokenTableHTML
); ++i
)
772 sal_Int32 matches
= o3tl::compareToIgnoreAsciiCase(colorname
, i
->aIdent
);
774 return SmColorTokenTableEntry(i
);
778 return SmColorTokenTableEntry(u
""_ustr
, TERROR
, COL_SM_BLACK
);
780 const SmColorTokenTableEntry
*
781 starmathdatabase::Identify_ColorName_DVIPSNAMES(std::u16string_view colorname
)
783 if (colorname
.empty())
784 return &aColorTokenTableERROR
[0];
785 for (auto i
= std::begin(aColorTokenTableDVIPS
); i
< std::end(aColorTokenTableDVIPS
); ++i
)
787 sal_Int32 matches
= o3tl::compareToIgnoreAsciiCase(colorname
, i
->aIdent
);
793 return &aColorTokenTableERROR
[0];