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

git-svn-id:...

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@53498 954022d7-b5bf-4e40-9824-e11837661b57
parent a1c6a4bb
......@@ -3145,14 +3145,14 @@ function DrawingObjects() {
worksheet._drawCollaborativeElements(false);
for ( var i = 0; i < _this.controller.selectedObjects.length; i++ ) {
if ( _this.controller.selectedObjects[i].isChart() ) {
_this.selectDrawingObjectRange(_this.controller.selectedObjects[i].Id);
shapeOverlayCtx.ClearMode = true;
_this.controller.selectedObjects[i].draw(shapeOverlayCtx);
shapeOverlayCtx.ClearMode = false;
}
}
//for ( var i = 0; i < _this.controller.selectedObjects.length; i++ ) {
// if ( _this.controller.selectedObjects[i].isChart() ) {
// _this.selectDrawingObjectRange(_this.controller.selectedObjects[i].Id);
// shapeOverlayCtx.ClearMode = true;
// _this.controller.selectedObjects[i].draw(shapeOverlayCtx);
// shapeOverlayCtx.ClearMode = false;
// }
//}
if (null == drDoc.m_oDocumentRenderer)
{
......@@ -3570,8 +3570,8 @@ function DrawingObjects() {
var index = i;
var drawingObject = aObjects[i];
if ( drawingObject.graphicObject.isChart() )
drawingObject.graphicObject.syncAscChart();
//if ( drawingObject.graphicObject.isChart() )
// drawingObject.graphicObject.syncAscChart();
if ( !printOptions ) {
if ( !drawingObject.inVisibleArea(graphicOption) ) {
......@@ -4107,21 +4107,21 @@ function DrawingObjects() {
}
_this.rebuildChartGraphicObjects = function(range) {
var bRebuild = true;
for (var i = 0; i < aObjects.length; i++) {
var graphicObject = aObjects[i].graphicObject;
if ( graphicObject.isChart() && graphicObject.chart.range.intervalObject ) {
bRebuild = true;
if ( range ) {
if ( !range.intersection(graphicObject.chart.range.intervalObject.bbox) )
bRebuild = false;
}
if ( bRebuild ) {
graphicObject.chart.rebuildSeries();
graphicObject.recalculate();
}
}
}
//var bRebuild = true;
//for (var i = 0; i < aObjects.length; i++) {
// var graphicObject = aObjects[i].graphicObject;
// if ( graphicObject.isChart() && graphicObject.chart.range.intervalObject ) {
// bRebuild = true;
// if ( range ) {
// if ( !range.intersection(graphicObject.chart.range.intervalObject.bbox) )
// bRebuild = false;
// }
// if ( bRebuild ) {
// graphicObject.chart.rebuildSeries();
// graphicObject.recalculate();
// }
// }
//}
}
_this.updateDrawingObject = function(bInsert, operType, updateRange) {
......@@ -4638,13 +4638,12 @@ function DrawingObjects() {
ret = aObjects.length;
aObjects.push(drawingObject);
}
drawingObject.setGraphicObjectCoords();
if ( isInit ) {
_this.showDrawingObjects(false);
_this.sendGraphicObjectProps();
worksheet.model.workbook.handlers.trigger("asc_onEndAddShape");
}
//if ( isInit ) {
// _this.showDrawingObjects(false);
// _this.sendGraphicObjectProps();
// worksheet.model.workbook.handlers.trigger("asc_onEndAddShape");
//}
if ( lockByDefault ) {
_this.objectLocker.reset();
......@@ -4652,9 +4651,9 @@ function DrawingObjects() {
_this.objectLocker.checkObjects( function(result) {} );
}
var boundsChecker = _this.getBoundsChecker(drawingObject.graphicObject);
aBoundsCheckers.push(boundsChecker);
//var boundsChecker = _this.getBoundsChecker(drawingObject.graphicObject);
//aBoundsCheckers.push(boundsChecker);
//
return ret;
}
......
This diff is collapsed.
function CAreaChart()
{
this.axId = null;
this.dLbls = null;
this.dropLines = null;
this.grouping = null;
this.series = [];
this.varyColors = null;
this.Id = g_oIdCounter.Get_NewId();
g_oTableId.Add(this, this.Id);
}
CAreaChart.prototype =
{
Get_Id: function()
{
return this.Id;
},
getObjectType: function()
{
return historyitem_type_AreaChart;
},
Write_ToBinary2: function(w)
{
w.WriteLong(this.getObjectType());
w.WriteString2(this.Get_Id());
},
Read_FromBinary2: function(r)
{
this.Id = r.GetString2();
},
setAxId: function(pr)
{
History.Add(this, {Type: historyitem_AreaChart_SetAxId, oldPr: this.axId, newPr: pr});
this.axId = pr;
},
setDLbls: function(pr)
{
History.Add(this, {Type: historyitem_AreaChart_SetDLbls, oldPr: this.dLbls, newPr: pr});
this.dLbls = pr;
},
setDropLines: function(pr)
{
History.Add(this, {Type: historyitem_AreaChart_SetDropLines, oldPr: this.dropLines, newPr: pr});
this.dropLines = pr;
},
setGrouping: function(pr)
{
History.Add(this, {Type: historyitem_AreaChart_SetGrouping, oldPr: this.grouping, newPr: pr});
this.grouping = pr;
},
addSer: function(ser)
{
History.Add(this, {Type: historyitem_AreaChart_AddSer, ser: ser});
this.series.push(ser);
},
setVaryColors: function(pr)
{
History.Add(this, {Type: historyitem_AreaChart_SetVaryColors, oldPr: this.varyColors, newPr: pr});
this.varyColors = pr;
},
Undo: function(data)
{
switch (data.Type)
{
case historyitem_AreaChart_SetAxId:
{
this.axId = data.oldPr;
break
}
case historyitem_AreaChart_SetDLbls:
{
this.dLbls = data.oldPr;
break
}
case historyitem_AreaChart_SetDropLines:
{
this.dropLines = data.oldPr;
break
}
case historyitem_AreaChart_SetGrouping:
{
this.grouping = data.oldPr;
break
}
case historyitem_AreaChart_SetVaryColors:
{
this.varyColors = data.oldPr;
break
}
}
},
Redo: function(data)
{
switch (data.Type)
{
case historyitem_AreaChart_SetAxId:
{
this.axId = data.newPr;
break
}
case historyitem_AreaChart_SetDLbls:
{
this.dLbls = data.newPr;
break
}
case historyitem_AreaChart_SetDropLines:
{
this.dropLines = data.newPr;
break
}
case historyitem_AreaChart_SetGrouping:
{
this.grouping = data.newPr;
break
}
case historyitem_AreaChart_SetVaryColors:
{
this.varyColors = data.newPr;
break
}
}
},
Save_Changes: function(data, w)
{
},
Load_Changes: function(r)
{}
};
\ No newline at end of file
function CAreaSeries()
{
this.cat = null;
this.dLbls = null;
this.dPt = null;
this.errBars = null;
this.idx = null;
this.order = null;
this.pictureOptions = null;
this.spPr = null;
this.trendline = null;
this.Id = g_oIdCounter.Get_NewId();
g_oTableId.Add(this, this.Id);
}
CAreaSeries.prototype =
{
Get_Id: function()
{
return this.Id;
},
getObjectType: function()
{
return historyitem_type_AreaSeries;
},
Write_ToBinary2: function()
{
w.WriteLong(this.getObjectType());
w.WriteString2(this.Get_Id());
},
setCat: function(pr)
{
History.Add(this, {Type: historyitem_AreaSeries_SetCat, oldPr: this.cat, newPr: pr});
this.cat = pr;
},
setDLbls: function(pr)
{
History.Add(this, {Type: historyitem_AreaSeries_SetDLbls, oldPr: this.dLbls, newPr: pr});
this.dLbls = pr;
},
setDPt: function(pr)
{
History.Add(this, {Type: historyitem_AreaSeries_SetDPt, oldPr: this.dPt, newPr: pr});
this.dPt = pr;
},
setErrBars: function(pr)
{
History.Add(this, {Type: historyitem_AreaSeries_SetErrBars, oldPr: this.errBars, newPr: pr});
this.errBars = pr;
},
setIdx: function(pr)
{
History.Add(this, {Type: historyitem_AreaSeries_SetIdx, oldPr: this.idx, newPr: pr});
this.idx = pr;
},
setOrder: function(pr)
{
History.Add(this, {Type: historyitem_AreaSeries_SetOrder, oldPr: this.order, newPr: pr});
this.order = pr;
},
setPictureOptions: function(pr)
{
History.Add(this, {Type: historyitem_AreaSeries_SetPictureOptions, oldPr: this.pictureOptions, newPr: pr});
this.pictureOptions = pr;
},
setSpPr: function(pr)
{
History.Add(this, {Type: historyitem_AreaSeries_SetSpPr, oldPr: this.spPr, newPr: pr});
this.spPr = pr;
},
setTrendline: function(pr)
{
History.Add(this, {Type: historyitem_AreaSeries_SetTrendline, oldPr: this.trendline, newPr: pr});
this.trendline = pr;
},
Undo: function(data)
{
switch (data.Type)
{
case historyitem_AreaSeries_SetCat:
{
this.cat = data.oldPr;
break;
}
case historyitem_AreaSeries_SetDLbls:
{
this.dLbls = data.oldPr;
break;
}
case historyitem_AreaSeries_SetDPt:
{
this.dPt = data.oldPr;
break;
}
case historyitem_AreaSeries_SetErrBars:
{
this.errBars = data.oldPr;
break;
}
case historyitem_AreaSeries_SetIdx:
{
this.idx = data.oldPr;
break;
}
case historyitem_AreaSeries_SetOrder:
{
this.order = data.oldPr;
break;
}
case historyitem_AreaSeries_SetPictureOptions:
{
this.pictureOptions = data.oldPr;
break;
}
case historyitem_AreaSeries_SetSpPr:
{
this.spPr = data.oldPr;
break;
}
case historyitem_AreaSeries_SetTrendline:
{
this.trendline = data.oldPr;
break;
}
}
},
Redo: function(data)
{
switch (data.Type)
{
case historyitem_AreaSeries_SetCat:
{
this.cat = data.newPr;
break;
}
case historyitem_AreaSeries_SetDLbls:
{
this.dLbls = data.newPr;
break;
}
case historyitem_AreaSeries_SetDPt:
{
this.dPt = data.newPr;
break;
}
case historyitem_AreaSeries_SetErrBars:
{
this.errBars = data.newPr;
break;
}
case historyitem_AreaSeries_SetIdx:
{
this.idx = data.newPr;
break;
}
case historyitem_AreaSeries_SetOrder:
{
this.order = data.newPr;
break;
}
case historyitem_AreaSeries_SetPictureOptions:
{
this.pictureOptions = data.newPr;
break;
}
case historyitem_AreaSeries_SetSpPr:
{
this.spPr = data.newPr;
break;
}
case historyitem_AreaSeries_SetTrendline:
{
this.trendline = data.newPr;
break;
}
}
},
Save_Changes: function(data, w)
{
w.WriteLong(data.Type);
switch (data.Type)
{
case historyitem_AreaSeries_SetCat:
case historyitem_AreaSeries_SetDLbls:
case historyitem_AreaSeries_SetDPt:
case historyitem_AreaSeries_SetErrBars:
case historyitem_AreaSeries_SetPictureOptions:
case historyitem_AreaSeries_SetSpPr:
case historyitem_AreaSeries_SetTrendline:
{
writeObject(w, data.newPr);
break;
}
case historyitem_AreaSeries_SetIdx:
case historyitem_AreaSeries_SetOrder:
{
writeLong(w, data.newPr);
break;
}
}
},
Load_Changes: function(r)
{
var type = r.GetLong();
switch (type)
{
case historyitem_AreaSeries_SetCat:
{
this.cat = readObject(r);
break;
}
case historyitem_AreaSeries_SetDLbls:
{
this.dLbls = readObject(r);
break;
}
case historyitem_AreaSeries_SetDPt:
{
this.dPt = readObject(r);
break;
}
case historyitem_AreaSeries_SetErrBars:
{
this.errBars = readObject(r);
break;
}
case historyitem_AreaSeries_SetIdx:
{
this.idx = readLong(r);
break;
}
case historyitem_AreaSeries_SetOrder:
{
this.order = readLong(r);
break;
}
case historyitem_AreaSeries_SetPictureOptions:
{
this.pictureOptions = readObject(r);
break;
}
case historyitem_AreaSeries_SetSpPr:
{
this.spPr = readObject(r);
break;
}
case historyitem_AreaSeries_SetTrendline:
{
this.trendline = readObject(r);
break;
}
}
}
};
var TYPE_AXIS_CAT = 0;
var TYPE_AXIS_DATE = 1;
var TYPE_AXIS_SER = 2;
var TYPE_AXIS_VAL = 3;
var AX_POS_L = 0;
var AX_POS_T = 1;
var AX_POS_R = 2;
var AX_POS_B = 3;
var CROSSES_AUTO_ZERO = 0;
var CROSSES_MAX = 1;
var CROSSES_MIN = 2;
var LBL_ALG_CTR = 0;
var LBL_ALG_L = 1;
var LBL_ALG_R = 2;
var TICK_MARK_CROSS = 0;
var TICK_MARK_IN = 1;
var TICK_MARK_NONE = 2;
var TICK_MARK_OUT = 3;
var TICK_LABEL_POSITION_HIGH = 0;
var TICK_LABEL_POSITION_LOW = 1;
var TICK_LABEL_POSITION_NEXT_TO = 2;
var TICK_LABEL_POSITION_NONE = 3;
var TIME_UNIT_DAYS = 0;
var TIME_UNIT_MONTHS = 1;
var TIME_UNIT_YEARS = 2;
var CROSS_BETWEEN_BETWEEN = 0;
var CROSS_BETWEEN_MID_CAT = 1;
function CAxis()
{
this.type = null;
this.auto = null;
this.axId = null;
this.axPos = null;
this.baseTimeUnit = null;
this.crossAx = null;
this.crossBetween = null;
this.crosses = null;
this.crossesAt = null;
this.delete = null;
this.dispUnits = null;
this.lblAlgn = null;
this.lblOffset = null;
this.majorGridlines = null;
this.majorTickMark = null;
this.majorTimeUnit = null;
this.majorUnit = null;
this.minorGridlines = null;
this.minorTickMark = null;
this.minorTimeUnit = null;
this.minorUnit = null;
this.noMultiLvlLbl = null;
this.numFmt = null;
this.scaling = null;
this.spPr = null;
this.tickLblPos = null;
this.tickLblSkip = null;
this.tickMarkSkip = null;
this.title = null;
this.txPr = null;
this.Id = g_oIdCounter.Get_NewId();
g_oTableId.Add(this, this.Id);
}
CAxis.prototype =
{
Get_Id: function()
{
return this.Id;
},
getObjectType: function()
{
return historyitem_type_Axis;
},
Write_ToBinary: function(w)
{
w.WriteLong(this.getObjectType());
w.WriteString2(this.Get_Id());
},
Read_FromBinary2: function(r)
{
this.Id = r.GetString2();
},
setType: function(type)
{
History.Add(this, {Type: historyitem_Axis_SetType, oldPr: this.type, newPr: type});
this.type = type;
},
setAuto: function(pr)
{
History.Add(this, {Type: historyitem_Axis_SetAuto, oldPr: this.auto, newPr: pr});
this.auto = pr;
},
setAxId : function(pr)
{
History.Add(this, {Type: historyitem_Axis_SetAxId, oldPr: this.axId, newPr: pr});
this.axId = pr;
},
setAxPos: function(pr)
{
History.Add(this, {Type: historyitem_Axis_SetAxPos, oldPr: this.axPos, newPr: pr});
this.axPos = pr;
},
setBaseTimeUnit: function(pr)
{
History.Add(this, {Type: historyitem_Axis_SetBaseTimeUnit, oldPr: this.baseTimeUnit, newPr: pr});
this.baseTimeUnit = pr;
},
setCrossAx: function(pr)
{
History.Add(this, {Type: historyitem_Axis_SetCrossAx, oldPr: this.crossAx, newPr: pr});
this.crossAx = pr;
},
setCrossBetween: function(pr)
{
History.Add(this, {Type: historyitem_Axis_SetCrossBetween, oldPr: this.crossBetween, newPr: pr});
this.crossBetween = pr;
},
setCrosses: function(pr)
{
History.Add(this, {Type: historyitem_Axis_SetCrosses, oldPr: this.crosses, newPr: pr});
this.crosses = pr;
},
setCrossesAt: function(pr)
{
History.Add(this, {Type: historyitem_Axis_SetCrossesAt, oldPr: this.crossesAt, newPr: pr});
this.crossesAt = pr;
},
setDelete: function(pr)
{
History.Add(this, {Type: historyitem_Axis_SetDelete, oldPr: this.bDelete, newPr: pr});
this.bDelete = pr;
},
setDispUnits: function(pr)
{
History.Add(this, {Type: historyitem_Axis_SetDispUnits, oldPr: this.dispUnits, newPr: pr});
this.dispUnits = pr;
},
setLblAlgn: function(pr)
{
History.Add(this, {Type: historyitem_Axis_SetLblAlgn, oldPr: this.lblAlgn, newPr: pr});
this.lblAlgn = pr;
},
setLblOffset: function(pr)
{
History.Add(this, {Type: historyitem_Axis_SetLblOffset, oldPr: this.lblOffset, newPr: pr});
this.lblOffset = pr;
},
setMajorGridlines: function(pr)
{
History.Add(this, {Type: historyitem_Axis_SetMajorGridlines, oldPr: this.majorGridlines, newPr: pr});
this.majorGridlines = pr;
},
setMajorTickMark: function(pr)
{
History.Add(this, {Type: historyitem_Axis_SetMajorTickMark, oldPr: this.majorTickMark, newPr: pr});
this.majorTickMark = pr;
},
setMajorTimeUnit: function(pr)
{
History.Add(this, {Type: historyitem_Axis_SetMajorTimeUnit, oldPr: this.majorTimeUnit, newPr: pr});
this.majorTimeUnit = pr;
},
setMajorUnit: function(pr)
{
History.Add(this, {Type: historyitem_Axis_SetMajorUnit, oldPr: this.majorUnit, newPr: pr});
this.majorTimeUnit = pr;
},
setMinorGridlines: function(pr)
{
History.Add(this, {Type: historyitem_Axis_SetMiniGridlines, oldPr: this.minorGridlines, newPr: pr});
this.minorGridlines = pr;
},
setMinorTickMark: function(pr)
{
History.Add(this, {Type: historyitem_Axis_SetMiniTickMark, oldPr: this.minorTickMark, newPr: pr});
this.minorTickMark = pr;
},
setMinorTimeUnit: function(pr)
{
History.Add(this, {Type: historyitem_Axis_SetMinorTimeUnit, oldPr: this.minorTimeUnit, newPr: pr});
this.minorTimeUnit = pr;
},
setMinorUnit: function(pr)
{
History.Add(this, {Type: historyitem_Axis_SetMinorUnit, oldPr: this.minorUnit, newPr: pr});
this.minorUnit = pr;
},
setNoMultiLvlLbl: function(pr)
{
History.Add(this, {Type: historyitem_Axis_SetNoMultiLvlLbl, oldPr: this.noMultiLvlLbl, newPr: pr});
this.noMultiLvlLbl = pr;
},
setNumFmt: function(pr)
{
History.Add(this, {Type: historyitem_Axis_SetNumFmt, oldPr: this.numFmt, newPr: pr});
this.numFmt = pr;
},
setScaling: function(pr)
{
History.Add(this, {Type: historyitem_Axis_SetScaling, oldPr: this.scaling, newPr: pr});
this.scaling = pr;
},
setSpPr: function(pr)
{
History.Add(this, {Type: historyitem_Axis_SetSpPr, oldPr: this.spPr, newPr: pr});
this.spPr = pr;
},
setTickLblPos: function(pr)
{
History.Add(this, {Type: historyitem_Axis_SetTickLblPos, oldPr: this.tickLblPos, newPr: pr});
this.tickLblPos = pr;
},
setTickLblSkip: function(pr)
{
History.Add(this, {Type: historyitem_Axis_SetTickLblSkip, oldPr: this.tickLblSkip, newPr: pr});
this.tickLblSkip = pr;
},
setTickMarkSkip: function(pr)
{
History.Add(this, {Type: historyitem_Axis_SetTickMarkSkip, oldPr: this.tickMarkSkip, newPr: pr});
this.tickMarkSkip = pr;
},
setTitle: function(pr)
{
History.Add(this, {Type: historyitem_Axis_SetTitle, oldPr: this.title, newPr: pr});
this.title = pr;
},
setTxPr: function(pr)
{
History.Add(this, {Type: historyitem_Axis_SetTxPr, oldPr: this.txPr, newPr: pr});
this.txPr = pr;
},
Undo: function(data)
{
},
Redo: function()
{},
Save_Changes: function()
{},
Load_Changes: function()
{}
};
function CBandFmt()
{
this.idx = null;
this.spPr = null;
this.Id = g_oIdCounter.Get_NewId();
g_oTableId.Add(this, this.Id);
}
CBandFmt.prototype =
{
Get_Id: function()
{
return this.Id;
},
getObjectType: function()
{
return historyitem_type_BandFmt;
},
setIdx: function(pr)
{
History.Add(this, {Type: historyitem_BandFmt_SetIdx, oldPr: this.idx, newPr: pr});
this.idx = pr;
},
setSpPr: function(pr)
{
History.Add(this, {Type: historyitem_BandFmt_SetSpPr, oldPr: this.spPr, newPr: pr});
this.spPr = pr;
},
Undo: function(data)
{
switch (data.Type)
{
case historyitem_BandFmt_SetIdx:
{
this.idx = data.oldPr;
break;
}
case historyitem_BandFmt_SetSpPr:
{
this.spPr = data.oldPr;
break;
}
}
},
Redo: function(data)
{
switch (data.Type)
{
case historyitem_BandFmt_SetIdx:
{
this.idx = data.newPr;
break;
}
case historyitem_BandFmt_SetSpPr:
{
this.spPr = data.newPr;
break;
}
}
},
Save_Changes: function(data, w)
{
w.WriteLong(data.Type);
switch (data.Type)
{
case historyitem_BandFmt_SetIdx:
{
w.WriteBool(isRealNumber(data.newPr));
if(isRealNumber(data.newPr))
{
w.WriteLong(data.newPr);
}
break;
}
case historyitem_BandFmt_SetSpPr:
{
w.WriteBool(isRealObject(data.newPr));
if(isRealObject(data.newPr))
{
w.WriteString(data.newPr.Get_Id());
}
break;
}
}
},
Load_Changes: function(r)
{
var type = r.GetLong();
switch (type)
{
case historyitem_BandFmt_SetIdx:
{
if(r.GetBool())
{
this.idx = r.GetLong();
}
else
{
this.idx = null;
}
break;
}
case historyitem_BandFmt_SetSpPr:
{
this.spPr = data.newPr;
if(r.GetBool())
{
this.spPr = g_oTableId.Get_ById(r.GetString2());
}
else
{
this.spPr = null;
}
break;
}
}
}
};
\ No newline at end of file
var BAR_DIR_BAR = 0;
var BAR_DIR_COL = 1;
function CBarChart()
{
this.axId = null;
this.barDir = null;
this.dLbls = null;
this.gapWidth = null;
this.grouping = null;
this.overlap = null;
this.series = [];
this.serLines = null;
this.varyColors = null;
this.Id = g_oIdCounter.Get_NewId();
g_oTableId.Add(this, this.Id);
}
CBarChart.prototype =
{
Grt_Id: function()
{
return this.Id;
},
getObjectType: function()
{
return historyitem_type_BarChart;
},
Write_ToBinary2: function(w)
{
w.WriteLong(this.getObjectType());
w.WriteString2(this.Get_Id());
},
Read_FromBinary2: function(r)
{
this.Id = r.GetString2();
},
setAxId: function(pr)
{
History.Add(this, {Type: historyitem_BarChart_SetAxId, oldPr: this.axId, newPr:pr});
this.axId = pr;
},
setBarDir: function(pr)
{
History.Add(this, {Type: historyitem_BarChart_SetBarDir, oldPr: this.barDir, newPr:pr});
this.barDir = pr;
},
setDLbls : function(pr)
{
History.Add(this, {Type: historyitem_BarChart_SetBarDir, oldPr: this.dLbls, newPr:pr});
this.dLbls = pr;
},
setGapWidth: function(pr)
{
History.Add(this, {Type: historyitem_BarChart_SetBarDir, oldPr: this.gapWidth, newPr:pr});
this.gapWidth = pr;
},
setGrouping: function(pr)
{
History.Add(this, {Type: historyitem_BarChart_SetBarDir, oldPr: this.grouping, newPr:pr});
this.grouping = pr;
},
setOverlap: function(pr)
{
History.Add(this, {Type: historyitem_BarChart_SetBarDir, oldPr: this.overlap, newPr:pr});
this.overlap = pr;
},
addSer: function(pr)
{
History.Add(this, {Type: historyitem_BarChart_SetBarDir, oldPr: this.series, newPr:pr});
this.series = pr;
},
setSerLines: function(pr)
{
History.Add(this, {Type: historyitem_BarChart_SetBarDir, oldPr: this.serLines, newPr:pr});
this.serLines = pr;
},
setVaryColors: function(pr)
{
History.Add(this, {Type: historyitem_BarChart_SetBarDir, oldPr: this.varyColors, newPr:pr});
this.varyColors = pr;
},
Undo: function(data)
{},
Redo: function(data)
{},
Save_Changes: function()
{},
Load_Changes: function()
{}
};
\ No newline at end of file
This diff is collapsed.
function CBubbleChart()
{
this.axId = null;
this.bubble3D = null;
this.bubbleScale = null;
this.dLbls = null;
this.series = [];
this.showNegBubbles = null;
this.sizeRepresents = null;
this.varyColors = null;
this.Id = g_oIdCounter.Get_NewId();
g_oTableId.Add(this, this.Id);
}
CBubbleChart.prototype =
{
Get_Id: function()
{
return this.Id;
},
getObjectType: function()
{
return historyitem_type_BubbleChart;
},
Write_ToBinary2: function(w)
{
w.WriteLong(this.getObjectType());
w.WriteString2(this.Get_Id());
},
Read_FromBinary2: function(r)
{
this.Id = r.GetString2();
},
setAxId: function(pr)
{
History.Add(this, {Type:historyitem_BubbleChart_SetAxId, oldPr: this.axId, newPr: pr});
this.axId = pr;
},
setBubble3D: function(pr)
{
History.Add(this, {Type:historyitem_BubbleChart_SetBubble3D, oldPr: this.bubble3D, newPr: pr});
this.bubble3D = pr;
},
setBubbleScale: function(pr)
{
History.Add(this, {Type:historyitem_BubbleChart_SetBubbleScale, oldPr: this.bubbleScale, newPr: pr});
this.bubbleScale = pr;
},
setDLbls: function(pr)
{
History.Add(this, {Type:historyitem_BubbleChart_SetDLbls, oldPr: this.dLbls, newPr: pr});
this.dLbls = pr;
},
AddSer: function(ser)
{
History.Add(this, {Type:historyitem_BubbleChart_AddSerie, ser: ser});
this.series.push(ser);
},
setShowNegBubbles: function(pr)
{
History.Add(this, {Type:historyitem_BubbleChart_SetShowNegBubbles, oldPr: this.showNegBubbles, newPr: pr});
this.showNegBubbles = pr;
},
setSizeRepresents: function(pr)
{
History.Add(this, {Type:historyitem_BubbleChart_SetSizeRepresents, oldPr: this.sizeRepresents, newPr: pr});
this.sizeRepresents = pr;
},
setVaryColors: function(pr)
{
History.Add(this, {Type:historyitem_BubbleChart_SetVaryColors, oldPr: this.varyColors, newPr: pr});
this.varyColors = pr;
},
Undo: function(data)
{},
Redo: function()
{},
Save_Changes: function()
{},
Load_Changes: function()
{}
};
\ No newline at end of file
This diff is collapsed.
function CCatAx()
{
this.auto = null;
this.axId = null;
this.axPos = null;
this.crossAx = null;
this.crosses = null;
this.crossesAt = null;
this.bDelete = null;
this.lblAlgn = null;
this.lblOffset = null;
this.majorGridlines = null;
this.majorTickMark = null;
this.minorGridlines = null;
this.minorTickMark = null;
this.noMultiLvlLbl = null;
this.numFmt = null;
this.scaling = null;
this.spPr = null;
this.tickLblPos = null;
this.tickLblSkip = null;
this.tickMarkSkip = null;
this.title = null;
this.txPr = null;
this.Id = g_oIdCounter.Get_NewId();
g_oTableId.Add(this, this.Id);
}
CCatAx.prototype =
{
Get_Id: function()
{
return this.Id;
},
getObjectType: function()
{
return historyitem_type_CatAx;
},
Write_ToBinary: function(w)
{
w.WriteLong(this.getObjectType());
w.WriteString2(this.Get_Id());
},
Read_FromBinary2: function(r)
{
this.Id = r.GetString2();
},
setAuto: function(pr)
{
History.Add(this, {Type: historyitem_CatAx_SetAuto, oldPr: this.auto, newPr: pr});
this.auto = pr;
},
setAxId : function(pr)
{
History.Add(this, {Type: historyitem_CatAx_SetAxId, oldPr: this.axId, newPr: pr});
this.axId = pr;
},
setAxPos: function(pr)
{
History.Add(this, {Type: historyitem_CatAx_SetAxPos, oldPr: this.axPos, newPr: pr});
this.axPos = pr;
},
setCrossAx: function(pr)
{
History.Add(this, {Type: historyitem_CatAx_SetCrossAx, oldPr: this.crossAx, newPr: pr});
this.crossAx = pr;
},
setCrosses: function(pr)
{
History.Add(this, {Type: historyitem_CatAx_SetCrosses, oldPr: this.crosses, newPr: pr});
this.crosses = pr;
},
setCrossesAt: function(pr)
{
History.Add(this, {Type: historyitem_CatAx_SetCrossesAt, oldPr: this.crossesAt, newPr: pr});
this.crossesAt = pr;
},
setDelete: function(pr)
{
History.Add(this, {Type: historyitem_CatAx_SetDelete, oldPr: this.bDelete, newPr: pr});
this.bDelete = pr;
},
setLblAlgn: function(pr)
{
History.Add(this, {Type: historyitem_CatAx_SetLblAlgn, oldPr: this.lblAlgn, newPr: pr});
this.lblAlgn = pr;
},
setLblOffset: function(pr)
{
History.Add(this, {Type: historyitem_CatAx_SetLblOffset, oldPr: this.lblOffset, newPr: pr});
this.lblOffset = pr;
},
setMajorGridlines: function(pr)
{
History.Add(this, {Type: historyitem_CatAx_SetMajorGridlines, oldPr: this.majorGridlines, newPr: pr});
this.majorGridlines = pr;
},
setMajorTickMark: function(pr)
{
History.Add(this, {Type: historyitem_CatAx_SetMajorTickMark, oldPr: this.majorTickMark, newPr: pr});
this.majorTickMark = pr;
},
setMinorGridlines: function(pr)
{
History.Add(this, {Type: historyitem_CatAx_SetMiniGridlines, oldPr: this.minorGridlines, newPr: pr});
this.minorGridlines = pr;
},
setMinorTickMark: function(pr)
{
History.Add(this, {Type: historyitem_CatAx_SetMiniTickMark, oldPr: this.minorTickMark, newPr: pr});
this.minorTickMark = pr;
},
setNoMultiLvlLbl: function(pr)
{
History.Add(this, {Type: historyitem_CatAx_SetNoMultiLvlLbl, oldPr: this.noMultiLvlLbl, newPr: pr});
this.noMultiLvlLbl = pr;
},
setNumFmt: function(pr)
{
History.Add(this, {Type: historyitem_CatAx_SetNumFmt, oldPr: this.numFmt, newPr: pr});
this.numFmt = pr;
},
setScaling: function(pr)
{
History.Add(this, {Type: historyitem_CatAx_SetScaling, oldPr: this.scaling, newPr: pr});
this.scaling = pr;
},
setSpPr: function(pr)
{
History.Add(this, {Type: historyitem_CatAx_SetSpPr, oldPr: this.spPr, newPr: pr});
this.spPr = pr;
},
setTickLblPos: function(pr)
{
History.Add(this, {Type: historyitem_CatAx_SetTickLblPos, oldPr: this.tickLblPos, newPr: pr});
this.tickLblPos = pr;
},
setTickLblSkip: function(pr)
{
History.Add(this, {Type: historyitem_CatAx_SetTickLblSkip, oldPr: this.tickLblSkip, newPr: pr});
this.tickLblSkip = pr;
},
setTickMarkSkip: function(pr)
{
History.Add(this, {Type: historyitem_CatAx_SetTickMarkSkip, oldPr: this.tickMarkSkip, newPr: pr});
this.tickMarkSkip = pr;
},
setTitle: function(pr)
{
History.Add(this, {Type: historyitem_CatAx_SetTitle, oldPr: this.title, newPr: pr});
this.title = pr;
},
setTxPr: function(pr)
{
History.Add(this, {Type: historyitem_CatAx_SetTxPr, oldPr: this.txPr, newPr: pr});
this.txPr = pr;
},
Undo: function()
{},
Redo: function()
{},
Save_Changes: function()
{},
Load_Changes: function()
{}
};
\ No newline at end of file
function CCat()
{
this.multiLvlStrRef = null;
this.numLit = null;
this.numRef = null;
this.strLit = null;
this.strRef = null;
this.Id = g_IdCounter.Get_NewId();
g_oTableId.Add(this, this.Id);
}
CCat.prototype =
{
Get_Id: function()
{
return this.Id;
},
getObjectType: function()
{
return historyitem_type_Cat;
},
setMultiLvlStrRef: function(pr)
{
History.Add(this, {Type: historyitem_Cat_SetMultiLvlStrRef, oldPr: this.multiLvlStrRef, newPr: pr});
this.multiLvlStrRef = pr;
},
setNumLit: function(pr)
{
History.Add(this, {Type: historyitem_Cat_SetMultiLvlStrRef, oldPr: this.multiLvlStrRef, newPr: pr});
this.multiLvlStrRef = pr;
},
setNumRef: function(pr)
{
History.Add(this, {Type: historyitem_Cat_SetMultiLvlStrRef, oldPr: this.multiLvlStrRef, newPr: pr});
this.multiLvlStrRef = pr;
},
setStrLit: function(pr)
{
History.Add(this, {Type: historyitem_Cat_SetMultiLvlStrRef, oldPr: this.multiLvlStrRef, newPr: pr});
this.multiLvlStrRef = pr;
},
setStrRef: function(pr)
{
History.Add(this, {Type: historyitem_Cat_SetMultiLvlStrRef, oldPr: this.multiLvlStrRef, newPr: pr});
this.multiLvlStrRef = pr;
},
Undo: function(data)
{
switch (data.Type)
{
case historyitem_Cat_SetMultiLvlStrRef:
{
this.multiLvlStrRef = data.oldPr;
break;
}
case historyitem_Cat_SetNumLit:
{
this.numLit = data.oldPr;
break;
}
case historyitem_Cat_SetNumRef:
{
this.numRef = data.oldPr;
break;
}
case historyitem_Cat_SetStrLit:
{
this.strLit = data.oldPr;
break;
}
case historyitem_Cat_SetStrRef:
{
this.strRef = data.oldPr;
break;
}
}
},
Redo: function(data)
{
switch (data.Type)
{
case historyitem_Cat_SetMultiLvlStrRef:
{
this.multiLvlStrRef = data.newPr;
break;
}
case historyitem_Cat_SetNumLit:
{
this.numLit = data.newPr;
break;
}
case historyitem_Cat_SetNumRef:
{
this.numRef = data.newPr;
break;
}
case historyitem_Cat_SetStrLit:
{
this.strLit = data.newPr;
break;
}
case historyitem_Cat_SetStrRef:
{
this.strRef = data.newPr;
break;
}
}
},
Save_Changes: function(data, w)
{
w.WriteLong(data.Type);
switch (data.Type)
{
case historyitem_Cat_SetMultiLvlStrRef:
case historyitem_Cat_SetNumLit:
case historyitem_Cat_SetNumRef:
case historyitem_Cat_SetStrLit:
case historyitem_Cat_SetStrRef:
{
writeObject(w, data.newPr);
break;
}
}
},
Load_Changes: function(r)
{
var type = r.GetLong();
switch (type)
{
case historyitem_Cat_SetMultiLvlStrRef:
{
this.multiLvlStrRef = readObject(r);
break;
}
case historyitem_Cat_SetNumLit:
{
this.numLit = readObject(r);
break;
}
case historyitem_Cat_SetNumRef:
{
this.numRef = readObject(r);
break;
}
case historyitem_Cat_SetStrLit:
{
this.strLit = readObject(r);
break;
}
case historyitem_Cat_SetStrRef:
{
this.strRef = readObject(r);
break;
}
}
}
};
\ No newline at end of file
This diff is collapsed.
function CChartText()
{
this.rich = null;
this.strRef = null;
this.Id = g_oIdCounter.Get_NewId();
g_oTableId.Add(this, this.Id);
}
CChartText.prototype =
{
Get_Id: function()
{
return this.Id;
},
getObjectType: function()
{
return historyitem_type_ChartText;
},
Write_ToBinary2: function(w)
{
w.WriteLong(this.getObjectType());
w.WriteString2(this.Get_Id())
},
Read_FromBinary2: function(r)
{
this.Id = r.GetLong();
},
setRich: function(pr)
{
History.Add(this, {Type: historyitem_ChartText_SetRich, oldPr: this.rich, newPr: pr});
this.rich = pr;
},
setStrRef: function(pr)
{
History.Add(this, {Type: historyitem_ChartText_SetStrRef, oldPr: this.strRef, newPr: pr});
this.strRef = pr;
},
Undo: function(data)
{
switch (data.Type)
{
case historyitem_ChartText_SetRich:
{
this.rich = data.oldPr;
break;
}
case historyitem_ChartText_SetStrRef:
{
this.strRef = data.oldPr;
break;
}
}
},
Redo: function(data)
{
switch (data.Type)
{
case historyitem_ChartText_SetRich:
{
this.rich = data.newPr;
break;
}
case historyitem_ChartText_SetStrRef:
{
this.strRef = data.newPr;
break;
}
}
},
Save_Changes: function(data, w)
{
w.WriteLong(data.Type);
switch (data.Type)
{
case historyitem_ChartText_SetRich:
case historyitem_ChartText_SetStrRef:
{
writeObject(w, data.newPr);
break;
}
}
},
Load_Changes: function(r)
{
var type = r.GetLong();
switch (type)
{
case historyitem_ChartText_SetRich:
{
this.rich = readObject(r);
break;
}
case historyitem_ChartText_SetStrRef:
{
this.strRef = readObject(r);
break;
}
}
}
};
\ No newline at end of file
function CShapeColor(r, g, b)
{
this.r = r;
this.g = g;
this.b = b;
this.darken = function()
{
var hslColor = RGBToHSL(this);
hslColor.l*=0.9;
return HSLToRGB(hslColor);
};
this.darkenLess = function()
{
var hslColor = RGBToHSL(this);
hslColor.l*=0.85;
return HSLToRGB(hslColor);
};
this.lighten = function()
{
var hslColor = RGBToHSL(this);
hslColor.l*= 1.1;
if(hslColor.l > 1)
{
hslColor.l = 1;
}
return HSLToRGB(hslColor);
};
this.lightenLess = function()
{
var hslColor = RGBToHSL(this);
hslColor.l*= 1.1;
if(hslColor.l > 1)
{
hslColor.l = 1;
}
return HSLToRGB(hslColor);
};
this.norm = function(a){
return this;
};
}
function RGBToHSL(RGBColor)//{r : 0..255, g : 0..255, b: 0..255}
{
var r, g, b;
r = RGBColor.r/255;
g = RGBColor.g/255;
b = RGBColor.b/255;
var max, min;
max = Math.max(r, g, b);
min = Math.min(r, g, b);
var h, s, l;
h = max === min ? 0
: (max == r && g>=b) ? 60*(g-b)/(max-min)
: (max == r && g < b) ? 60*(g-b)/(max-min)+360
: (max == g) ? 60*(b-r)/(max - min)+120
: 60*(r-g)/(max-min)+240;
l = (max + min)*0.5;
s = l > 0.5 ? (max -min) / (2 - max - min) : (max -min) / (max + min);
while(h<0)
{
h+=360;
}
while(h>=360)
{
h-=360;
}
return {h : h, s : s, l : l}; //{h : 0..360, s : 0..1, l : 0..1}
}
function HSLToRGB(HSLColor) { //{h : 0..360, s : 0..1, l : 0..1}
var h, s, l, r, g, b;
h = HSLColor.h/360;
s = HSLColor.s;
l = HSLColor.l;
var q, p, tr, tg, tb;
q = l < 0.5 ? (l*(1+s)): l+s-l*s;
p = 2*l - q;
tr = h+1/3;
tg = h;
tb = h-1/3;
if(tr < 0) {
tr+=1;
}
if(tr > 1) {
tr-=1;
}
if(tg < 0) {
tg+=1;
}
if(tg > 1) {
tg-=1;
}
if(tb < 0) {
tb+=1;
}
if(tb > 1) {
tb-=1;
}
r = Math.round(255*(tr < 1/6 ? p + ((q-p)*6*tr) : (1/6 < tr && tr <1/2) ? q : (1/2 < tr && tr < 2/3) ? (p+((q-p)*(2/3-tr)*6)) : p));
g = Math.round(255*(tg < 1/6 ? p + ((q-p)*6*tg) : (1/6 < tg && tg <1/2) ? q : (1/2 < tg && tg < 2/3) ? (p+((q-p)*(2/3-tg)*6)) : p));
b = Math.round(255*(tb < 1/6 ? p + ((q-p)*6*tb) : (1/6 < tb && tb <1/2) ? q : (1/2 < tb && tb < 2/3) ? (p+((q-p)*(2/3-tb)*6)) : p));
if(r>255) r=255;
if(g>255) g=255;
if(b>255) b=255;
return {r : r, g : g, b : b};//{r : 0..255, g : 0..255, b : 0..255}
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
function CDLbls()
{
this.delete = null;
this.dLbl = null;
this.dLblPos = null;
this.leaderLines = null;
this.numFmt = null;
this.separator = null;
this.showBubbleSize = null;
this.showCatName = null;
this.showLeaderLines = null;
this.showLegendKey = null;
this.showPercent = null;
this.showSerName = null;
this.showVal = null;
this.spPr = null;
this.txPr = null;
this.Id = g_oIdCounter.Get_NewId();
g_oTableId.Add(this, this.Id);
}
CDLbls.prototype =
{
Get_Id: function()
{
return this.Id;
},
getObjectType: function()
{
return historyitem_type_DLbls;
},
Write_ToBinary2: function(w)
{
w.WriteLong(this.getObjectType());
w.WriteString2(this.Get_Id());
},
Read_FromBinary: function(r)
{
this.Id = r.GetString2();
},
setDelete: function(pr)
{
History.Add(this, {Type: historyitem_DLbls_SetDelete, oldPr: this.delete, newPr: pr});
this.delete = pr;
},
setDLbl: function(pr)
{
History.Add(this, {Type: historyitem_DLbls_SetDLbl, oldPr: this.dLbl, newPr: pr});
this.dLbl = pr;
},
setDLblPos: function(pr)
{
History.Add(this, {Type: historyitem_DLbls_SetDLblPos, oldPr: this.dLblPos, newPr: pr});
this.dLblPos = pr;
},
setLeaderLines: function(pr)
{
History.Add(this, {Type: historyitem_DLbls_SetLeaderLines, oldPr: this.leaderLines, newPr: pr});
this.leaderLines = pr;
},
setNumFmt: function(pr)
{
History.Add(this, {Type: historyitem_DLbls_SetNumFmt, oldPr: this.numFmt, newPr: pr});
this.numFmt = pr;
},
setSeparator: function(pr)
{
History.Add(this, {Type: historyitem_DLbls_SetSeparator, oldPr: this.separator, newPr: pr});
this.separator = pr;
},
setShowBubbleSize: function(pr)
{
History.Add(this, {Type: historyitem_DLbls_SetShowBubbleSize, oldPr: this.showBubbleSize, newPr: pr});
this.showBubbleSize = pr;
},
setShowCatName: function(pr)
{
History.Add(this, {Type: historyitem_DLbls_SetShowCatName, oldPr: this.showCatName, newPr: pr});
this.showCatName = pr;
},
setShowLeaderLines: function(pr)
{
History.Add(this, {Type: historyitem_DLbls_SetShowLeaderLines, oldPr: this.showLeaderLines, newPr: pr});
this.showLeaderLines = pr;
},
setShowLegendKey: function(pr)
{
History.Add(this, {Type: historyitem_DLbls_SetShowLegendKey, oldPr: this.showLegendKey, newPr: pr});
this.showLegendKey = pr;
},
setShowPercent: function(pr)
{
History.Add(this, {Type: historyitem_DLbls_SetShowPercent, oldPr: this.showPercent, newPr: pr});
this.showPercent = pr;
},
setShowSerName: function(pr)
{
History.Add(this, {Type: historyitem_DLbls_SetShowSerName, oldPr: this.showSerName, newPr: pr});
this.showSerName = pr;
},
setShowVal: function(pr)
{
History.Add(this, {Type: historyitem_DLbls_SetShowVal, oldPr: this.showVal, newPr: pr});
this.showVal = pr;
},
setSpPr: function(pr)
{
History.Add(this, {Type: historyitem_DLbls_SetSpPr, oldPr: this.spPr, newPr: pr});
this.spPr = pr;
},
setTxPr: function(pr)
{
History.Add(this, {Type: historyitem_DLbls_SetTxPr, oldPr: this.txPr, newPr: pr});
this.txPr = pr;
},
Undo: function(data)
{},
Redo: function(data)
{},
Save_Changes: function(data, w)
{},
Load_Changes: function(r)
{}
};
\ No newline at end of file
function CDPt()
{
this.bubble3D = null;
this.explosion = null;
this.idx = null;
this.invertIfNegative = null;
this.marker = null;
this.pictureOptions = null;
this.spPr = null;
this.Id = g_oIdCounter.Get_NewId();
g_oTableId.Add(this, this.Id);
}
CDPt.prototype =
{
Get_Id: function()
{
return this.Id;
},
getObjectType: function()
{
return historyitem_type_DPt;
},
Write_ToBinary2: function(w)
{
w.WriteLong(this.getObjectType());
w.WriteString2(this.Get_Id());
},
Read_FromBinary2: function(r)
{
this.Id = r.GetString2();
},
setBubble3D: function(pr)
{
History.Add(this, {Type: historyitem_DPt_SetBubble3D, oldPr: this.bubble3D, newPr: pr});
this.bubble3D = pr;
},
setExplosion: function(pr)
{
History.Add(this, {Type: historyitem_DPt_SetExplosion, oldPr: this.explosion, newPr: pr});
this.explosion = pr;
},
setIdx: function(pr)
{
History.Add(this, {Type: historyitem_DPt_SetIdx, oldPr: this.idx, newPr: pr});
this.idx = pr;
},
setInvertIfNegative: function(pr)
{
History.Add(this, {Type: historyitem_DPt_SetInvertIfNegative, oldPr: this.invertIfNegative, newPr: pr});
this.invertIfNegative = pr;
},
setMarker: function(pr)
{
History.Add(this, {Type: historyitem_DPt_SetMarker, oldPr: this.marker, newPr: pr});
this.marker = pr;
},
setPictureOptions: function(pr)
{
History.Add(this, {Type: historyitem_DPt_SetPictureOptions, oldPr: this.pictureOptions, newPr: pr});
this.pictureOptions = pr;
},
setSpPr: function(pr)
{
History.Add(this, {Type: historyitem_DPt_SetSpPr, oldPr: this.spPr, newPr: pr});
this.spPr = pr;
},
Undo: function(data)
{
switch (data.Type)
{
case historyitem_DPt_SetBubble3D:
{
this.bubble3D = data.oldPr;
break;
}
case historyitem_DPt_SetExplosion:
{
this.explosion = data.oldPr;
break;
}
case historyitem_DPt_SetIdx:
{
this.idx = data.oldPr;
break;
}
case historyitem_DPt_SetInvertIfNegative:
{
this.invertIfNegative = data.oldPr;
break;
}
case historyitem_DPt_SetMarker:
{
this.marker = data.oldPr;
break;
}
case historyitem_DPt_SetPictureOptions:
{
this.pictureOptions = data.oldPr;
break;
}
case historyitem_DPt_SetSpPr:
{
this.spPr = data.oldPr;
break;
}
}
},
Redo: function(data)
{
switch (data.Type)
{
case historyitem_DPt_SetBubble3D:
{
this.bubble3D = data.newPr;
break;
}
case historyitem_DPt_SetExplosion:
{
this.explosion = data.newPr;
break;
}
case historyitem_DPt_SetIdx:
{
this.idx = data.newPr;
break;
}
case historyitem_DPt_SetInvertIfNegative:
{
this.invertIfNegative = data.newPr;
break;
}
case historyitem_DPt_SetMarker:
{
this.marker = data.newPr;
break;
}
case historyitem_DPt_SetPictureOptions:
{
this.pictureOptions = data.newPr;
break;
}
case historyitem_DPt_SetSpPr:
{
this.spPr = data.newPr;
break;
}
}
},
Save_Changes: function(data, w)
{
w.WriteLong(data.Type);
switch (data.Type)
{
case historyitem_DPt_SetBubble3D:
case historyitem_DPt_SetInvertIfNegative:
{
w.WriteBool(isRealBool(data.newPr));
if(isRealBool(data.newPr))
{
w.WriteBool(data.newPr);
}
break;
}
case historyitem_DPt_SetExplosion:
case historyitem_DPt_SetIdx:
{
w.WriteBool(isRealNumber(data.newPr));
if(isRealNumber(data.newPr))
{
w.WriteLong(data.newPr);
}
break;
}
case historyitem_DPt_SetMarker:
case historyitem_DPt_SetPictureOptions:
case historyitem_DPt_SetSpPr:
{
w.WriteBool(isRealObject(data.newPr));
if(isRealObject(data.newPr))
{
w.WriteString2(data.newPr.Get_Id());
}
break;
}
}
},
Load_Changes: function(r)
{
var type = r.GetLong();
switch (type)
{
case historyitem_DPt_SetBubble3D:
{
if(r.GetBool())
{
this.bubble3D = r.GetBool();
}
else
{
this.bubble3D = null;
}
break;
}
case historyitem_DPt_SetExplosion:
{
if(r.GetBool())
{
this.explosion = r.GetLong();
}
else
{
this.explosion = null;
}
break;
}
case historyitem_DPt_SetIdx:
{
if(r.GetBool())
{
this.idx = r.GetLong();
}
else
{
this.idx = null;
}
break;
}
case historyitem_DPt_SetInvertIfNegative:
{
if(r.GetBool())
{
this.invertIfNegative = r.GetBool();
}
else
{
this.invertIfNegative = null;
}
break;
}
case historyitem_DPt_SetMarker:
{
if(r.GetBool())
{
this.marker = g_oTableId.Get_ById(r.GetString2());
}
else
{
this.marker = null;
}
break;
}
case historyitem_DPt_SetPictureOptions:
{
if(r.GetBool())
{
this.pictureOptions = g_oTableId.Get_ById(r.GetString2());
}
else
{
this.pictureOptions = null;
}
break;
}
case historyitem_DPt_SetSpPr:
{
if(r.GetBool())
{
this.spPr = g_oTableId.Get_ById(r.GetString2());
}
else
{
this.spPr = null;
}
break;
}
}
}
};
\ No newline at end of file
function CDTable()
{
this.showHorzBorder = null;
this.showKeys = null;
this.showOutline = null;
this.showVertBorder = null;
this.spPr = null;
this.txPr = null;
this.Id = g_oIdCounter.Get_NewId();
g_oTableId.Add(this, this.Id);
}
CDTable.prototype =
{
Get_Id: function()
{
return this.Id;
},
getObjectType: function()
{
return historyitem_type_DTable;
},
Write_ToBinary2: function(w)
{
w.WriteLong(this.getObjectType());
w.WriteString2(this.Get_Id());
},
Read_FromBinary: function(r)
{
this.Id = r.GetString2();
},
setShowHorzBorder: function(pr)
{
History.Add(this, {Type: historyitem_DTable_SetShowHorzBorder, oldPr: this.showHorzBorder, newPr: pr});
this.showHorzBorder = pr;
},
setShowKeys: function(pr)
{
History.Add(this, {Type: historyitem_DTable_SetShowKeys, oldPr: this.showHorzBorder, newPr: pr});
this.showKeys = pr;
},
setShowOutline: function(pr)
{
History.Add(this, {Type: historyitem_DTable_SetShowOutline, oldPr: this.showHorzBorder, newPr: pr});
this.showOutline = pr;
},
setShowVertBorder: function(pr)
{
History.Add(this, {Type: historyitem_DTable_SetShowVertBorder, oldPr: this.showHorzBorder, newPr: pr});
this.showVertBorder = pr;
},
setSpPr: function(pr)
{
History.Add(this, {Type: historyitem_DTable_SetSpPr, oldPr: this.showHorzBorder, newPr: pr});
this.spPr = pr;
},
setTxPr: function(pr)
{
History.Add(this, {Type: historyitem_DTable_SetTxPr, oldPr: this.showHorzBorder, newPr: pr});
this.txPr = pr;
},
Undo: function(data)
{
switch (data.Type)
{
case historyitem_DTable_SetShowHorzBorder:
{
this.showHorzBorder = data.oldPr;
break;
}
case historyitem_DTable_SetShowKeys:
{
this.showKeys = data.oldPr;
break;
}
case historyitem_DTable_SetShowOutline:
{
this.showOutline = data.oldPr;
break;
}
case historyitem_DTable_SetShowVertBorder:
{
this.showVertBorder = data.oldPr;
break;
}
case historyitem_DTable_SetSpPr:
{
this.spPr = data.oldPr;
break;
}
case historyitem_DTable_SetTxPr:
{
this.txPr = data.oldPr;
break;
}
}
},
Redo: function(data)
{
switch (data.Type)
{
case historyitem_DTable_SetShowHorzBorder:
{
this.showHorzBorder = data.newPr;
break;
}
case historyitem_DTable_SetShowKeys:
{
this.showKeys = data.newPr;
break;
}
case historyitem_DTable_SetShowOutline:
{
this.showOutline = data.newPr;
break;
}
case historyitem_DTable_SetShowVertBorder:
{
this.showVertBorder = data.newPr;
break;
}
case historyitem_DTable_SetSpPr:
{
this.spPr = data.newPr;
break;
}
case historyitem_DTable_SetTxPr:
{
this.txPr = data.newPr;
break;
}
}
},
Save_Changes: function(data, w)
{
w.WriteLong(data.Type);
switch (data.Type)
{
case historyitem_DTable_SetShowHorzBorder:
case historyitem_DTable_SetShowKeys:
case historyitem_DTable_SetShowOutline:
case historyitem_DTable_SetShowVertBorder:
{
w.WriteBool(isRealBool(data.newPr));
if(isRealBool(data.newPr))
{
w.WriteBool(data.newPr);
}
break;
}
case historyitem_DTable_SetSpPr:
case historyitem_DTable_SetTxPr:
{
this.spPr = data.newPr;
w.WriteBool(isRealObject(data.newPr));
if(isRealObject(data.newPr))
{
w.WriteString2(data.newPr.Get_Id());
}
break;
}
}
},
Load_Changes: function(r)
{
var type = r.GetLong();
switch (type)
{
case historyitem_DTable_SetShowHorzBorder:
{
if(r.GetBool())
{
this.showHorzBorder = r.GetBool();
}
else
{
this.showHorzBorder = null;
}
break;
}
case historyitem_DTable_SetShowKeys:
{
if(r.GetBool())
{
this.showKeys = r.GetBool();
}
else
{
this.showKeys = null;
}
break;
}
case historyitem_DTable_SetShowOutline:
{
if(r.GetBool())
{
this.showOutline = r.GetBool();
}
else
{
this.showOutline = null;
}
break;
}
case historyitem_DTable_SetShowVertBorder:
{
if(r.GetBool())
{
this.showVertBorder = r.GetBool();
}
else
{
this.showVertBorder = null;
}
break;
}
case historyitem_DTable_SetSpPr:
{
if(r.GetBool())
{
this.spPr = g_oTableId.Get_ById(r.GetString2());
}
else
{
this.spPr = null;
}
break;
}
case historyitem_DTable_SetTxPr:
{
if(r.GetBool())
{
this.txPr = g_oTableId.Get_ById(r.GetString2());
}
else
{
this.txPr = null;
}
break;
}
}
}
};
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/**
* Created by JetBrains WebStorm.
* User: Sergey.Luzyanin
* Date: 2/24/12
* Time: 10:06 AM
* To change this template use File | Settings | File Templates.
*/
var cToRad = Math.PI/(60000*180);
var cToDeg = 1/cToRad;
function Cos(angle)
{
return Math.cos(cToRad*angle);
}
function Sin(angle)
{
return Math.sin(cToRad*angle);
}
function Tan(angle)
{
return Math.tan(cToRad*angle);
}
function ATan(x)
{
return cToDeg*Math.atan(x);
}
function ATan2(y, x)
{
return cToDeg*Math.atan2(y, x);
}
function CAt2(x, y, z)
{
return x*(Cos(ATan2(z, y)));
}
function SAt2(x, y, z)
{
return x*(Sin(ATan2(z, y)));
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -819,6 +819,24 @@ DrawingObjectsController.prototype =
}
break;
}
case "Bar":
{
switch (chart.subType)
{
case "normal":
{
return CreateBarChart(chart.series, BAR_GROUPING_CLUSTERED);
}
case "stacked":
{
return CreateBarChart(chart.series, BAR_GROUPING_STACKED);
}
case "stackedPer":
{
return CreateBarChart(chart.series, BAR_GROUPING_PERCENT_STACKED);
}
}
}
}
var chart_as_group = new CChartAsGroup(null, this.drawingObjects);
chart_as_group.initFromChartObject(chart, options);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
CGroupShape.prototype.addToRecalculate = function()
{
if(this.drawingObjects && this.drawingObjects.controller)
{
this.drawingObjects.controller.objectsForRecalculate[this.Id] = this;
}
};
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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