Commit 46d8b72e authored by Sergey.Luzyanin's avatar Sergey.Luzyanin Committed by Alexander.Trofimov

Bug 24132 - Copy&Paste: Ошибка в консоли после копирования статьи из википедии

Убрана лишняя перерисовка при отсутствии картинок.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@56450 954022d7-b5bf-4e40-9824-e11837661b57
parent 5ae79ed3
...@@ -3179,7 +3179,8 @@ function DrawingObjects() { ...@@ -3179,7 +3179,8 @@ function DrawingObjects() {
_this.showDrawingObjects(true); _this.showDrawingObjects(true);
}; };
api.ImageLoader.LoadDocumentImages(aImagesSync, null, _this.asyncImagesDocumentEndLoaded); if(aImagesSync.length > 0)
api.ImageLoader.LoadDocumentImages(aImagesSync, null, _this.asyncImagesDocumentEndLoaded);
// Upload event // Upload event
if (window.addEventListener) { if (window.addEventListener) {
......
...@@ -827,8 +827,8 @@ CChartSpace.prototype = ...@@ -827,8 +827,8 @@ CChartSpace.prototype =
if (startCell && endCell) if (startCell && endCell)
{ {
var wsName = this.worksheet.sName; var wsName = this.worksheet.sName;
if ( !rx_test_ws_name.test(wsName) ) if ( !rx_test_ws_name.test(wsName) )
wsName = "'" + wsName + "'"; wsName = "'" + wsName + "'";
if (startCell.getID() == endCell.getID()) if (startCell.getID() == endCell.getID())
ret.range = wsName + "!" + startCell.getID(); ret.range = wsName + "!" + startCell.getID();
......
...@@ -1925,7 +1925,7 @@ ...@@ -1925,7 +1925,7 @@
this._fixSelectionOfHiddenCells(); this._fixSelectionOfHiddenCells();
this._drawAutoF(); this._drawAutoF();
this.cellCommentator.drawCommentCells(); this.cellCommentator.drawCommentCells();
this.objectRender.showDrawingObjects(false); this.objectRender.showDrawingObjects(true);
if (this.overlayCtx) { if (this.overlayCtx) {
this._drawSelection(); this._drawSelection();
} }
......
...@@ -2405,6 +2405,8 @@ CGraphicObjects.prototype = ...@@ -2405,6 +2405,8 @@ CGraphicObjects.prototype =
{ {
this.document.theme.themeElements.clrScheme = data.oldScheme; this.document.theme.themeElements.clrScheme = data.oldScheme;
this.drawingDocument.CheckGuiControlColors(); this.drawingDocument.CheckGuiControlColors();
editor.chartPreviewManager.clearPreviews();
break; break;
} }
} }
...@@ -2418,6 +2420,7 @@ CGraphicObjects.prototype = ...@@ -2418,6 +2420,7 @@ CGraphicObjects.prototype =
{ {
this.document.theme.themeElements.clrScheme = data.newScheme; this.document.theme.themeElements.clrScheme = data.newScheme;
this.drawingDocument.CheckGuiControlColors(); this.drawingDocument.CheckGuiControlColors();
editor.chartPreviewManager.clearPreviews();
break; break;
} }
} }
...@@ -2461,6 +2464,7 @@ CGraphicObjects.prototype = ...@@ -2461,6 +2464,7 @@ CGraphicObjects.prototype =
this.drawingObjects[i].GraphicObj.handleUpdateLn(); this.drawingObjects[i].GraphicObj.handleUpdateLn();
} }
} }
editor.chartPreviewManager.clearPreviews();
break; break;
} }
} }
...@@ -2478,6 +2482,7 @@ CGraphicObjects.prototype = ...@@ -2478,6 +2482,7 @@ CGraphicObjects.prototype =
this.drawingObjects[i].GraphicObj.handleUpdateLn(); this.drawingObjects[i].GraphicObj.handleUpdateLn();
} }
} }
editor.chartPreviewManager.clearPreviews();
} }
}; };
...@@ -2551,18 +2556,19 @@ function CreateImageFromBinary(bin, nW, nH) ...@@ -2551,18 +2556,19 @@ function CreateImageFromBinary(bin, nW, nH)
h = nH; h = nH;
} }
var para_drawing = new ParaDrawing(w, h, null, editor.WordControl.m_oLogicDocument.DrawingDocument, editor.WordControl.m_oLogicDocument, null); var para_drawing = new ParaDrawing(w, h, null, editor.WordControl.m_oLogicDocument.DrawingDocument, editor.WordControl.m_oLogicDocument, null);
var word_image = new WordImage(para_drawing, editor.WordControl.m_oLogicDocument, editor.WordControl.m_oLogicDocument.DrawingDocument, null); var word_image = editor.WordControl.m_oLogicDocument.DrawingObjects.createImage(bin, 0, 0, w, h);
word_image.init(bin, w, h, null, null); para_drawing.Set_GraphicObject(word_image);
word_image.setParent(para_drawing);
para_drawing.Set_GraphicObject(word_image); para_drawing.Set_GraphicObject(word_image);
return para_drawing; return para_drawing;
} }
function CreateImageFromBinary2(bin, w, h) function CreateImageFromBinary2(bin, w, h)
{ {
var para_drawing = new ParaDrawing(w, h, null, editor.WordControl.m_oLogicDocument.DrawingDocument, editor.WordControl.m_oLogicDocument, null); var para_drawing = new ParaDrawing(w, h, null, editor.WordControl.m_oLogicDocument.DrawingDocument, editor.WordControl.m_oLogicDocument, null);
var word_image = new WordImage(para_drawing, editor.WordControl.m_oLogicDocument, editor.WordControl.m_oLogicDocument.DrawingDocument, null); var word_image = editor.WordControl.m_oLogicDocument.DrawingObjects.createImage(bin, 0, 0, w, h);
word_image.init(bin, w, h, null, null); para_drawing.Set_GraphicObject(word_image);
word_image.setParent(para_drawing);
para_drawing.Set_GraphicObject(word_image); para_drawing.Set_GraphicObject(word_image);
return para_drawing; return para_drawing;
} }
......
...@@ -6222,8 +6222,7 @@ asc_docs_api.prototype.ChangeColorScheme = function(index_scheme) ...@@ -6222,8 +6222,7 @@ asc_docs_api.prototype.ChangeColorScheme = function(index_scheme)
{ {
History.TurnOff(); History.TurnOff();
} }
//this.chartStyleManager.init(); this.chartPreviewManager.clearPreviews();
//this.chartPreviewManager.init();
if(is_on) if(is_on)
{ {
History.TurnOn(); History.TurnOn();
......
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