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

Заполнение таблицы данными при вставке чарта

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@49263 954022d7-b5bf-4e40-9824-e11837661b57
parent 9e0ff1e5
......@@ -3280,12 +3280,17 @@ function DrawingObjects() {
var graphicObject = new CChartAsGroup(null, _this);
graphicObject.setChartBinary(chart["binary"]);
var _range = convertFormula(graphicObject.chart.range.interval, worksheet);
if (_range)
graphicObject.chart.range.intervalObject = _range;
graphicObject.chart.rebuildSeries();
// Инжектим тему и перестраиваем превью диаграмм
if ( graphicObject.chart.themeColors ) {
api.GuiControlColorsMap = [];
for (var i = 0; i < wordChart.themeColors.length; i++) {
for (var i = 0; i < graphicObject.chart.themeColors.length; i++) {
var color = new RGBColor( graphicObject.chart.themeColors[i] );
api.GuiControlColorsMap.push(new CColor(color.r, color.g, color.b));
......@@ -3294,9 +3299,8 @@ function DrawingObjects() {
api.chartPreviewManager.init();
}
/*
// Заполняем таблицу
if ( chart.data.length ) {
/*if ( graphicObject.chart.series.length ) {
var bbox = chart.range.intervalObject.getBBox0();
var r = bbox.r1, c = bbox.c1;
......@@ -3310,14 +3314,13 @@ function DrawingObjects() {
}
}
}
else {
else*/ {
var aCells = chart.range.intervalObject.getCells();
for ( var i = 0; i < aCells.length; i++ ) {
aCells[i].setValue( (i + 1).toString() );
}
}
worksheet._updateCellsRange(chart.range.intervalObject.getBBox0());
*/
}
}
......
......@@ -6864,17 +6864,6 @@ CErrorData.prototype.get_Value = function() { return this.Value; };
asc_docs_api.prototype.asc_getChartObject = function()
{
this.isChartEditor = true; // Для совместного редактирования
/*var chart = this.WordControl.m_oLogicDocument.Get_ChartObject();
if ( chart.type != "" )
this.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Drawing_Props);
else
this.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Paragraph_Content);
chart["themeColors"] = [];
for (var i = 0; i < this.WordControl.m_oDrawingDocument.GuiControlColorsMap.length; i++) {
chart["themeColors"].push( this.WordControl.m_oDrawingDocument.GuiControlColorsMap[i].get_hex() );
}*/
var graphicObject = this.WordControl.m_oLogicDocument.Get_ChartObject();
for (var i = 0; i < this.WordControl.m_oDrawingDocument.GuiControlColorsMap.length; i++) {
......
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