Compare commits

..

12 Commits

301 changed files with 2971 additions and 2112 deletions

View File

@ -3232,6 +3232,11 @@ public:
NSBinPptxRW::CXmlWriter xmlWriter;
pTheme->toXmlWriter(&xmlWriter);
m_oFileWriter.m_oTheme.m_sContent = xmlWriter.GetXmlString();
if ((m_oFileWriter.m_pDrawingConverter) && (m_oFileWriter.m_pDrawingConverter->m_pTheme))
{
*m_oFileWriter.m_pDrawingConverter->m_pTheme = pTheme;
}
}
else
res = c_oSerConstants::ReadUnknown;
@ -7585,7 +7590,8 @@ public:
m_oFileWriter.m_pDrawingConverter->m_pImageManager->m_nDocumentType = XMLWRITER_DOC_TYPE_XLSX;
m_oFileWriter.m_pDrawingConverter->SetDstContentRels();
std::wstring sThemePath = m_oFileWriter.m_sThemePath;
std::wstring sThemePath = m_oFileWriter.m_sThemePath;
std::wstring sDrawingsPath = m_oFileWriter.m_oChartWriter.m_sDir + FILE_SEPARATOR_STR + L"word" + FILE_SEPARATOR_STR + L"drawings";
size_t nPos = sThemePath.rfind(FILE_SEPARATOR_STR);
if (std::wstring::npos != nPos)
@ -7593,11 +7599,11 @@ public:
sThemePath = sThemePath.substr(0, nPos);
}
BinXlsxRW::SaveParams oSaveParams(sThemePath, m_oFileWriter.m_pDrawingConverter->GetContentTypes());
BinXlsxRW::SaveParams oSaveParams(sDrawingsPath, sThemePath, m_oFileWriter.m_pDrawingConverter->GetContentTypes());
BinXlsxRW::BinaryChartReader oBinaryChartReader(m_oBufferedStream, oSaveParams, m_oFileWriter.m_pDrawingConverter);
OOX::Spreadsheet::CChartSpace* pChartSpace = new OOX::Spreadsheet::CChartSpace(NULL);
oBinaryChartReader.ReadCT_ChartSpace(length, &pChartSpace->m_oChartSpace);
oBinaryChartReader.ReadCT_ChartSpace(length, pChartSpace);
//save xlsx
_INT32 nChartCount = m_oFileWriter.m_pDrawingConverter->GetDocumentChartsCount();
@ -7623,15 +7629,11 @@ public:
pChartSpace->m_oChartSpace.m_externalData->m_autoUpdate->m_val = new bool(false);
}
//save chart.xml
NSStringUtils::CStringBuilder sw;
pChartSpace->toXML(sw);
std::wstring sFilename;
std::wstring sRelsName;
std::wstring sContent = sw.GetData();
m_oFileWriter.m_oChartWriter.AddChart(sContent, sRelsName, sFilename, nChartIndex);
std::wstring sFilename = L"chart" + std::to_wstring(nChartIndex) + L".xml";
std::wstring sRelsName = L"charts/" + sFilename;
OOX::CPath pathChartsFile = pathChartsDir + FILE_SEPARATOR_STR + sFilename;
pChartSpace->write(pathChartsFile, OOX::CPath(L"/word/charts"), *m_oFileWriter.m_pDrawingConverter->GetContentTypes());
OOX::CPath pathChartsRels = pathChartsRelsDir.GetPath() + FILE_SEPARATOR_STR + sFilename + L".rels";
m_oFileWriter.m_pDrawingConverter->SaveDstContentRels(pathChartsRels.GetPath());
@ -7640,7 +7642,7 @@ public:
std::wstring bstrChartRelType = OOX::FileTypes::Chart.RelationType();
m_oFileWriter.m_pDrawingConverter->WriteRels(bstrChartRelType, sRelsName, std::wstring(), &rIdChart);
m_oFileWriter.m_pDrawingConverter->Registration(L"application/vnd.openxmlformats-officedocument.drawingml.chart+xml", L"/word/charts", sFilename);
//m_oFileWriter.m_pDrawingConverter->Registration(L"application/vnd.openxmlformats-officedocument.drawingml.chart+xml", L"/word/charts", sFilename);
pDrawingProperty->sChartRels = L"rId" + std::to_wstring( rIdChart);
@ -7829,7 +7831,6 @@ public:
}
else if (pDrawingProperty->nObjectType == 2)
{
BinXlsxRW::CXlsxSerializer oXlsxSerializer;
oXlsxSerializer.setDrawingConverter(m_oFileWriter.m_pDrawingConverter);
@ -7844,10 +7845,16 @@ public:
std::wstring strDstEmbeddedTemp = strDstEmbedded + FILE_SEPARATOR_STR + L"Temp";
NSDirectory::CreateDirectory(strDstEmbeddedTemp);
std::wstring strDstEmbeddedTempXl = strDstEmbeddedTemp + FILE_SEPARATOR_STR + L"xl";
NSDirectory::CreateDirectory(strDstEmbeddedTempXl);
std::wstring strDstEmbeddedTempThemePath = strDstEmbeddedTempXl + FILE_SEPARATOR_STR + L"theme";
std::wstring strDstEmbeddedTempDrawingPath = strDstEmbeddedTempXl + FILE_SEPARATOR_STR + L"drawings";
int id = m_oFileWriter.m_oChartWriter.nEmbeddedCount++;
std::wstring sXlsxFilename = L"Microsoft_Excel_Worksheet" + std::to_wstring( id + 1) + L".xlsx";
BinXlsxRW::SaveParams oSaveParams(m_oFileWriter.m_sThemePath, m_oFileWriter.m_pDrawingConverter->GetContentTypes());//???
BinXlsxRW::SaveParams oSaveParams(strDstEmbeddedTempDrawingPath, strDstEmbeddedTempThemePath, m_oFileWriter.m_pDrawingConverter->GetContentTypes());//???
OOX::Spreadsheet::CXlsx oXlsx;

View File

@ -150,28 +150,32 @@ namespace BinXlsxRW{
m_pExternalDrawingConverter->SetDstContentRels();
//получаем sThemePath из bsFilename предполагая что папка theme находится на уровень выше bsFilename
std::wstring sDrawingsPath;
std::wstring sThemePath;
std::wstring sEmbedingPath;
std::wstring sContentTypePath;
int nIndex = (int)sFilepath.rfind(FILE_SEPARATOR_CHAR);
size_t nIndex = (int)sFilepath.rfind(FILE_SEPARATOR_CHAR);
nIndex = (int)sFilepath.rfind(FILE_SEPARATOR_CHAR, nIndex - 1);
if(-1 != nIndex)
if(std::wstring::npos != nIndex)
{
std::wstring sFilepathLeft = sFilepath.substr(0, nIndex + 1);
sThemePath = sFilepathLeft + L"theme";
sEmbedingPath = sFilepathLeft + L"embeddings";
sDrawingsPath = sFilepathLeft + L"drawings";
}
if (pReader->m_nDocumentType == XMLWRITER_DOC_TYPE_DOCX) sContentTypePath = L"/word/charts/";
else if (pReader->m_nDocumentType == XMLWRITER_DOC_TYPE_XLSX) sContentTypePath = L"/xl/charts/";
else sContentTypePath = L"/ppt/charts/";
//todo theme path
BinXlsxRW::SaveParams oSaveParams(sThemePath, m_pExternalDrawingConverter->GetContentTypes());
BinXlsxRW::SaveParams oSaveParams(sDrawingsPath, sThemePath, m_pExternalDrawingConverter->GetContentTypes());
OOX::Spreadsheet::CChartSpace oChartSpace(NULL);
BinXlsxRW::BinaryChartReader oBinaryChartReader(*pReader, oSaveParams, m_pExternalDrawingConverter);
oBinaryChartReader.ReadCT_ChartSpace(lLength, &oChartSpace.m_oChartSpace);
oBinaryChartReader.ReadCT_ChartSpace(lLength, &oChartSpace);
if(oChartSpace.isValid())
{

View File

@ -1070,7 +1070,7 @@ void odf_drawing_context::end_shape()
enhanced->attlist_.draw_type_ = shape_define->odf_type_name;
enhanced->attlist_.draw_text_areas_ = shape_define->text_areas;
enhanced->attlist_.draw_glue_points_ = shape_define->glue_points;
enhanced->attlist_.draw_glue_points_ = shape_define->glue_points;
enhanced->attlist_.draw_sub_view_size_ = shape_define->sub_view_size;
if (impl_->current_drawing_state_.oox_shape_ && !impl_->current_drawing_state_.oox_shape_->modifiers.empty())

View File

@ -232,4 +232,10 @@ oox_shape_ptr oox_shape::create(int ooxPrstGeomType)
}
}
void oox_shape::add(std::wstring name,std::wstring frmla)
{
XmlUtils::replace_all(name, L"gd", L"f");
_equation q = {name, frmla};
equations.push_back(q);
}
}

View File

@ -68,11 +68,7 @@ namespace cpdoccore
_CP_OPT(std::wstring) r_maximum;
};
void add(std::wstring name,std::wstring frmla)
{
_equation q = {name, frmla};
equations.push_back(q);
}
void add(std::wstring name,std::wstring frmla);
std::vector<_equation> equations;
std::vector<_handle> handles;
@ -87,4 +83,4 @@ namespace cpdoccore
std::wstring odf_type_name;
};
};
};

View File

