Commit 037e2efa authored by ElenaSubbotina's avatar ElenaSubbotina

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

parent b41b5edb
...@@ -258,7 +258,7 @@ namespace NS_DWC_Common ...@@ -258,7 +258,7 @@ namespace NS_DWC_Common
{ {
if (colorStr.GetLength() == 4) 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 lB = ((lColor >> 16) & 0x0F);
BYTE lG = ((lColor >> 20) & 0x0F); BYTE lG = ((lColor >> 20) & 0x0F);
BYTE lR = ((lColor >> 8) & 0x0F); BYTE lR = ((lColor >> 8) & 0x0F);
...@@ -270,7 +270,7 @@ namespace NS_DWC_Common ...@@ -270,7 +270,7 @@ namespace NS_DWC_Common
} }
else else
{ {
int lColor = XmlUtils::GetColor(colorStr.Mid(1, 6)); int lColor = XmlUtils::GetColorBGR(colorStr.Mid(1, 6));
color.R = (BYTE)(lColor >> 0); color.R = (BYTE)(lColor >> 0);
color.G = (BYTE)(lColor >> 8); color.G = (BYTE)(lColor >> 8);
color.B = (BYTE)(lColor >> 16); color.B = (BYTE)(lColor >> 16);
......
...@@ -449,7 +449,7 @@ namespace NSPresentationEditor ...@@ -449,7 +449,7 @@ namespace NSPresentationEditor
int lColor; int lColor;
if (str.Find(_T("#")) == 0) if (str.Find(_T("#")) == 0)
{ {
lColor = XmlUtils::GetColor(str.Mid(1, 6)); lColor = XmlUtils::GetColorBGR(str.Mid(1, 6));
R = (BYTE)(lColor); R = (BYTE)(lColor);
G = (BYTE)(lColor >> 8); G = (BYTE)(lColor >> 8);
B = (BYTE)(lColor >> 16); B = (BYTE)(lColor >> 16);
......
...@@ -78,7 +78,7 @@ namespace XmlUtils ...@@ -78,7 +78,7 @@ namespace XmlUtils
return nResult; return nResult;
} }
AVSINLINE static int GetColor (const CString& string) AVSINLINE static int GetColorBGR (const CString& string)
{ {
// variables // variables
int blue = 0; int blue = 0;
...@@ -99,7 +99,7 @@ namespace XmlUtils ...@@ -99,7 +99,7 @@ namespace XmlUtils
green = 16*GetDigit(color[2]) + GetDigit(color[3]); green = 16*GetDigit(color[2]) + GetDigit(color[3]);
blue = 16*GetDigit(color[4]) + GetDigit(color[5]); 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) 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