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 = ...@@ -749,7 +749,8 @@ var c_oSer_DrawingType =
PicSrc:5, PicSrc:5,
GraphicFrame: 6, GraphicFrame: 6,
Chart: 7, Chart: 7,
Ext: 8 Ext: 8,
pptxDrawing: 9
}; };
/** @enum */ /** @enum */
var c_oSer_ChartType = var c_oSer_ChartType =
...@@ -760,7 +761,8 @@ var c_oSer_ChartType = ...@@ -760,7 +761,8 @@ var c_oSer_ChartType =
Style: 3, Style: 3,
TitlePptx: 4, TitlePptx: 4,
TitleTxPrPptx: 5, TitleTxPrPptx: 5,
ShowBorder: 6 ShowBorder: 6,
SpPr: 7
}; };
/** @enum */ /** @enum */
var c_oSer_ChartLegendType = var c_oSer_ChartLegendType =
...@@ -833,7 +835,8 @@ var c_oSer_ChartSeriesType = ...@@ -833,7 +835,8 @@ var c_oSer_ChartSeriesType =
TxRef: 5, TxRef: 5,
Index: 6, Index: 6,
Order: 7, Order: 7,
DataLabels: 8 DataLabels: 8,
SpPr: 9
}; };
/** @enum */ /** @enum */
var c_oSer_ChartSeriesMarkerType = var c_oSer_ChartSeriesMarkerType =
......
...@@ -3806,6 +3806,7 @@ function BinaryPPTYLoader() ...@@ -3806,6 +3806,7 @@ function BinaryPPTYLoader()
this.ReadGraphicObject = function() this.ReadGraphicObject = function()
{ {
var s = this.stream;
var _type = s.GetUChar(); var _type = s.GetUChar();
var _object = null; var _object = null;
......
...@@ -4955,6 +4955,7 @@ function Binary_WorksheetTableReader(stream, wb, aSharedStrings, aCellXfs, Dxfs, ...@@ -4955,6 +4955,7 @@ function Binary_WorksheetTableReader(stream, wb, aSharedStrings, aCellXfs, Dxfs,
this.bcr = new Binary_CommonReader(this.stream); this.bcr = new Binary_CommonReader(this.stream);
this.aMerged = new Array(); this.aMerged = new Array();
this.aHyperlinks = new Array(); this.aHyperlinks = new Array();
this.oPPTXContentLoader = new CPPTXContentLoader();
this.Read = function() this.Read = function()
{ {
var oThis = this; var oThis = this;
...@@ -5587,6 +5588,15 @@ function Binary_WorksheetTableReader(stream, wb, aSharedStrings, aCellXfs, Dxfs, ...@@ -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); var oBinary_ChartReader = new Binary_ChartReader(this.stream, oDrawing.graphicObject.chart, oDrawing.graphicObject);
res = oBinary_ChartReader.Read(length); 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 else
res = c_oSerConstants.ReadUnknown; res = c_oSerConstants.ReadUnknown;
return res; return res;
...@@ -5968,6 +5978,8 @@ function Binary_WorksheetTableReader(stream, wb, aSharedStrings, aCellXfs, Dxfs, ...@@ -5968,6 +5978,8 @@ function Binary_WorksheetTableReader(stream, wb, aSharedStrings, aCellXfs, Dxfs,
}); });
aSheetViews.push(oSheetView); aSheetViews.push(oSheetView);
} }
else
res = c_oSerConstants.ReadUnknown;
return res; return res;
}; };
this.ReadSheetView = function (type, length, oSheetView) { this.ReadSheetView = function (type, length, oSheetView) {
......
...@@ -87,7 +87,45 @@ function CPPTXContentLoader() ...@@ -87,7 +87,45 @@ function CPPTXContentLoader()
return GrObject; 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.ReadTextBody = function(reader, stream, shape)
{ {
this.BaseReader = reader; 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