Commit ee1c130f authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

Выставление правильных themeColors для диаграмм (они должны быть CRGBColor)

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@52138 954022d7-b5bf-4e40-9824-e11837661b57
parent d7cdc5e7
......@@ -5612,9 +5612,15 @@ function PreMoveState(graphicObjects, ctrlShiftFlag/*был ли н
{
if(false === this.graphicObjects.document.Document_Is_SelectionLocked(changestype_Drawing_Props, {Type : changestype_2_Element_and_Type , Element : gr_obj.Parent, CheckType : changestype_Paragraph_Content} )) {
var graphicObject = gr_obj.GraphicObj;
var oColor, oNewColor;
graphicObject.chart.themeColors = [];
for (var i = 0; i < this.graphicObjects.drawingDocument.GuiControlColorsMap.length; i++) {
graphicObject.chart.themeColors.push( this.graphicObjects.drawingDocument.GuiControlColorsMap[i].get_hex() );
oColor = this.graphicObjects.drawingDocument.GuiControlColorsMap[i];
oNewColor = new CRGBColor();
oNewColor.RGBA.R = oColor.r;
oNewColor.RGBA.G = oColor.g;
oNewColor.RGBA.B = oColor.b;
graphicObject.chart.themeColors.push(oNewColor);
}
editor.asc_fireCallback("asc_doubleClickOnChart", graphicObject);
}
......@@ -10178,9 +10184,15 @@ function PreMoveInGroup(graphicObjects, group, ctrlShift, bSelectedMajorObject,
{
if(false === this.graphicObjects.document.Document_Is_SelectionLocked(changestype_Drawing_Props, {Type : changestype_2_Element_and_Type , Element : this.group.parent.Parent, CheckType : changestype_Paragraph_Content} )) {
var chart = obj;
var oColor, oNewColor;
chart["themeColors"] = [];
for (var i = 0; i < this.graphicObjects.drawingDocument.GuiControlColorsMap.length; i++) {
chart["themeColors"].push( this.graphicObjects.drawingDocument.GuiControlColorsMap[i].get_hex() );
oColor = this.graphicObjects.drawingDocument.GuiControlColorsMap[i];
oNewColor = new CRGBColor();
oNewColor.RGBA.R = oColor.r;
oNewColor.RGBA.G = oColor.g;
oNewColor.RGBA.B = oColor.b;
chart["themeColors"].push(oNewColor);
}
editor.asc_fireCallback("asc_doubleClickOnChart", chart);
}
......
......@@ -7186,8 +7186,14 @@ asc_docs_api.prototype.asc_getChartObject = function()
this.isChartEditor = true; // Для совместного редактирования
var graphicObject = this.WordControl.m_oLogicDocument.Get_ChartObject();
var oColor, oNewColor;
for (var i = 0; i < this.WordControl.m_oDrawingDocument.GuiControlColorsMap.length; i++) {
graphicObject.chart.themeColors.push( this.WordControl.m_oDrawingDocument.GuiControlColorsMap[i].get_hex() );
oColor = this.WordControl.m_oDrawingDocument.GuiControlColorsMap[i];
oNewColor = new CRGBColor();
oNewColor.RGBA.R = oColor.r;
oNewColor.RGBA.G = oColor.g;
oNewColor.RGBA.B = oColor.b;
graphicObject.chart.themeColors.push(oNewColor);
}
return graphicObject;
}
......
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