Commit 088d2958 authored by Igor.Zotov's avatar Igor.Zotov Committed by Alexander.Trofimov

для opensource версии(не поддерживаем диаграммы)

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@52876 954022d7-b5bf-4e40-9824-e11837661b57
parent a98ad428
......@@ -4907,23 +4907,26 @@ function BinaryPPTYLoader()
}
case 3:
{
var _length = s.GetLong();
var _length = s.GetLong();
var _pos = s.cur;
_chart = new CChartAsGroup(this.TempMainObject);
var _stream = new FT_Stream2();
_stream.data = s.data;
_stream.pos = s.pos;
_stream.cur = s.cur;
_stream.size = s.size;
var oBinary_ChartReader = new Binary_ChartReader(_stream, _chart.chart, _chart);
oBinary_ChartReader.ReadExternal(_length);
if(null == _chart.chart.range.interval || _chart.chart.range.interval.length <= 0)
{
_chart = null;
}
if(typeof CChartAsGroup !== "undefined")
{
_chart = new CChartAsGroup(this.TempMainObject);
var _stream = new FT_Stream2();
_stream.data = s.data;
_stream.pos = s.pos;
_stream.cur = s.cur;
_stream.size = s.size;
var oBinary_ChartReader = new Binary_ChartReader(_stream, _chart.chart, _chart);
oBinary_ChartReader.ReadExternal(_length);
if(null == _chart.chart.range.interval || _chart.chart.range.interval.length <= 0)
{
_chart = null;
}
}
s.Seek2(_pos + _length);
break;
}
......
......@@ -1827,7 +1827,7 @@ CGraphicObjects.prototype = {
for(var i = 0; i < sp_tree.length; ++i)
{
var sp = sp_tree[i];
if(sp instanceof CChartAsGroup)
if(typeof(CChartAsGroup) != "undefined" && sp instanceof CChartAsGroup)
{
sp.recalculate();
}
......@@ -1837,7 +1837,7 @@ CGraphicObjects.prototype = {
for(var j = 0; j < arr_g_o.length; ++j)
{
var cur_group_sp = arr_g_o[j];
if(cur_group_sp instanceof CChartAsGroup)
if(typeof(CChartAsGroup) != "undefined" && cur_group_sp instanceof CChartAsGroup)
{
cur_group_sp.recalculate();
}
......
......@@ -120,9 +120,18 @@ function asc_docs_api(name)
this.canSave = true; //Флаг нужен чтобы не происходило сохранение пока не завершится предыдущее сохранение
this.chartStyleManager = new ChartStyleManager();
this.chartPreviewManager = new ChartPreviewManager();
this.chartTranslate = new asc_CChartTranslate();
if(typeof ChartStyleManager !== "undefined")
this.chartStyleManager = new ChartStyleManager();
else
this.chartStyleManager = null;
if(typeof ChartPreviewManager !== "undefined")
this.chartPreviewManager = new ChartPreviewManager();
else
this.chartPreviewManager = null;
if(typeof asc_CChartTranslate !== "undefined")
this.chartTranslate = new asc_CChartTranslate();
else
this.chartTranslate = null;
// объекты, нужные для отправки в тулбар (шрифты, стили)
this._gui_fonts = null;
......@@ -640,7 +649,7 @@ asc_docs_api.prototype.sync_BeginCatchSelectedElements = function()
asc_docs_api.prototype.sync_EndCatchSelectedElements = function(options)
{
if ( !this.chartStyleManager.isReady() || !this.chartPreviewManager.isReady() )
if ( this.chartStyleManager && this.chartPreviewManager && ( !this.chartStyleManager.isReady() || !this.chartPreviewManager.isReady() ))
{
for ( var i = 0; i < this.SelectedObjectsStack.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