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 @@ ...@@ -112,8 +112,8 @@
"../cell/view/WorksheetView.js", "../cell/view/WorksheetView.js",
"../cell/view/DrawingObjectsController.js", "../cell/view/DrawingObjectsController.js",
"../cell/model/DrawingObjects/Graphics.js", "../cell/model/DrawingObjects/Graphics.js",
"../cell/model/DrawingObjects/ShapeDrawer.js", "../cell/model/DrawingObjects/ShapeDrawer.js",
"../cell/model/DrawingObjects/DrawingDocument.js", "../cell/model/DrawingObjects/DrawingDocument.js",
"../cell/model/DrawingObjects/Format/ShapePrototype.js", "../cell/model/DrawingObjects/Format/ShapePrototype.js",
"../cell/model/DrawingObjects/Format/ImagePrototype.js", "../cell/model/DrawingObjects/Format/ImagePrototype.js",
......
...@@ -99,8 +99,8 @@ ...@@ -99,8 +99,8 @@
"../word/Editor/Sections.js", "../word/Editor/Sections.js",
"../word/Drawing/Graphics.js", "../word/Drawing/Graphics.js",
"../word/Drawing/ShapeDrawer.js", "../word/Drawing/ShapeDrawer.js",
"../slide/Drawing/Transitions.js", "../slide/Drawing/Transitions.js",
"../slide/Drawing/DrawingDocument.js", "../slide/Drawing/DrawingDocument.js",
"../slide/Drawing/HtmlPage.js", "../slide/Drawing/HtmlPage.js",
......
...@@ -123,8 +123,8 @@ ...@@ -123,8 +123,8 @@
"../word/Editor/Spelling.js", "../word/Editor/Spelling.js",
"../word/Drawing/Graphics.js", "../word/Drawing/Graphics.js",
"../word/Drawing/ShapeDrawer.js", "../word/Drawing/ShapeDrawer.js",
"../word/Drawing/DrawingDocument.js", "../word/Drawing/DrawingDocument.js",
"../word/Drawing/GraphicsEvents.js", "../word/Drawing/GraphicsEvents.js",
"../word/Drawing/Rulers.js", "../word/Drawing/Rulers.js",
......
"use strict"; "use strict";
(function(window, undefined){
// Import // Import
var getFullImageSrc2 = AscCommon.getFullImageSrc2; var getFullImageSrc2 = AscCommon.getFullImageSrc2;
...@@ -1893,3 +1895,5 @@ function ShapeToImageConverter(shape, pageIndex) ...@@ -1893,3 +1895,5 @@ function ShapeToImageConverter(shape, pageIndex)
//------------------------------------------------------------export---------------------------------------------------- //------------------------------------------------------------export----------------------------------------------------
window['AscCommon'] = window['AscCommon'] || {}; window['AscCommon'] = window['AscCommon'] || {};
window['AscCommon'].CShapeDrawer = CShapeDrawer; window['AscCommon'].CShapeDrawer = CShapeDrawer;
window['AscCommon'].ShapeToImageConverter = ShapeToImageConverter;
})(window);
...@@ -3886,7 +3886,7 @@ CShape.prototype = ...@@ -3886,7 +3886,7 @@ CShape.prototype =
} }
if(!AscFormat.isRealNumber(this.x) || !AscFormat.isRealNumber(this.y) || !AscFormat.isRealNumber(this.extX) || !AscFormat.isRealNumber(this.extY)) if(!AscFormat.isRealNumber(this.x) || !AscFormat.isRealNumber(this.y) || !AscFormat.isRealNumber(this.extX) || !AscFormat.isRealNumber(this.extY))
return ""; return "";
var img_object = ShapeToImageConverter(this, this.pageIndex); var img_object = AscCommon.ShapeToImageConverter(this, this.pageIndex);
if(img_object) if(img_object)
{ {
if(img_object.ImageNative) if(img_object.ImageNative)
...@@ -4143,7 +4143,7 @@ CShape.prototype = ...@@ -4143,7 +4143,7 @@ CShape.prototype =
if (graphics.CheckUseFonts2 !== undefined) if (graphics.CheckUseFonts2 !== undefined)
graphics.CheckUseFonts2(this.transformText); graphics.CheckUseFonts2(this.transformText);
if (window.IsShapeToImageConverter) if (AscCommon.IsShapeToImageConverter)
{ {
this.textBoxContent.Set_StartPage(0); this.textBoxContent.Set_StartPage(0);
result_page_index = 0; result_page_index = 0;
......
window.IsShapeToImageConverter = false;
function DrawLineEnd(xEnd, yEnd, xPrev, yPrev, type, w, len, drawer, trans) function DrawLineEnd(xEnd, yEnd, xPrev, yPrev, type, w, len, drawer, trans)
{ {
switch (type) switch (type)
...@@ -1602,4 +1601,6 @@ function ShapeToImageConverter(shape, pageIndex) ...@@ -1602,4 +1601,6 @@ function ShapeToImageConverter(shape, pageIndex)
//------------------------------------------------------------export---------------------------------------------------- //------------------------------------------------------------export----------------------------------------------------
window['AscCommon'] = window['AscCommon'] || {}; window['AscCommon'] = window['AscCommon'] || {};
window['AscCommon'].CShapeDrawer = CShapeDrawer; window['AscCommon'].CShapeDrawer = CShapeDrawer;
\ No newline at end of file window['AscCommon'].ShapeToImageConverter = ShapeToImageConverter;
window['AscCommon'].IsShapeToImageConverter = false;
...@@ -1253,7 +1253,7 @@ Slide.prototype = ...@@ -1253,7 +1253,7 @@ Slide.prototype =
{ {
if(typeof this.cachedImage === "string" && this.cachedImage.length > 0) if(typeof this.cachedImage === "string" && this.cachedImage.length > 0)
return this.cachedImage; return this.cachedImage;
return ShapeToImageConverter(this, 0).ImageUrl; return AscCommon.ShapeToImageConverter(this, 0).ImageUrl;
}, },
checkNoTransformPlaceholder: function() checkNoTransformPlaceholder: function()
......
"use strict"; "use strict";
(function(window, undefined){
// Import // Import
var getFullImageSrc2 = AscCommon.getFullImageSrc2; var getFullImageSrc2 = AscCommon.getFullImageSrc2;
...@@ -7,8 +9,6 @@ var CShapeColor = AscFormat.CShapeColor; ...@@ -7,8 +9,6 @@ var CShapeColor = AscFormat.CShapeColor;
var c_oAscFill = Asc.c_oAscFill; var c_oAscFill = Asc.c_oAscFill;
window.IsShapeToImageConverter = false;
window.IsShapeToImageConverter;
function DrawLineEnd(xEnd, yEnd, xPrev, yPrev, type, w, len, drawer, trans) function DrawLineEnd(xEnd, yEnd, xPrev, yPrev, type, w, len, drawer, trans)
{ {
switch (type) switch (type)
...@@ -1804,7 +1804,7 @@ CShapeDrawer.prototype = ...@@ -1804,7 +1804,7 @@ CShapeDrawer.prototype =
function ShapeToImageConverter(shape, pageIndex) function ShapeToImageConverter(shape, pageIndex)
{ {
window.IsShapeToImageConverter = true; AscCommon.IsShapeToImageConverter = true;
var _bounds_cheker = new AscFormat.CSlideBoundsChecker(); var _bounds_cheker = new AscFormat.CSlideBoundsChecker();
var dKoef = g_dKoef_mm_to_pix; var dKoef = g_dKoef_mm_to_pix;
...@@ -1857,7 +1857,7 @@ function ShapeToImageConverter(shape, pageIndex) ...@@ -1857,7 +1857,7 @@ function ShapeToImageConverter(shape, pageIndex)
shape.draw(g, /*pageIndex*/0); shape.draw(g, /*pageIndex*/0);
window.IsShapeToImageConverter = false; AscCommon.IsShapeToImageConverter = false;
var _ret = { ImageNative : _canvas, ImageUrl : "" }; var _ret = { ImageNative : _canvas, ImageUrl : "" };
try try
...@@ -1877,3 +1877,6 @@ function ShapeToImageConverter(shape, pageIndex) ...@@ -1877,3 +1877,6 @@ function ShapeToImageConverter(shape, pageIndex)
//------------------------------------------------------------export---------------------------------------------------- //------------------------------------------------------------export----------------------------------------------------
window['AscCommon'] = window['AscCommon'] || {}; window['AscCommon'] = window['AscCommon'] || {};
window['AscCommon'].CShapeDrawer = CShapeDrawer; window['AscCommon'].CShapeDrawer = CShapeDrawer;
window['AscCommon'].ShapeToImageConverter = ShapeToImageConverter;
window['AscCommon'].IsShapeToImageConverter = false;
})(window);
...@@ -2541,7 +2541,7 @@ ParaMath.prototype.MathToImageConverter = function(bCopy, _canvasInput, _widthPx ...@@ -2541,7 +2541,7 @@ ParaMath.prototype.MathToImageConverter = function(bCopy, _canvasInput, _widthPx
History.TurnOn(); History.TurnOn();
window.IsShapeToImageConverter = true; AscCommon.IsShapeToImageConverter = true;
var dKoef = g_dKoef_mm_to_pix; var dKoef = g_dKoef_mm_to_pix;
...@@ -2600,7 +2600,7 @@ ParaMath.prototype.MathToImageConverter = function(bCopy, _canvasInput, _widthPx ...@@ -2600,7 +2600,7 @@ ParaMath.prototype.MathToImageConverter = function(bCopy, _canvasInput, _widthPx
if (true === isShowParaMarks) if (true === isShowParaMarks)
par.LogicDocument.Set_ShowParagraphMarks(true, false); par.LogicDocument.Set_ShowParagraphMarks(true, false);
window.IsShapeToImageConverter = false; AscCommon.IsShapeToImageConverter = false;
if (undefined === _canvasInput) 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