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

баг с пересчетом при изменении свойств ползунками. создание автофигур для превью без истории.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@64357 954022d7-b5bf-4e40-9824-e11837661b57
parent 63bb85ca
...@@ -834,49 +834,52 @@ TextArtPreviewManager.prototype.getWordArtPreview = function(prst) ...@@ -834,49 +834,52 @@ TextArtPreviewManager.prototype.getWordArtPreview = function(prst)
TextArtPreviewManager.prototype.generateTextArtStyles = function() TextArtPreviewManager.prototype.generateTextArtStyles = function()
{ {
if(this.aStylesByIndex.length === 0) ExecuteNoHistory(function(){
{
this.initStyles();
}
var _canvas = this.getCanvas();
var ctx = _canvas.getContext('2d');
var graphics = new CGraphics();
var oShape = this.getTAShape();
oShape.recalculate();
graphics.m_oFontManager = g_fontManager; if(this.aStylesByIndex.length === 0)
{
this.initStyles();
}
var _canvas = this.getCanvas();
var ctx = _canvas.getContext('2d');
var graphics = new CGraphics();
var oShape = this.getTAShape();
oShape.recalculate();
var oldShowParaMarks; graphics.m_oFontManager = g_fontManager;
if(editor)
{
oldShowParaMarks = editor.ShowParaMarks;
editor.ShowParaMarks = false;
}
var oContent = oShape.getDocContent();
oContent.Set_ApplyToAll(true);
for(var i = 0; i < this.aStylesByIndex.length; ++i)
{
oContent.Paragraph_Add(new ParaTextPr(this.aStylesByIndex[i]));
graphics.init(ctx, _canvas.width, _canvas.height, oShape.extX, oShape.extY);
graphics.transform(1,0,0,1,0,0);
oShape.recalcText();
if(!oShape.bWordShape)
{
oShape.recalculate();
}
else
{
oShape.recalculateText();
}
oShape.draw(graphics);
this.TextArtStyles[i] = _canvas.toDataURL("image/png");
}
oContent.Set_ApplyToAll(false);
if(editor) var oldShowParaMarks;
{ if(editor)
editor.ShowParaMarks = oldShowParaMarks; {
} oldShowParaMarks = editor.ShowParaMarks;
editor.ShowParaMarks = false;
}
var oContent = oShape.getDocContent();
oContent.Set_ApplyToAll(true);
for(var i = 0; i < this.aStylesByIndex.length; ++i)
{
oContent.Paragraph_Add(new ParaTextPr(this.aStylesByIndex[i]));
graphics.init(ctx, _canvas.width, _canvas.height, oShape.extX, oShape.extY);
graphics.transform(1,0,0,1,0,0);
oShape.recalcText();
if(!oShape.bWordShape)
{
oShape.recalculate();
}
else
{
oShape.recalculateText();
}
oShape.draw(graphics);
this.TextArtStyles[i] = _canvas.toDataURL("image/png");
}
oContent.Set_ApplyToAll(false);
if(editor)
{
editor.ShowParaMarks = oldShowParaMarks;
}
}, this, []);
}; };
......
...@@ -998,6 +998,7 @@ var historyitem_SetWrapPolygon = 14; ...@@ -998,6 +998,7 @@ var historyitem_SetWrapPolygon = 14;
var historyitem_Drawing_SetLocked = 15;// Устанавливаем привязку к конкретному параграфу] var historyitem_Drawing_SetLocked = 15;// Устанавливаем привязку к конкретному параграфу]
var historyitem_Drawing_SetRelativeHeight = 16;// Устанавливаем Z-Index var historyitem_Drawing_SetRelativeHeight = 16;// Устанавливаем Z-Index
var historyitem_Drawing_SetEffectExtent = 17;// Устанавливаем EffectExtent var historyitem_Drawing_SetEffectExtent = 17;// Устанавливаем EffectExtent
var historyitem_Drawing_SetParent = 18;// Устанавливаем Parent
......
...@@ -119,7 +119,7 @@ CShape.prototype.recalcTxBoxContent = function() ...@@ -119,7 +119,7 @@ CShape.prototype.recalcTxBoxContent = function()
{ {
this.recalcInfo.recalculateTxBoxContent = true; this.recalcInfo.recalculateTxBoxContent = true;
this.recalcInfo.AllDrawings = []; this.recalcInfo.AllDrawings = [];
if(this.checkAutofit && this.checkAutofit()) if(this.checkAutofit && this.checkAutofit() && (!editor || !editor.noCreatePoint || editor.exucuteHistory))
{ {
this.recalcTransform(); this.recalcTransform();
} }
......
...@@ -5732,7 +5732,7 @@ ParaDrawing.prototype = ...@@ -5732,7 +5732,7 @@ ParaDrawing.prototype =
case historyitem_Drawing_SetParent: case historyitem_Drawing_SetParent:
{ {
writeObject(w, data.newPr); writeObject(Writer, Data.newPr);
break; break;
} }
} }
......
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