Commit 687656d7 authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander.Trofimov

(важно!) переделка записи/чтения на новые шейпы. Презентации тоже

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@55984 954022d7-b5bf-4e40-9824-e11837661b57
parent c358ec44
...@@ -4845,22 +4845,21 @@ function BinaryPPTYLoader() ...@@ -4845,22 +4845,21 @@ function BinaryPPTYLoader()
_stream.cur = s.cur; _stream.cur = s.cur;
_stream.size = s.size; _stream.size = s.size;
// _chart = new CChartSpace(); _chart = new CChartSpace();
// var oBinaryChartReader = new BinaryChartReader(this.stream); var oBinaryChartReader = new BinaryChartReader(this.stream);
// oBinaryChartReader.ExternalReadCT_ChartSpace(length, _chart); oBinaryChartReader.ExternalReadCT_ChartSpace(length, _chart);
// if (_xfrm) if (_xfrm)
// { {
// if (_chart.setXfrm) if (_chart.setXfrm)
// { {
// _chart.setXfrm(_xfrm.offX, _xfrm.offY, _xfrm.extX, _xfrm.extY, _xfrm.rot, _xfrm.flipH, _xfrm.flipV); _chart.setXfrm(_xfrm.offX, _xfrm.offY, _xfrm.extX, _xfrm.extY, _xfrm.rot, _xfrm.flipH, _xfrm.flipV);
// } }
// else else
// { {
// _chart.setPosition(_xfrm.offX, _xfrm.offY); _chart.setPosition(_xfrm.offX, _xfrm.offY);
// _chart.setExtents(_xfrm.extX, _xfrm.extY); _chart.setExtents(_xfrm.extX, _xfrm.extY);
// } }
// } }
s.Seek2(_pos + _length); s.Seek2(_pos + _length);
break; break;
...@@ -4946,16 +4945,16 @@ function BinaryPPTYLoader() ...@@ -4946,16 +4945,16 @@ function BinaryPPTYLoader()
var _length = s.GetLong(); var _length = s.GetLong();
var _pos = s.cur; var _pos = s.cur;
if(typeof CChartAsGroup !== "undefined") if(typeof CChartSpace !== "undefined")
{ {
var _stream = new FT_Stream2(); var _stream = new FT_Stream2();
_stream.data = s.data; _stream.data = s.data;
_stream.pos = s.pos; _stream.pos = s.pos;
_stream.cur = s.cur; _stream.cur = s.cur;
_stream.size = s.size; _stream.size = s.size;
// _chart = new CChartSpace(); _chart = new CChartSpace();
// var oBinaryChartReader = new BinaryChartReader(this.stream); var oBinaryChartReader = new BinaryChartReader(this.stream);
// oBinaryChartReader.ExternalReadCT_ChartSpace(length, _chart); oBinaryChartReader.ExternalReadCT_ChartSpace(length, _chart);
} }
s.Seek2(_pos + _length); s.Seek2(_pos + _length);
......
...@@ -1380,25 +1380,35 @@ function CBinaryFileWriter() ...@@ -1380,25 +1380,35 @@ function CBinaryFileWriter()
{ {
oThis.StartRecord(0); oThis.StartRecord(0);
if (spTree[i] instanceof CShape) switch(spTree[i].getObjectType())
{
case historyitem_type_Shape:
{ {
oThis.WriteShape(spTree[i]); oThis.WriteShape(spTree[i]);
break;
} }
else if(spTree[i] instanceof CImageShape) case historyitem_type_ImageShape:
{ {
oThis.WriteImage(spTree[i]); oThis.WriteImage(spTree[i]);
break;
} }
else if (spTree[i] instanceof CGroupShape) case historyitem_type_GroupShape:
{ {
oThis.WriteGroupShape(spTree[i]); oThis.WriteGroupShape(spTree[i]);
break;
} }
else if (spTree[i] instanceof CGraphicFrame && spTree[i].graphicObject instanceof CTable) case historyitem_type_ChartSpace:
{ {
oThis.WriteTable(spTree[i]); oThis.WriteChart(spTree[i]);
break;
} }
else if (typeof CChartAsGroup != "undefined" && spTree[i] instanceof CChartAsGroup) default:
{ {
oThis.WriteChart(spTree[i]); if (spTree[i] instanceof CGraphicFrame && spTree[i].graphicObject instanceof CTable)
{
oThis.WriteTable(spTree[i]);
}
}
} }
oThis.EndRecord(); oThis.EndRecord();
...@@ -2608,7 +2618,7 @@ function CBinaryFileWriter() ...@@ -2608,7 +2618,7 @@ function CBinaryFileWriter()
oThis.UseContinueWriter = true; oThis.UseContinueWriter = true;
var oBinaryChartWriter = new BinaryChartWriter(_memory); var oBinaryChartWriter = new BinaryChartWriter(_memory);
oBinaryChartWriter.WriteChartContent(grObj); oBinaryChartWriter.WriteCT_ChartSpace(grObj);
oThis.ImData = _memory.ImData; oThis.ImData = _memory.ImData;
oThis.data = _memory.data; oThis.data = _memory.data;
...@@ -2905,25 +2915,35 @@ function CBinaryFileWriter() ...@@ -2905,25 +2915,35 @@ function CBinaryFileWriter()
{ {
oThis.StartRecord(0); oThis.StartRecord(0);
if (spTree[i] instanceof CShape) switch(spTree[i].getObjectType())
{
case historyitem_type_Shape:
{ {
oThis.WriteShape(spTree[i]); oThis.WriteShape(spTree[i]);
break;
} }
else if(spTree[i] instanceof CImageShape) case historyitem_type_ImageShape:
{ {
oThis.WriteImage(spTree[i]); oThis.WriteImage(spTree[i]);
break;
} }
else if (spTree[i] instanceof CGroupShape) case historyitem_type_GroupShape:
{ {
oThis.WriteGroupShape(spTree[i]); oThis.WriteGroupShape(spTree[i]);
break;
} }
else if (spTree[i] instanceof CGraphicFrame && spTree[i].graphicObject instanceof CTable) case historyitem_type_ChartSpace:
{ {
oThis.WriteTable(spTree[i]); oThis.WriteChart(spTree[i]);
break;
} }
else if (typeof CChartAsGroup != "undefined" && spTree[i] instanceof CChartAsGroup) default:
{ {
oThis.WriteChart(spTree[i]); if (spTree[i] instanceof CGraphicFrame && spTree[i].graphicObject instanceof CTable)
{
oThis.WriteTable(spTree[i]);
}
}
} }
oThis.EndRecord(0); oThis.EndRecord(0);
......
...@@ -1067,25 +1067,35 @@ function CPPTXContentWriter() ...@@ -1067,25 +1067,35 @@ function CPPTXContentWriter()
_writer.StartRecord(0); _writer.StartRecord(0);
var elem = spTree[i]; var elem = spTree[i];
if ("undefined" !== typeof(WordShape) && elem instanceof WordShape) switch(grObject.getObjectType())
{
case historyitem_type_Shape:
{
if(grObject.bWordShape)
{ {
this.WriteShape(elem, Document, oMapCommentId, oNumIdMap, copyParams); this.WriteShape(elem, Document, oMapCommentId, oNumIdMap, copyParams);
} }
else if ("undefined" !== typeof(CShape) && elem instanceof CShape) else
{ {
this.WriteShape2(elem, Document, oMapCommentId, oNumIdMap, copyParams); this.WriteShape2(elem, Document, oMapCommentId, oNumIdMap, copyParams);
} }
else if (("undefined" !== typeof(WordImage) && elem instanceof WordImage) || ("undefined" !== typeof(CImageShape) && elem instanceof CImageShape)) break;
}
case historyitem_type_ImageShape:
{ {
this.WriteImage(elem); this.WriteImage(elem);
break;
} }
else if (("undefined" !== typeof(WordGroupShapes) && elem instanceof WordGroupShapes) || ("undefined" !== typeof(CGroupShape) && elem instanceof CGroupShape)) case historyitem_type_GroupShape:
{ {
this.WriteGroup(elem, Document, oMapCommentId, oNumIdMap, copyParams); this.WriteGroup(elem, Document, oMapCommentId, oNumIdMap, copyParams);
break;
} }
else if ("undefined" !== typeof(CChartAsGroup) && elem instanceof CChartAsGroup) case historyitem_type_ChartSpace:
{ {
this.BinaryFileWriter.WriteChart(elem); this.BinaryFileWriter.WriteChart(elem);
break;
}
} }
_writer.EndRecord(0); _writer.EndRecord(0);
......
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