diff options
author | dante <dante19031999@gmail.com> | 2021-02-02 15:08:43 +0100 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-02-03 07:56:45 +0100 |
commit | 404f14ce91b3c8abdd59c017298923b71fa5cef0 (patch) | |
tree | 57f3ae8c108b4463146ac7af6d1ee92b96babcb1 /starmath/source | |
parent | 3b778d346522ac8fc3018eb93509fb3d993233cc (diff) |
Clean up SmColorTokenTableEntry
Remove useless member SmColorTokenTableEntry::cIdent
aColorTokenTableDVIPS renamed (make the loop enter in one line)
removed redundant code in visitors (related to color)
removed temporal variables on visitors (related to color)
removed temporal variables on mthmlexport (related to color)
removed redundant code in mathmlexport (related to color)
Since SmColorTokenTableEntry is used as pointer remove useless operators
Change-Id: Icef831711c95e4f9c23b29a3a3606dd9d6fcf6c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110321
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'starmath/source')
-rw-r--r-- | starmath/source/mathml/mathmlexport.cxx | 8 | ||||
-rw-r--r-- | starmath/source/mathml/starmathdatabase.cxx | 695 | ||||
-rw-r--r-- | starmath/source/visitors.cxx | 12 |
3 files changed, 352 insertions, 363 deletions
diff --git a/starmath/source/mathml/mathmlexport.cxx b/starmath/source/mathml/mathmlexport.cxx index 2c621217504f..004e83ca1655 100644 --- a/starmath/source/mathml/mathmlexport.cxx +++ b/starmath/source/mathml/mathmlexport.cxx @@ -1146,10 +1146,9 @@ void SmXMLExport::ExportFont(const SmNode* pNode, int nLevel) break; case TMATHMLCOL: { - std::unique_ptr<SmColorTokenTableEntry> aSmColorTokenTableEntry; nc = pNode->GetToken().aText.toUInt32(16); - aSmColorTokenTableEntry = starmathdatabase::Identify_Color_MATHML(nc); - OUString sssStr = OUString::createFromAscii(aSmColorTokenTableEntry->cIdent); + OUString sssStr + = OUString::createFromAscii(starmathdatabase::Identify_Color_MATHML(nc)->pIdent); AddAttribute(XML_NAMESPACE_MATH, XML_MATHCOLOR, sssStr); } break; @@ -1160,9 +1159,8 @@ void SmXMLExport::ExportFont(const SmNode* pNode, int nLevel) case TDVIPSNAMESCOL: case TICONICCOL: { - OUStringBuffer sStrBuf; + OUStringBuffer sStrBuf(7); sStrBuf.append('#'); - std::unique_ptr<SmColorTokenTableEntry> aSmColorTokenTableEntry; nc = pNode->GetToken().aText.toUInt32(16); sStrBuf.append(Color(ColorTransparency, nc).AsRGBHEXString()); OUString ssStr(sStrBuf.makeStringAndClear()); diff --git a/starmath/source/mathml/starmathdatabase.cxx b/starmath/source/mathml/starmathdatabase.cxx index d0e61820acc8..4aef49cd37ac 100644 --- a/starmath/source/mathml/starmathdatabase.cxx +++ b/starmath/source/mathml/starmathdatabase.cxx @@ -358,352 +358,354 @@ SmToken starmathdatabase::Identify_PrefixPostfix_SmXMLOperatorContext_Impl(sal_U } const SmColorTokenTableEntry starmathdatabase::aColorTokenTableParse[] - = { { "aliceblue", "aliceblue", THTMLCOL, COL_SM_ALICEBLUE }, - { "antiquewhite", "antiquewhite", THTMLCOL, COL_SM_ANTIQUEWHITE }, - { "aqua", "aqua", TMATHMLCOL, COL_SM_AQUA }, - { "aquamarine", "aquamarine", THTMLCOL, COL_SM_AQUAMARINE }, - { "azure", "azure", THTMLCOL, COL_SM_AZURE }, - { "beige", "beige", THTMLCOL, COL_SM_BEIGE }, - { "bisque", "bisque", THTMLCOL, COL_SM_BISQUE }, - { "black", "black", TMATHMLCOL, COL_SM_BLACK }, - { "blanchedalmond", "blanchedalmond", THTMLCOL, COL_SM_BLANCHEDALMOND }, - { "blue", "blue", TMATHMLCOL, COL_SM_BLUE }, - { "blueviolet", "blueviolet", THTMLCOL, COL_SM_BLUEVIOLET }, - { "brown", "brown", THTMLCOL, COL_SM_BROWN }, - { "burlywood", "burlywood", THTMLCOL, COL_SM_BURLYWOOD }, - { "cadetblue", "cadetblue", THTMLCOL, COL_SM_CADETBLUE }, - { "chartreuse", "chartreuse", THTMLCOL, COL_SM_CHARTREUSE }, - { "chocolate", "chocolate", THTMLCOL, COL_SM_CHOCOLATE }, - { "coral", "coral", THTMLCOL, COL_SM_CORAL }, - { "cornflowerblue", "cornflowerblue", THTMLCOL, COL_SM_CORNFLOWERBLUE }, - { "cornsilk", "cornsilk", THTMLCOL, COL_SM_CORNSILK }, - { "crimson", "crimson", THTMLCOL, COL_SM_CRIMSON }, - { "cyan", "cyan", TMATHMLCOL, COL_SM_CYAN }, - { "darkblue", "darkblue", THTMLCOL, COL_SM_DARKBLUE }, - { "darkcyan", "darkcyan", THTMLCOL, COL_SM_DARKCYAN }, - { "darkgoldenrod", "darkgoldenrod", THTMLCOL, COL_SM_DARKGOLDENROD }, - { "darkgray", "darkgray", THTMLCOL, COL_SM_DARKGRAY }, - { "darkgreen", "darkgreen", THTMLCOL, COL_SM_DARKGREEN }, - { "darkgrey", "darkgrey", THTMLCOL, COL_SM_DARKGREY }, - { "darkkhaki", "darkkhaki", THTMLCOL, COL_SM_DARKKHAKI }, - { "darkmagenta", "darkmagenta", THTMLCOL, COL_SM_DARKMAGENTA }, - { "darkolivegreen", "darkolivegreen", THTMLCOL, COL_SM_DARKOLIVEGREEN }, - { "darkorange", "darkorange", THTMLCOL, COL_SM_DARKORANGE }, - { "darkorchid", "darkorchid", THTMLCOL, COL_SM_DARKORCHID }, - { "darkred", "darkred", THTMLCOL, COL_SM_DARKRED }, - { "darksalmon", "darksalmon", THTMLCOL, COL_SM_DARKSALMON }, - { "darkseagreen", "darkseagreen", THTMLCOL, COL_SM_DARKSEAGREEN }, - { "darkslateblue", "darkslateblue", THTMLCOL, COL_SM_DARKSLATEBLUE }, - { "darkslategray", "darkslategray", THTMLCOL, COL_SM_DARKSLATEGRAY }, - { "darkslategrey", "darkslategrey", THTMLCOL, COL_SM_DARKSLATEGREY }, - { "darkturquoise", "darkturquoise", THTMLCOL, COL_SM_DARKTURQUOISE }, - { "darkviolet", "darkviolet", THTMLCOL, COL_SM_DARKVIOLET }, - { "debian", "", TICONICCOL, COL_SM_DEBIAN_MAGENTA }, - { "deeppink", "deeppink", THTMLCOL, COL_SM_DEEPPINK }, - { "deepskyblue", "deepskyblue", THTMLCOL, COL_SM_DEEPSKYBLUE }, - { "dimgray", "dimgray", THTMLCOL, COL_SM_DIMGRAY }, - { "dimgrey", "dimgrey", THTMLCOL, COL_SM_DIMGREY }, - { "dodgerblue", "dodgerblue", THTMLCOL, COL_SM_DODGERBLUE }, - { "dvip", "dvip", TDVIPSNAMESCOL, COL_SM_BLACK }, - { "firebrick", "firebrick", THTMLCOL, COL_SM_FIREBRICK }, - { "floralwhite", "floralwhite", THTMLCOL, COL_SM_FLORALWHITE }, - { "forestgreen", "forestgreen", THTMLCOL, COL_SM_FORESTGREEN }, - { "fuchsia", "fuchsia", TMATHMLCOL, COL_SM_FUCHSIA }, - { "gainsboro", "gainsboro", THTMLCOL, COL_SM_GAINSBORO }, - { "ghostwhite", "ghostwhite", THTMLCOL, COL_SM_GHOSTWHITE }, - { "gold", "gold", THTMLCOL, COL_SM_GOLD }, - { "goldenrod", "goldenrod", THTMLCOL, COL_SM_GOLDENROD }, - { "gray", "gray", TMATHMLCOL, COL_SM_GRAY }, - { "green", "green", TMATHMLCOL, COL_SM_GREEN }, - { "greenyellow", "greenyellow", THTMLCOL, COL_SM_GREENYELLOW }, - { "grey", "grey", THTMLCOL, COL_SM_GREY }, - { "hex", "hex", THEX, COL_SM_BLACK }, - { "honeydew", "honeydew", THTMLCOL, COL_SM_HONEYDEW }, - { "hotpink", "hotpink", THTMLCOL, COL_SM_HOTPINK }, - { "indianred", "indianred", THTMLCOL, COL_SM_INDIANRED }, - { "indigo", "indigo", THTMLCOL, COL_SM_INDIGO }, - { "ivory", "ivory", THTMLCOL, COL_SM_IVORY }, - { "khaki", "khaki", THTMLCOL, COL_SM_KHAKI }, - { "lavender", "lavender", THTMLCOL, COL_SM_LAVENDER }, - { "lavenderblush", "lavenderblush", THTMLCOL, COL_SM_LAVENDERBLUSH }, - { "lawngreen", "lawngreen", THTMLCOL, COL_SM_LAWNGREEN }, - { "lemonchiffon", "lemonchiffon", THTMLCOL, COL_SM_LEMONCHIFFON }, - { "lightblue", "lightblue", THTMLCOL, COL_SM_LIGHTBLUE }, - { "lightcoral", "lightcoral", THTMLCOL, COL_SM_LIGHTCORAL }, - { "lightcyan", "lightcyan", THTMLCOL, COL_SM_LIGHTCYAN }, - { "lightgoldenrodyellow", "lightgoldenrodyellow", THTMLCOL, COL_SM_LIGHTGOLDENRODYELLOW }, - { "lightgray", "lightgray", THTMLCOL, COL_SM_LIGHTGRAY }, - { "lightgreen", "lightgreen", THTMLCOL, COL_SM_LIGHTGREEN }, - { "lightgrey", "lightgrey", THTMLCOL, COL_SM_LIGHTGREY }, - { "lightpink", "lightpink", THTMLCOL, COL_SM_LIGHTPINK }, - { "lightsalmon", "lightsalmon", THTMLCOL, COL_SM_LIGHTSALMON }, - { "lightseagreen", "lightseagreen", THTMLCOL, COL_SM_LIGHTSEAGREEN }, - { "lightskyblue", "lightskyblue", THTMLCOL, COL_SM_LIGHTSKYBLUE }, - { "lightslategray", "lightslategray", THTMLCOL, COL_SM_LIGHTSLATEGRAY }, - { "lightslategrey", "lightslategrey", THTMLCOL, COL_SM_LIGHTSLATEGREY }, - { "lightsteelblue", "lightsteelblue", THTMLCOL, COL_SM_LIGHTSTEELBLUE }, - { "lightyellow", "lightyellow", THTMLCOL, COL_SM_LIGHTYELLOW }, - { "lime", "lime", TMATHMLCOL, COL_SM_LIME }, - { "limegreen", "limegreen", THTMLCOL, COL_SM_LIMEGREEN }, - { "linen", "linen", THTMLCOL, COL_SM_LINEN }, - { "lo", "", TICONICCOL, COL_SM_LO_GREEN }, - { "magenta", "magenta", TMATHMLCOL, COL_SM_MAGENTA }, - { "maroon", "maroon", TMATHMLCOL, COL_SM_MAROON }, - { "mediumaquamarine", "mediumaquamarine", THTMLCOL, COL_SM_MEDIUMAQUAMARINE }, - { "mediumblue", "mediumblue", THTMLCOL, COL_SM_MEDIUMBLUE }, - { "mediumorchid", "mediumorchid", THTMLCOL, COL_SM_MEDIUMORCHID }, - { "mediumpurple", "mediumpurple", THTMLCOL, COL_SM_MEDIUMPURPLE }, - { "mediumseagreen", "mediumseagreen", THTMLCOL, COL_SM_MEDIUMSEAGREEN }, - { "mediumslateblue", "mediumslateblue", THTMLCOL, COL_SM_MEDIUMSLATEBLUE }, - { "mediumspringgreen", "mediumspringgreen", THTMLCOL, COL_SM_MEDIUMSPRINGGREEN }, - { "mediumturquoise", "mediumturquoise", THTMLCOL, COL_SM_MEDIUMTURQUOISE }, - { "mediumvioletred", "mediumvioletred", THTMLCOL, COL_SM_MEDIUMVIOLETRED }, - { "midnightblue", "midnightblue", THTMLCOL, COL_SM_MIDNIGHTBLUE }, - { "mintcream", "mintcream", THTMLCOL, COL_SM_MINTCREAM }, - { "mistyrose", "mistyrose", THTMLCOL, COL_SM_MISTYROSE }, - { "moccasin", "moccasin", THTMLCOL, COL_SM_MOCCASIN }, - { "navajowhite", "navajowhite", THTMLCOL, COL_SM_NAVAJOWHITE }, - { "navy", "navy", TMATHMLCOL, COL_SM_NAVY }, - { "oldlace", "oldlace", THTMLCOL, COL_SM_OLDLACE }, - { "olive", "olive", TMATHMLCOL, COL_SM_OLIVE }, - { "olivedrab", "olivedrab", THTMLCOL, COL_SM_OLIVEDRAB }, - { "orange", "orange", THTMLCOL, COL_SM_ORANGE }, - { "orangered", "orangered", THTMLCOL, COL_SM_ORANGERED }, - { "orchid", "orchid", THTMLCOL, COL_SM_ORCHID }, - { "palegoldenrod", "palegoldenrod", THTMLCOL, COL_SM_PALEGOLDENROD }, - { "palegreen", "palegreen", THTMLCOL, COL_SM_PALEGREEN }, - { "paleturquoise", "paleturquoise", THTMLCOL, COL_SM_PALETURQUOISE }, - { "palevioletred", "palevioletred", THTMLCOL, COL_SM_PALEVIOLETRED }, - { "papayawhip", "papayawhip", THTMLCOL, COL_SM_PAPAYAWHIP }, - { "peachpuff", "peachpuff", THTMLCOL, COL_SM_PEACHPUFF }, - { "peru", "peru", THTMLCOL, COL_SM_PERU }, - { "pink", "pink", THTMLCOL, COL_SM_PINK }, - { "plum", "plum", THTMLCOL, COL_SM_PLUM }, - { "powderblue", "powderblue", THTMLCOL, COL_SM_POWDERBLUE }, - { "purple", "purple", TMATHMLCOL, COL_SM_PURPLE }, - { "rebeccapurple", "rebeccapurple", THTMLCOL, COL_SM_REBECCAPURPLE }, - { "red", "red", TMATHMLCOL, COL_SM_RED }, - { "rgb", "rgb", TRGB, COL_AUTO }, - { "rgba", "rgba", TRGBA, COL_AUTO }, - { "rosybrown", "rosybrown", THTMLCOL, COL_SM_ROSYBROWN }, - { "royalblue", "royalblue", THTMLCOL, COL_SM_ROYALBLUE }, - { "saddlebrown", "saddlebrown", THTMLCOL, COL_SM_SADDLEBROWN }, - { "salmon", "salmon", THTMLCOL, COL_SM_SALMON }, - { "sandybrown", "sandybrown", THTMLCOL, COL_SM_SANDYBROWN }, - { "seagreen", "seagreen", THTMLCOL, COL_SM_SEAGREEN }, - { "seashell", "seashell", THTMLCOL, COL_SM_SEASHELL }, - { "sienna", "sienna", THTMLCOL, COL_SM_SIENNA }, - { "silver", "silver", TMATHMLCOL, COL_SM_SILVER }, - { "skyblue", "skyblue", THTMLCOL, COL_SM_SKYBLUE }, - { "slateblue", "slateblue", THTMLCOL, COL_SM_SLATEBLUE }, - { "slategray", "slategray", THTMLCOL, COL_SM_SLATEGRAY }, - { "slategrey", "slategrey", THTMLCOL, COL_SM_SLATEGREY }, - { "snow", "snow", THTMLCOL, COL_SM_SNOW }, - { "springgreen", "springgreen", THTMLCOL, COL_SM_SPRINGGREEN }, - { "steelblue", "steelblue", THTMLCOL, COL_SM_STEELBLUE }, - { "tan", "tan", THTMLCOL, COL_SM_TAN }, - { "teal", "teal", TMATHMLCOL, COL_SM_TEAL }, - { "thistle", "thistle", THTMLCOL, COL_SM_THISTLE }, - { "tomato", "tomato", THTMLCOL, COL_SM_TOMATO }, - { "turquoise", "turquoise", THTMLCOL, COL_SM_TURQUOISE }, - { "ubuntu", "", TICONICCOL, COL_SM_UBUNTU_ORANGE }, - { "violet", "COL_SM_VIOLET", THTMLCOL, COL_SM_VIOLET }, - { "wheat", "wheat", THTMLCOL, COL_SM_WHEAT }, - { "white", "white", TMATHMLCOL, COL_SM_WHITE }, - { "whitesmoke", "whitesmoke", THTMLCOL, COL_SM_WHITESMOKE }, - { "yellow", "yellow", TMATHMLCOL, COL_SM_YELLOW }, - { "yellowgreen", "yellowgreen", THTMLCOL, COL_SM_YELLOWGREEN } }; + = { { "aliceblue", THTMLCOL, COL_SM_ALICEBLUE }, + { "antiquewhite", THTMLCOL, COL_SM_ANTIQUEWHITE }, + { "aqua", TMATHMLCOL, COL_SM_AQUA }, + { "aquamarine", THTMLCOL, COL_SM_AQUAMARINE }, + { "azure", THTMLCOL, COL_SM_AZURE }, + { "beige", THTMLCOL, COL_SM_BEIGE }, + { "bisque", THTMLCOL, COL_SM_BISQUE }, + { "black", TMATHMLCOL, COL_SM_BLACK }, + { "blanchedalmond", THTMLCOL, COL_SM_BLANCHEDALMOND }, + { "blue", TMATHMLCOL, COL_SM_BLUE }, + { "blueviolet", THTMLCOL, COL_SM_BLUEVIOLET }, + { "brown", THTMLCOL, COL_SM_BROWN }, + { "burlywood", THTMLCOL, COL_SM_BURLYWOOD }, + { "cadetblue", THTMLCOL, COL_SM_CADETBLUE }, + { "chartreuse", THTMLCOL, COL_SM_CHARTREUSE }, + { "chocolate", THTMLCOL, COL_SM_CHOCOLATE }, + { "coral", THTMLCOL, COL_SM_CORAL }, + { "cornflowerblue", THTMLCOL, COL_SM_CORNFLOWERBLUE }, + { "cornsilk", THTMLCOL, COL_SM_CORNSILK }, + { "crimson", THTMLCOL, COL_SM_CRIMSON }, + { "cyan", TMATHMLCOL, COL_SM_CYAN }, + { "darkblue", THTMLCOL, COL_SM_DARKBLUE }, + { "darkcyan", THTMLCOL, COL_SM_DARKCYAN }, + { "darkgoldenrod", THTMLCOL, COL_SM_DARKGOLDENROD }, + { "darkgray", THTMLCOL, COL_SM_DARKGRAY }, + { "darkgreen", THTMLCOL, COL_SM_DARKGREEN }, + { "darkgrey", THTMLCOL, COL_SM_DARKGREY }, + { "darkkhaki", THTMLCOL, COL_SM_DARKKHAKI }, + { "darkmagenta", THTMLCOL, COL_SM_DARKMAGENTA }, + { "darkolivegreen", THTMLCOL, COL_SM_DARKOLIVEGREEN }, + { "darkorange", THTMLCOL, COL_SM_DARKORANGE }, + { "darkorchid", THTMLCOL, COL_SM_DARKORCHID }, + { "darkred", THTMLCOL, COL_SM_DARKRED }, + { "darksalmon", THTMLCOL, COL_SM_DARKSALMON }, + { "darkseagreen", THTMLCOL, COL_SM_DARKSEAGREEN }, + { "darkslateblue", THTMLCOL, COL_SM_DARKSLATEBLUE }, + { "darkslategray", THTMLCOL, COL_SM_DARKSLATEGRAY }, + { "darkslategrey", THTMLCOL, COL_SM_DARKSLATEGREY }, + { "darkturquoise", THTMLCOL, COL_SM_DARKTURQUOISE }, + { "darkviolet", THTMLCOL, COL_SM_DARKVIOLET }, + { "debian", TICONICCOL, COL_SM_DEBIAN_MAGENTA }, + { "deeppink", THTMLCOL, COL_SM_DEEPPINK }, + { "deepskyblue", THTMLCOL, COL_SM_DEEPSKYBLUE }, + { "dimgray", THTMLCOL, COL_SM_DIMGRAY }, + { "dimgrey", THTMLCOL, COL_SM_DIMGREY }, + { "dodgerblue", THTMLCOL, COL_SM_DODGERBLUE }, + { "dvip", TDVIPSNAMESCOL, COL_SM_BLACK }, + { "firebrick", THTMLCOL, COL_SM_FIREBRICK }, + { "floralwhite", THTMLCOL, COL_SM_FLORALWHITE }, + { "forestgreen", THTMLCOL, COL_SM_FORESTGREEN }, + { "fuchsia", TMATHMLCOL, COL_SM_FUCHSIA }, + { "gainsboro", THTMLCOL, COL_SM_GAINSBORO }, + { "ghostwhite", THTMLCOL, COL_SM_GHOSTWHITE }, + { "gold", THTMLCOL, COL_SM_GOLD }, + { "goldenrod", THTMLCOL, COL_SM_GOLDENROD }, + { "gray", TMATHMLCOL, COL_SM_GRAY }, + { "green", TMATHMLCOL, COL_SM_GREEN }, + { "greenyellow", THTMLCOL, COL_SM_GREENYELLOW }, + { "grey", THTMLCOL, COL_SM_GREY }, + { "hex", THEX, COL_SM_BLACK }, + { "honeydew", THTMLCOL, COL_SM_HONEYDEW }, + { "hotpink", THTMLCOL, COL_SM_HOTPINK }, + { "indianred", THTMLCOL, COL_SM_INDIANRED }, + { "indigo", THTMLCOL, COL_SM_INDIGO }, + { "ivory", THTMLCOL, COL_SM_IVORY }, + { "khaki", THTMLCOL, COL_SM_KHAKI }, + { "lavender", THTMLCOL, COL_SM_LAVENDER }, + { "lavenderblush", THTMLCOL, COL_SM_LAVENDERBLUSH }, + { "lawngreen", THTMLCOL, COL_SM_LAWNGREEN }, + { "lemonchiffon", THTMLCOL, COL_SM_LEMONCHIFFON }, + { "lightblue", THTMLCOL, COL_SM_LIGHTBLUE }, + { "lightcoral", THTMLCOL, COL_SM_LIGHTCORAL }, + { "lightcyan", THTMLCOL, COL_SM_LIGHTCYAN }, + { "lightgoldenrodyellow", THTMLCOL, COL_SM_LIGHTGOLDENRODYELLOW }, + { "lightgray", THTMLCOL, COL_SM_LIGHTGRAY }, + { "lightgreen", THTMLCOL, COL_SM_LIGHTGREEN }, + { "lightgrey", THTMLCOL, COL_SM_LIGHTGREY }, + { "lightpink", THTMLCOL, COL_SM_LIGHTPINK }, + { "lightsalmon", THTMLCOL, COL_SM_LIGHTSALMON }, + { "lightseagreen", THTMLCOL, COL_SM_LIGHTSEAGREEN }, + { "lightskyblue", THTMLCOL, COL_SM_LIGHTSKYBLUE }, + { "lightslategray", THTMLCOL, COL_SM_LIGHTSLATEGRAY }, + { "lightslategrey", THTMLCOL, COL_SM_LIGHTSLATEGREY }, + { "lightsteelblue", THTMLCOL, COL_SM_LIGHTSTEELBLUE }, + { "lightyellow", THTMLCOL, COL_SM_LIGHTYELLOW }, + { "lime", TMATHMLCOL, COL_SM_LIME }, + { "limegreen", THTMLCOL, COL_SM_LIMEGREEN }, + { "linen", THTMLCOL, COL_SM_LINEN }, + { "lo", TICONICCOL, COL_SM_LO_GREEN }, + { "magenta", TMATHMLCOL, COL_SM_MAGENTA }, + { "maroon", TMATHMLCOL, COL_SM_MAROON }, + { "mediumaquamarine", THTMLCOL, COL_SM_MEDIUMAQUAMARINE }, + { "mediumblue", THTMLCOL, COL_SM_MEDIUMBLUE }, + { "mediumorchid", THTMLCOL, COL_SM_MEDIUMORCHID }, + { "mediumpurple", THTMLCOL, COL_SM_MEDIUMPURPLE }, + { "mediumseagreen", THTMLCOL, COL_SM_MEDIUMSEAGREEN }, + { "mediumslateblue", THTMLCOL, COL_SM_MEDIUMSLATEBLUE }, + { "mediumspringgreen", THTMLCOL, COL_SM_MEDIUMSPRINGGREEN }, + { "mediumturquoise", THTMLCOL, COL_SM_MEDIUMTURQUOISE }, + { "mediumvioletred", THTMLCOL, COL_SM_MEDIUMVIOLETRED }, + { "midnightblue", THTMLCOL, COL_SM_MIDNIGHTBLUE }, + { "mintcream", THTMLCOL, COL_SM_MINTCREAM }, + { "mistyrose", THTMLCOL, COL_SM_MISTYROSE }, + { "moccasin", THTMLCOL, COL_SM_MOCCASIN }, + { "navajowhite", THTMLCOL, COL_SM_NAVAJOWHITE }, + { "navy", TMATHMLCOL, COL_SM_NAVY }, + { "oldlace", THTMLCOL, COL_SM_OLDLACE }, + { "olive", TMATHMLCOL, COL_SM_OLIVE }, + { "olivedrab", THTMLCOL, COL_SM_OLIVEDRAB }, + { "orange", THTMLCOL, COL_SM_ORANGE }, + { "orangered", THTMLCOL, COL_SM_ORANGERED }, + { "orchid", THTMLCOL, COL_SM_ORCHID }, + { "palegoldenrod", THTMLCOL, COL_SM_PALEGOLDENROD }, + { "palegreen", THTMLCOL, COL_SM_PALEGREEN }, + { "paleturquoise", THTMLCOL, COL_SM_PALETURQUOISE }, + { "palevioletred", THTMLCOL, COL_SM_PALEVIOLETRED }, + { "papayawhip", THTMLCOL, COL_SM_PAPAYAWHIP }, + { "peachpuff", THTMLCOL, COL_SM_PEACHPUFF }, + { "per", THTMLCOL, COL_SM_PERU }, + { "pink", THTMLCOL, COL_SM_PINK }, + { "plum", THTMLCOL, COL_SM_PLUM }, + { "powderblue", THTMLCOL, COL_SM_POWDERBLUE }, + { "purple", TMATHMLCOL, COL_SM_PURPLE }, + { "rebeccapurple", THTMLCOL, COL_SM_REBECCAPURPLE }, + { "red", TMATHMLCOL, COL_SM_RED }, + { "rgb", TRGB, COL_AUTO }, + { "rgba", TRGBA, COL_AUTO }, + { "rosybrown", THTMLCOL, COL_SM_ROSYBROWN }, + { "royalblue", THTMLCOL, COL_SM_ROYALBLUE }, + { "saddlebrown", THTMLCOL, COL_SM_SADDLEBROWN }, + { "salmon", THTMLCOL, COL_SM_SALMON }, + { "sandybrown", THTMLCOL, COL_SM_SANDYBROWN }, + { "seagreen", THTMLCOL, COL_SM_SEAGREEN }, + { "seashell", THTMLCOL, COL_SM_SEASHELL }, + { "sienna", THTMLCOL, COL_SM_SIENNA }, + { "silver", TMATHMLCOL, COL_SM_SILVER }, + { "skyblue", THTMLCOL, COL_SM_SKYBLUE }, + { "slateblue", THTMLCOL, COL_SM_SLATEBLUE }, + { "slategray", THTMLCOL, COL_SM_SLATEGRAY }, + { "slategrey", THTMLCOL, COL_SM_SLATEGREY }, + { "snow", THTMLCOL, COL_SM_SNOW }, + { "springgreen", THTMLCOL, COL_SM_SPRINGGREEN }, + { "steelblue", THTMLCOL, COL_SM_STEELBLUE }, + { "tan", THTMLCOL, COL_SM_TAN }, + { "teal", TMATHMLCOL, COL_SM_TEAL }, + { "thistle", THTMLCOL, COL_SM_THISTLE }, + { "tomato", THTMLCOL, COL_SM_TOMATO }, + { "turquoise", THTMLCOL, COL_SM_TURQUOISE }, + { "ubunt", TICONICCOL, COL_SM_UBUNTU_ORANGE }, + { "violet", THTMLCOL, COL_SM_VIOLET }, + { "wheat", THTMLCOL, COL_SM_WHEAT }, + { "white", TMATHMLCOL, COL_SM_WHITE }, + { "whitesmoke", THTMLCOL, COL_SM_WHITESMOKE }, + { "yellow", TMATHMLCOL, COL_SM_YELLOW }, + { "yellowgreen", THTMLCOL, COL_SM_YELLOWGREEN } }; const SmColorTokenTableEntry starmathdatabase::aColorTokenTableHTML[] - = { { "aliceblue", "aliceblue", THTMLCOL, COL_SM_ALICEBLUE }, - { "antiquewhite", "antiquewhite", THTMLCOL, COL_SM_ANTIQUEWHITE }, - { "aqua", "aqua", TMATHMLCOL, COL_SM_AQUA }, - { "aquamarine", "aquamarine", THTMLCOL, COL_SM_AQUAMARINE }, - { "azure", "azure", THTMLCOL, COL_SM_AZURE }, - { "beige", "beige", THTMLCOL, COL_SM_BEIGE }, - { "bisque", "bisque", THTMLCOL, COL_SM_BISQUE }, - { "black", "black", TMATHMLCOL, COL_SM_BLACK }, - { "blanchedalmond", "blanchedalmond", THTMLCOL, COL_SM_BLANCHEDALMOND }, - { "blue", "blue", TMATHMLCOL, COL_SM_BLUE }, - { "blueviolet", "blueviolet", THTMLCOL, COL_SM_BLUEVIOLET }, - { "brown", "brown", THTMLCOL, COL_SM_BROWN }, - { "burlywood", "burlywood", THTMLCOL, COL_SM_BURLYWOOD }, - { "cadetblue", "cadetblue", THTMLCOL, COL_SM_CADETBLUE }, - { "chartreuse", "chartreuse", THTMLCOL, COL_SM_CHARTREUSE }, - { "chocolate", "chocolate", THTMLCOL, COL_SM_CHOCOLATE }, - { "coral", "coral", THTMLCOL, COL_SM_CORAL }, - { "cornflowerblue", "cornflowerblue", THTMLCOL, COL_SM_CORNFLOWERBLUE }, - { "cornsilk", "cornsilk", THTMLCOL, COL_SM_CORNSILK }, - { "crimson", "crimson", THTMLCOL, COL_SM_CRIMSON }, - { "cyan", "cyan", TMATHMLCOL, COL_SM_CYAN }, - { "darkblue", "darkblue", THTMLCOL, COL_SM_DARKBLUE }, - { "darkcyan", "darkcyan", THTMLCOL, COL_SM_DARKCYAN }, - { "darkgoldenrod", "darkgoldenrod", THTMLCOL, COL_SM_DARKGOLDENROD }, - { "darkgray", "darkgray", THTMLCOL, COL_SM_DARKGRAY }, - { "darkgreen", "darkgreen", THTMLCOL, COL_SM_DARKGREEN }, - { "darkgrey", "darkgrey", THTMLCOL, COL_SM_DARKGREY }, - { "darkkhaki", "darkkhaki", THTMLCOL, COL_SM_DARKKHAKI }, - { "darkmagenta", "darkmagenta", THTMLCOL, COL_SM_DARKMAGENTA }, - { "darkolivegreen", "darkolivegreen", THTMLCOL, COL_SM_DARKOLIVEGREEN }, - { "darkorange", "darkorange", THTMLCOL, COL_SM_DARKORANGE }, - { "darkorchid", "darkorchid", THTMLCOL, COL_SM_DARKORCHID }, - { "darkred", "darkred", THTMLCOL, COL_SM_DARKRED }, - { "darksalmon", "darksalmon", THTMLCOL, COL_SM_DARKSALMON }, - { "darkseagreen", "darkseagreen", THTMLCOL, COL_SM_DARKSEAGREEN }, - { "darkslateblue", "darkslateblue", THTMLCOL, COL_SM_DARKSLATEBLUE }, - { "darkslategray", "darkslategray", THTMLCOL, COL_SM_DARKSLATEGRAY }, - { "darkslategrey", "darkslategrey", THTMLCOL, COL_SM_DARKSLATEGREY }, - { "darkturquoise", "darkturquoise", THTMLCOL, COL_SM_DARKTURQUOISE }, - { "darkviolet", "darkviolet", THTMLCOL, COL_SM_DARKVIOLET }, - { "deeppink", "deeppink", THTMLCOL, COL_SM_DEEPPINK }, - { "deepskyblue", "deepskyblue", THTMLCOL, COL_SM_DEEPSKYBLUE }, - { "dimgray", "dimgray", THTMLCOL, COL_SM_DIMGRAY }, - { "dimgrey", "dimgrey", THTMLCOL, COL_SM_DIMGREY }, - { "dodgerblue", "dodgerblue", THTMLCOL, COL_SM_DODGERBLUE }, - { "firebrick", "firebrick", THTMLCOL, COL_SM_FIREBRICK }, - { "floralwhite", "floralwhite", THTMLCOL, COL_SM_FLORALWHITE }, - { "forestgreen", "forestgreen", THTMLCOL, COL_SM_FORESTGREEN }, - { "fuchsia", "fuchsia", TMATHMLCOL, COL_SM_FUCHSIA }, - { "gainsboro", "gainsboro", THTMLCOL, COL_SM_GAINSBORO }, - { "ghostwhite", "ghostwhite", THTMLCOL, COL_SM_GHOSTWHITE }, - { "gold", "gold", THTMLCOL, COL_SM_GOLD }, - { "goldenrod", "goldenrod", THTMLCOL, COL_SM_GOLDENROD }, - { "gray", "gray", TMATHMLCOL, COL_SM_GRAY }, - { "green", "green", TMATHMLCOL, COL_SM_GREEN }, - { "greenyellow", "greenyellow", THTMLCOL, COL_SM_GREENYELLOW }, - { "grey", "grey", THTMLCOL, COL_SM_GREY }, - { "honeydew", "honeydew", THTMLCOL, COL_SM_HONEYDEW }, - { "hotpink", "hotpink", THTMLCOL, COL_SM_HOTPINK }, - { "indianred", "indianred", THTMLCOL, COL_SM_INDIANRED }, - { "indigo", "indigo", THTMLCOL, COL_SM_INDIGO }, - { "ivory", "ivory", THTMLCOL, COL_SM_IVORY }, - { "khaki", "khaki", THTMLCOL, COL_SM_KHAKI }, - { "lavender", "lavender", THTMLCOL, COL_SM_LAVENDER }, - { "lavenderblush", "lavenderblush", THTMLCOL, COL_SM_LAVENDERBLUSH }, - { "lawngreen", "lawngreen", THTMLCOL, COL_SM_LAWNGREEN }, - { "lemonchiffon", "lemonchiffon", THTMLCOL, COL_SM_LEMONCHIFFON }, - { "lightblue", "lightblue", THTMLCOL, COL_SM_LIGHTBLUE }, - { "lightcoral", "lightcoral", THTMLCOL, COL_SM_LIGHTCORAL }, - { "lightcyan", "lightcyan", THTMLCOL, COL_SM_LIGHTCYAN }, - { "lightgoldenrodyellow", "lightgoldenrodyellow", THTMLCOL, COL_SM_LIGHTGOLDENRODYELLOW }, - { "lightgray", "lightgray", THTMLCOL, COL_SM_LIGHTGRAY }, - { "lightgreen", "lightgreen", THTMLCOL, COL_SM_LIGHTGREEN }, - { "lightgrey", "lightgrey", THTMLCOL, COL_SM_LIGHTGREY }, - { "lightpink", "lightpink", THTMLCOL, COL_SM_LIGHTPINK }, - { "lightsalmon", "lightsalmon", THTMLCOL, COL_SM_LIGHTSALMON }, - { "lightseagreen", "lightseagreen", THTMLCOL, COL_SM_LIGHTSEAGREEN }, - { "lightskyblue", "lightskyblue", THTMLCOL, COL_SM_LIGHTSKYBLUE }, - { "lightslategray", "lightslategray", THTMLCOL, COL_SM_LIGHTSLATEGRAY }, - { "lightslategrey", "lightslategrey", THTMLCOL, COL_SM_LIGHTSLATEGREY }, - { "lightsteelblue", "lightsteelblue", THTMLCOL, COL_SM_LIGHTSTEELBLUE }, - { "lightyellow", "lightyellow", THTMLCOL, COL_SM_LIGHTYELLOW }, - { "lime", "lime", TMATHMLCOL, COL_SM_LIME }, - { "limegreen", "limegreen", THTMLCOL, COL_SM_LIMEGREEN }, - { "linen", "linen", THTMLCOL, COL_SM_LINEN }, - { "magenta", "magenta", TMATHMLCOL, COL_SM_MAGENTA }, - { "maroon", "maroon", TMATHMLCOL, COL_SM_MAROON }, - { "mediumaquamarine", "mediumaquamarine", THTMLCOL, COL_SM_MEDIUMAQUAMARINE }, - { "mediumblue", "mediumblue", THTMLCOL, COL_SM_MEDIUMBLUE }, - { "mediumorchid", "mediumorchid", THTMLCOL, COL_SM_MEDIUMORCHID }, - { "mediumpurple", "mediumpurple", THTMLCOL, COL_SM_MEDIUMPURPLE }, - { "mediumseagreen", "mediumseagreen", THTMLCOL, COL_SM_MEDIUMSEAGREEN }, - { "mediumslateblue", "mediumslateblue", THTMLCOL, COL_SM_MEDIUMSLATEBLUE }, - { "mediumspringgreen", "mediumspringgreen", THTMLCOL, COL_SM_MEDIUMSPRINGGREEN }, - { "mediumturquoise", "mediumturquoise", THTMLCOL, COL_SM_MEDIUMTURQUOISE }, - { "mediumvioletred", "mediumvioletred", THTMLCOL, COL_SM_MEDIUMVIOLETRED }, - { "midnightblue", "midnightblue", THTMLCOL, COL_SM_MIDNIGHTBLUE }, - { "mintcream", "mintcream", THTMLCOL, COL_SM_MINTCREAM }, - { "mistyrose", "mistyrose", THTMLCOL, COL_SM_MISTYROSE }, - { "moccasin", "moccasin", THTMLCOL, COL_SM_MOCCASIN }, - { "navajowhite", "navajowhite", THTMLCOL, COL_SM_NAVAJOWHITE }, - { "navy", "navy", TMATHMLCOL, COL_SM_NAVY }, - { "oldlace", "oldlace", THTMLCOL, COL_SM_OLDLACE }, - { "olive", "olive", TMATHMLCOL, COL_SM_OLIVE }, - { "olivedrab", "olivedrab", THTMLCOL, COL_SM_OLIVEDRAB }, - { "orange", "orange", THTMLCOL, COL_SM_ORANGE }, - { "orangered", "orangered", THTMLCOL, COL_SM_ORANGERED }, - { "orchid", "orchid", THTMLCOL, COL_SM_ORCHID }, - { "palegoldenrod", "palegoldenrod", THTMLCOL, COL_SM_PALEGOLDENROD }, - { "palegreen", "palegreen", THTMLCOL, COL_SM_PALEGREEN }, - { "paleturquoise", "paleturquoise", THTMLCOL, COL_SM_PALETURQUOISE }, - { "palevioletred", "palevioletred", THTMLCOL, COL_SM_PALEVIOLETRED }, - { "papayawhip", "papayawhip", THTMLCOL, COL_SM_PAPAYAWHIP }, - { "peachpuff", "peachpuff", THTMLCOL, COL_SM_PEACHPUFF }, - { "peru", "peru", THTMLCOL, COL_SM_PERU }, - { "pink", "pink", THTMLCOL, COL_SM_PINK }, - { "plum", "plum", THTMLCOL, COL_SM_PLUM }, - { "powderblue", "powderblue", THTMLCOL, COL_SM_POWDERBLUE }, - { "purple", "purple", TMATHMLCOL, COL_SM_PURPLE }, - { "rebeccapurple", "rebeccapurple", THTMLCOL, COL_SM_REBECCAPURPLE }, - { "red", "red", TMATHMLCOL, COL_SM_RED }, - { "rosybrown", "rosybrown", THTMLCOL, COL_SM_ROSYBROWN }, - { "royalblue", "royalblue", THTMLCOL, COL_SM_ROYALBLUE }, - { "saddlebrown", "saddlebrown", THTMLCOL, COL_SM_SADDLEBROWN }, - { "salmon", "salmon", THTMLCOL, COL_SM_SALMON }, - { "sandybrown", "sandybrown", THTMLCOL, COL_SM_SANDYBROWN }, - { "seagreen", "seagreen", THTMLCOL, COL_SM_SEAGREEN }, - { "seashell", "seashell", THTMLCOL, COL_SM_SEASHELL }, - { "sienna", "sienna", THTMLCOL, COL_SM_SIENNA }, - { "silver", "silver", TMATHMLCOL, COL_SM_SILVER }, - { "skyblue", "skyblue", THTMLCOL, COL_SM_SKYBLUE }, - { "slateblue", "slateblue", THTMLCOL, COL_SM_SLATEBLUE }, - { "slategray", "slategray", THTMLCOL, COL_SM_SLATEGRAY }, - { "slategrey", "slategrey", THTMLCOL, COL_SM_SLATEGREY }, - { "snow", "snow", THTMLCOL, COL_SM_SNOW }, - { "springgreen", "springgreen", THTMLCOL, COL_SM_SPRINGGREEN }, - { "steelblue", "steelblue", THTMLCOL, COL_SM_STEELBLUE }, - { "tan", "tan", THTMLCOL, COL_SM_TAN }, - { "teal", "teal", TMATHMLCOL, COL_SM_TEAL }, - { "thistle", "thistle", THTMLCOL, COL_SM_THISTLE }, - { "tomato", "tomato", THTMLCOL, COL_SM_TOMATO }, - { "turquoise", "turquoise", THTMLCOL, COL_SM_TURQUOISE }, - { "violet", "COL_SM_VIOLET", THTMLCOL, COL_SM_VIOLET }, - { "wheat", "wheat", THTMLCOL, COL_SM_WHEAT }, - { "white", "white", TMATHMLCOL, COL_SM_WHITE }, - { "whitesmoke", "whitesmoke", THTMLCOL, COL_SM_WHITESMOKE }, - { "yellow", "yellow", TMATHMLCOL, COL_SM_YELLOW }, - { "yellowgreen", "yellowgreen", THTMLCOL, COL_SM_YELLOWGREEN } }; + = { { "aliceblue", THTMLCOL, COL_SM_ALICEBLUE }, + { "antiquewhite", THTMLCOL, COL_SM_ANTIQUEWHITE }, + { "aqua", TMATHMLCOL, COL_SM_AQUA }, + { "aquamarine", THTMLCOL, COL_SM_AQUAMARINE }, + { "azure", THTMLCOL, COL_SM_AZURE }, + { "beige", THTMLCOL, COL_SM_BEIGE }, + { "bisque", THTMLCOL, COL_SM_BISQUE }, + { "black", TMATHMLCOL, COL_SM_BLACK }, + { "blanchedalmond", THTMLCOL, COL_SM_BLANCHEDALMOND }, + { "blue", TMATHMLCOL, COL_SM_BLUE }, + { "blueviolet", THTMLCOL, COL_SM_BLUEVIOLET }, + { "brown", THTMLCOL, COL_SM_BROWN }, + { "burlywood", THTMLCOL, COL_SM_BURLYWOOD }, + { "cadetblue", THTMLCOL, COL_SM_CADETBLUE }, + { "chartreuse", THTMLCOL, COL_SM_CHARTREUSE }, + { "chocolate", THTMLCOL, COL_SM_CHOCOLATE }, + { "coral", THTMLCOL, COL_SM_CORAL }, + { "cornflowerblue", THTMLCOL, COL_SM_CORNFLOWERBLUE }, + { "cornsilk", THTMLCOL, COL_SM_CORNSILK }, + { "crimson", THTMLCOL, COL_SM_CRIMSON }, + { "cyan", TMATHMLCOL, COL_SM_CYAN }, + { "darkblue", THTMLCOL, COL_SM_DARKBLUE }, + { "darkcyan", THTMLCOL, COL_SM_DARKCYAN }, + { "darkgoldenrod", THTMLCOL, COL_SM_DARKGOLDENROD }, + { "darkgray", THTMLCOL, COL_SM_DARKGRAY }, + { "darkgreen", THTMLCOL, COL_SM_DARKGREEN }, + { "darkgrey", THTMLCOL, COL_SM_DARKGREY }, + { "darkkhaki", THTMLCOL, COL_SM_DARKKHAKI }, + { "darkmagenta", THTMLCOL, COL_SM_DARKMAGENTA }, + { "darkolivegreen", THTMLCOL, COL_SM_DARKOLIVEGREEN }, + { "darkorange", THTMLCOL, COL_SM_DARKORANGE }, + { "darkorchid", THTMLCOL, COL_SM_DARKORCHID }, + { "darkred", THTMLCOL, COL_SM_DARKRED }, + { "darksalmon", THTMLCOL, COL_SM_DARKSALMON }, + { "darkseagreen", THTMLCOL, COL_SM_DARKSEAGREEN }, + { "darkslateblue", THTMLCOL, COL_SM_DARKSLATEBLUE }, + { "darkslategray", THTMLCOL, COL_SM_DARKSLATEGRAY }, + { "darkslategrey", THTMLCOL, COL_SM_DARKSLATEGREY }, + { "darkturquoise", THTMLCOL, COL_SM_DARKTURQUOISE }, + { "darkviolet", THTMLCOL, COL_SM_DARKVIOLET }, + { "deeppink", THTMLCOL, COL_SM_DEEPPINK }, + { "deepskyblue", THTMLCOL, COL_SM_DEEPSKYBLUE }, + { "dimgray", THTMLCOL, COL_SM_DIMGRAY }, + { "dimgrey", THTMLCOL, COL_SM_DIMGREY }, + { "dodgerblue", THTMLCOL, COL_SM_DODGERBLUE }, + { "firebrick", THTMLCOL, COL_SM_FIREBRICK }, + { "floralwhite", THTMLCOL, COL_SM_FLORALWHITE }, + { "forestgreen", THTMLCOL, COL_SM_FORESTGREEN }, + { "fuchsia", TMATHMLCOL, COL_SM_FUCHSIA }, + { "gainsboro", THTMLCOL, COL_SM_GAINSBORO }, + { "ghostwhite", THTMLCOL, COL_SM_GHOSTWHITE }, + { "gold", THTMLCOL, COL_SM_GOLD }, + { "goldenrod", THTMLCOL, COL_SM_GOLDENROD }, + { "gray", TMATHMLCOL, COL_SM_GRAY }, + { "green", TMATHMLCOL, COL_SM_GREEN }, + { "greenyellow", THTMLCOL, COL_SM_GREENYELLOW }, + { "grey", THTMLCOL, COL_SM_GREY }, + { "honeydew", THTMLCOL, COL_SM_HONEYDEW }, + { "hotpink", THTMLCOL, COL_SM_HOTPINK }, + { "indianred", THTMLCOL, COL_SM_INDIANRED }, + { "indigo", THTMLCOL, COL_SM_INDIGO }, + { "ivory", THTMLCOL, COL_SM_IVORY }, + { "khaki", THTMLCOL, COL_SM_KHAKI }, + { "lavender", THTMLCOL, COL_SM_LAVENDER }, + { "lavenderblush", THTMLCOL, COL_SM_LAVENDERBLUSH }, + { "lawngreen", THTMLCOL, COL_SM_LAWNGREEN }, + { "lemonchiffon", THTMLCOL, COL_SM_LEMONCHIFFON }, + { "lightblue", THTMLCOL, COL_SM_LIGHTBLUE }, + { "lightcoral", THTMLCOL, COL_SM_LIGHTCORAL }, + { "lightcyan", THTMLCOL, COL_SM_LIGHTCYAN }, + { "lightgoldenrodyellow", THTMLCOL, COL_SM_LIGHTGOLDENRODYELLOW }, + { "lightgray", THTMLCOL, COL_SM_LIGHTGRAY }, + { "lightgreen", THTMLCOL, COL_SM_LIGHTGREEN }, + { "lightgrey", THTMLCOL, COL_SM_LIGHTGREY }, + { "lightpink", THTMLCOL, COL_SM_LIGHTPINK }, + { "lightsalmon", THTMLCOL, COL_SM_LIGHTSALMON }, + { "lightseagreen", THTMLCOL, COL_SM_LIGHTSEAGREEN }, + { "lightskyblue", THTMLCOL, COL_SM_LIGHTSKYBLUE }, + { "lightslategray", THTMLCOL, COL_SM_LIGHTSLATEGRAY }, + { "lightslategrey", THTMLCOL, COL_SM_LIGHTSLATEGREY }, + { "lightsteelblue", THTMLCOL, COL_SM_LIGHTSTEELBLUE }, + { "lightyellow", THTMLCOL, COL_SM_LIGHTYELLOW }, + { "lime", TMATHMLCOL, COL_SM_LIME }, + { "limegreen", THTMLCOL, COL_SM_LIMEGREEN }, + { "linen", THTMLCOL, COL_SM_LINEN }, + { "magenta", TMATHMLCOL, COL_SM_MAGENTA }, + { "maroon", TMATHMLCOL, COL_SM_MAROON }, + { "mediumaquamarine", THTMLCOL, COL_SM_MEDIUMAQUAMARINE }, + { "mediumblue", THTMLCOL, COL_SM_MEDIUMBLUE }, + { "mediumorchid", THTMLCOL, COL_SM_MEDIUMORCHID }, + { "mediumpurple", THTMLCOL, COL_SM_MEDIUMPURPLE }, + { "mediumseagreen", THTMLCOL, COL_SM_MEDIUMSEAGREEN }, + { "mediumslateblue", THTMLCOL, COL_SM_MEDIUMSLATEBLUE }, + { "mediumspringgreen", THTMLCOL, COL_SM_MEDIUMSPRINGGREEN }, + { "mediumturquoise", THTMLCOL, COL_SM_MEDIUMTURQUOISE }, + { "mediumvioletred", THTMLCOL, COL_SM_MEDIUMVIOLETRED }, + { "midnightblue", THTMLCOL, COL_SM_MIDNIGHTBLUE }, + { "mintcream", THTMLCOL, COL_SM_MINTCREAM }, + { "mistyrose", THTMLCOL, COL_SM_MISTYROSE }, + { "moccasin", THTMLCOL, COL_SM_MOCCASIN }, + { "navajowhite", THTMLCOL, COL_SM_NAVAJOWHITE }, + { "navy", TMATHMLCOL, COL_SM_NAVY }, + { "oldlace", THTMLCOL, COL_SM_OLDLACE }, + { "olive", TMATHMLCOL, COL_SM_OLIVE }, + { "olivedrab", THTMLCOL, COL_SM_OLIVEDRAB }, + { "orange", THTMLCOL, COL_SM_ORANGE }, + { "orangered", THTMLCOL, COL_SM_ORANGERED }, + { "orchid", THTMLCOL, COL_SM_ORCHID }, + { "palegoldenrod", THTMLCOL, COL_SM_PALEGOLDENROD }, + { "palegreen", THTMLCOL, COL_SM_PALEGREEN }, + { "paleturquoise", THTMLCOL, COL_SM_PALETURQUOISE }, + { "palevioletred", THTMLCOL, COL_SM_PALEVIOLETRED }, + { "papayawhip", THTMLCOL, COL_SM_PAPAYAWHIP }, + { "peachpuff", THTMLCOL, COL_SM_PEACHPUFF }, + { "per", THTMLCOL, COL_SM_PERU }, + { "pink", THTMLCOL, COL_SM_PINK }, + { "plum", THTMLCOL, COL_SM_PLUM }, + { "powderblue", THTMLCOL, COL_SM_POWDERBLUE }, + { "purple", TMATHMLCOL, COL_SM_PURPLE }, + { "rebeccapurple", THTMLCOL, COL_SM_REBECCAPURPLE }, + { "red", TMATHMLCOL, COL_SM_RED }, + { "rosybrown", THTMLCOL, COL_SM_ROSYBROWN }, + { "royalblue", THTMLCOL, COL_SM_ROYALBLUE }, + { "saddlebrown", THTMLCOL, COL_SM_SADDLEBROWN }, + { "salmon", THTMLCOL, COL_SM_SALMON }, + { "sandybrown", THTMLCOL, COL_SM_SANDYBROWN }, + { "seagreen", THTMLCOL, COL_SM_SEAGREEN }, + { "seashell", THTMLCOL, COL_SM_SEASHELL }, + { "sienna", THTMLCOL, COL_SM_SIENNA }, + { "silver", TMATHMLCOL, COL_SM_SILVER }, + { "skyblue", THTMLCOL, COL_SM_SKYBLUE }, + { "slateblue", THTMLCOL, COL_SM_SLATEBLUE }, + { "slategray", THTMLCOL, COL_SM_SLATEGRAY }, + { "slategrey", THTMLCOL, COL_SM_SLATEGREY }, + { "snow", THTMLCOL, COL_SM_SNOW }, + { "springgreen", THTMLCOL, COL_SM_SPRINGGREEN }, + { "steelblue", THTMLCOL, COL_SM_STEELBLUE }, + { "tan", THTMLCOL, COL_SM_TAN }, + { "teal", TMATHMLCOL, COL_SM_TEAL }, + { "thistle", THTMLCOL, COL_SM_THISTLE }, + { "tomato", THTMLCOL, COL_SM_TOMATO }, + { "turquoise", THTMLCOL, COL_SM_TURQUOISE }, + { "violet", THTMLCOL, COL_SM_VIOLET }, + { "wheat", THTMLCOL, COL_SM_WHEAT }, + { "white", TMATHMLCOL, COL_SM_WHITE }, + { "whitesmoke", THTMLCOL, COL_SM_WHITESMOKE }, + { "yellow", TMATHMLCOL, COL_SM_YELLOW }, + { "yellowgreen", THTMLCOL, COL_SM_YELLOWGREEN } }; -const SmColorTokenTableEntry starmathdatabase::aColorTokenTableDVIPSNAMES[] - = { { "apricot", "Apricot", TDVIPSNAMESCOL, COL_SM_DIV_APRICOT }, - { "aquamarine", "Aquamarine", TDVIPSNAMESCOL, COL_SM_DIV_AQUAMARINE }, - { "bittersweet", "Bittersweet", TDVIPSNAMESCOL, COL_SM_DIV_BITTERSWEET }, - { "black", "Black", TDVIPSNAMESCOL, COL_SM_BLACK }, - { "blue", "Blue", TDVIPSNAMESCOL, COL_SM_BLACK } }; +const SmColorTokenTableEntry starmathdatabase::aColorTokenTableDVIPS[] + = { { "apricot", TDVIPSNAMESCOL, COL_SM_DIV_APRICOT }, + { "aquamarine", TDVIPSNAMESCOL, COL_SM_DIV_AQUAMARINE }, + { "bittersweet", TDVIPSNAMESCOL, COL_SM_DIV_BITTERSWEET }, + { "black", TDVIPSNAMESCOL, COL_SM_BLACK }, + { "blue", TDVIPSNAMESCOL, COL_SM_BLACK } }; -const SmColorTokenTableEntry starmathdatabase::aColorTokenTableMATHML[] - = { { "aqua", "aqua", TMATHMLCOL, COL_SM_AQUA }, - { "black", "black", TMATHMLCOL, COL_SM_BLACK }, - { "blue", "blue", TMATHMLCOL, COL_SM_BLUE }, - { "fuchsia", "fuchsia", TMATHMLCOL, COL_SM_FUCHSIA }, - { "gray", "gray", TMATHMLCOL, COL_SM_GRAY }, - { "green", "green", TMATHMLCOL, COL_SM_GREEN }, - { "lime", "lime", TMATHMLCOL, COL_SM_LIME }, - { "maroon", "maroon", TMATHMLCOL, COL_SM_MAROON }, - { "navy", "navy", TMATHMLCOL, COL_SM_NAVY }, - { "olive", "olive", TMATHMLCOL, COL_SM_OLIVE }, - { "purple", "purple", TMATHMLCOL, COL_SM_PURPLE }, - { "red", "red", TMATHMLCOL, COL_SM_RED }, - { "silver", "silver", TMATHMLCOL, COL_SM_SILVER }, - { "teal", "teal", TMATHMLCOL, COL_SM_TEAL }, - { "white", "white", TMATHMLCOL, COL_SM_WHITE }, - { "yellow", "yellow", TMATHMLCOL, COL_SM_YELLOW } }; +const SmColorTokenTableEntry starmathdatabase::aColorTokenTableMATHML[] = { + // clang-format off + { "aqua", TMATHMLCOL, COL_SM_AQUA }, + { "black", TMATHMLCOL, COL_SM_BLACK }, + { "blue", TMATHMLCOL, COL_SM_BLUE }, + { "fuchsia", TMATHMLCOL, COL_SM_FUCHSIA }, + { "gray", TMATHMLCOL, COL_SM_GRAY }, + { "green", TMATHMLCOL, COL_SM_GREEN }, + { "lime", TMATHMLCOL, COL_SM_LIME }, + { "maroon", TMATHMLCOL, COL_SM_MAROON }, + { "navy", TMATHMLCOL, COL_SM_NAVY }, + { "olive", TMATHMLCOL, COL_SM_OLIVE }, + { "purple", TMATHMLCOL, COL_SM_PURPLE }, + { "red", TMATHMLCOL, COL_SM_RED }, + { "silver", TMATHMLCOL, COL_SM_SILVER }, + { "teal", TMATHMLCOL, COL_SM_TEAL }, + { "white", TMATHMLCOL, COL_SM_WHITE }, + { "yellow", TMATHMLCOL, COL_SM_YELLOW } + // clang-format on +}; std::unique_ptr<SmColorTokenTableEntry> starmathdatabase::Identify_Color_Parser(sal_uInt32 cColor) { for (auto i = std::begin(aColorTokenTableParse); i < std::end(aColorTokenTableParse); ++i) if (i->equals(cColor)) return std::unique_ptr<SmColorTokenTableEntry>(new SmColorTokenTableEntry(i)); - for (auto i = std::begin(aColorTokenTableDVIPSNAMES); i < std::end(aColorTokenTableDVIPSNAMES); - ++i) + for (auto i = std::begin(aColorTokenTableDVIPS); i < std::end(aColorTokenTableDVIPS); ++i) if (i->equals(cColor)) return std::unique_ptr<SmColorTokenTableEntry>(new SmColorTokenTableEntry(i)); if ((cColor & 0x00FFFFFF) == cColor) return std::unique_ptr<SmColorTokenTableEntry>( - new SmColorTokenTableEntry("", "", TRGB, cColor)); + new SmColorTokenTableEntry("", TRGB, cColor)); else return std::unique_ptr<SmColorTokenTableEntry>( - new SmColorTokenTableEntry("", "", TRGBA, cColor)); + new SmColorTokenTableEntry("", TRGBA, cColor)); } std::unique_ptr<SmColorTokenTableEntry> starmathdatabase::Identify_Color_HTML(sal_uInt32 cColor) @@ -713,10 +715,10 @@ std::unique_ptr<SmColorTokenTableEntry> starmathdatabase::Identify_Color_HTML(sa return std::unique_ptr<SmColorTokenTableEntry>(new SmColorTokenTableEntry(i)); if ((cColor & 0x00FFFFFF) == cColor) return std::unique_ptr<SmColorTokenTableEntry>( - new SmColorTokenTableEntry("", "", TRGB, cColor)); + new SmColorTokenTableEntry("", TRGB, cColor)); else return std::unique_ptr<SmColorTokenTableEntry>( - new SmColorTokenTableEntry("", "", TRGBA, cColor)); + new SmColorTokenTableEntry("", TRGBA, cColor)); } std::unique_ptr<SmColorTokenTableEntry> starmathdatabase::Identify_Color_MATHML(sal_uInt32 cColor) @@ -726,25 +728,24 @@ std::unique_ptr<SmColorTokenTableEntry> starmathdatabase::Identify_Color_MATHML( return std::unique_ptr<SmColorTokenTableEntry>(new SmColorTokenTableEntry(i)); if ((cColor & 0x00FFFFFF) == cColor) return std::unique_ptr<SmColorTokenTableEntry>( - new SmColorTokenTableEntry("", "", TRGB, cColor)); + new SmColorTokenTableEntry("", TRGB, cColor)); else return std::unique_ptr<SmColorTokenTableEntry>( - new SmColorTokenTableEntry("", "", TRGBA, cColor)); + new SmColorTokenTableEntry("", TRGBA, cColor)); } std::unique_ptr<SmColorTokenTableEntry> starmathdatabase::Identify_Color_DVIPSNAMES(sal_uInt32 cColor) { - for (auto i = std::begin(aColorTokenTableDVIPSNAMES); i < std::end(aColorTokenTableDVIPSNAMES); - ++i) + for (auto i = std::begin(aColorTokenTableDVIPS); i < std::end(aColorTokenTableDVIPS); ++i) if (i->equals(cColor)) return std::unique_ptr<SmColorTokenTableEntry>(new SmColorTokenTableEntry(i)); if ((cColor & 0x00FFFFFF) == cColor) return std::unique_ptr<SmColorTokenTableEntry>( - new SmColorTokenTableEntry("", "", TRGB, cColor)); + new SmColorTokenTableEntry("", TRGB, cColor)); else return std::unique_ptr<SmColorTokenTableEntry>( - new SmColorTokenTableEntry("", "", TRGBA, cColor)); + new SmColorTokenTableEntry("", TRGBA, cColor)); } std::unique_ptr<SmColorTokenTableEntry> @@ -752,12 +753,12 @@ starmathdatabase::Identify_ColorName_Parser(const OUString& colorname) { if (colorname.isEmpty()) return std::unique_ptr<SmColorTokenTableEntry>( - new SmColorTokenTableEntry("", "", TERROR, COL_SM_BLACK)); + new SmColorTokenTableEntry("", TERROR, COL_SM_BLACK)); for (auto i = std::begin(aColorTokenTableParse); i < std::end(aColorTokenTableParse); ++i) if (i->equals(colorname)) return std::unique_ptr<SmColorTokenTableEntry>(new SmColorTokenTableEntry(i)); return std::unique_ptr<SmColorTokenTableEntry>( - new SmColorTokenTableEntry("", "", TERROR, COL_SM_BLACK)); + new SmColorTokenTableEntry("", TERROR, COL_SM_BLACK)); } std::unique_ptr<SmColorTokenTableEntry> @@ -765,18 +766,17 @@ starmathdatabase::Identify_ColorName_HTML(const OUString& colorname) { if (colorname.isEmpty()) return std::unique_ptr<SmColorTokenTableEntry>( - new SmColorTokenTableEntry("", "", TERROR, COL_SM_BLACK)); + new SmColorTokenTableEntry("", TERROR, COL_SM_BLACK)); for (auto i = std::begin(aColorTokenTableHTML); i < std::end(aColorTokenTableHTML); ++i) if (i->equals(colorname)) return std::unique_ptr<SmColorTokenTableEntry>(new SmColorTokenTableEntry(i)); if (colorname[0] == '#') { Color col = Color::STRtoRGB(colorname); - return std::unique_ptr<SmColorTokenTableEntry>( - new SmColorTokenTableEntry("", "", TRGB, col)); + return std::unique_ptr<SmColorTokenTableEntry>(new SmColorTokenTableEntry("", TRGB, col)); } return std::unique_ptr<SmColorTokenTableEntry>( - new SmColorTokenTableEntry("", "", TERROR, COL_SM_BLACK)); + new SmColorTokenTableEntry("", TERROR, COL_SM_BLACK)); } std::unique_ptr<SmColorTokenTableEntry> @@ -784,11 +784,10 @@ starmathdatabase::Identify_ColorName_DVIPSNAMES(const OUString& colorname) { if (colorname.isEmpty()) return std::unique_ptr<SmColorTokenTableEntry>( - new SmColorTokenTableEntry("", "", TERROR, COL_SM_BLACK)); - for (auto i = std::begin(aColorTokenTableDVIPSNAMES); i < std::end(aColorTokenTableDVIPSNAMES); - ++i) + new SmColorTokenTableEntry("", TERROR, COL_SM_BLACK)); + for (auto i = std::begin(aColorTokenTableDVIPS); i < std::end(aColorTokenTableDVIPS); ++i) if (i->equals(colorname)) return std::unique_ptr<SmColorTokenTableEntry>(new SmColorTokenTableEntry(i)); return std::unique_ptr<SmColorTokenTableEntry>( - new SmColorTokenTableEntry("", "", TERROR, COL_SM_BLACK)); + new SmColorTokenTableEntry("", TERROR, COL_SM_BLACK)); } diff --git a/starmath/source/visitors.cxx b/starmath/source/visitors.cxx index bb1d138f9988..3de2d3106322 100644 --- a/starmath/source/visitors.cxx +++ b/starmath/source/visitors.cxx @@ -2088,7 +2088,6 @@ void SmNodeToTextVisitor::Visit( SmFontNode* pNode ) { sal_uInt32 nc; sal_uInt8 nr, ng, nb; - std::unique_ptr<SmColorTokenTableEntry> aSmColorTokenTableEntry; switch ( pNode->GetToken( ).eType ) { case TBOLD: @@ -2138,20 +2137,17 @@ void SmNodeToTextVisitor::Visit( SmFontNode* pNode ) case TDVIPSNAMESCOL: Append(u"color dvip "); nc = pNode->GetToken().aText.toUInt32(16); - aSmColorTokenTableEntry = starmathdatabase::Identify_Color_Parser( nc ); - Append( aSmColorTokenTableEntry->pIdent ); + Append( starmathdatabase::Identify_Color_Parser( nc )->pIdent ); break; case THTMLCOL: case TMATHMLCOL: case TICONICCOL: Append(u"color "); nc = pNode->GetToken().aText.toUInt32(16); - aSmColorTokenTableEntry = starmathdatabase::Identify_Color_Parser( nc ); - Append( aSmColorTokenTableEntry->pIdent ); + Append( starmathdatabase::Identify_Color_Parser( nc )->pIdent ); break; case TRGB: nc = pNode->GetToken().aText.toUInt32(16); - aSmColorTokenTableEntry = starmathdatabase::Identify_Color_Parser( nc ); Append(u"color rgb "); nb = nc % 256; nc /= 256; @@ -2166,8 +2162,6 @@ void SmNodeToTextVisitor::Visit( SmFontNode* pNode ) Separate(); break; case TRGBA: - nc = pNode->GetToken().aText.toUInt32(16); - aSmColorTokenTableEntry = starmathdatabase::Identify_Color_Parser( nc ); Append(u"color rgba "); nc = pNode->GetToken().aText.toUInt32(16); nb = nc % 256; @@ -2186,8 +2180,6 @@ void SmNodeToTextVisitor::Visit( SmFontNode* pNode ) Separate(); break; case THEX: - nc = pNode->GetToken().aText.toUInt32(16); - aSmColorTokenTableEntry = starmathdatabase::Identify_Color_Parser( nc ); Append(u"color hex "); nc = pNode->GetToken().aText.toUInt32(16); Append(OUString::number(nc,16)); |