Commit da21f7c8 authored by Oleg Korshul's avatar Oleg Korshul Committed by GitHub

Merge pull request #105 from ONLYOFFICE/release/v4.3.0

Release/v4.3.0
parents 745b5efb 4f41ecc5
...@@ -2252,7 +2252,9 @@ CChartSpace.prototype.Refresh_RecalcData2 = function(pageIndex, object) ...@@ -2252,7 +2252,9 @@ CChartSpace.prototype.Refresh_RecalcData2 = function(pageIndex, object)
} }
else else
{ {
var bOldRecalculateRef = this.recalcInfo.recalculateReferences;
this.setRecalculateInfo(); this.setRecalculateInfo();
this.recalcInfo.recalculateReferences = bOldRecalculateRef;
} }
this.addToRecalculate(); this.addToRecalculate();
}; };
...@@ -2333,6 +2335,10 @@ CChartSpace.prototype.getAllContents = function() ...@@ -2333,6 +2335,10 @@ CChartSpace.prototype.getAllContents = function()
{ {
}; };
CChartSpace.prototype.getAllFonts = function (allFonts) {
this.documentGetAllFontNames(allFonts);
};
CChartSpace.prototype.documentGetAllFontNames = function(allFonts) CChartSpace.prototype.documentGetAllFontNames = function(allFonts)
{ {
allFonts["+mn-lt"] = 1; allFonts["+mn-lt"] = 1;
......
...@@ -609,20 +609,29 @@ ...@@ -609,20 +609,29 @@
CDrawingDocContent.prototype.Recalculate = function() CDrawingDocContent.prototype.Recalculate = function()
{ {
if(this.Parent){
if(this.Parent instanceof AscFormat.CShape){ if(typeof editor !== "undefined" && editor &&
this.Parent.recalculateContent(); (editor.isPresentationEditor || editor.isDocumentEditor)){
return; if(editor.WordControl && editor.WordControl.m_oLogicDocument){
} editor.WordControl.m_oLogicDocument.Recalculate();
else if(this.Parent && this.Parent.parent){ }
if(this.Parent.parent instanceof AscFormat.CShape){ }
this.Parent.parent.recalculateContent(); else{
if(this.Parent){
if(this.Parent instanceof AscFormat.CShape){
this.Parent.recalculateContent();
return; return;
} }
else if(this.Parent && this.Parent.parent){
if(this.Parent.parent instanceof AscFormat.CShape){
this.Parent.parent.recalculateContent();
return;
}
}
}
if(this.XLimit > 0){
this.Recalculate_PageDrawing();
} }
}
if(this.XLimit > 0){
this.Recalculate_PageDrawing();
} }
}; };
......
...@@ -1618,10 +1618,10 @@ CPresentation.prototype = ...@@ -1618,10 +1618,10 @@ CPresentation.prototype =
}, [], false, AscDFH.historydescription_Presentation_AddChart); }, [], false, AscDFH.historydescription_Presentation_AddChart);
}, },
Selection_Remove: function() Selection_Remove: function(bNoResetChartSelection)
{ {
if(this.Slides[this.CurPage]){ if(this.Slides[this.CurPage]){
this.Slides[this.CurPage].graphicObjects.resetSelection(); this.Slides[this.CurPage].graphicObjects.resetSelection(undefined, bNoResetChartSelection);
} }
}, },
......
...@@ -746,25 +746,29 @@ CDocMeta.prototype = ...@@ -746,25 +746,29 @@ CDocMeta.prototype =
if (null != _cachedImage) if (null != _cachedImage)
{ {
g.drawImage2(_cachedImage, 0, 0, page.width_mm, page.height_mm); g.drawImage2(_cachedImage, 0, 0, page.width_mm, page.height_mm);
return obj.MetaDoc.OnImageLoad(obj); break;
} }
else
{
var img = new Image();
img.onload = function ()
{
obj.MetaDoc.SetCachedImage(_src, img);
if (1 != obj.BreakDrawing)
{
g.drawImage2(img, 0, 0, page.width_mm, page.height_mm);
}
obj.MetaDoc.OnImageLoad(obj);
};
img.onerror = function ()
{
obj.MetaDoc.OnImageLoad(obj);
};
img.src = _src;
var img = new Image(); return;
img.onload = function(){ }
obj.MetaDoc.SetCachedImage(_src, img);
if (1 != obj.BreakDrawing)
{
g.drawImage2(img, 0, 0, page.width_mm, page.height_mm);
}
obj.MetaDoc.OnImageLoad(obj);
};
img.onerror = function(){
obj.MetaDoc.OnImageLoad(obj);
};
img.src = _src;
return;
} }
else if (3 == _type) else if (3 == _type)
{ {
...@@ -777,25 +781,29 @@ CDocMeta.prototype = ...@@ -777,25 +781,29 @@ CDocMeta.prototype =
if (null != _cachedImage) if (null != _cachedImage)
{ {
g.drawImage2(_cachedImage, 0, 0, page.width_mm, page.height_mm); g.drawImage2(_cachedImage, 0, 0, page.width_mm, page.height_mm);
return obj.MetaDoc.OnImageLoad(obj); break;
} }
else
{
var img = new Image();
img.onload = function ()
{
obj.MetaDoc.SetCachedImage(_src, img);
if (1 != obj.BreakDrawing)
{
g.drawImage2(img, 0, 0, page.width_mm, page.height_mm);
}
obj.MetaDoc.OnImageLoad(obj);
};
img.onerror = function ()
{
obj.MetaDoc.OnImageLoad(obj);
};
img.src = _src;
var img = new Image(); return;
img.onload = function(){ }
obj.MetaDoc.SetCachedImage(_src, img);
if (1 != obj.BreakDrawing)
{
g.drawImage2(img, 0, 0, page.width_mm, page.height_mm);
}
obj.MetaDoc.OnImageLoad(obj);
};
img.onerror = function(){
obj.MetaDoc.OnImageLoad(obj);
};
img.src = _src;
return;
} }
var _src = (0 == _type || 10 == _type) ? AscCommon.g_oDocumentUrls.getImageUrl("image" + s.GetLong() + ".jpg") : AscCommon.g_oDocumentUrls.getImageUrl("image" + s.GetLong() + ".png"); var _src = (0 == _type || 10 == _type) ? AscCommon.g_oDocumentUrls.getImageUrl("image" + s.GetLong() + ".jpg") : AscCommon.g_oDocumentUrls.getImageUrl("image" + s.GetLong() + ".png");
...@@ -843,43 +851,47 @@ CDocMeta.prototype = ...@@ -843,43 +851,47 @@ CDocMeta.prototype =
_ctx.restore(); _ctx.restore();
} }
} }
break;
return obj.MetaDoc.OnImageLoad(obj);
} }
else
{
var img = new Image();
img.onload = function ()
{
obj.MetaDoc.SetCachedImage(_src, img);
if (1 != obj.BreakDrawing)
{
var _ctx = g.m_oContext;
var img = new Image(); if (_tr)
img.onload = function(){ {
obj.MetaDoc.SetCachedImage(_src, img); var _dX = g.m_oCoordTransform.sx;
if (1 != obj.BreakDrawing) var _dY = g.m_oCoordTransform.sy;
{
var _ctx = g.m_oContext;
if (_tr)
{
var _dX = g.m_oCoordTransform.sx;
var _dY = g.m_oCoordTransform.sy;
_ctx.save(); _ctx.save();
_ctx.setTransform(_tr.sx * _dX, _tr.shy * _dY, _tr.shx * _dX, _tr.sy * _dY, _tr.tx * _dX, _tr.ty * _dY); _ctx.setTransform(_tr.sx * _dX, _tr.shy * _dY, _tr.shx * _dX, _tr.sy * _dY, _tr.tx * _dX, _tr.ty * _dY);
} }
g.drawImage2(img,__x,__y,__w,__h); g.drawImage2(img, __x, __y, __w, __h);
//editor.WordControl.OnScroll(); //editor.WordControl.OnScroll();
if (_tr) if (_tr)
{ {
_ctx.restore(); _ctx.restore();
} }
} }
obj.MetaDoc.OnImageLoad(obj); obj.MetaDoc.OnImageLoad(obj);
}; };
img.onerror = function(){ img.onerror = function ()
obj.MetaDoc.OnImageLoad(obj); {
}; obj.MetaDoc.OnImageLoad(obj);
img.src = _src; };
img.src = _src;
return; return;
}
break;
} }
case 160: case 160:
{ {
......
...@@ -227,7 +227,7 @@ CHistory.prototype = ...@@ -227,7 +227,7 @@ CHistory.prototype =
if ( this.Index === this.Points.length - 1 ) if ( this.Index === this.Points.length - 1 )
this.LastState = this.Document.Get_SelectionState(); this.LastState = this.Document.Get_SelectionState();
this.Document.Selection_Remove(); this.Document.Selection_Remove(true);
this.Internal_RecalcData_Clear(); this.Internal_RecalcData_Clear();
...@@ -281,7 +281,7 @@ CHistory.prototype = ...@@ -281,7 +281,7 @@ CHistory.prototype =
if ( true != this.Can_Redo() ) if ( true != this.Can_Redo() )
return null; return null;
this.Document.Selection_Remove(); this.Document.Selection_Remove(true);
var Point = this.Points[++this.Index]; var Point = this.Points[++this.Index];
......
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