diff --git a/main/helpcontent2/source/text/smath/01/03090600.xhp b/main/helpcontent2/source/text/smath/01/03090600.xhp index c38fd92..ff7070b 100644 --- a/main/helpcontent2/source/text/smath/01/03090600.xhp +++ b/main/helpcontent2/source/text/smath/01/03090600.xhp @@ -422,7 +422,8 @@ - Use the color command to change the color of your formula. Type color, then type the color name (the available colors are white, black, cyan, magenta, red, blue, green and yellow), then the formula, character or character sequence. The input color green size 20 a results in a green letter "a" with a font size of 20. + Use the color command to change the color of your formula. Type color, then type the color name, then the formula, character or character sequence. The input color green size 20 a results in a green letter "a" with a font size of 20. + Available color names are 16 HTML color names (white, silver, gray, white, maroon, red, purple, fuchsia, green, lime, olive, yellow, navy, blue, teal and aqua) and the names cyan and magenta. Cyan is rendered as teal, magenta is rendered as purple. The nbold and nitalic commands remove the bold or italic default fonts of formula components. For example, remove italics from the x in the formula 5 x + 3=28 by typing nitalic before the x as in 5 nitalic x + 3=28. The attributes "acute", "bar", "breve", "check", "circle", "dot", "ddot", "dddot", "grave", "hat", "tilde" and "vec" have fixed sizes. Their width or length cannot be adjusted when positioned over a long symbol. For size changes you can use size n, +n, -n, *n and /n , where n is a placeholder. This method is useful when the base size of the formula is subject to change. The commands size +n and size -n change point size, and size *n and size /n change the size by a percentage. For example, the command size *1.17 increases the size of a character by exactly 17%. diff --git a/main/helpcontent2/source/text/smath/01/03091506.xhp b/main/helpcontent2/source/text/smath/01/03091506.xhp index c457182..d1e6ff6 100644 --- a/main/helpcontent2/source/text/smath/01/03091506.xhp +++ b/main/helpcontent2/source/text/smath/01/03091506.xhp @@ -150,7 +150,7 @@ formulas;in colorcolors;in formulas -The color command changes the character color; first enter the color command directly in the Commands window. Then enter the color name (black, white, cyan, magenta, red, blue, green, or yellow). Then enter the characters to be changed. +The color command changes the character color; first enter the color command directly in the Commands window. Then enter the color name (black, silver, gray, white, maroon, red, purple, fuchsia, green, lime, olive, yellow, navy, blue, teal, aqua, cyan, magenta). Then enter the characters to be changed. diff --git a/main/starmath/inc/parse.hxx b/main/starmath/inc/parse.hxx index 8122931..fcb7887 100644 --- a/main/starmath/inc/parse.hxx +++ b/main/starmath/inc/parse.hxx @@ -95,7 +95,9 @@ enum SmTokenType TSINH, TCOSH, TTANH, TCOTH, TASIN, TACOS, TATAN, TLN, TLOG, TUOPER, TBOPER, TBLACK, TWHITE, TRED, TGREEN, - TBLUE, TCYAN, TMAGENTA, TYELLOW, TFIXED, + TBLUE, TCYAN, TMAGENTA, TYELLOW, TSILVER, + TGRAY, TMAROON, TPURPLE, TLIME, TOLIVE, + TNAVY, TTEAL, TAQUA, TFUCHSIA, TFIXED, TSANS, TSERIF, TPOINT, TASINH, TACOSH, TATANH, TACOTH, TACOT, TEXP, TCDOT, TODOT, TLESLANT, TGESLANT, TNSUBSET, TNSUPSET, diff --git a/main/starmath/source/mathmlexport.cxx b/main/starmath/source/mathmlexport.cxx index a5c3a36..486b2ff 100644 --- a/main/starmath/source/mathmlexport.cxx +++ b/main/starmath/source/mathmlexport.cxx @@ -1281,6 +1281,36 @@ void SmXMLExport::ExportFont(const SmNode *pNode, int nLevel) case TYELLOW: AddAttribute(XML_NAMESPACE_MATH, XML_COLOR, XML_YELLOW); break; + case TSILVER: + AddAttribute(XML_NAMESPACE_MATH, XML_COLOR, XML_SILVER); + break; + case TGRAY: + AddAttribute(XML_NAMESPACE_MATH, XML_COLOR, XML_GRAY); + break; + case TMAROON: + AddAttribute(XML_NAMESPACE_MATH, XML_COLOR, XML_MAROON); + break; + case TOLIVE: + AddAttribute(XML_NAMESPACE_MATH, XML_COLOR, XML_OLIVE); + break; + case TLIME: + AddAttribute(XML_NAMESPACE_MATH, XML_COLOR, XML_LIME); + break; + case TAQUA: + AddAttribute(XML_NAMESPACE_MATH, XML_COLOR, XML_AQUA); + break; + case TTEAL: + AddAttribute(XML_NAMESPACE_MATH, XML_COLOR, XML_TEAL); + break; + case TNAVY: + AddAttribute(XML_NAMESPACE_MATH, XML_COLOR, XML_NAVY); + break; + case TFUCHSIA: + AddAttribute(XML_NAMESPACE_MATH, XML_COLOR, XML_FUCHSIA); + break; + case TPURPLE: + AddAttribute(XML_NAMESPACE_MATH, XML_COLOR, XML_PURPLE); + break; case TSIZE: { const SmFontNode *pFontNode = static_cast(pNode); diff --git a/main/starmath/source/mathmlimport.cxx b/main/starmath/source/mathmlimport.cxx index db03916..8dbe20f 100644 --- a/main/starmath/source/mathmlimport.cxx +++ b/main/starmath/source/mathmlimport.cxx @@ -724,6 +724,9 @@ void SmXMLContext_Helper::RetrieveAttrs(const uno::Reference< case XML_TOK_COLOR: sColor = sValue; break; + case XML_TOK_MATHCOLOR: + sColor = sValue; + break; default: break; } @@ -966,6 +969,9 @@ void SmXMLStyleContext_Impl::StartElement(const uno::Reference< case XML_TOK_COLOR: sColor = sValue; break; + case XML_TOK_MATHCOLOR: + sColor = sValue; + break; default: break; } @@ -2093,6 +2099,7 @@ static __FAR_DATA SvXMLTokenMapEntry aPresLayoutAttrTokenMap[] = { XML_NAMESPACE_MATH, XML_FONTSIZE, XML_TOK_FONTSIZE }, { XML_NAMESPACE_MATH, XML_FONTFAMILY, XML_TOK_FONTFAMILY }, { XML_NAMESPACE_MATH, XML_COLOR, XML_TOK_COLOR }, + { XML_NAMESPACE_MATH, XML_MATHCOLOR, XML_TOK_MATHCOLOR }, XML_TOKEN_MAP_END }; @@ -2150,13 +2157,20 @@ static __FAR_DATA SvXMLTokenMapEntry aColorTokenMap[] = { XML_NAMESPACE_MATH, XML_RED, TRED}, { XML_NAMESPACE_MATH, XML_GREEN, TGREEN}, { XML_NAMESPACE_MATH, XML_BLUE, TBLUE}, - { XML_NAMESPACE_MATH, XML_AQUA, TCYAN}, - { XML_NAMESPACE_MATH, XML_FUCHSIA, TMAGENTA}, + { XML_NAMESPACE_MATH, XML_AQUA, TAQUA}, + { XML_NAMESPACE_MATH, XML_FUCHSIA, TFUCHSIA}, { XML_NAMESPACE_MATH, XML_YELLOW, TYELLOW}, + { XML_NAMESPACE_MATH, XML_NAVY, TNAVY}, + { XML_NAMESPACE_MATH, XML_TEAL, TTEAL}, + { XML_NAMESPACE_MATH, XML_MAROON, TMAROON}, + { XML_NAMESPACE_MATH, XML_PURPLE, TPURPLE}, + { XML_NAMESPACE_MATH, XML_OLIVE, TOLIVE}, + { XML_NAMESPACE_MATH, XML_GRAY, TGRAY}, + { XML_NAMESPACE_MATH, XML_SILVER, TSILVER}, + { XML_NAMESPACE_MATH, XML_LIME, TLIME}, XML_TOKEN_MAP_END }; - //////////////////////////////////////////////////////////// const SvXMLTokenMap& SmXMLImport::GetPresLayoutElemTokenMap() diff --git a/main/starmath/source/mathmlimport.hxx b/main/starmath/source/mathmlimport.hxx index 136492d..b4a240b 100644 --- a/main/starmath/source/mathmlimport.hxx +++ b/main/starmath/source/mathmlimport.hxx @@ -292,7 +292,8 @@ enum SmXMLPresLayoutAttrTokenMap XML_TOK_FONTSTYLE, XML_TOK_FONTSIZE, XML_TOK_FONTFAMILY, - XML_TOK_COLOR + XML_TOK_COLOR, + XML_TOK_MATHCOLOR }; diff --git a/main/starmath/source/node.cxx b/main/starmath/source/node.cxx index 526b39d..41a9910 100644 --- a/main/starmath/source/node.cxx +++ b/main/starmath/source/node.cxx @@ -2060,6 +2060,36 @@ void SmFontNode::CreateTextFromNode(String &rText) case TYELLOW: APPEND(rText,"color yellow "); break; + case TTEAL: + APPEND(rText,"color teal"); + break; + case TSILVER: + APPEND(rText,"color silver"); + break; + case TGRAY: + APPEND(rText,"color gray"); + break; + case TMAROON: + APPEND(rText,"color maroon"); + break; + case TPURPLE: + APPEND(rText,"color purple"); + break; + case TLIME: + APPEND(rText,"color lime"); + break; + case TOLIVE: + APPEND(rText,"color olive"); + break; + case TNAVY: + APPEND(rText,"color navy"); + break; + case TAQUA: + APPEND(rText,"color aqua"); + break; + case TFUCHSIA: + APPEND(rText,"color fuchsia"); + break; case TSANS: APPEND(rText,"font sans "); break; @@ -2125,12 +2155,22 @@ void SmFontNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat) case TBLACK : SetColor(Color(COL_BLACK)); break; case TWHITE : SetColor(Color(COL_WHITE)); break; - case TRED : SetColor(Color(COL_RED)); break; + case TRED : SetColor(Color(COL_LIGHTRED)); break; case TGREEN : SetColor(Color(COL_GREEN)); break; - case TBLUE : SetColor(Color(COL_BLUE)); break; - case TCYAN : SetColor(Color(COL_CYAN)); break; - case TMAGENTA : SetColor(Color(COL_MAGENTA)); break; + case TBLUE : SetColor(Color(COL_LIGHTBLUE)); break; + case TCYAN : SetColor(Color(COL_CYAN)); break; // read old documents + case TMAGENTA : SetColor(Color(COL_MAGENTA)); break; // read old documents case TYELLOW : SetColor(Color(COL_YELLOW)); break; + case TTEAL : SetColor(Color(COL_CYAN)); break; + case TSILVER : SetColor(Color(COL_LIGHTGRAY)); break; + case TGRAY : SetColor(Color(COL_GRAY)); break; + case TMAROON : SetColor(Color(COL_RED)); break; + case TPURPLE : SetColor(Color(COL_MAGENTA)); break; + case TLIME : SetColor(Color(COL_LIGHTGREEN)); break; + case TOLIVE : SetColor(Color(COL_BROWN)); break; + case TNAVY : SetColor(Color(COL_BLUE)); break; + case TAQUA : SetColor(Color(COL_LIGHTCYAN)); break; + case TFUCHSIA : SetColor(Color(COL_LIGHTMAGENTA)); break; default: DBG_ASSERT(sal_False, "Sm: unbekannter Fall"); diff --git a/main/starmath/source/parse.cxx b/main/starmath/source/parse.cxx index 1da5942..037104a 100644 --- a/main/starmath/source/parse.cxx +++ b/main/starmath/source/parse.cxx @@ -130,6 +130,7 @@ static const SmTokenTableEntry aTokenTable[] = { "alignt", TALIGNC, '\0', TGALIGN | TGDISCARDED, 0}, { "and", TAND, MS_AND, TGPRODUCT, 0}, { "approx", TAPPROX, MS_APPROX, TGRELATION, 0}, + { "aqua", TAQUA, '\0', TGCOLOR, 0}, { "arccos", TACOS, '\0', TGFUNCTION, 5}, { "arccot", TACOT, '\0', TGFUNCTION, 5}, { "arcsin", TASIN, '\0', TGFUNCTION, 5}, @@ -183,11 +184,13 @@ static const SmTokenTableEntry aTokenTable[] = { "font", TFONT, '\0', TGFONTATTR, 5}, { "forall", TFORALL, MS_FORALL, TGSTANDALONE, 5}, { "from", TFROM, '\0', TGLIMIT, 0}, + { "fuchsia", TFUCHSIA, '\0', TGCOLOR, 0}, { "func", TFUNC, '\0', TGFUNCTION, 5}, { "ge", TGE, MS_GE, TGRELATION, 0}, { "geslant", TGESLANT, MS_GESLANT, TGRELATION, 0 }, { "gg", TGG, MS_GG, TGRELATION, 0}, { "grave", TGRAVE, MS_GRAVE, TGATTRIBUT, 5}, + { "gray", TGRAY, '\0', TGCOLOR, 0}, { "green", TGREEN, '\0', TGCOLOR, 0}, { "gt", TGT, MS_GT, TGRELATION, 0}, { "hat", THAT, MS_HAT, TGATTRIBUT, 5}, @@ -213,6 +216,7 @@ static const SmTokenTableEntry aTokenTable[] = { "leslant", TLESLANT, MS_LESLANT, TGRELATION, 0 }, { "lfloor", TLFLOOR, MS_LFLOOR, TGLBRACES, 5}, { "lim", TLIM, '\0', TGOPER, 5}, + { "lime", TLIME, '\0', TGCOLOR, 0}, { "liminf", TLIMINF, '\0', TGOPER, 5}, { "limsup", TLIMSUP, '\0', TGOPER, 5}, { "lint", TLINT, MS_LINT, TGOPER, 5}, @@ -226,10 +230,12 @@ static const SmTokenTableEntry aTokenTable[] = { "lsup", TLSUP, '\0', TGPOWER, 0}, { "lt", TLT, MS_LT, TGRELATION, 0}, { "magenta", TMAGENTA, '\0', TGCOLOR, 0}, + { "maroon", TMAROON, '\0', TGCOLOR, 0}, { "matrix", TMATRIX, '\0', 0, 5}, { "minusplus", TMINUSPLUS, MS_MINUSPLUS, TGUNOPER | TGSUM, 5}, { "mline", TMLINE, MS_LINE, 0, 0}, //! nicht in TGRBRACES, Level 0 { "nabla", TNABLA, MS_NABLA, TGSTANDALONE, 5}, + { "navy", TNAVY, '\0', TGCOLOR, 0}, { "nbold", TNBOLD, '\0', TGFONTATTR, 5}, { "ndivides", TNDIVIDES, MS_NDIVIDES, TGRELATION, 0}, { "neg", TNEG, MS_NEG, TGUNOPER, 5 }, @@ -247,6 +253,7 @@ static const SmTokenTableEntry aTokenTable[] = { "nsupseteq", TNSUPSETEQ, MS_NSUPSETEQ, TGRELATION, 0 }, { "odivide", TODIVIDE, MS_ODIVIDE, TGPRODUCT, 0}, { "odot", TODOT, MS_ODOT, TGPRODUCT, 0}, + { "olive", TOLIVE, '\0', TGCOLOR, 0}, { "ominus", TOMINUS, MS_OMINUS, TGSUM, 0}, { "oper", TOPER, '\0', TGOPER, 5}, { "oplus", TOPLUS, MS_OPLUS, TGSUM, 0}, @@ -264,6 +271,7 @@ static const SmTokenTableEntry aTokenTable[] = { "plusminus", TPLUSMINUS, MS_PLUSMINUS, TGUNOPER | TGSUM, 5}, { "prod", TPROD, MS_PROD, TGOPER, 5}, { "prop", TPROP, MS_PROP, TGRELATION, 0}, + { "purple", TPURPLE, '\0', TGCOLOR, 0}, { "rangle", TRANGLE, MS_RANGLE, TGRBRACES, 0}, //! 0 to terminate expression { "rbrace", TRBRACE, MS_RBRACE, TGRBRACES, 0}, // { "rceil", TRCEIL, MS_RCEIL, TGRBRACES, 0}, // @@ -284,6 +292,7 @@ static const SmTokenTableEntry aTokenTable[] = { "setR" , TSETR, MS_SETR, TGSTANDALONE, 5}, { "setZ" , TSETZ, MS_SETZ, TGSTANDALONE, 5}, { "setminus", TBACKSLASH, MS_BACKSLASH, TGPRODUCT, 0 }, + { "silver", TSILVER, '\0', TGCOLOR, 0}, { "sim", TSIM, MS_SIM, TGRELATION, 0}, { "simeq", TSIMEQ, MS_SIMEQ, TGRELATION, 0}, { "sin", TSIN, '\0', TGFUNCTION, 5}, @@ -301,6 +310,7 @@ static const SmTokenTableEntry aTokenTable[] = { "supseteq", TSUPSETEQ, MS_SUPSETEQ, TGRELATION, 0}, { "tan", TTAN, '\0', TGFUNCTION, 5}, { "tanh", TTANH, '\0', TGFUNCTION, 5}, + { "teal", TTEAL, '\0', TGCOLOR, 0}, { "tilde", TTILDE, MS_TILDE, TGATTRIBUT, 5}, { "times", TTIMES, MS_TIMES, TGPRODUCT, 0}, { "to", TTO, '\0', TGLIMIT, 0}, diff --git a/main/xmloff/inc/xmloff/xmltoken.hxx b/main/xmloff/inc/xmloff/xmltoken.hxx index a466ced..fc2d7aa 100644 --- a/main/xmloff/inc/xmloff/xmltoken.hxx +++ b/main/xmloff/inc/xmloff/xmltoken.hxx @@ -3139,7 +3139,6 @@ namespace xmloff { namespace token { XML_ASTERISK, XML_HORIZONTAL_BAR, XML_VERTICAL_BAR, - XML_TOKEN_END };