Commit 9e767131 authored by Sergey.Konovalov's avatar Sergey.Konovalov

для открытия автофигур в spreadsheet

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@48882 954022d7-b5bf-4e40-9824-e11837661b57
parent 488b8159
......@@ -749,7 +749,8 @@ var c_oSer_DrawingType =
PicSrc:5,
GraphicFrame: 6,
Chart: 7,
Ext: 8
Ext: 8,
pptxDrawing: 9
};
/** @enum */
var c_oSer_ChartType =
......@@ -760,7 +761,8 @@ var c_oSer_ChartType =
Style: 3,
TitlePptx: 4,
TitleTxPrPptx: 5,
ShowBorder: 6
ShowBorder: 6,
SpPr: 7
};
/** @enum */
var c_oSer_ChartLegendType =
......@@ -833,7 +835,8 @@ var c_oSer_ChartSeriesType =
TxRef: 5,
Index: 6,
Order: 7,
DataLabels: 8
DataLabels: 8,
SpPr: 9
};
/** @enum */
var c_oSer_ChartSeriesMarkerType =
......
......@@ -3806,6 +3806,7 @@ function BinaryPPTYLoader()
this.ReadGraphicObject = function()
{
var s = this.stream;
var _type = s.GetUChar();
var _object = null;
......
......@@ -4955,6 +4955,7 @@ function Binary_WorksheetTableReader(stream, wb, aSharedStrings, aCellXfs, Dxfs,
this.bcr = new Binary_CommonReader(this.stream);
this.aMerged = new Array();
this.aHyperlinks = new Array();
this.oPPTXContentLoader = new CPPTXContentLoader();
this.Read = function()
{
var oThis = this;
......@@ -5587,6 +5588,15 @@ function Binary_WorksheetTableReader(stream, wb, aSharedStrings, aCellXfs, Dxfs,
var oBinary_ChartReader = new Binary_ChartReader(this.stream, oDrawing.graphicObject.chart, oDrawing.graphicObject);
res = oBinary_ChartReader.Read(length);
}
else if ( c_oSer_DrawingType.pptxDrawing == type )
{
var oGraphicObject = this.oPPTXContentLoader.ReadGraphicObject(this.stream);
if(null != oGraphicObject)
{
oDrawing.graphicObject = oGraphicObject;
oGraphicObject.setDrawingBase(oDrawing);
}
}
else
res = c_oSerConstants.ReadUnknown;
return res;
......@@ -5968,6 +5978,8 @@ function Binary_WorksheetTableReader(stream, wb, aSharedStrings, aCellXfs, Dxfs,
});
aSheetViews.push(oSheetView);
}
else
res = c_oSerConstants.ReadUnknown;
return res;
};
this.ReadSheetView = function (type, length, oSheetView) {
......
......@@ -87,7 +87,45 @@ function CPPTXContentLoader()
return GrObject;
}
this.ReadGraphicObject = function(stream)
{
if (this.Reader == null)
this.Reader = new BinaryPPTYLoader();
this.LogicDocument = null;
this.Reader.ImageMapChecker = this.ImageMapChecker;
if (null == this.stream)
{
this.stream = new FileStream();
this.stream.obj = stream.obj;
this.stream.data = stream.data;
this.stream.size = stream.size;
}
this.stream.pos = stream.pos;
this.stream.cur = stream.cur;
this.Reader.stream = this.stream;
var s = this.stream;
var _main_type = s.GetUChar(); // 0!!!
var _rec_start = s.cur;
var _end_rec = _rec_start + s.GetULong() + 4;
s.Skip2(5); // 1 + 4 byte - len
var GrObject = this.Reader.ReadGraphicObject();
s.Seek2(_end_rec);
stream.pos = s.pos;
stream.cur = s.cur;
return GrObject;
}
this.ReadTextBody = function(reader, stream, shape)
{
this.BaseReader = reader;
......
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