@ -248,11 +248,42 @@ namespace NS_DWC_Common
return nRot;
}
const static int shemeDefaultColor[] =
{
0x00000000, 0x00FFFFFF, 0x00FF0000, 0x0000FF00, 0x000000FF, 0x00FFFF00, 0x00FF00FF, 0x0000FFFF,
0x00000000, 0x00FFFFFF, 0x00FF0000, 0x0000FF00, 0x000000FF, 0x00FFFF00, 0x00FF00FF, 0x0000FFFF,
0x00800000, 0x00008000, 0x00000080, 0x00808000, 0x00800080, 0x00008080, 0x00C0C0C0, 0x00808080,
0x009999FF, 0x00993366, 0x00FFFFCC, 0x00CCFFFF, 0x00660066, 0x00FF8080, 0x000066CC, 0x00CCCCFF,
0x00000080, 0x00FF00FF, 0x00FFFF00, 0x0000FFFF, 0x00800080, 0x00800000, 0x00008080, 0x000000FF,
0x0000CCFF, 0x00CCFFFF, 0x00CCFFCC, 0x00FFFF99, 0x0099CCFF, 0x00FF99CC, 0x00CC99FF, 0x00FFCC99,
0x003366FF, 0x0033CCCC, 0x0099CC00, 0x00FFCC00, 0x00FF9900, 0x00FF6600, 0x00666699, 0x00969696,
0x00003366, 0x00339966, 0x00003300, 0x00333300, 0x00993300, 0x00993366, 0x00333399, 0x00333333
};
//const static int controlPanelColors1[] =
//{
// 0x00FFFFFF, 0x00CCCCCC, 0x00FFFFFF, 0x006363CE,
// 0x00DDDDDD, 0x00DDDDDD, 0x00888888, 0x00000000,
// 0x00000000, 0x00808080, 0x00B5D5FF, 0x00000000,
// 0x00FFFFFF, 0x00FFFFFF, 0x007F7F7F, 0x00FBFCC5,
// 0x00000000, 0x00F7F7F7, 0x00000000, 0x00FFFFFF,
// 0x00666666, 0x00C0C0C0, 0x00DDDDDD, 0x00C0C0C0,
// 0x00888888, 0x00FFFFFF, 0x00CCCCCC, 0x00000000
//};
//const static int controlPanelColors2[] =
//{
// 0x00000000, 0x00FFFFFF, 0x00000000, 0x00FFFFFF,
// 0x00000000, 0x00000000, 0x00000000, 0x00FFFFFF,
// 0x00FFFFFF, 0x00000000, 0x00FFFFFF, 0x00FFFFFF,
// 0x00000000, 0x00000000, 0x00000000, 0x00000000,
// 0x00FFFFFF, 0x00FFFFFF, 0x00FFFFFF, 0x00000000,
// 0x00FFFFFF, 0x00000000, 0x00000000, 0x00000000,
// 0x00000000, 0x00000000, 0x00FFFFFF, 0x00FFFFFF
//};
NSPresentationEditor::CColor getColorFromString(const std::wstring& colorStr)
{
NSPresentationEditor::CColor color;
if (colorStr.find(L"#") != -1)
bool bSet = false;
if (colorStr.find(L"#") != std::wstring::npos)
{
if (colorStr.length() == 4)
{
@ -274,257 +305,285 @@ namespace NS_DWC_Common
color.B = (BYTE)(lColor >> 16);
color.A = 0;
}
bSet = true;
}
else
{
int RGB = 0;
std::wstring str;
int pos = (int)colorStr.find(' ');
if( pos < 0 )
str = colorStr;
else
str = colorStr.substr( 0, pos );
int RGB = 0;
switch(str[0])
size_t pos = colorStr.find(L"["); //"buttonFace [67]"
if( pos != std::wstring::npos )
{
case 'a':
if(str == L"aliceBlue") {RGB = 0xF0F8FF; break;} // (Alice Blue Preset Color) Specifies a color with RGB value (240,248,255)
if(str == L"antiqueWhite") {RGB = 0xFAEBD7; break;} // (Antique White Preset Color) Specifies a color with RGB value (250,235,215)
if(str == L"aqua") {RGB = 0x00FFFF; break;} // (Aqua Preset Color) Specifies a color with RGB value (0,255,255)
if(str == L"aquamarine") {RGB = 0x7FFFD4; break;} // (Aquamarine Preset Color) Specifies a color with RGB value (127,255,212)
if(str == L"azure") {RGB = 0xF0FFFF; break;} // (Azure Preset Color) Specifies a color with RGB value (240,255,255)
break;
case 'b':
if(str == L"beige") {RGB = 0xF5F5DC; break;} // (Beige Preset Color) Specifies a color with RGB value (245,245,220)
if(str == L"bisque") {RGB = 0xFFE4C4; break;} // (Bisque Preset Color) Specifies a color with RGB value (255,228,196)
if(str == L"black") {RGB = 0x000000; break;} // (Black Preset Color) Specifies a color with RGB value (0,0,0)
if(str == L"blanchedAlmond") {RGB = 0xFFEBCD; break;} // (Blanched Almond Preset Color) Specifies a color with RGB value (255,235,205)
if(str == L"blue") {RGB = 0x0000FF; break;} // (Blue Preset Color) Specifies a color with RGB value (0,0,255)
if(str == L"blueViolet") {RGB = 0x8A2BE2; break;} // (Blue Violet Preset Color) Specifies a color with RGB value (138,43,226)
if(str == L"brown") {RGB = 0xA52A2A; break;} // (Brown Preset Color) Specifies a color with RGB value (165,42,42)
if(str == L"burlyWood") {RGB = 0xDEB887; break;} // (Burly Wood Preset Color) Specifies a color with RGB value (222,184,135)
break;
case 'c':
if(str == L"cadetBlue") {RGB = 0x5F9EA0; break;} // (Cadet Blue Preset Color) Specifies a color with RGB value (95,158,160)
if(str == L"chartreuse") {RGB = 0x7FFF00; break;} // (Chartreuse Preset Color) Specifies a color with RGB value (127,255,0)
if(str == L"chocolate") {RGB = 0xD2691E; break;} // (Chocolate Preset Color) Specifies a color with RGB value (210,105,30)
if(str == L"coral") {RGB = 0xFF7F50; break;} // (Coral Preset Color) Specifies a color with RGB value (255,127,80)
if(str == L"cornflowerBlue") {RGB = 0x6495ED; break;} // (Cornflower Blue Preset Color) Specifies a color with RGB value (100,149,237)
if(str == L"cornsilk") {RGB = 0xFFF8DC; break;} // (Cornsilk Preset Color) Specifies a color with RGB value (255,248,220)
if(str == L"crimson") {RGB = 0xDC143C; break;} // (Crimson Preset Color) Specifies a color with RGB value (220,20,60)
if(str == L"cyan") {RGB = 0x00FFFF; break;} // (Cyan Preset Color) Specifies a color with RGB value (0,255,255)
break;
case 'd':
if(str == L"darkBlue") {RGB = 0x00008B; break;} // (Dark Blue Preset Color) Specifies a color with RGB value (0,0,139)
if(str == L"darkCyan") {RGB = 0x008B8B; break;} // (Dark Cyan Preset Color) Specifies a color with RGB value (0,139,139)
if(str == L"darkGoldenrod") {RGB = 0xB8860B; break;} // (Dark Goldenrod Preset Color) Specifies a color with RGB value (184,134,11)
if(str == L"darkGray") {RGB = 0xA9A9A9; break;} // (Dark Gray Preset Color) Specifies a color with RGB value (169,169,169)
if(str == L"darkGreen") {RGB = 0x006400; break;} // (Dark Green Preset Color) Specifies a color with RGB value (0,100,0)
if(str == L"darkGrey") {RGB = 0xA9A9A9; break;} // (Dark Gray Preset Color) Specifies a color with RGB value (169,169,169)
if(str == L"darkKhaki") {RGB = 0xBDB76B; break;} // (Dark Khaki Preset Color) Specifies a color with RGB value (189,183,107)
if(str == L"darkMagenta") {RGB = 0x8B008B; break;} // (Dark Magenta Preset Color) Specifies a color with RGB value (139,0,139)
if(str == L"darkOliveGreen") {RGB = 0x556B2F; break;} // (Dark Olive Green Preset Color) Specifies a color with RGB value (85,107,47)
if(str == L"darkOrange") {RGB = 0xFF8C00; break;} // (Dark Orange Preset Color) Specifies a color with RGB value (255,140,0)
if(str == L"darkOrchid") {RGB = 0x9932CC; break;} // (Dark Orchid Preset Color) Specifies a color with RGB value (153,50,204)
if(str == L"darkRed") {RGB = 0x8B0000; break;} // (Dark Red Preset Color) Specifies a color with RGB value (139,0,0)
if(str == L"darkSalmon") {RGB = 0xE9967A; break;} // (Dark Salmon Preset Color) Specifies a color with RGB value (233,150,122)
if(str == L"darkSeaGreen") {RGB = 0x8FBC8F; break;} // (Dark Sea Green Preset Color) Specifies a color with RGB value (143,188,143)
if(str == L"darkSlateBlue") {RGB = 0x483D8B; break;} // (Dark Slate Blue Preset Color) Specifies a color with RGB value (72,61,139)
if(str == L"darkSlateGray") {RGB = 0x2F4F4F; break;} // (Dark Slate Gray Preset Color) Specifies a color with RGB value (47,79,79)
if(str == L"darkSlateGrey") {RGB = 0x2F4F4F; break;} // (Dark Slate Gray Preset Color) Specifies a color with RGB value (47,79,79)
if(str == L"darkTurquoise") {RGB = 0x00CED1; break;} // (Dark Turquoise Preset Color) Specifies a color with RGB value (0,206,209)
if(str == L"darkViolet") {RGB = 0x9400D3; break;} // (Dark Violet Preset Color) Specifies a color with RGB value (148,0,211)
if(str == L"deepPink") {RGB = 0xFF1493; break;} // (Deep Pink Preset Color) Specifies a color with RGB value (255,20,147)
if(str == L"deepSkyBlue") {RGB = 0x00BFFF; break;} // (Deep Sky Blue Preset Color) Specifies a color with RGB value (0,191,255)
if(str == L"dimGray") {RGB = 0x696969; break;} // (Dim Gray Preset Color) Specifies a color with RGB value (105,105,105)
if(str == L"dimGrey") {RGB = 0x696969; break;} // (Dim Gray Preset Color) Specifies a color with RGB value (105,105,105)
if(str == L"dkBlue") {RGB = 0x00008B; break;} // (Dark Blue Preset Color) Specifies a color with RGB value (0,0,139)
if(str == L"dkCyan") {RGB = 0x008B8B; break;} // (Dark Cyan Preset Color) Specifies a color with RGB value (0,139,139)
if(str == L"dkGoldenrod") {RGB = 0xB8860B; break;} // (Dark Goldenrod Preset Color) Specifies a color with RGB value (184,134,11)
if(str == L"dkGray") {RGB = 0xA9A9A9; break;} // (Dark Gray Preset Color) Specifies a color with RGB value (169,169,169)
if(str == L"dkGreen") {RGB = 0x006400; break;} // (Dark Green Preset Color) Specifies a color with RGB value (0,100,0)
if(str == L"dkGrey") {RGB = 0xA9A9A9; break;} // (Dark Gray Preset Color) Specifies a color with RGB value (169,169,169)
if(str == L"dkKhaki") {RGB = 0xBDB76B; break;} // (Dark Khaki Preset Color) Specifies a color with RGB value (189,183,107)
if(str == L"dkMagenta") {RGB = 0x8B008B; break;} // (Dark Magenta Preset Color) Specifies a color with RGB value (139,0,139)
if(str == L"dkOliveGreen") {RGB = 0x556B2F; break;} // (Dark Olive Green Preset Color) Specifies a color with RGB value (85,107,47)
if(str == L"dkOrange") {RGB = 0xFF8C00; break;} // (Dark Orange Preset Color) Specifies a color with RGB value (255,140,0)
if(str == L"dkOrchid") {RGB = 0x9932CC; break;} // (Dark Orchid Preset Color) Specifies a color with RGB value (153,50,204)
if(str == L"dkRed") {RGB = 0x8B0000; break;} // (Dark Red Preset Color) Specifies a color with RGB value (139,0,0)
if(str == L"dkSalmon") {RGB = 0xE9967A; break;} // (Dark Salmon Preset Color) Specifies a color with RGB value (233,150,122)
if(str == L"dkSeaGreen") {RGB = 0x8FBC8B; break;} // (Dark Sea Green Preset Color) Specifies a color with RGB value (143,188,139)
if(str == L"dkSlateBlue") {RGB = 0x483D8B; break;} // (Dark Slate Blue Preset Color) Specifies a color with RGB value (72,61,139)
if(str == L"dkSlateGray") {RGB = 0x2F4F4F; break;} // (Dark Slate Gray Preset Color) Specifies a color with RGB value (47,79,79)
if(str == L"dkSlateGrey") {RGB = 0x2F4F4F; break;} // (Dark Slate Gray Preset Color) Specifies a color with RGB value (47,79,79)
if(str == L"dkTurquoise") {RGB = 0x00CED1; break;} // (Dark Turquoise Preset Color) Specifies a color with RGB value (0,206,209)
if(str == L"dkViolet") {RGB = 0x9400D3; break;} // (Dark Violet Preset Color) Specifies a color with RGB value (148,0,211)
if(str == L"dodgerBlue") {RGB = 0x1E90FF; break;} // (Dodger Blue Preset Color) Specifies a color with RGB value (30,144,255)
break;
case 'f':
if(str == L"firebrick") {RGB = 0xB22222; break;} // (Firebrick Preset Color) Specifies a color with RGB value (178,34,34)
if(str == L"floralWhite") {RGB = 0xFFFAF0; break;} // (Floral White Preset Color) Specifies a color with RGB value (255,250,240)
if(str == L"forestGreen") {RGB = 0x228B22; break;} // (Forest Green Preset Color) Specifies a color with RGB value (34,139,34)
if(str == L"fuchsia") {RGB = 0xFF00FF; break;} // (Fuchsia Preset Color) Specifies a color with RGB value (255,0,255)
break;
case 'g':
if(str == L"gainsboro") {RGB = 0xDCDCDC; break;} // (Gainsboro Preset Color) Specifies a color with RGB value (220,220,220)
if(str == L"ghostWhite") {RGB = 0xF8F8FF; break;} // (Ghost White Preset Color) Specifies a color with RGB value (248,248,255)
if(str == L"gold") {RGB = 0xFFD700; break;} // (Gold Preset Color) Specifies a color with RGB value (255,215,0)
if(str == L"goldenrod") {RGB = 0xDAA520; break;} // (Goldenrod Preset Color) Specifies a color with RGB value (218,165,32)
if(str == L"gray") {RGB = 0x808080; break;} // (Gray Preset Color) Specifies a color with RGB value (128,128,128)
if(str == L"green") {RGB = 0x008000; break;} // (Green Preset Color) Specifies a color with RGB value (0,128,0)
if(str == L"greenYellow") {RGB = 0xADFF2F; break;} // (Green Yellow Preset Color) Specifies a color with RGB value (173,255,47)
if(str == L"grey") {RGB = 0x808080; break;} // (Gray Preset Color) Specifies a color with RGB value (128,128,128)
break;
case 'h':
if(str == L"honeydew") {RGB = 0xF0FFF0; break;} // (Honeydew Preset Color) Specifies a color with RGB value (240,255,240)
if(str == L"hotPink") {RGB = 0xFF69B4; break;} // (Hot Pink Preset Color) Specifies a color with RGB value (255,105,180)
break;
case 'i':
if(str == L"indianRed") {RGB = 0xCD5C5C; break;} // (Indian Red Preset Color) Specifies a color with RGB value (205,92,92)
if(str == L"indigo") {RGB = 0x4B0082; break;} // (Indigo Preset Color) Specifies a color with RGB value (75,0,130)
if(str == L"ivory") {RGB = 0xFFFFF0; break;} // (Ivory Preset Color) Specifies a color with RGB value (255,255,240)
break;
case 'k':
if(str == L"khaki") {RGB = 0xF0E68C; break;} // (Khaki Preset Color) Specifies a color with RGB value (240,230,140)
break;
case 'l':
if(str == L"lavender") {RGB = 0xE6E6FA; break;} // (Lavender Preset Color) Specifies a color with RGB value (230,230,250)
if(str == L"lavenderBlush") {RGB = 0xFFF0F5; break;} // (Lavender Blush Preset Color) Specifies a color with RGB value (255,240,245)
if(str == L"lawnGreen") {RGB = 0x7CFC00; break;} // (Lawn Green Preset Color) Specifies a color with RGB value (124,252,0)
if(str == L"lemonChiffon") {RGB = 0xFFFACD; break;} // (Lemon Chiffon Preset Color) Specifies a color with RGB value (255,250,205)
if(str == L"lightBlue") {RGB = 0xADD8E6; break;} // (Light Blue Preset Color) Specifies a color with RGB value (173,216,230)
if(str == L"lightCoral") {RGB = 0xF08080; break;} // (Light Coral Preset Color) Specifies a color with RGB value (240,128,128)
if(str == L"lightCyan") {RGB = 0xE0FFFF; break;} // (Light Cyan Preset Color) Specifies a color with RGB value (224,255,255)
if(str == L"lightGoldenrodYellow") {RGB = 0xFAFAD2;break;} // (Light Goldenrod Color) Specifies a color with RGB value (250,250,210)
if(str == L"lightGray") {RGB = 0xD3D3D3; break;} // (Light Gray Preset Color) Specifies a color with RGB value (211,211,211)
if(str == L"lightGreen") {RGB = 0x90EE90; break;} // (Light Green Preset Color) Specifies a color with RGB value (144,238,144)
if(str == L"lightGrey") {RGB = 0xD3D3D3; break;} // (Light Gray Preset Color) Specifies a color with RGB value (211,211,211)
if(str == L"lightPink") {RGB = 0xFFB6C1; break;} // (Light Pink Preset Color) Specifies a color with RGB value (255,182,193)
if(str == L"lightSalmon") {RGB = 0xFFA07A; break;} // (Light Salmon Preset Color) Specifies a color with RGB value (255,160,122)
if(str == L"lightSeaGreen") {RGB = 0x20B2AA; break;} // (Light Sea Green Preset Color) Specifies a color with RGB value (32,178,170)
if(str == L"lightSkyBlue") {RGB = 0x87CEFA; break;} // (Light Sky Blue Preset Color) Specifies a color with RGB value (135,206,250)
if(str == L"lightSlateGray") {RGB = 0x778899; break;} // (Light Slate Gray Preset Color) Specifies a color with RGB value (119,136,153)
if(str == L"lightSlateGrey") {RGB = 0x778899; break;} // (Light Slate Gray Preset Color) Specifies a color with RGB value (119,136,153)
if(str == L"lightSteelBlue") {RGB = 0xB0C4DE; break;} // (Light Steel Blue Preset Color) Specifies a color with RGB value (176,196,222)
if(str == L"lightYellow") {RGB = 0xFFFFE0; break;} // (Light Yellow Preset Color) Specifies a color with RGB value (255,255,224)
if(str == L"lime") {RGB = 0x00FF00; break;} // (Lime Preset Color) Specifies a color with RGB value (0,255,0)
if(str == L"limeGreen") {RGB = 0x32CD32; break;} // (Lime Green Preset Color) Specifies a color with RGB value (50,205,50)
if(str == L"linen") {RGB = 0xFAF0E6; break;} // (Linen Preset Color) Specifies a color with RGB value (250,240,230)
if(str == L"ltBlue") {RGB = 0xADD8E6; break;} // (Light Blue Preset Color) Specifies a color with RGB value (173,216,230)
if(str == L"ltCoral") {RGB = 0xF08080; break;} // (Light Coral Preset Color) Specifies a color with RGB value (240,128,128)
if(str == L"ltCyan") {RGB = 0xE0FFFF; break;} // (Light Cyan Preset Color) Specifies a color with RGB value (224,255,255)
if(str == L"ltGoldenrodYellow") {RGB = 0xFAFA78; break;} // (Light Goldenrod Color) Specifies a color with RGB value (250,250,120)
if(str == L"ltGray") {RGB = 0xD3D3D3; break;} // (Light Gray Preset Color) Specifies a color with RGB value (211,211,211)
if(str == L"ltGreen") {RGB = 0x90EE90; break;} // (Light Green Preset Color) Specifies a color with RGB value (144,238,144)
if(str == L"ltGrey") {RGB = 0xD3D3D3; break;} // (Light Gray Preset Color) Specifies a color with RGB value (211,211,211)
if(str == L"ltPink") {RGB = 0xFFB6C1; break;} // (Light Pink Preset Color) Specifies a color with RGB value (255,182,193)
if(str == L"ltSalmon") {RGB = 0xFFA07A; break;} // (Light Salmon Preset Color) Specifies a color with RGB value (255,160,122)
if(str == L"ltSeaGreen") {RGB = 0x20B2AA; break;} // (Light Sea Green Preset Color) Specifies a color with RGB value (32,178,170)
if(str == L"ltSkyBlue") {RGB = 0x87CEFA; break;} // (Light Sky Blue Preset Color) Specifies a color with RGB value (135,206,250)
if(str == L"ltSlateGray") {RGB = 0x778899; break;} // (Light Slate Gray Preset Color) Specifies a color with RGB value (119,136,153)
if(str == L"ltSlateGrey") {RGB = 0x778899; break;} // (Light Slate Gray Preset Color) Specifies a color with RGB value (119,136,153)
if(str == L"ltSteelBlue") {RGB = 0xB0C4DE; break;} // (Light Steel Blue Preset Color) Specifies a color with RGB value (176,196,222)
if(str == L"ltYellow") {RGB = 0xFFFFE0; break;} // (Light Yellow Preset Color) Specifies a color with RGB value (255,255,224)
break;
case 'm':
if(str == L"magenta") {RGB = 0xFF00FF; break;} // (Magenta Preset Color) Specifies a color with RGB value (255,0,255)
if(str == L"maroon") {RGB = 0x800000; break;} // (Maroon Preset Color) Specifies a color with RGB value (128,0,0)
if(str == L"medAquamarine") {RGB = 0x66CDAA; break;} // (Medium Aquamarine Preset Color)Specifies a color with RGB value (102,205,170)
if(str == L"medBlue") {RGB = 0x0000CD; break;} // (Medium Blue Preset Color) Specifies a color with RGB value (0,0,205)
if(str == L"mediumAquamarine") {RGB = 0x66CDAA; break;} // (Medium Aquamarine Color) Specifies a color with RGB value (102,205,170)
if(str == L"mediumBlue") {RGB = 0x0000CD; break;} // (Medium Blue Preset Color) Specifies a color with RGB value (0,0,205)
if(str == L"mediumOrchid") {RGB = 0xBA55D3; break;} // (Medium Orchid Preset Color) Specifies a color with RGB value (186,85,211)
if(str == L"mediumPurple") {RGB = 0x9370DB; break;} // (Medium Purple Preset Color) Specifies a color with RGB value (147,112,219)
if(str == L"mediumSeaGreen") {RGB = 0x3CB371; break;} // (Medium Sea Green Preset Color) Specifies a color with RGB value (60,179,113)
if(str == L"mediumSlateBlue") {RGB = 0x7B68EE; break;} // (Medium Slate Blue Preset Color)Specifies a color with RGB value (123,104,238)
if(str == L"mediumSpringGreen") {RGB = 0x00FA9A; break;} // (Medium Spring Color) Specifies a color with RGB value (0,250,154)
if(str == L"mediumTurquoise") {RGB = 0x48D1CC; break;} // (Medium Turquoise Preset Color) Specifies a color with RGB value (72,209,204)
if(str == L"mediumVioletRed") {RGB = 0xC71585; break;} // (Medium Violet Red Preset Color)Specifies a color with RGB value (199,21,133)
if(str == L"medOrchid") {RGB = 0xBA55D3; break;} // (Medium Orchid Preset Color) Specifies a color with RGB value (186,85,211)
if(str == L"medPurple") {RGB = 0x9370DB; break;} // (Medium Purple Preset Color) Specifies a color with RGB value (147,112,219)
if(str == L"medSeaGreen") {RGB = 0x3CB371; break;} // (Medium Sea Green Preset Color) Specifies a color with RGB value (60,179,113)
if(str == L"medSlateBlue") {RGB = 0x7B68EE; break;} // (Medium Slate Blue Preset Color)Specifies a color with RGB value (123,104,238)
if(str == L"medSpringGreen") {RGB = 0x00FA9A; break;} // (Medium Spring Preset Color) Specifies a color with RGB value (0,250,154)
if(str == L"medTurquoise") {RGB = 0x48D1CC; break;} // (Medium Turquoise Preset Color) Specifies a color with RGB value (72,209,204)
if(str == L"medVioletRed") {RGB = 0xC71585; break;} // (Medium Violet Red Preset Color)Specifies a color with RGB value (199,21,133)
if(str == L"midnightBlue") {RGB = 0x191970; break;} // (Midnight Blue Preset Color) Specifies a color with RGB value (25,25,112)
if(str == L"mintCream") {RGB = 0xF5FFFA; break;} // (Mint Cream Preset Color) Specifies a color with RGB value (245,255,250)
if(str == L"mistyRose") {RGB = 0xFFE4FF; break;} // (Misty Rose Preset Color) Specifies a color with RGB value (255,228,225)
if(str == L"moccasin") {RGB = 0xFFE4B5; break;} // (Moccasin Preset Color) Specifies a color with RGB value (255,228,181)
break;
case 'n':
if(str == L"navajoWhite") {RGB = 0xFFDEAD; break;} // (Navajo White Preset Color) Specifies a color with RGB value (255,222,173)
if(str == L"navy") {RGB = 0x000080; break;} // (Navy Preset Color) Specifies a color with RGB value (0,0,128)
break;
case 'o':
if(str == L"oldLace") {RGB = 0xFDF5E6; break;} // (Old Lace Preset Color) Specifies a color with RGB value (253,245,230)
if(str == L"olive") {RGB = 0x808000; break;} // (Olive Preset Color) Specifies a color with RGB value (128,128,0)
if(str == L"oliveDrab") {RGB = 0x6B8E23; break;} // (Olive Drab Preset Color) Specifies a color with RGB value (107,142,35)
if(str == L"orange") {RGB = 0xFFA500; break;} // (Orange Preset Color) Specifies a color with RGB value (255,165,0)
if(str == L"orangeRed") {RGB = 0xFF4500; break;} // (Orange Red Preset Color) Specifies a color with RGB value (255,69,0)
if(str == L"orchid") {RGB = 0xDA70D6; break;} // (Orchid Preset Color) Specifies a color with RGB value (218,112,214)
break;
case 'p':
if(str == L"paleGoldenrod") {RGB = 0xEEE8AA; break;} // (Pale Goldenrod Preset Color) Specifies a color with RGB value (238,232,170)
if(str == L"paleGreen") {RGB = 0x98FB98; break;} // (Pale Green Preset Color) Specifies a color with RGB value (152,251,152)
if(str == L"paleTurquoise") {RGB = 0xAFEEEE; break;} // (Pale Turquoise Preset Color) Specifies a color with RGB value (175,238,238)
if(str == L"paleVioletRed") {RGB = 0xDB7093; break;} // (Pale Violet Red Preset Color) Specifies a color with RGB value (219,112,147)
if(str == L"papayaWhip") {RGB = 0xFFEFD5; break;} // (Papaya Whip Preset Color) Specifies a color with RGB value (255,239,213)
if(str == L"peachPuff") {RGB = 0xFFDAB9; break;} // (Peach Puff Preset Color) Specifies a color with RGB value (255,218,185)
if(str == L"peru") {RGB = 0xCD853F; break;} // (Peru Preset Color) Specifies a color with RGB value (205,133,63)
if(str == L"pink") {RGB = 0xFFC0CB; break;} // (Pink Preset Color) Specifies a color with RGB value (255,192,203)
if(str == L"plum") {RGB = 0xD3A0D3; break;} // (Plum Preset Color) Specifies a color with RGB value (221,160,221)
if(str == L"powderBlue") {RGB = 0xB0E0E6; break;} // (Powder Blue Preset Color) Specifies a color with RGB value (176,224,230)
if(str == L"purple") {RGB = 0x800080; break;} // (Purple Preset Color) Specifies a color with RGB value (128,0,128)
break;
case 'r':
if(str == L"red") {RGB = 0xFF0000; break;} // (Red Preset Color) Specifies a color with RGB value (255,0,0)
if(str == L"rosyBrown") {RGB = 0xBC8F8F; break;} // (Rosy Brown Preset Color) Specifies a color with RGB value (188,143,143)
if(str == L"royalBlue") {RGB = 0x4169E1; break;} // (Royal Blue Preset Color) Specifies a color with RGB value (65,105,225)
break;
case 's':
if(str == L"saddleBrown") {RGB = 0x8B4513; break;} // (Saddle Brown Preset Color) Specifies a color with RGB value (139,69,19)
if(str == L"salmon") {RGB = 0xFA8072; break;} // (Salmon Preset Color) Specifies a color with RGB value (250,128,114)
if(str == L"sandyBrown") {RGB = 0xF4A460; break;} // (Sandy Brown Preset Color) Specifies a color with RGB value (244,164,96)
if(str == L"seaGreen") {RGB = 0x2E8B57; break;} // (Sea Green Preset Color) Specifies a color with RGB value (46,139,87)
if(str == L"seaShell") {RGB = 0xFFF5EE; break;} // (Sea Shell Preset Color) Specifies a color with RGB value (255,245,238)
if(str == L"sienna") {RGB = 0xA0522D; break;} // (Sienna Preset Color) Specifies a color with RGB value (160,82,45)
if(str == L"silver") {RGB = 0xC0C0C0; break;} // (Silver Preset Color) Specifies a color with RGB value (192,192,192)
if(str == L"skyBlue") {RGB = 0x87CEEB; break;} // (Sky Blue Preset Color) Specifies a color with RGB value (135,206,235)
if(str == L"slateBlue") {RGB = 0x6A5AEB; break;} // (Slate Blue Preset Color) Specifies a color with RGB value (106,90,205)
if(str == L"slateGray") {RGB = 0x708090; break;} // (Slate Gray Preset Color) Specifies a color with RGB value (112,128,144)
if(str == L"slateGrey") {RGB = 0x708090; break;} // (Slate Gray Preset Color) Specifies a color with RGB value (112,128,144)
if(str == L"snow") {RGB = 0xFFFAFA; break;} // (Snow Preset Color) Specifies a color with RGB value (255,250,250)
if(str == L"springGreen") {RGB = 0x00FF7F; break;} // (Spring Green Preset Color) Specifies a color with RGB value (0,255,127)
if(str == L"steelBlue") {RGB = 0x4682B4; break;} // (Steel Blue Preset Color) Specifies a color with RGB value (70,130,180)
break;
case 't':
if(str == L"tan") {RGB = 0xD2B48C; break;} // (Tan Preset Color) Specifies a color with RGB value (210,180,140)
if(str == L"teal") {RGB = 0x008080; break;} // (Teal Preset Color) Specifies a color with RGB value (0,128,128)
if(str == L"thistle") {RGB = 0xD8BFD8; break;} // (Thistle Preset Color) Specifies a color with RGB value (216,191,216)
if(str == L"tomato") {RGB = 0xFF7347; break;} // (Tomato Preset Color) Specifies a color with RGB value (255,99,71)
if(str == L"turquoise") {RGB = 0x40E0D0; break;} // (Turquoise Preset Color) Specifies a color with RGB value (64,224,208)
break;
case 'v':
if(str == L"violet") {RGB = 0xEE82EE; break;} // (Violet Preset Color) Specifies a color with RGB value (238,130,238)
break;
case 'w':
if(str == L"wheat") {RGB = 0xF5DEB3; break;} // (Wheat Preset Color) Specifies a color with RGB value (245,222,179)
if(str == L"white") {RGB = 0xFFFFFF; break;} // (White Preset Color) Specifies a color with RGB value (255,255,255)
if(str == L"whiteSmoke") {RGB = 0xF5F5F5; break;} // (White Smoke Preset Color) Specifies a color with RGB value (245,245,245)
break;
case 'y':
if(str == L"yellow") {RGB = 0xFFFF00; break;} // (Yellow Preset Color) Specifies a color with RGB value (255,255,0)
if(str == L"yellowGreen") {RGB = 0x9ACD32; break;} // (Yellow Green Preset Color) Specifies a color with RGB value (154,205,50)
break;
}
str = colorStr.substr(pos + 1, colorStr.length() - pos - 2);
color.R = (BYTE)(RGB >>16);
color.G = (BYTE)(RGB >> 8);
color.B = (BYTE)(RGB);
color.A = 0;
int index = XmlUtils::GetInteger(str);
if (index < 64)
{
RGB = shemeDefaultColor[index];
bSet = true;
}
//else if (index < 93)
//{
// RGB = background ? controlPanelColors2[index - 65] : controlPanelColors1[index - 65];
// bSet = true;
//}
}
if (!bSet)
{
pos = colorStr.find(' ');
if( pos == std::wstring::npos )
str = colorStr;
else
str = colorStr.substr( 0, pos );
switch(str[0])
{
case 'a':
if(str == L"aliceBlue") {RGB = 0xF0F8FF; bSet = true; break;} // (Alice Blue Preset Color) Specifies a color with RGB value (240,248,255)
else if(str == L"antiqueWhite") {RGB = 0xFAEBD7; bSet = true; break;} // (Antique White Preset Color) Specifies a color with RGB value (250,235,215)
else if(str == L"aqua") {RGB = 0x00FFFF; bSet = true; break;} // (Aqua Preset Color) Specifies a color with RGB value (0,255,255)
else if(str == L"aquamarine") {RGB = 0x7FFFD4; bSet = true; break;} // (Aquamarine Preset Color) Specifies a color with RGB value (127,255,212)
else if(str == L"azure") {RGB = 0xF0FFFF; bSet = true; break;} // (Azure Preset Color) Specifies a color with RGB value (240,255,255)
break;
case 'b':
if(str == L"beige") {RGB = 0xF5F5DC; bSet = true; break;} // (Beige Preset Color) Specifies a color with RGB value (245,245,220)
else if(str == L"bisque") {RGB = 0xFFE4C4; bSet = true; break;} // (Bisque Preset Color) Specifies a color with RGB value (255,228,196)
else if(str == L"black") {RGB = 0x000000; bSet = true; break;} // (Black Preset Color) Specifies a color with RGB value (0,0,0)
else if(str == L"blanchedAlmond"){RGB = 0xFFEBCD; bSet = true; break;} // (Blanched Almond Preset Color) Specifies a color with RGB value (255,235,205)
else if(str == L"blue") {RGB = 0x0000FF; bSet = true; break;} // (Blue Preset Color) Specifies a color with RGB value (0,0,255)
else if(str == L"blueViolet") {RGB = 0x8A2BE2; bSet = true; break;} // (Blue Violet Preset Color) Specifies a color with RGB value (138,43,226)
else if(str == L"brown") {RGB = 0xA52A2A; bSet = true; break;} // (Brown Preset Color) Specifies a color with RGB value (165,42,42)
else if(str == L"burlyWood") {RGB = 0xDEB887; bSet = true; break;} // (Burly Wood Preset Color) Specifies a color with RGB value (222,184,135)
else if(str == L"buttonFace") {RGB = 0xF0F0F0; bSet = true; break;}
else if(str == L"buttonText") {RGB = 0x000000; bSet = true; break;}
break;
case 'c':
if(str == L"cadetBlue") {RGB = 0x5F9EA0; bSet = true; break;} // (Cadet Blue Preset Color) Specifies a color with RGB value (95,158,160)
else if(str == L"chartreuse") {RGB = 0x7FFF00; bSet = true; break;} // (Chartreuse Preset Color) Specifies a color with RGB value (127,255,0)
else if(str == L"chocolate") {RGB = 0xD2691E; bSet = true; break;} // (Chocolate Preset Color) Specifies a color with RGB value (210,105,30)
else if(str == L"coral") {RGB = 0xFF7F50; bSet = true; break;} // (Coral Preset Color) Specifies a color with RGB value (255,127,80)
else if(str == L"cornflowerBlue"){RGB = 0x6495ED; bSet = true; break;} // (Cornflower Blue Preset Color) Specifies a color with RGB value (100,149,237)
else if(str == L"cornsilk") {RGB = 0xFFF8DC; bSet = true; break;} // (Cornsilk Preset Color) Specifies a color with RGB value (255,248,220)
else if(str == L"crimson") {RGB = 0xDC143C; bSet = true; break;} // (Crimson Preset Color) Specifies a color with RGB value (220,20,60)
else if(str == L"cyan") {RGB = 0x00FFFF; bSet = true; break;} // (Cyan Preset Color) Specifies a color with RGB value (0,255,255)
break;
case 'd':
if(str == L"darkBlue") {RGB = 0x00008B; bSet = true; break;} // (Dark Blue Preset Color) Specifies a color with RGB value (0,0,139)
else if(str == L"darkCyan") {RGB = 0x008B8B; bSet = true; break;} // (Dark Cyan Preset Color) Specifies a color with RGB value (0,139,139)
else if(str == L"darkGoldenrod") {RGB = 0xB8860B; bSet = true; break;} // (Dark Goldenrod Preset Color) Specifies a color with RGB value (184,134,11)
else if(str == L"darkGray") {RGB = 0xA9A9A9; bSet = true; break;} // (Dark Gray Preset Color) Specifies a color with RGB value (169,169,169)
else if(str == L"darkGreen") {RGB = 0x006400; bSet = true; break;} // (Dark Green Preset Color) Specifies a color with RGB value (0,100,0)
else if(str == L"darkGrey") {RGB = 0xA9A9A9; bSet = true; break;} // (Dark Gray Preset Color) Specifies a color with RGB value (169,169,169)
else if(str == L"darkKhaki") {RGB = 0xBDB76B; bSet = true; break;} // (Dark Khaki Preset Color) Specifies a color with RGB value (189,183,107)
else if(str == L"darkMagenta") {RGB = 0x8B008B; bSet = true; break;} // (Dark Magenta Preset Color) Specifies a color with RGB value (139,0,139)
else if(str == L"darkOliveGreen") {RGB = 0x556B2F; bSet = true; break;} // (Dark Olive Green Preset Color) Specifies a color with RGB value (85,107,47)
else if(str == L"darkOrange") {RGB = 0xFF8C00; bSet = true; break;} // (Dark Orange Preset Color) Specifies a color with RGB value (255,140,0)
else if(str == L"darkOrchid") {RGB = 0x9932CC; bSet = true; break;} // (Dark Orchid Preset Color) Specifies a color with RGB value (153,50,204)
else if(str == L"darkRed") {RGB = 0x8B0000; bSet = true; break;} // (Dark Red Preset Color) Specifies a color with RGB value (139,0,0)
else if(str == L"darkSalmon") {RGB = 0xE9967A; bSet = true; break;} // (Dark Salmon Preset Color) Specifies a color with RGB value (233,150,122)
else if(str == L"darkSeaGreen") {RGB = 0x8FBC8F; bSet = true; break;} // (Dark Sea Green Preset Color) Specifies a color with RGB value (143,188,143)
else if(str == L"darkSlateBlue") {RGB = 0x483D8B; bSet = true; break;} // (Dark Slate Blue Preset Color) Specifies a color with RGB value (72,61,139)
else if(str == L"darkSlateGray") {RGB = 0x2F4F4F; bSet = true; break;} // (Dark Slate Gray Preset Color) Specifies a color with RGB value (47,79,79)
else if(str == L"darkSlateGrey") {RGB = 0x2F4F4F; bSet = true; break;} // (Dark Slate Gray Preset Color) Specifies a color with RGB value (47,79,79)
else if(str == L"darkTurquoise") {RGB = 0x00CED1; bSet = true; break;} // (Dark Turquoise Preset Color) Specifies a color with RGB value (0,206,209)
else if(str == L"darkViolet") {RGB = 0x9400D3; bSet = true; break;} // (Dark Violet Preset Color) Specifies a color with RGB value (148,0,211)
else if(str == L"deepPink") {RGB = 0xFF1493; bSet = true; break;} // (Deep Pink Preset Color) Specifies a color with RGB value (255,20,147)
else if(str == L"deepSkyBlue") {RGB = 0x00BFFF; bSet = true; break;} // (Deep Sky Blue Preset Color) Specifies a color with RGB value (0,191,255)
else if(str == L"dimGray") {RGB = 0x696969; bSet = true; break;} // (Dim Gray Preset Color) Specifies a color with RGB value (105,105,105)
else if(str == L"dimGrey") {RGB = 0x696969; bSet = true; break;} // (Dim Gray Preset Color) Specifies a color with RGB value (105,105,105)
else if(str == L"dkBlue") {RGB = 0x00008B; bSet = true; break;} // (Dark Blue Preset Color) Specifies a color with RGB value (0,0,139)
else if(str == L"dkCyan") {RGB = 0x008B8B; bSet = true; break;} // (Dark Cyan Preset Color) Specifies a color with RGB value (0,139,139)
else if(str == L"dkGoldenrod") {RGB = 0xB8860B; bSet = true; break;} // (Dark Goldenrod Preset Color) Specifies a color with RGB value (184,134,11)
else if(str == L"dkGray") {RGB = 0xA9A9A9; bSet = true; break;} // (Dark Gray Preset Color) Specifies a color with RGB value (169,169,169)
else if(str == L"dkGreen") {RGB = 0x006400; bSet = true; break;} // (Dark Green Preset Color) Specifies a color with RGB value (0,100,0)
else if(str == L"dkGrey") {RGB = 0xA9A9A9; bSet = true; break;} // (Dark Gray Preset Color) Specifies a color with RGB value (169,169,169)
else if(str == L"dkKhaki") {RGB = 0xBDB76B; bSet = true; break;} // (Dark Khaki Preset Color) Specifies a color with RGB value (189,183,107)
else if(str == L"dkMagenta") {RGB = 0x8B008B; bSet = true; break;} // (Dark Magenta Preset Color) Specifies a color with RGB value (139,0,139)
else if(str == L"dkOliveGreen") {RGB = 0x556B2F; bSet = true; break;} // (Dark Olive Green Preset Color) Specifies a color with RGB value (85,107,47)
else if(str == L"dkOrange") {RGB = 0xFF8C00; bSet = true; break;} // (Dark Orange Preset Color) Specifies a color with RGB value (255,140,0)
else if(str == L"dkOrchid") {RGB = 0x9932CC; bSet = true; break;} // (Dark Orchid Preset Color) Specifies a color with RGB value (153,50,204)
else if(str == L"dkRed") {RGB = 0x8B0000; bSet = true; break;} // (Dark Red Preset Color) Specifies a color with RGB value (139,0,0)
else if(str == L"dkSalmon") {RGB = 0xE9967A; bSet = true; break;} // (Dark Salmon Preset Color) Specifies a color with RGB value (233,150,122)
else if(str == L"dkSeaGreen") {RGB = 0x8FBC8B; bSet = true; break;} // (Dark Sea Green Preset Color) Specifies a color with RGB value (143,188,139)
else if(str == L"dkSlateBlue") {RGB = 0x483D8B; bSet = true; break;} // (Dark Slate Blue Preset Color) Specifies a color with RGB value (72,61,139)
else if(str == L"dkSlateGray") {RGB = 0x2F4F4F; bSet = true; break;} // (Dark Slate Gray Preset Color) Specifies a color with RGB value (47,79,79)
else if(str == L"dkSlateGrey") {RGB = 0x2F4F4F; bSet = true; break;} // (Dark Slate Gray Preset Color) Specifies a color with RGB value (47,79,79)
else if(str == L"dkTurquoise") {RGB = 0x00CED1; bSet = true; break;} // (Dark Turquoise Preset Color) Specifies a color with RGB value (0,206,209)
else if(str == L"dkViolet") {RGB = 0x9400D3; bSet = true; break;} // (Dark Violet Preset Color) Specifies a color with RGB value (148,0,211)
else if(str == L"dodgerBlue") {RGB = 0x1E90FF; bSet = true; break;} // (Dodger Blue Preset Color) Specifies a color with RGB value (30,144,255)
break;
case 'f':
if(str == L"firebrick") {RGB = 0xB22222; bSet = true; break;} // (Firebrick Preset Color) Specifies a color with RGB value (178,34,34)
else if(str == L"floralWhite") {RGB = 0xFFFAF0; bSet = true; break;} // (Floral White Preset Color) Specifies a color with RGB value (255,250,240)
else if(str == L"forestGreen") {RGB = 0x228B22; bSet = true; break;} // (Forest Green Preset Color) Specifies a color with RGB value (34,139,34)
else if(str == L"fuchsia") {RGB = 0xFF00FF; bSet = true; break;} // (Fuchsia Preset Color) Specifies a color with RGB value (255,0,255)
break;
case 'g':
if(str == L"gainsboro") {RGB = 0xDCDCDC; bSet = true; break;} // (Gainsboro Preset Color) Specifies a color with RGB value (220,220,220)
else if(str == L"ghostWhite") {RGB = 0xF8F8FF; bSet = true; break;} // (Ghost White Preset Color) Specifies a color with RGB value (248,248,255)
else if(str == L"gold") {RGB = 0xFFD700; bSet = true; break;} // (Gold Preset Color) Specifies a color with RGB value (255,215,0)
else if(str == L"goldenrod") {RGB = 0xDAA520; bSet = true; break;} // (Goldenrod Preset Color) Specifies a color with RGB value (218,165,32)
else if(str == L"gray") {RGB = 0x808080; bSet = true; break;} // (Gray Preset Color) Specifies a color with RGB value (128,128,128)
else if(str == L"green") {RGB = 0x008000; bSet = true; break;} // (Green Preset Color) Specifies a color with RGB value (0,128,0)
else if(str == L"greenYellow") {RGB = 0xADFF2F; bSet = true; break;} // (Green Yellow Preset Color) Specifies a color with RGB value (173,255,47)
else if(str == L"grey") {RGB = 0x808080; bSet = true; break;} // (Gray Preset Color) Specifies a color with RGB value (128,128,128)
break;
case 'h':
if(str == L"honeydew") {RGB = 0xF0FFF0; bSet = true; break;} // (Honeydew Preset Color) Specifies a color with RGB value (240,255,240)
else if(str == L"hotPink") {RGB = 0xFF69B4; bSet = true; break;} // (Hot Pink Preset Color) Specifies a color with RGB value (255,105,180)
break;
case 'i':
if(str == L"indianRed") {RGB = 0xCD5C5C; bSet = true; break;} // (Indian Red Preset Color) Specifies a color with RGB value (205,92,92)
else if(str == L"indigo") {RGB = 0x4B0082; bSet = true; break;} // (Indigo Preset Color) Specifies a color with RGB value (75,0,130)
else if(str == L"ivory") {RGB = 0xFFFFF0; bSet = true; break;} // (Ivory Preset Color) Specifies a color with RGB value (255,255,240)
else if(str == L"infoText") {RGB = 0x000000; bSet = true; break;}
break;
case 'k':
if(str == L"khaki") {RGB = 0xF0E68C; bSet = true; break;} // (Khaki Preset Color) Specifies a color with RGB value (240,230,140)
break;
case 'l':
if(str == L"lavender") {RGB = 0xE6E6FA; bSet = true; break;} // (Lavender Preset Color) Specifies a color with RGB value (230,230,250)
else if(str == L"lavenderBlush") {RGB = 0xFFF0F5; bSet = true; break;} // (Lavender Blush Preset Color) Specifies a color with RGB value (255,240,245)
else if(str == L"lawnGreen") {RGB = 0x7CFC00; bSet = true; break;} // (Lawn Green Preset Color) Specifies a color with RGB value (124,252,0)
else if(str == L"lemonChiffon") {RGB = 0xFFFACD; bSet = true; break;} // (Lemon Chiffon Preset Color) Specifies a color with RGB value (255,250,205)
else if(str == L"lightBlue") {RGB = 0xADD8E6; bSet = true; break;} // (Light Blue Preset Color) Specifies a color with RGB value (173,216,230)
else if(str == L"lightCoral") {RGB = 0xF08080; bSet = true; break;} // (Light Coral Preset Color) Specifies a color with RGB value (240,128,128)
else if(str == L"lightCyan") {RGB = 0xE0FFFF; bSet = true; break;} // (Light Cyan Preset Color) Specifies a color with RGB value (224,255,255)
else if(str == L"lightGoldenrodYellow") {RGB = 0xFAFAD2;bSet = true; break;} // (Light Goldenrod Color) Specifies a color with RGB value (250,250,210)
else if(str == L"lightGray") {RGB = 0xD3D3D3; bSet = true; break;} // (Light Gray Preset Color) Specifies a color with RGB value (211,211,211)
else if(str == L"lightGreen") {RGB = 0x90EE90; bSet = true; break;} // (Light Green Preset Color) Specifies a color with RGB value (144,238,144)
else if(str == L"lightGrey") {RGB = 0xD3D3D3; bSet = true; break;} // (Light Gray Preset Color) Specifies a color with RGB value (211,211,211)
else if(str == L"lightPink") {RGB = 0xFFB6C1; bSet = true; break;} // (Light Pink Preset Color) Specifies a color with RGB value (255,182,193)
else if(str == L"lightSalmon") {RGB = 0xFFA07A; bSet = true; break;} // (Light Salmon Preset Color) Specifies a color with RGB value (255,160,122)
else if(str == L"lightSeaGreen") {RGB = 0x20B2AA; bSet = true; break;} // (Light Sea Green Preset Color) Specifies a color with RGB value (32,178,170)
else if(str == L"lightSkyBlue") {RGB = 0x87CEFA; bSet = true; break;} // (Light Sky Blue Preset Color) Specifies a color with RGB value (135,206,250)
else if(str == L"lightSlateGray") {RGB = 0x778899; bSet = true; break;} // (Light Slate Gray Preset Color) Specifies a color with RGB value (119,136,153)
else if(str == L"lightSlateGrey") {RGB = 0x778899; bSet = true; break;} // (Light Slate Gray Preset Color) Specifies a color with RGB value (119,136,153)
else if(str == L"lightSteelBlue") {RGB = 0xB0C4DE; bSet = true; break;} // (Light Steel Blue Preset Color) Specifies a color with RGB value (176,196,222)
else if(str == L"lightYellow") {RGB = 0xFFFFE0; bSet = true; break;} // (Light Yellow Preset Color) Specifies a color with RGB value (255,255,224)
else if(str == L"lime") {RGB = 0x00FF00; bSet = true; break;} // (Lime Preset Color) Specifies a color with RGB value (0,255,0)
else if(str == L"limeGreen") {RGB = 0x32CD32; bSet = true; break;} // (Lime Green Preset Color) Specifies a color with RGB value (50,205,50)
else if(str == L"linen") {RGB = 0xFAF0E6; bSet = true; break;} // (Linen Preset Color) Specifies a color with RGB value (250,240,230)
else if(str == L"ltBlue") {RGB = 0xADD8E6; bSet = true; break;} // (Light Blue Preset Color) Specifies a color with RGB value (173,216,230)
else if(str == L"ltCoral") {RGB = 0xF08080; bSet = true; break;} // (Light Coral Preset Color) Specifies a color with RGB value (240,128,128)
else if(str == L"ltCyan") {RGB = 0xE0FFFF; bSet = true; break;} // (Light Cyan Preset Color) Specifies a color with RGB value (224,255,255)
else if(str == L"ltGoldenrodYellow"){RGB = 0xFAFA78; bSet = true; break;} // (Light Goldenrod Color) Specifies a color with RGB value (250,250,120)
else if(str == L"ltGray") {RGB = 0xD3D3D3; bSet = true; break;} // (Light Gray Preset Color) Specifies a color with RGB value (211,211,211)
else if(str == L"ltGreen") {RGB = 0x90EE90; bSet = true; break;} // (Light Green Preset Color) Specifies a color with RGB value (144,238,144)
else if(str == L"ltGrey") {RGB = 0xD3D3D3; bSet = true; break;} // (Light Gray Preset Color) Specifies a color with RGB value (211,211,211)
else if(str == L"ltPink") {RGB = 0xFFB6C1; bSet = true; break;} // (Light Pink Preset Color) Specifies a color with RGB value (255,182,193)
else if(str == L"ltSalmon") {RGB = 0xFFA07A; bSet = true; break;} // (Light Salmon Preset Color) Specifies a color with RGB value (255,160,122)
else if(str == L"ltSeaGreen") {RGB = 0x20B2AA; bSet = true; break;} // (Light Sea Green Preset Color) Specifies a color with RGB value (32,178,170)
else if(str == L"ltSkyBlue") {RGB = 0x87CEFA; bSet = true; break;} // (Light Sky Blue Preset Color) Specifies a color with RGB value (135,206,250)
else if(str == L"ltSlateGray") {RGB = 0x778899; bSet = true; break;} // (Light Slate Gray Preset Color) Specifies a color with RGB value (119,136,153)
else if(str == L"ltSlateGrey") {RGB = 0x778899; bSet = true; break;} // (Light Slate Gray Preset Color) Specifies a color with RGB value (119,136,153)
else if(str == L"ltSteelBlue") {RGB = 0xB0C4DE; bSet = true; break;} // (Light Steel Blue Preset Color) Specifies a color with RGB value (176,196,222)
else if(str == L"ltYellow") {RGB = 0xFFFFE0; bSet = true; break;} // (Light Yellow Preset Color) Specifies a color with RGB value (255,255,224)
break;
case 'm':
if(str == L"magenta") {RGB = 0xFF00FF; bSet = true; break;} // (Magenta Preset Color) Specifies a color with RGB value (255,0,255)
else if(str == L"maroon") {RGB = 0x800000; bSet = true; break;} // (Maroon Preset Color) Specifies a color with RGB value (128,0,0)
else if(str == L"medAquamarine"){RGB = 0x66CDAA; bSet = true; break;} // (Medium Aquamarine Preset Color)Specifies a color with RGB value (102,205,170)
else if(str == L"medBlue") {RGB = 0x0000CD; bSet = true; break;} // (Medium Blue Preset Color) Specifies a color with RGB value (0,0,205)
else if(str == L"mediumAquamarine") {RGB = 0x66CDAA; bSet = true; break;} // (Medium Aquamarine Color) Specifies a color with RGB value (102,205,170)
else if(str == L"mediumBlue") {RGB = 0x0000CD; bSet = true; break;} // (Medium Blue Preset Color) Specifies a color with RGB value (0,0,205)
else if(str == L"mediumOrchid") {RGB = 0xBA55D3; bSet = true; break;} // (Medium Orchid Preset Color) Specifies a color with RGB value (186,85,211)
else if(str == L"mediumPurple") {RGB = 0x9370DB; bSet = true; break;} // (Medium Purple Preset Color) Specifies a color with RGB value (147,112,219)
else if(str == L"mediumSeaGreen"){RGB = 0x3CB371; bSet = true; break;} // (Medium Sea Green Preset Color) Specifies a color with RGB value (60,179,113)
else if(str == L"mediumSlateBlue") {RGB = 0x7B68EE; bSet = true; break;} // (Medium Slate Blue Preset Color)Specifies a color with RGB value (123,104,238)
else if(str == L"mediumSpringGreen"){RGB = 0x00FA9A; bSet = true; break;} // (Medium Spring Color) Specifies a color with RGB value (0,250,154)
else if(str == L"mediumTurquoise") {RGB = 0x48D1CC; bSet = true; break;} // (Medium Turquoise Preset Color) Specifies a color with RGB value (72,209,204)
else if(str == L"mediumVioletRed") {RGB = 0xC71585; bSet = true; break;} // (Medium Violet Red Preset Color)Specifies a color with RGB value (199,21,133)
else if(str == L"medOrchid") {RGB = 0xBA55D3; bSet = true; break;} // (Medium Orchid Preset Color) Specifies a color with RGB value (186,85,211)
else if(str == L"medPurple") {RGB = 0x9370DB; bSet = true; break;} // (Medium Purple Preset Color) Specifies a color with RGB value (147,112,219)
else if(str == L"medSeaGreen") {RGB = 0x3CB371; bSet = true; break;} // (Medium Sea Green Preset Color) Specifies a color with RGB value (60,179,113)
else if(str == L"medSlateBlue") {RGB = 0x7B68EE; bSet = true; break;} // (Medium Slate Blue Preset Color)Specifies a color with RGB value (123,104,238)
else if(str == L"medSpringGreen"){RGB = 0x00FA9A; bSet = true; break;} // (Medium Spring Preset Color) Specifies a color with RGB value (0,250,154)
else if(str == L"medTurquoise") {RGB = 0x48D1CC; bSet = true; break;} // (Medium Turquoise Preset Color) Specifies a color with RGB value (72,209,204)
else if(str == L"medVioletRed") {RGB = 0xC71585; bSet = true; break;} // (Medium Violet Red Preset Color)Specifies a color with RGB value (199,21,133)
else if(str == L"midnightBlue") {RGB = 0x191970; bSet = true; break;} // (Midnight Blue Preset Color) Specifies a color with RGB value (25,25,112)
else if(str == L"mintCream") {RGB = 0xF5FFFA; bSet = true; break;} // (Mint Cream Preset Color) Specifies a color with RGB value (245,255,250)
else if(str == L"mistyRose") {RGB = 0xFFE4FF; bSet = true; break;} // (Misty Rose Preset Color) Specifies a color with RGB value (255,228,225)
else if(str == L"moccasin") {RGB = 0xFFE4B5; bSet = true; break;} // (Moccasin Preset Color) Specifies a color with RGB value (255,228,181)
else if(str == L"menuText") {RGB = 0x000000; bSet = true; break;}
break;
case 'n':
if(str == L"navajoWhite") {RGB = 0xFFDEAD; bSet = true; break;} // (Navajo White Preset Color) Specifies a color with RGB value (255,222,173)
else if(str == L"navy") {RGB = 0x000080; bSet = true; break;} // (Navy Preset Color) Specifies a color with RGB value (0,0,128)
break;
case 'o':
if(str == L"oldLace") {RGB = 0xFDF5E6; bSet = true; break;} // (Old Lace Preset Color) Specifies a color with RGB value (253,245,230)
else if(str == L"olive") {RGB = 0x808000; bSet = true; break;} // (Olive Preset Color) Specifies a color with RGB value (128,128,0)
else if(str == L"oliveDrab") {RGB = 0x6B8E23; bSet = true; break;} // (Olive Drab Preset Color) Specifies a color with RGB value (107,142,35)
else if(str == L"orange") {RGB = 0xFFA500; bSet = true; break;} // (Orange Preset Color) Specifies a color with RGB value (255,165,0)
else if(str == L"orangeRed") {RGB = 0xFF4500; bSet = true; break;} // (Orange Red Preset Color) Specifies a color with RGB value (255,69,0)
else if(str == L"orchid") {RGB = 0xDA70D6; bSet = true; break;} // (Orchid Preset Color) Specifies a color with RGB value (218,112,214)
break;
case 'p':
if(str == L"paleGoldenrod") {RGB = 0xEEE8AA; bSet = true; break;} // (Pale Goldenrod Preset Color) Specifies a color with RGB value (238,232,170)
else if(str == L"paleGreen") {RGB = 0x98FB98; bSet = true; break;} // (Pale Green Preset Color) Specifies a color with RGB value (152,251,152)
else if(str == L"paleTurquoise"){RGB = 0xAFEEEE; bSet = true; break;} // (Pale Turquoise Preset Color) Specifies a color with RGB value (175,238,238)
else if(str == L"paleVioletRed"){RGB = 0xDB7093; bSet = true; break;} // (Pale Violet Red Preset Color) Specifies a color with RGB value (219,112,147)
else if(str == L"papayaWhip") {RGB = 0xFFEFD5; bSet = true; break;} // (Papaya Whip Preset Color) Specifies a color with RGB value (255,239,213)
else if(str == L"peachPuff") {RGB = 0xFFDAB9; bSet = true; break;} // (Peach Puff Preset Color) Specifies a color with RGB value (255,218,185)
else if(str == L"peru") {RGB = 0xCD853F; bSet = true; break;} // (Peru Preset Color) Specifies a color with RGB value (205,133,63)
else if(str == L"pink") {RGB = 0xFFC0CB; bSet = true; break;} // (Pink Preset Color) Specifies a color with RGB value (255,192,203)
else if(str == L"plum") {RGB = 0xD3A0D3; bSet = true; break;} // (Plum Preset Color) Specifies a color with RGB value (221,160,221)
else if(str == L"powderBlue") {RGB = 0xB0E0E6; bSet = true; break;} // (Powder Blue Preset Color) Specifies a color with RGB value (176,224,230)
else if(str == L"purple") {RGB = 0x800080; bSet = true; break;} // (Purple Preset Color) Specifies a color with RGB value (128,0,128)
break;
case 'r':
if(str == L"red") {RGB = 0xFF0000; bSet = true; break;} // (Red Preset Color) Specifies a color with RGB value (255,0,0)
else if(str == L"rosyBrown") {RGB = 0xBC8F8F; bSet = true; break;} // (Rosy Brown Preset Color) Specifies a color with RGB value (188,143,143)
else if(str == L"royalBlue") {RGB = 0x4169E1; bSet = true; break;} // (Royal Blue Preset Color) Specifies a color with RGB value (65,105,225)
break;
case 's':
if(str == L"saddleBrown") {RGB = 0x8B4513; bSet = true; break;} // (Saddle Brown Preset Color) Specifies a color with RGB value (139,69,19)
else if(str == L"salmon") {RGB = 0xFA8072; bSet = true; break;} // (Salmon Preset Color) Specifies a color with RGB value (250,128,114)
else if(str == L"sandyBrown") {RGB = 0xF4A460; bSet = true; break;} // (Sandy Brown Preset Color) Specifies a color with RGB value (244,164,96)
else if(str == L"seaGreen") {RGB = 0x2E8B57; bSet = true; break;} // (Sea Green Preset Color) Specifies a color with RGB value (46,139,87)
else if(str == L"seaShell") {RGB = 0xFFF5EE; bSet = true; break;} // (Sea Shell Preset Color) Specifies a color with RGB value (255,245,238)
else if(str == L"sienna") {RGB = 0xA0522D; bSet = true; break;} // (Sienna Preset Color) Specifies a color with RGB value (160,82,45)
else if(str == L"silver") {RGB = 0xC0C0C0; bSet = true; break;} // (Silver Preset Color) Specifies a color with RGB value (192,192,192)
else if(str == L"skyBlue") {RGB = 0x87CEEB; bSet = true; break;} // (Sky Blue Preset Color) Specifies a color with RGB value (135,206,235)
else if(str == L"slateBlue") {RGB = 0x6A5AEB; bSet = true; break;} // (Slate Blue Preset Color) Specifies a color with RGB value (106,90,205)
else if(str == L"slateGray") {RGB = 0x708090; bSet = true; break;} // (Slate Gray Preset Color) Specifies a color with RGB value (112,128,144)
else if(str == L"slateGrey") {RGB = 0x708090; bSet = true; break;} // (Slate Gray Preset Color) Specifies a color with RGB value (112,128,144)
else if(str == L"snow") {RGB = 0xFFFAFA; bSet = true; break;} // (Snow Preset Color) Specifies a color with RGB value (255,250,250)
else if(str == L"springGreen") {RGB = 0x00FF7F; bSet = true; break;} // (Spring Green Preset Color) Specifies a color with RGB value (0,255,127)
else if(str == L"steelBlue") {RGB = 0x4682B4; bSet = true; break;} // (Steel Blue Preset Color) Specifies a color with RGB value (70,130,180)
break;
case 't':
if(str == L"tan") {RGB = 0xD2B48C; bSet = true; break;} // (Tan Preset Color) Specifies a color with RGB value (210,180,140)
else if(str == L"teal") {RGB = 0x008080; bSet = true; break;} // (Teal Preset Color) Specifies a color with RGB value (0,128,128)
else if(str == L"thistle") {RGB = 0xD8BFD8; bSet = true; break;} // (Thistle Preset Color) Specifies a color with RGB value (216,191,216)
else if(str == L"tomato") {RGB = 0xFF7347; bSet = true; break;} // (Tomato Preset Color) Specifies a color with RGB value (255,99,71)
else if(str == L"turquoise") {RGB = 0x40E0D0; bSet = true; break;} // (Turquoise Preset Color) Specifies a color with RGB value (64,224,208)
break;
case 'v':
if(str == L"violet") {RGB = 0xEE82EE; bSet = true; break;} // (Violet Preset Color) Specifies a color with RGB value (238,130,238)
break;
case 'w':
if(str == L"wheat") {RGB = 0xF5DEB3; bSet = true; break;} // (Wheat Preset Color) Specifies a color with RGB value (245,222,179)
else if(str == L"white") {RGB = 0xFFFFFF; bSet = true; break;} // (White Preset Color) Specifies a color with RGB value (255,255,255)
else if(str == L"whiteSmoke") {RGB = 0xF5F5F5; bSet = true; break;} // (White Smoke Preset Color) Specifies a color with RGB value (245,245,245)
else if(str == L"windowsText") {RGB = 0x000000; bSet = true; break;} // (White Smoke Preset Color) Specifies a color with RGB value (245,245,245)
break;
case 'y':
if(str == L"yellow") {RGB = 0xFFFF00; bSet = true; break;} // (Yellow Preset Color) Specifies a color with RGB value (255,255,0)
else if(str == L"yellowGreen") {RGB = 0x9ACD32; bSet = true; break;} // (Yellow Green Preset Color) Specifies a color with RGB value (154,205,50)
break;
}
}
if (bSet)
{
color.R = (BYTE)(RGB >>16);
color.G = (BYTE)(RGB >> 8);
color.B = (BYTE)(RGB);
color.A = 0;
}
}
return color;
}
@ -4847,16 +4906,13 @@ HRESULT CDrawingConverter::SaveObject(LONG lStart, LONG lLength, const std::wstr
if (m_bIsUseConvertion2007)
{
if (oElem.is<PPTX::Logic::SpTree>())
if (oElem.is<PPTX::Logic::SpTree>() ||
oElem.is<PPTX::Logic::Shape>() ||
oElem.is<PPTX::Logic::Pic>())
{
oXmlWriter.WriteString(L"<mc:AlternateContent><mc:Choice Requires=\"wpg\">");
bIsNeedConvert2007 = true;
}
else if (oElem.is<PPTX::Logic::Shape>())
{
oXmlWriter.WriteString(L"<mc:AlternateContent><mc:Choice Requires=\"wps\">");
bIsNeedConvert2007 = true;
}
}
oXmlWriter.WriteString(L"<w:drawing>");
@ -4865,21 +4921,20 @@ HRESULT CDrawingConverter::SaveObject(LONG lStart, LONG lLength, const std::wstr
if (oElem.is<PPTX::Logic::SpTree>())
{
oXmlWriter.WriteString(L"<a:graphic xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\">\
<a:graphicData uri=\"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup\">");
<a:graphicData uri=\"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup\">");
}
else if (oElem.is<PPTX::Logic::Pic>())
{
oXmlWriter.WriteString(L"<a:graphic xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\">\
<a:graphicData uri=\"http://schemas.openxmlformats.org/drawingml/2006/picture\">");
<a:graphicData uri=\"http://schemas.openxmlformats.org/drawingml/2006/picture\">");
}
else
{
oXmlWriter.WriteString(L"<a:graphic xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\">\
<a:graphicData uri=\"http://schemas.microsoft.com/office/word/2010/wordprocessingShape\">");
<a:graphicData uri=\"http://schemas.microsoft.com/office/word/2010/wordprocessingShape\">");
}
oElem.toXmlWriter(&oXmlWriter);
oXmlWriter.WriteString(L"</a:graphicData>\
</a:graphic>");
oXmlWriter.WriteString(L"</a:graphicData></a:graphic>");
oXmlWriter.WriteString(strMainPropsTail);
oXmlWriter.WriteString(bIsInline ? L"</wp:inline>" : L"</wp:anchor>");
@ -4897,7 +4952,10 @@ HRESULT CDrawingConverter::SaveObject(LONG lStart, LONG lLength, const std::wstr
{
ConvertShapeVML(oElem, bsMainProps, oXmlWriter);
}
else if (oElem.is<PPTX::Logic::Pic>())
{
ConvertPicVML(oElem, bsMainProps, oXmlWriter);
}
oXmlWriter.WriteString(L"</w:pict></mc:Fallback></mc:AlternateContent>");
}
}

