Commit 07820444 authored by Alexander.Trofimov's avatar Alexander.Trofimov

word/Drawing/ShapeDrawer to function-closure

cell/model/DrawingObjects/ShapeDrawer to function-closure
parent 004947fa
......@@ -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",
......
"use strict";
(function(window, undefined){
// Import
var getFullImageSrc2 = AscCommon.getFullImageSrc2;
......@@ -1893,3 +1895,5 @@ function ShapeToImageConverter(shape, pageIndex)
//------------------------------------------------------------export----------------------------------------------------
window['AscCommon'] = window['AscCommon'] || {};
window['AscCommon'].CShapeDrawer = CShapeDrawer;
window['AscCommon'].ShapeToImageConverter = ShapeToImageConverter;
})(window);
......@@ -3886,7 +3886,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)
......@@ -4143,7 +4143,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;
......
window.IsShapeToImageConverter = false;
function DrawLineEnd(xEnd, yEnd, xPrev, yPrev, type, w, len, drawer, trans)
{
switch (type)
......@@ -1602,4 +1601,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;
......@@ -1253,7 +1253,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()
......
"use strict";
(function(window, undefined){
// Import
var getFullImageSrc2 = AscCommon.getFullImageSrc2;
......@@ -7,8 +9,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)
......@@ -1804,7 +1804,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;
......@@ -1857,7 +1857,7 @@ function ShapeToImageConverter(shape, pageIndex)
shape.draw(g, /*pageIndex*/0);
window.IsShapeToImageConverter = false;
AscCommon.IsShapeToImageConverter = false;
var _ret = { ImageNative : _canvas, ImageUrl : "" };
try
......@@ -1877,3 +1877,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