diff options
Diffstat (limited to 'starmath/source/node.cxx')
-rw-r--r-- | starmath/source/node.cxx | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx index ba62c4d9a484..526b2e3ee010 100644 --- a/starmath/source/node.cxx +++ b/starmath/source/node.cxx @@ -1719,6 +1719,7 @@ void SmAttributNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat) void SmFontNode::CreateTextFromNode(OUStringBuffer &rText) { rText.append("{"); + sal_Int32 nc,r,g,b; switch (GetToken().eType) { @@ -1819,6 +1820,21 @@ void SmFontNode::CreateTextFromNode(OUStringBuffer &rText) case TFUCHSIA: rText.append("color fuchsia "); break; + case TRGB: + rText.append("color rgb "); + nc = GetToken().aText.toInt32(); + b = nc % 256; + nc /= 256; + g = nc % 256; + nc /= 256; + r = nc % 256; + rText.append(r); + rText.append(" "); + rText.append(g); + rText.append(" "); + rText.append(b); + rText.append(" "); + break; case TSANS: rText.append("font sans "); break; @@ -1866,6 +1882,8 @@ void SmFontNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat) { SmNode *pNode = GetSubNode(1); assert(pNode); + sal_Int32 nc; + Color col_perso_rgb_color (0); switch (GetToken().eType) { case TSIZE : @@ -1902,6 +1920,15 @@ void SmFontNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat) case TNAVY : SetColor(COL_BLUE); break; case TAQUA : SetColor(COL_LIGHTCYAN); break; case TFUCHSIA : SetColor(COL_LIGHTMAGENTA); break; + case TRGB : + nc = GetToken().aText.toInt32(); + col_perso_rgb_color.SetBlue(nc % 256); + nc /= 256; + col_perso_rgb_color.SetGreen(nc % 256); + nc /= 256; + col_perso_rgb_color.SetRed(nc % 256); + SetColor(col_perso_rgb_color); + break; default: SAL_WARN("starmath", "unknown case"); @@ -2658,7 +2685,7 @@ void SmSpecialNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell static const sal_Unicode cUppercaseOmega = 0x03A9; sal_Unicode cChar = rTmp[0]; // uppercase letters should be straight and lowercase letters italic - bItalic = (cUppercaseAlpha > cChar || cChar > cUppercaseOmega); + bItalic = cUppercaseAlpha > cChar || cChar > cUppercaseOmega; } } |