Commit 208a9eeb authored by Dmitry.Vikulov's avatar Dmitry.Vikulov Committed by Alexander.Trofimov

Передача цветов темы между приложениями теперь через объект CRGBColor

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@51936 954022d7-b5bf-4e40-9824-e11837661b57
parent 2c4876e8
...@@ -2442,8 +2442,15 @@ function PreMoveState(drawingObjectsController, drawingObjects, startX, startY, ...@@ -2442,8 +2442,15 @@ function PreMoveState(drawingObjectsController, drawingObjects, startX, startY,
if(false === editor.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Drawing_Props, undefined )) { if(false === editor.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Drawing_Props, undefined )) {
var graphicObject = gr_obj; var graphicObject = gr_obj;
graphicObject.chart.themeColors = []; graphicObject.chart.themeColors = [];
var oColor, oNewColor;
for (var i = 0; i < editor.WordControl.m_oDrawingDocument.GuiControlColorsMap.length; i++) { for (var i = 0; i < editor.WordControl.m_oDrawingDocument.GuiControlColorsMap.length; i++) {
graphicObject.chart.themeColors.push( editor.WordControl.m_oDrawingDocument.GuiControlColorsMap[i].get_hex() ); oColor = editor.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 );
} }
editor.asc_fireCallback("asc_doubleClickOnChart", graphicObject); editor.asc_fireCallback("asc_doubleClickOnChart", graphicObject);
} }
......
...@@ -4786,9 +4786,15 @@ asc_docs_api.prototype.asc_getChartObject = function() ...@@ -4786,9 +4786,15 @@ asc_docs_api.prototype.asc_getChartObject = function()
{ {
this.isChartEditor = true; // Для совместного редактирования this.isChartEditor = true; // Для совместного редактирования
var oColor, oNewColor;
var graphicObject = this.WordControl.m_oLogicDocument.Get_ChartObject(); var graphicObject = this.WordControl.m_oLogicDocument.Get_ChartObject();
for (var i = 0; i < this.WordControl.m_oDrawingDocument.GuiControlColorsMap.length; i++) { 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; return graphicObject;
} }
......
...@@ -5507,8 +5507,15 @@ function PreMoveInlineObject(graphicObjects, objectId, ctrlShiftFlag, bSelectedM ...@@ -5507,8 +5507,15 @@ function PreMoveInlineObject(graphicObjects, objectId, ctrlShiftFlag, bSelectedM
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} )) { 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 = this.graphicObjects.majorGraphicObject.GraphicObj; var graphicObject = this.graphicObjects.majorGraphicObject.GraphicObj;
graphicObject.chart.themeColors = []; graphicObject.chart.themeColors = [];
var oColor, oNewColor;
for (var i = 0; i < this.graphicObjects.drawingDocument.GuiControlColorsMap.length; i++) { 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); editor.asc_fireCallback("asc_doubleClickOnChart", 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