Commit 037e2efa authored by ElenaSubbotina's avatar ElenaSubbotina

Docx->doct->doc- linux - цвет графики

parent b41b5edb
......@@ -258,7 +258,7 @@ namespace NS_DWC_Common
{
if (colorStr.GetLength() == 4)
{
int lColor = XmlUtils::GetColor(colorStr.Mid(1, 3));
int lColor = XmlUtils::GetColorBGR(colorStr.Mid(1, 3));
BYTE lB = ((lColor >> 16) & 0x0F);
BYTE lG = ((lColor >> 20) & 0x0F);
BYTE lR = ((lColor >> 8) & 0x0F);
......@@ -270,7 +270,7 @@ namespace NS_DWC_Common
}
else
{
int lColor = XmlUtils::GetColor(colorStr.Mid(1, 6));
int lColor = XmlUtils::GetColorBGR(colorStr.Mid(1, 6));
color.R = (BYTE)(lColor >> 0);
color.G = (BYTE)(lColor >> 8);
color.B = (BYTE)(lColor >> 16);
......
......@@ -449,7 +449,7 @@ namespace NSPresentationEditor
int lColor;
if (str.Find(_T("#")) == 0)
{
lColor = XmlUtils::GetColor(str.Mid(1, 6));
lColor = XmlUtils::GetColorBGR(str.Mid(1, 6));
R = (BYTE)(lColor);
G = (BYTE)(lColor >> 8);
B = (BYTE)(lColor >> 16);
......
......@@ -78,7 +78,7 @@ namespace XmlUtils
return nResult;
}
AVSINLINE static int GetColor (const CString& string)
AVSINLINE static int GetColorBGR (const CString& string)
{
// variables
int blue = 0;
......@@ -95,11 +95,11 @@ namespace XmlUtils
while (color.GetLength() < 6)
color = _T("0") + color;
red = 16*GetDigit(color[0]) + GetDigit(color[1]);
green = 16*GetDigit(color[2]) + GetDigit(color[3]);
blue = 16*GetDigit(color[4]) + GetDigit(color[5]);
red = 16*GetDigit(color[0]) + GetDigit(color[1]);
green = 16*GetDigit(color[2]) + GetDigit(color[3]);
blue = 16*GetDigit(color[4]) + GetDigit(color[5]);
return RGB(red, green, blue);
return ((int)(((BYTE)(red)|((WORD)((BYTE)(green))<<8))|(((DWORD)(BYTE)(blue))<<16))); //RGB(red, green, blue);
}
AVSINLINE static bool GetBoolean (const CString& string)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment