Commit 8d6e7b2e authored by Sergey Luzyanin's avatar Sergey Luzyanin

fix Bug 13578

parent 4a836625
...@@ -2076,8 +2076,8 @@ ...@@ -2076,8 +2076,8 @@
var bIsCorrect = false; var bIsCorrect = false;
if (_image.Image != null) { if (_image.Image != null) {
var __w = Math.max(parseInt(_image.Image.width * AscCommon.g_dKoef_pix_to_mm), 1); var __w = Math.max((_image.Image.width * AscCommon.g_dKoef_pix_to_mm), 1);
var __h = Math.max(parseInt(_image.Image.height * AscCommon.g_dKoef_pix_to_mm), 1); var __h = Math.max((_image.Image.height * AscCommon.g_dKoef_pix_to_mm), 1);
var dKoef = Math.max(__w / _w, __h / _h); var dKoef = Math.max(__w / _w, __h / _h);
if (dKoef > 1) { if (dKoef > 1) {
...@@ -2091,7 +2091,7 @@ ...@@ -2091,7 +2091,7 @@
} }
} }
return new asc_CImageSize(parseInt(_w), parseInt(_h), bIsCorrect); return new asc_CImageSize(_w, _h, bIsCorrect);
} }
return new asc_CImageSize(50, 50, false); return new asc_CImageSize(50, 50, false);
}, },
......
...@@ -3822,10 +3822,10 @@ background-repeat: no-repeat;\ ...@@ -3822,10 +3822,10 @@ background-repeat: no-repeat;\
var _h = AscCommon.Page_Height - (AscCommon.Y_Top_Margin + AscCommon.Y_Bottom_Margin); var _h = AscCommon.Page_Height - (AscCommon.Y_Top_Margin + AscCommon.Y_Bottom_Margin);
if (_image.Image != null) if (_image.Image != null)
{ {
var __w = Math.max((_image.Image.width * AscCommon.g_dKoef_pix_to_mm) >> 0, 1); var __w = Math.max((_image.Image.width * AscCommon.g_dKoef_pix_to_mm), 1);
var __h = Math.max((_image.Image.height * AscCommon.g_dKoef_pix_to_mm) >> 0, 1); var __h = Math.max((_image.Image.height * AscCommon.g_dKoef_pix_to_mm), 1);
_w = Math.max(5, Math.min(_w, __w)); _w = Math.max(5, Math.min(_w, __w));
_h = Math.max(5, Math.min((_w * __h / __w) >> 0)); _h = Math.max(5, Math.min((_w * __h / __w)));
} }
var src = _image.src; var src = _image.src;
......
...@@ -5048,10 +5048,10 @@ background-repeat: no-repeat;\ ...@@ -5048,10 +5048,10 @@ background-repeat: no-repeat;\
var _h = Math.max(1, ColumnSize.H); var _h = Math.max(1, ColumnSize.H);
if (_image.Image != null) if (_image.Image != null)
{ {
var __w = Math.max(parseInt(_image.Image.width * AscCommon.g_dKoef_pix_to_mm), 1); var __w = Math.max((_image.Image.width * AscCommon.g_dKoef_pix_to_mm), 1);
var __h = Math.max(parseInt(_image.Image.height * AscCommon.g_dKoef_pix_to_mm), 1); var __h = Math.max((_image.Image.height * AscCommon.g_dKoef_pix_to_mm), 1);
_w = Math.max(5, Math.min(_w, __w)); _w = Math.max(5, Math.min(_w, __w));
_h = Math.max(5, Math.min(parseInt(_w * __h / __w))); _h = Math.max(5, Math.min((_w * __h / __w)));
} }
var src = _image.src; var src = _image.src;
...@@ -5101,10 +5101,10 @@ background-repeat: no-repeat;\ ...@@ -5101,10 +5101,10 @@ background-repeat: no-repeat;\
var _h = Math.max(1, ColumnSize.H); var _h = Math.max(1, ColumnSize.H);
if (_image.Image != null) if (_image.Image != null)
{ {
var __w = Math.max(parseInt(_image.Image.width * AscCommon.g_dKoef_pix_to_mm), 1); var __w = Math.max((_image.Image.width * AscCommon.g_dKoef_pix_to_mm), 1);
var __h = Math.max(parseInt(_image.Image.height * AscCommon.g_dKoef_pix_to_mm), 1); var __h = Math.max((_image.Image.height * AscCommon.g_dKoef_pix_to_mm), 1);
_w = Math.max(5, Math.min(_w, __w)); _w = Math.max(5, Math.min(_w, __w));
_h = Math.max(5, Math.min(parseInt(_w * __h / __w))); _h = Math.max(5, Math.min((_w * __h / __w)));
} }
var src = _image.src; var src = _image.src;
......
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