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,23 +4845,22 @@ function BinaryPPTYLoader() ...@@ -4845,23 +4845,22 @@ 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);
......
...@@ -1379,26 +1379,36 @@ function CBinaryFileWriter() ...@@ -1379,26 +1379,36 @@ function CBinaryFileWriter()
for (var i = 0; i < _len; i++) for (var i = 0; i < _len; i++)
{ {
oThis.StartRecord(0); oThis.StartRecord(0);
if (spTree[i] instanceof CShape) switch(spTree[i].getObjectType())
{
oThis.WriteShape(spTree[i]);
}
else if(spTree[i] instanceof CImageShape)
{
oThis.WriteImage(spTree[i]);
}
else if (spTree[i] instanceof CGroupShape)
{
oThis.WriteGroupShape(spTree[i]);
}
else if (spTree[i] instanceof CGraphicFrame && spTree[i].graphicObject instanceof CTable)
{
oThis.WriteTable(spTree[i]);
}
else if (typeof CChartAsGroup != "undefined" && spTree[i] instanceof CChartAsGroup)
{ {
oThis.WriteChart(spTree[i]); case historyitem_type_Shape:
{
oThis.WriteShape(spTree[i]);
break;
}
case historyitem_type_ImageShape:
{
oThis.WriteImage(spTree[i]);
break;
}
case historyitem_type_GroupShape:
{
oThis.WriteGroupShape(spTree[i]);
break;
}
case historyitem_type_ChartSpace:
{
oThis.WriteChart(spTree[i]);
break;
}
default:
{
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,27 +2915,37 @@ function CBinaryFileWriter() ...@@ -2905,27 +2915,37 @@ function CBinaryFileWriter()
{ {
oThis.StartRecord(0); oThis.StartRecord(0);
if (spTree[i] instanceof CShape) switch(spTree[i].getObjectType())
{ {
oThis.WriteShape(spTree[i]); case historyitem_type_Shape:
} {
else if(spTree[i] instanceof CImageShape) oThis.WriteShape(spTree[i]);
{ break;
oThis.WriteImage(spTree[i]); }
} case historyitem_type_ImageShape:
else if (spTree[i] instanceof CGroupShape) {
{ oThis.WriteImage(spTree[i]);
oThis.WriteGroupShape(spTree[i]); break;
} }
else if (spTree[i] instanceof CGraphicFrame && spTree[i].graphicObject instanceof CTable) case historyitem_type_GroupShape:
{ {
oThis.WriteTable(spTree[i]); oThis.WriteGroupShape(spTree[i]);
} break;
else if (typeof CChartAsGroup != "undefined" && spTree[i] instanceof CChartAsGroup) }
{ case historyitem_type_ChartSpace:
oThis.WriteChart(spTree[i]); {
oThis.WriteChart(spTree[i]);
break;
}
default:
{
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())
{ {
this.WriteShape(elem, Document, oMapCommentId, oNumIdMap, copyParams); case historyitem_type_Shape:
} {
else if ("undefined" !== typeof(CShape) && elem instanceof CShape) if(grObject.bWordShape)
{ {
this.WriteShape2(elem, Document, oMapCommentId, oNumIdMap, copyParams); this.WriteShape(elem, Document, oMapCommentId, oNumIdMap, copyParams);
} }
else if (("undefined" !== typeof(WordImage) && elem instanceof WordImage) || ("undefined" !== typeof(CImageShape) && elem instanceof CImageShape)) else
{ {
this.WriteImage(elem); this.WriteShape2(elem, Document, oMapCommentId, oNumIdMap, copyParams);
} }
else if (("undefined" !== typeof(WordGroupShapes) && elem instanceof WordGroupShapes) || ("undefined" !== typeof(CGroupShape) && elem instanceof CGroupShape)) break;
{ }
this.WriteGroup(elem, Document, oMapCommentId, oNumIdMap, copyParams); case historyitem_type_ImageShape:
} {
else if ("undefined" !== typeof(CChartAsGroup) && elem instanceof CChartAsGroup) this.WriteImage(elem);
{ break;
this.BinaryFileWriter.WriteChart(elem); }
case historyitem_type_GroupShape:
{
this.WriteGroup(elem, Document, oMapCommentId, oNumIdMap, copyParams);
break;
}
case historyitem_type_ChartSpace:
{
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