View File

@ -42,7 +42,7 @@
#include <vector>
#include <map>
#include "./../DesktopEditor/graphics/pro/Fonts.h"
#include "../DesktopEditor/graphics/pro/Fonts.h"
class IRenderer;
class COfficeFontPicker;

View File

@ -272,14 +272,15 @@ static std::wstring SchemeClr_GetStringCode(const BYTE& val)
return (L"accent1");
}
#define XMLWRITER_DOC_TYPE_PPTX 0
#define XMLWRITER_DOC_TYPE_DOCX 1
#define XMLWRITER_DOC_TYPE_XLSX 2
#define XMLWRITER_DOC_TYPE_CHART 3
#define XMLWRITER_DOC_TYPE_WORDART 4
#define XMLWRITER_DOC_TYPE_GRAPHICS 5
#define XMLWRITER_DOC_TYPE_PPTX 0
#define XMLWRITER_DOC_TYPE_DOCX 1
#define XMLWRITER_DOC_TYPE_XLSX 2
#define XMLWRITER_DOC_TYPE_CHART 3
#define XMLWRITER_DOC_TYPE_WORDART 4
#define XMLWRITER_DOC_TYPE_GRAPHICS 5
#define XMLWRITER_DOC_TYPE_CHART_DRAWING 6
#define XMLWRITER_RECORD_TYPE_SPPR 0
#define XMLWRITER_RECORD_TYPE_CLRMAPOVR 1
#define XMLWRITER_RECORD_TYPE_SPPR 0
#define XMLWRITER_RECORD_TYPE_CLRMAPOVR 1
#define XMLWRITER_RECORD_TYPE_TEXT_OUTLINE 2
#define XMLWRITER_RECORD_TYPE_TEXT_FILL 3
#define XMLWRITER_RECORD_TYPE_TEXT_FILL 3

View File

@ -403,8 +403,6 @@ namespace NSStringUtils
}
}
#ifdef AVS_USE_CONVERT_PPTX_TOCUSTOM_VML
class COOXToVMLGeometry : public IRenderer
{
private:
@ -883,4 +881,3 @@ private:
}
};
#endif

View File

@ -38,7 +38,7 @@
#include <boost/algorithm/string.hpp>
#include <math.h>
#include "./../Common.h"
#include "../Common.h"
#include "../../../../../../DesktopEditor/xml/include/xmlutils.h"
#include "../../../../../../DesktopEditor/graphics/aggplustypes.h"

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "./../BaseShape.h"
#include "../BaseShape.h"
#include "CustomGeomShape.h"
#include "PptShapeEnum.h"
#include "../../../../../../Common/DocxFormat/Source/DocxFormat/Logic/VmlOfficeDrawing.h"

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

View File

@ -30,7 +30,7 @@
*
*/
#pragma once
#include "../PPTXShape.h"
#include "../PptxShape.h"
namespace OOXMLShapes
{

Some files were not shown because too many files have changed in this diff Show More