Commit 45a258f5 authored by Sergey.Luzyanin's avatar Sergey.Luzyanin

Bug 31119 - Не происходит замена изображения "из файла"

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@66934 954022d7-b5bf-4e40-9824-e11837661b57
parent c461a4a9
......@@ -4156,8 +4156,6 @@ asc_docs_api.prototype.AddImageUrlAction = function(url, imgProp)
{
var _image = this.ImageLoader.LoadImage(url, 1);
if (null != _image)
{
if ( false === this.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Paragraph_Content) )
{
var _w = Math.max(1, Page_Width - (X_Left_Margin + X_Right_Margin));
var _h = Math.max(1, Page_Height - (Y_Top_Margin + Y_Bottom_Margin));
......@@ -4168,7 +4166,6 @@ asc_docs_api.prototype.AddImageUrlAction = function(url, imgProp)
_w = Math.max(5, Math.min(_w, __w));
_h = Math.max(5, Math.min(parseInt(_w * __h / __w)));
}
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Document_AddImageUrl);
var src = _image.src;
if (this.isShapeImageChangeUrl)
......@@ -4189,12 +4186,15 @@ asc_docs_api.prototype.AddImageUrlAction = function(url, imgProp)
this.isImageChangeUrl = false;
}
else
{
if ( false === this.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Paragraph_Content) )
{
var imageLocal = g_oDocumentUrls.getImageLocal(src);
if(imageLocal){
src = imageLocal;
}
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Document_AddImageUrl);
if (undefined === imgProp || undefined === imgProp.WrappingStyle || 0 == imgProp.WrappingStyle)
this.WordControl.m_oLogicDocument.Add_InlineImage(_w, _h, src);
else
......@@ -4206,8 +4206,6 @@ asc_docs_api.prototype.AddImageUrlAction = function(url, imgProp)
{
this.sync_StartAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.LoadImage);
this.asyncImageEndLoaded2 = function(_image)
{
if ( false === this.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Paragraph_Content) )
{
var _w = Math.max(1, Page_Width - (X_Left_Margin + X_Right_Margin));
var _h = Math.max(1, Page_Height - (Y_Top_Margin + Y_Bottom_Margin));
......@@ -4218,7 +4216,6 @@ asc_docs_api.prototype.AddImageUrlAction = function(url, imgProp)
_w = Math.max(5, Math.min(_w, __w));
_h = Math.max(5, Math.min(parseInt(_w * __h / __w)));
}
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Document_AddImageUrlLong);
var src = _image.src;
if (this.isShapeImageChangeUrl)
......@@ -4240,11 +4237,13 @@ asc_docs_api.prototype.AddImageUrlAction = function(url, imgProp)
}
else
{
if ( false === this.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Paragraph_Content) ){
var imageLocal = g_oDocumentUrls.getImageLocal(src);
if(imageLocal){
src = imageLocal;
}
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(historydescription_Document_AddImageUrlLong);
if (undefined === imgProp || undefined === imgProp.WrappingStyle || 0 == imgProp.WrappingStyle)
this.WordControl.m_oLogicDocument.Add_InlineImage(_w, _h, src);
else
......@@ -6388,9 +6387,9 @@ CErrorData.prototype.get_Value = function() { return this.Value; };
asc_docs_api.prototype.asc_getChartObject = function(type)
{
this.isChartEditor = true; // Для совместного редактирования
if(!isRealNumber(type))
{
this.asc_onOpenChartFrame();
this.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Drawing_Props);
}
......@@ -6407,6 +6406,8 @@ asc_docs_api.prototype.asc_addChartDrawingObject = function(options)
};
asc_docs_api.prototype.asc_doubleClickOnChart = function(obj)
{
this.isChartEditor = true; // Для совместного редактирования
this.asc_onOpenChartFrame();
this.WordControl.onMouseUpMainSimple();
this.asc_fireCallback("asc_doubleClickOnChart", obj);
};
......
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