Commit 62aec0d6 authored by Alexander.Trofimov's avatar Alexander.Trofimov

word/Drawing/ShapeDrawer to function-closure

cell/model/DrawingObjects/ShapeDrawer to function-closure
parent af14141b
......@@ -112,8 +112,8 @@
"../cell/view/WorksheetView.js",
"../cell/view/DrawingObjectsController.js",
"../cell/model/DrawingObjects/Graphics.js",
"../cell/model/DrawingObjects/ShapeDrawer.js",
"../cell/model/DrawingObjects/DrawingDocument.js",
"../cell/model/DrawingObjects/Format/ShapePrototype.js",
"../cell/model/DrawingObjects/Format/ImagePrototype.js",
......
......@@ -99,8 +99,8 @@
"../word/Editor/Sections.js",
"../word/Drawing/Graphics.js",
"../word/Drawing/ShapeDrawer.js",
"../slide/Drawing/Transitions.js",
"../slide/Drawing/DrawingDocument.js",
"../slide/Drawing/HtmlPage.js",
......
......@@ -123,8 +123,8 @@
"../word/Editor/Spelling.js",
"../word/Drawing/Graphics.js",
"../word/Drawing/ShapeDrawer.js",
"../word/Drawing/DrawingDocument.js",
"../word/Drawing/GraphicsEvents.js",
"../word/Drawing/Rulers.js",
......
......@@ -24,6 +24,8 @@
*/
"use strict";
(function(window, undefined){
// Import
var getFullImageSrc2 = AscCommon.getFullImageSrc2;
......@@ -1917,3 +1919,5 @@ function ShapeToImageConverter(shape, pageIndex)
//------------------------------------------------------------export----------------------------------------------------
window['AscCommon'] = window['AscCommon'] || {};
window['AscCommon'].CShapeDrawer = CShapeDrawer;
window['AscCommon'].ShapeToImageConverter = ShapeToImageConverter;
})(window);
......@@ -3910,7 +3910,7 @@ CShape.prototype =
}
if(!AscFormat.isRealNumber(this.x) || !AscFormat.isRealNumber(this.y) || !AscFormat.isRealNumber(this.extX) || !AscFormat.isRealNumber(this.extY))
return "";
var img_object = ShapeToImageConverter(this, this.pageIndex);
var img_object = AscCommon.ShapeToImageConverter(this, this.pageIndex);
if(img_object)
{
if(img_object.ImageNative)
......@@ -4167,7 +4167,7 @@ CShape.prototype =
if (graphics.CheckUseFonts2 !== undefined)
graphics.CheckUseFonts2(this.transformText);
if (window.IsShapeToImageConverter)
if (AscCommon.IsShapeToImageConverter)
{
this.textBoxContent.Set_StartPage(0);
result_page_index = 0;
......
......@@ -22,7 +22,6 @@
* Pursuant to Section 7  3(e) we decline to grant you any rights under trademark law for use of our trademarks.
*
*/
window.IsShapeToImageConverter = false;
function DrawLineEnd(xEnd, yEnd, xPrev, yPrev, type, w, len, drawer, trans)
{
switch (type)
......@@ -1626,4 +1625,6 @@ function ShapeToImageConverter(shape, pageIndex)
//------------------------------------------------------------export----------------------------------------------------
window['AscCommon'] = window['AscCommon'] || {};
window['AscCommon'].CShapeDrawer = CShapeDrawer;
\ No newline at end of file
window['AscCommon'].CShapeDrawer = CShapeDrawer;
window['AscCommon'].ShapeToImageConverter = ShapeToImageConverter;
window['AscCommon'].IsShapeToImageConverter = false;
......@@ -1277,7 +1277,7 @@ Slide.prototype =
{
if(typeof this.cachedImage === "string" && this.cachedImage.length > 0)
return this.cachedImage;
return ShapeToImageConverter(this, 0).ImageUrl;
return AscCommon.ShapeToImageConverter(this, 0).ImageUrl;
},
checkNoTransformPlaceholder: function()
......
......@@ -24,6 +24,8 @@
*/
"use strict";
(function(window, undefined){
// Import
var getFullImageSrc2 = AscCommon.getFullImageSrc2;
......@@ -31,8 +33,6 @@ var CShapeColor = AscFormat.CShapeColor;
var c_oAscFill = Asc.c_oAscFill;
window.IsShapeToImageConverter = false;
window.IsShapeToImageConverter;
function DrawLineEnd(xEnd, yEnd, xPrev, yPrev, type, w, len, drawer, trans)
{
switch (type)
......@@ -1828,7 +1828,7 @@ CShapeDrawer.prototype =
function ShapeToImageConverter(shape, pageIndex)
{
window.IsShapeToImageConverter = true;
AscCommon.IsShapeToImageConverter = true;
var _bounds_cheker = new AscFormat.CSlideBoundsChecker();
var dKoef = g_dKoef_mm_to_pix;
......@@ -1881,7 +1881,7 @@ function ShapeToImageConverter(shape, pageIndex)
shape.draw(g, /*pageIndex*/0);
window.IsShapeToImageConverter = false;
AscCommon.IsShapeToImageConverter = false;
var _ret = { ImageNative : _canvas, ImageUrl : "" };
try
......@@ -1901,3 +1901,6 @@ function ShapeToImageConverter(shape, pageIndex)
//------------------------------------------------------------export----------------------------------------------------
window['AscCommon'] = window['AscCommon'] || {};
window['AscCommon'].CShapeDrawer = CShapeDrawer;
window['AscCommon'].ShapeToImageConverter = ShapeToImageConverter;
window['AscCommon'].IsShapeToImageConverter = false;
})(window);
......@@ -2541,7 +2541,7 @@ ParaMath.prototype.MathToImageConverter = function(bCopy, _canvasInput, _widthPx
History.TurnOn();
window.IsShapeToImageConverter = true;
AscCommon.IsShapeToImageConverter = true;
var dKoef = g_dKoef_mm_to_pix;
......@@ -2600,7 +2600,7 @@ ParaMath.prototype.MathToImageConverter = function(bCopy, _canvasInput, _widthPx
if (true === isShowParaMarks)
par.LogicDocument.Set_ShowParagraphMarks(true, false);
window.IsShapeToImageConverter = false;
AscCommon.IsShapeToImageConverter = false;
if (undefined === _canvasInput)
{
......
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