Commit 68d9c18c authored by Sergey.Luzyanin's avatar Sergey.Luzyanin Committed by Alexander.Trofimov

Bug 25312 - Ошибка в консоли при создании копии листа с диаграммой

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@57203 954022d7-b5bf-4e40-9824-e11837661b57
parent 2ccf5f6c
......@@ -3144,6 +3144,16 @@ function DrawingObjects() {
}, this, []);
};
_this.updateChartReferences2 = function(oldWorksheet, newWorksheet)
{
for (var i = 0; i < aObjects.length; i++) {
var graphicObject = aObjects[i].graphicObject;
if ( graphicObject.updateChartReferences )
{
graphicObject.updateChartReferences2(oldWorksheet, parserHelp.getEscapeSheetName(newWorksheet));
}
}
};
//-----------------------------------------------------------------------------------
// Graphic object
......@@ -3597,7 +3607,7 @@ function DrawingObjects() {
settings.putRange(worksheet.getSelectionRangeValue());
settings.putStyle(2);
settings.putType(c_oAscChartTypeSettings.lineNormal);
settings.putTitle(c_oAscChartTitleShowSettings.none);
settings.putTitle(c_oAscChartTitleShowSettings.noOverlay);
settings.putLegendPos(c_oAscChartLegendShowSettings.right);
settings.putHorAxisLabel(c_oAscChartHorAxisLabelShowSettings.none);
settings.putVertAxisLabel(c_oAscChartVertAxisLabelShowSettings.none);
......
......@@ -175,6 +175,9 @@ function CreateUniFillSchemeColorWidthTint(schemeColorId, tintVal)
this, [schemeColorId, tintVal]);
}
var G_O_VISITED_HLINK_COLOR = CreateUniFillSolidFillWidthTintOrShade(CreateUnifillSolidFillSchemeColorByIndex(10), 0);
function CChartSpace()
{
this.chart = null;
......@@ -640,6 +643,14 @@ CChartSpace.prototype =
}
},
updateChartReferences2: function(oldWorksheetName, newWorksheetName)
{
if(this.checkChartReferences(oldWorksheetName))
{
this.changeChartReferences(oldWorksheetName, newWorksheetName);
}
},
checkSeriesRefs: function(callback, bbox, worksheet)
{
if(this.chart && this.chart.plotArea)
......@@ -760,7 +771,6 @@ CChartSpace.prototype =
rebuildSeries: function()
{
this.setRecalculateInfo();
this.checkSeriesRefs(this.clearCacheVal);
this.recalculate();
......
......@@ -23,6 +23,9 @@
*/
//Типы изменений в классе CTheme
var historyitem_ChangeColorScheme = 0;
var historyitem_ChangeFontScheme = 1;
var historyitem_ChangeFmtScheme = 2;
......
......@@ -1772,11 +1772,11 @@ Workbook.prototype._SerializeHistoryBase64 = function (oMemory, item, aPointChan
Workbook.prototype.SerializeHistory = function(){
var aRes = [];
//соединяем изменения, которые были до приема данных с теми, что получились после.
var wsViews = this.oApi.wb.wsViews;
for(var i in wsViews)
var worksheets = this.aWorksheets, t;
for(t = 0; t < worksheets.length; ++t)
{
if(isRealObject(wsViews[i]) && isRealObject(wsViews[i].objectRender) && isRealObject(wsViews[i].objectRender.controller))
wsViews[i].objectRender.controller.refreshContentChanges();
worksheets[t] && worksheets[t].refreshContentChanges();
}
var aActions = this.aCollaborativeActions.concat(History.GetSerializeArray());
if(aActions.length > 0)
......@@ -1800,10 +1800,12 @@ Workbook.prototype.SerializeHistory = function(){
else if (historyitem_Workbook_SheetAdd == item.nActionType || historyitem_Workbook_SheetRemove == item.nActionType || historyitem_Workbook_SheetMove == item.nActionType)
bChangeSheetPlace = true;
}
this._SerializeHistoryBase64(oMemory, item, aPointChangesBase64);
}
aRes.push(aPointChangesBase64);
}
aPointChangesBase64 = [];
var aFonts = [];
for (var i in oFontMap)
......@@ -2119,7 +2121,7 @@ Woorksheet.prototype.copyDrawingObjects=function(oNewWs, wsFrom)
oNewWs.Drawings[oNewWs.Drawings.length - 1] = drawingObject;
}
drawingObjects.pushToAObjects(oNewWs.Drawings);
drawingObjects.updateChartReferences(wsFrom.sName, oNewWs.sName);
drawingObjects.updateChartReferences2(wsFrom.sName, oNewWs.sName);
}
};
Woorksheet.prototype.init=function(){
......
......@@ -672,7 +672,7 @@ CGraphicObjects.prototype =
ret.spPr.xfrm.setOffY(0);
ret.theme = this.document.theme;
return ret;
}, this, [])
}, this, []);
}
else
{
......
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