Commit 956e179d authored by Alexander.Trofimov's avatar Alexander.Trofimov

common/Drawings/Format/GraphicFrame to function-closure

parent 1cbefcc6
...@@ -48,6 +48,8 @@ ...@@ -48,6 +48,8 @@
var pptx_content_writer = AscCommon.pptx_content_writer; var pptx_content_writer = AscCommon.pptx_content_writer;
var g_dKoef_mm_to_pix = AscCommon.g_dKoef_mm_to_pix; var g_dKoef_mm_to_pix = AscCommon.g_dKoef_mm_to_pix;
var CGraphicFrame = AscFormat.CGraphicFrame;
var doc = window.document; var doc = window.document;
var isTruePaste = false; var isTruePaste = false;
......
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
*/ */
"use strict"; "use strict";
(function(window, undefined){
// Import // Import
var CShape = AscFormat.CShape; var CShape = AscFormat.CShape;
var HitInLine = AscFormat.HitInLine; var HitInLine = AscFormat.HitInLine;
...@@ -1262,3 +1264,8 @@ CGraphicFrame.prototype = ...@@ -1262,3 +1264,8 @@ CGraphicFrame.prototype =
this.Id = r.GetString2(); this.Id = r.GetString2();
} }
}; };
//--------------------------------------------------------export----------------------------------------------------
window['AscFormat'] = window['AscFormat'] || {};
window['AscFormat'].CGraphicFrame = CGraphicFrame;
})(window);
...@@ -4893,7 +4893,7 @@ function BinaryPPTYLoader() ...@@ -4893,7 +4893,7 @@ function BinaryPPTYLoader()
case 5: case 5:
{ {
var _ret = null; var _ret = null;
if ("undefined" != typeof(CGraphicFrame)) if ("undefined" != typeof(AscFormat.CGraphicFrame))
_ret = this.ReadGrFrame(); _ret = this.ReadGrFrame();
else else
_ret = this.ReadChartDataInGroup(shape); _ret = this.ReadChartDataInGroup(shape);
...@@ -5236,7 +5236,7 @@ function BinaryPPTYLoader() ...@@ -5236,7 +5236,7 @@ function BinaryPPTYLoader()
var _rec_start = s.cur; var _rec_start = s.cur;
var _end_rec = _rec_start + s.GetULong() + 4; var _end_rec = _rec_start + s.GetULong() + 4;
var _graphic_frame = new CGraphicFrame(); var _graphic_frame = new AscFormat.CGraphicFrame();
_graphic_frame.setParent2(this.TempMainObject); _graphic_frame.setParent2(this.TempMainObject);
this.TempGroupObject = _graphic_frame; this.TempGroupObject = _graphic_frame;
......
...@@ -1556,7 +1556,7 @@ function CBinaryFileWriter() ...@@ -1556,7 +1556,7 @@ function CBinaryFileWriter()
} }
default: default:
{ {
if (spTree[i] instanceof CGraphicFrame && spTree[i].graphicObject instanceof CTable) if (spTree[i] instanceof AscFormat.CGraphicFrame && spTree[i].graphicObject instanceof CTable)
{ {
oThis.WriteTable(spTree[i]); oThis.WriteTable(spTree[i]);
} }
...@@ -3282,7 +3282,7 @@ function CBinaryFileWriter() ...@@ -3282,7 +3282,7 @@ function CBinaryFileWriter()
} }
default: default:
{ {
if (spTree[i] instanceof CGraphicFrame && spTree[i].graphicObject instanceof CTable) if (spTree[i] instanceof AscFormat.CGraphicFrame && spTree[i].graphicObject instanceof CTable)
{ {
oThis.WriteTable(spTree[i]); oThis.WriteTable(spTree[i]);
} }
......
...@@ -2140,7 +2140,7 @@ CTableId.prototype.Read_Class_FromBinary = function(Reader) ...@@ -2140,7 +2140,7 @@ CTableId.prototype.Read_Class_FromBinary = function(Reader)
case AscDFH.historyitem_type_SlideComments : Element = new SlideComments(); break; case AscDFH.historyitem_type_SlideComments : Element = new SlideComments(); break;
case AscDFH.historyitem_type_PropLocker : Element = new PropLocker(); break; case AscDFH.historyitem_type_PropLocker : Element = new PropLocker(); break;
case AscDFH.historyitem_type_Theme : Element = new AscFormat.CTheme(); break; case AscDFH.historyitem_type_Theme : Element = new AscFormat.CTheme(); break;
case AscDFH.historyitem_type_GraphicFrame : Element = new CGraphicFrame(); break; case AscDFH.historyitem_type_GraphicFrame : Element = new AscFormat.CGraphicFrame(); break;
} }
if ( null !== Element ) if ( null !== Element )
......
...@@ -47,6 +47,7 @@ var g_oDocumentUrls = AscCommon.g_oDocumentUrls; ...@@ -47,6 +47,7 @@ var g_oDocumentUrls = AscCommon.g_oDocumentUrls;
var g_dKoef_mm_to_pix = AscCommon.g_dKoef_mm_to_pix; var g_dKoef_mm_to_pix = AscCommon.g_dKoef_mm_to_pix;
var CShape = AscFormat.CShape; var CShape = AscFormat.CShape;
var CGraphicFrame = AscFormat.CGraphicFrame;
var c_oAscError = Asc.c_oAscError; var c_oAscError = Asc.c_oAscError;
var c_oAscShdClear = Asc.c_oAscShdClear; var c_oAscShdClear = Asc.c_oAscShdClear;
......
...@@ -1454,7 +1454,7 @@ CPresentation.prototype = ...@@ -1454,7 +1454,7 @@ CPresentation.prototype =
RowHeight = Height / Rows; RowHeight = Height / Rows;
} }
var graphic_frame = new CGraphicFrame(); var graphic_frame = new AscFormat.CGraphicFrame();
graphic_frame.setParent(Parent); graphic_frame.setParent(Parent);
graphic_frame.setSpPr(new AscFormat.CSpPr()); graphic_frame.setSpPr(new AscFormat.CSpPr());
graphic_frame.spPr.setParent(graphic_frame); graphic_frame.spPr.setParent(graphic_frame);
......
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