Commit 85c3afbb authored by Sergey Luzyanin's avatar Sergey Luzyanin

nvGraphicFramePr in ChartSpace

parent 4e176013
......@@ -481,6 +481,8 @@ function checkPointInMap(map, worksheet, row, col)
function CChartSpace()
{
CChartSpace.superclass.constructor.call(this);
this.nvGraphicFramePr = null;
this.chart = null;
this.clrMapOvr = null;
this.date1904 = null;
......@@ -1088,6 +1090,12 @@ CChartSpace.prototype.setFill = function (fill) {
this.spPr.setFill(fill);
};
CChartSpace.prototype.setNvSpPr = function(pr) {
History.Add(this, {Type: AscDFH.historyitem_ChartSpace_SetNvGrFrProps, oldPr: this.nvGraphicFramePr, newPr: pr});
this.nvGraphicFramePr = pr;
};
CChartSpace.prototype.changeLine = function (line)
{
if(this.recalcInfo.recalculatePenBrush)
......@@ -1673,6 +1681,7 @@ CChartSpace.prototype.copy = function(drawingDocument)
copy.setUserShapes(this.userShapes);
copy.setThemeOverride(this.themeOverride);
copy.setBDeleted(this.bDeleted);
copy.setLocks(this.locks);
copy.cachedImage = this.getBase64Img();
copy.cachedPixH = this.cachedPixH;
copy.cachedPixW = this.cachedPixW;
......
......@@ -442,6 +442,7 @@ window['AscDFH'].historyitem_ChartSpace_SetUserShapes = 2094;
window['AscDFH'].historyitem_ChartSpace_SetThemeOverride = 2095;
window['AscDFH'].historyitem_ChartSpace_SetGroup = 2096;
window['AscDFH'].historyitem_ChartSpace_SetParent = 2097;
window['AscDFH'].historyitem_ChartSpace_SetNvGrFrProps = 2098;
window['AscDFH'].historyitem_Legend_SetLayout = 2095;
window['AscDFH'].historyitem_Legend_AddLegendEntry = 2096;
window['AscDFH'].historyitem_Legend_SetLegendPos = 2097;
......
......@@ -2899,6 +2899,12 @@ function CBinaryFileWriter()
oThis.WriteUChar(g_nodeAttributeStart);
oThis.WriteUChar(g_nodeAttributeEnd);
if(grObj.nvGraphicFramePr)
{
grObj.nvGraphicFramePr.locks = grObj.locks;
grObj.nvGraphicFramePr.objectType = grObj.getObjectType();
oThis.WriteRecord1(0, grObj.nvGraphicFramePr, oThis.WriteUniNvPr);
}
if (grObj.spPr.xfrm && grObj.spPr.xfrm.isNotNull())
oThis.WriteRecord2(1, grObj.spPr.xfrm, oThis.WriteXfrm);
......@@ -3456,7 +3462,7 @@ function CBinaryFileWriter()
oThis._WriteBool2(5, !!(locks & (AscFormat.LOCKS_MASKS.noEditPoints << 1)));
if(locks & AscFormat.LOCKS_MASKS.noGrp)
oThis._WriteBool2(6, !!(locks & (AscFormat.LOCKS_MASKS.noGrp << 1)));
if(locks & AscFormat.LOCKS_MASKS.noMov)
if(locks & AscFormat.LOCKS_MASKS.noMove)
oThis._WriteBool2(7, !!(locks & (AscFormat.LOCKS_MASKS.noMove << 1)));
if(locks & AscFormat.LOCKS_MASKS.noResize)
oThis._WriteBool2(8, !!(locks & (AscFormat.LOCKS_MASKS.noResize << 1)));
......@@ -3498,36 +3504,36 @@ function CBinaryFileWriter()
this.WriteGrpCNvPr = function(locks) {
oThis.WriteUChar(g_nodeAttributeStart);
if(locks & AscFormat.noChangeAspect)
oThis._WriteBool2(0, !!(locks & (AscFormat.noChangeAspect << 1)));
if(locks & AscFormat.noGrp)
oThis._WriteBool2(1, !!(locks & (AscFormat.noGrp << 1)));
if(locks & AscFormat.noMove)
oThis._WriteBool2(2, !!(locks & (AscFormat.noMove << 1)));
if(locks & AscFormat.noResize)
oThis._WriteBool2(3, !!(locks & (AscFormat.noResize << 1)));
if(locks & AscFormat.noRot)
oThis._WriteBool2(4, !!(locks & (AscFormat.noRot << 1)));
if(locks & AscFormat.noSelect)
oThis._WriteBool2(5, !!(locks & (AscFormat.noSelect << 1)));
if(locks & AscFormat.noUngrp)
oThis._WriteBool2(6, !!(locks & (AscFormat.noUngrp << 1)));
if(locks & AscFormat.LOCKS_MASKS.noChangeAspect)
oThis._WriteBool2(0, !!(locks & (AscFormat.LOCKS_MASKS.noChangeAspect << 1)));
if(locks & AscFormat.LOCKS_MASKS.noGrp)
oThis._WriteBool2(1, !!(locks & (AscFormat.LOCKS_MASKS.noGrp << 1)));
if(locks & AscFormat.LOCKS_MASKS.noMove)
oThis._WriteBool2(2, !!(locks & (AscFormat.LOCKS_MASKS.noMove << 1)));
if(locks & AscFormat.LOCKS_MASKS.noResize)
oThis._WriteBool2(3, !!(locks & (AscFormat.LOCKS_MASKS.noResize << 1)));
if(locks & AscFormat.LOCKS_MASKS.noRot)
oThis._WriteBool2(4, !!(locks & (AscFormat.LOCKS_MASKS.noRot << 1)));
if(locks & AscFormat.LOCKS_MASKS.noSelect)
oThis._WriteBool2(5, !!(locks & (AscFormat.LOCKS_MASKS.noSelect << 1)));
if(locks & AscFormat.LOCKS_MASKS.noUngrp)
oThis._WriteBool2(6, !!(locks & (AscFormat.LOCKS_MASKS.noUngrp << 1)));
oThis.WriteUChar(g_nodeAttributeEnd);
};
this.WriteGrFrameCNvPr = function(locks) {
oThis.WriteUChar(g_nodeAttributeStart);
if(locks & AscFormat.noChangeAspect)
oThis._WriteBool2(0, !!(locks & (AscFormat.noChangeAspect << 1)));
if(locks & AscFormat.noDrilldown)
oThis._WriteBool2(1, !!(locks & (AscFormat.noDrilldown << 1)));
if(locks & AscFormat.noGrp)
oThis._WriteBool2(2, !!(locks & (AscFormat.noGrp << 1)));
if(locks & AscFormat.noMove)
oThis._WriteBool2(3, !!(locks & (AscFormat.noMove << 1)));
if(locks & AscFormat.noResize)
oThis._WriteBool2(4, !!(locks & (AscFormat.noResize << 1)));
if(locks & AscFormat.noSelect)
oThis._WriteBool2(5, !!(locks & (AscFormat.noSelect << 1)));
if(locks & AscFormat.LOCKS_MASKS.noChangeAspect)
oThis._WriteBool2(0, !!(locks & (AscFormat.LOCKS_MASKS.noChangeAspect << 1)));
if(locks & AscFormat.LOCKS_MASKS.noDrilldown)
oThis._WriteBool2(1, !!(locks & (AscFormat.LOCKS_MASKS.noDrilldown << 1)));
if(locks & AscFormat.LOCKS_MASKS.noGrp)
oThis._WriteBool2(2, !!(locks & (AscFormat.LOCKS_MASKS.noGrp << 1)));
if(locks & AscFormat.LOCKS_MASKS.noMove)
oThis._WriteBool2(3, !!(locks & (AscFormat.LOCKS_MASKS.noMove << 1)));
if(locks & AscFormat.LOCKS_MASKS.noResize)
oThis._WriteBool2(4, !!(locks & (AscFormat.LOCKS_MASKS.noResize << 1)));
if(locks & AscFormat.LOCKS_MASKS.noSelect)
oThis._WriteBool2(5, !!(locks & (AscFormat.LOCKS_MASKS.noSelect << 1)));
oThis.WriteUChar(g_nodeAttributeEnd);
};
......
......@@ -807,7 +807,13 @@ Slide.prototype =
switch (drawing.getObjectType())
{
case AscDFH.historyitem_type_ChartSpace:
{
{
if(!drawing.nvGraphicFramePr)
{
nv_sp_pr = new AscFormat.UniNvPr();
nv_sp_pr.cNvPr.setId(++this.maxId);
drawing.setNvSpPr(nv_sp_pr);
}
break;
}
case AscDFH.historyitem_type_GroupShape:
......
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