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

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@49609 954022d7-b5bf-4e40-9824-e11837661b57
parent 3cd46fc7
......@@ -2,7 +2,9 @@
var chartCanvas = null;
var g_bChartPreview = false;
function ChartRender() {
function ChartRender(options) {
this.options = options;
this.insertChart = function(chart, activeWorkSheet, width, height, isNewChart, bChartPreview) {
......@@ -31,8 +33,7 @@ function ChartRender() {
// chartBase64 = chartCanvas.toDataURL();
//return chartBase64;
insertChart(chart, activeWorkSheet, width, height, isNewChart);
insertChart(chart, activeWorkSheet, width, height, isNewChart, this.options);
var ret = chartCanvas;
chartCanvas = null;
return ret;
......@@ -153,14 +154,14 @@ function ChartPreviewManager() {
previewGroups[c_oAscChartType.stock] = [];
previewGroups[c_oAscChartType.stock][c_oAscChartSubType.normal] = [];
_this.init = function() {
_this.init = function(options) {
var startTime = new Date();
var api_doc = window["editor"];
var api_sheet = window["Asc"]["editor"];
var styleManager = api_doc ? api_doc.chartStyleManager : api_sheet.chartStyleManager;
var chartRender = new ChartRender();
var chartRender = new ChartRender(options);
var preview_w = 50, preview_h = 50;
......@@ -980,7 +981,7 @@ function formulaToRange(formula, worksheet) {
return range;
}
function insertChart(chart, activeWorkSheet, width, height, isNewChart) {
function insertChart(chart, activeWorkSheet, width, height, isNewChart, options) {
var isSeries = false;
var formatCell = 'General';
var formatCellScOy = 'General';
......
......@@ -4247,7 +4247,7 @@ function BinaryPPTYLoader()
var _length = s.GetLong();
var _pos = s.cur;
_chart = new CChartAsGroup();
_chart = new CChartAsGroup(this.TempMainObject);
var _stream = new FT_Stream2();
_stream.data = s.data;
_stream.pos = s.pos;
......
......@@ -936,11 +936,11 @@ function CBinaryFileWriter()
{
oThis.WriteShape(spTree[i]);
}
else if(spTree[i] instanceof CImage2)
else if(spTree[i] instanceof CImageShape)
{
oThis.WriteImage(spTree[i]);
}
else if (spTree[i] instanceof GroupShape)
else if (spTree[i] instanceof CGroupShape)
{
oThis.WriteGroupShape(spTree[i]);
}
......@@ -1995,7 +1995,7 @@ function CBinaryFileWriter()
oThis._WriteBool2(0, shape.attrUseBgFill);
oThis.WriteUChar(g_nodeAttributeEnd);
shape.spPr.WriteXfrm = shape.getXfrm();
shape.spPr.WriteXfrm = shape.spPr.xfrm;
var tmpGeom = shape.spPr.Geometry;
shape.spPr.Geometry = shape.geometry;
......@@ -2037,7 +2037,7 @@ function CBinaryFileWriter()
oThis.WriteRecord1(0, image.nvPicPr, this.WriteUniNvPr);
image.spPr.WriteXfrm = image.getXfrm();
image.spPr.WriteXfrm = image.spPr.xfrm;
if (image.spPr.Geometry === undefined || image.spPr.Geometry == null)
{
......@@ -2062,7 +2062,7 @@ function CBinaryFileWriter()
oThis.WriteUChar(g_nodeAttributeEnd);
oThis.WriteRecord1(0, grObj.nvGraphicFramePr, oThis.WriteUniNvPr);
oThis.WriteRecord2(1, grObj.getXfrm(), oThis.WriteXfrm);
oThis.WriteRecord2(1, grObj.spPr.xfrm, oThis.WriteXfrm);
oThis.WriteRecord2(2, grObj.graphicObject, oThis.WriteTable2);
oThis.EndRecord();
......@@ -2075,7 +2075,7 @@ function CBinaryFileWriter()
oThis.WriteUChar(g_nodeAttributeStart);
oThis.WriteUChar(g_nodeAttributeEnd);
oThis.WriteRecord2(1, grObj.getXfrm(), oThis.WriteXfrm);
oThis.WriteRecord2(1, grObj.spPr.xfrm, oThis.WriteXfrm);
oThis.WriteRecord2(3, grObj, oThis.WriteChart2);
oThis.EndRecord();
......@@ -2366,14 +2366,14 @@ function CBinaryFileWriter()
{
oThis.StartRecord(4);
group.grpSpPr.WriteXfrm = group.getXfrm();
group.spPr.WriteXfrm = group.spPr.xfrm;
oThis.WriteRecord1(0, group.nvGrpSpPr, oThis.WriteUniNvPr);
oThis.WriteRecord1(1, group.grpSpPr, oThis.WriteGrpSpPr);
oThis.WriteRecord1(1, group.spPr, oThis.WriteGrpSpPr);
group.grpSpPr.WriteXfrm = null;
group.spPr.WriteXfrm = null;
var spTree = group.ArrGlyph;
var spTree = group.spTree;
var _len = spTree.length;
if (0 != _len)
{
......
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