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

Настройки текста TextFill и TextOutline для мат. объектов.

Отключение режима рецензирования при пересчете диаграмм.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@66637 954022d7-b5bf-4e40-9824-e11837661b57
parent 8eea9b78
......@@ -255,6 +255,10 @@ CChartSpace.prototype.recalculate = function()
return;
ExecuteNoHistory(function()
{
var bOldTrackRevision = editor.WordControl.m_oLogicDocument.TrackRevisions;
if(bOldTrackRevision){
editor.WordControl.m_oLogicDocument.TrackRevisions = false;
}
this.updateLinks();
if(this.recalcInfo.recalcTitle)
......@@ -452,7 +456,9 @@ CChartSpace.prototype.recalculate = function()
{
this.updatePosition(this.posX, this.posY);
}
if(bOldTrackRevision){
editor.WordControl.m_oLogicDocument.TrackRevisions = true;
}
}, this, []);
};
......
......@@ -2932,6 +2932,8 @@ var historyitem_Math_RFontsHint = 19;
var historyitem_Math_CtrPrpHighLight = 20;
var historyitem_Math_ArgSize = 21;
var historyitem_Math_ReviewType = 22;
var historyitem_Math_CtrPrpTextFill = 23;
var historyitem_Math_CtrPrpTextOutline = 24;
function ReadChanges_FromBinary(Reader, Class)
......@@ -2958,6 +2960,8 @@ function ReadChanges_FromBinary(Reader, Class)
case historyitem_Math_RFontsEastAsia : Changes = new CChangesMath_RFontsEastAsia(); break;
case historyitem_Math_RFontsHint : Changes = new CChangesMath_RFontsHint(); break;
case historyitem_Math_CtrPrpHighLight : Changes = new CChangesMathHighLight(); break;
case historyitem_Math_CtrPrpTextFill : Changes = new CChangesMathTextFill(); break;
case historyitem_Math_CtrPrpTextOutline : Changes = new CChangesMathTextOutline(); break;
}
if (null !== Changes)
......@@ -3195,7 +3199,92 @@ CChangesMathUnifill.prototype.Load_Changes = function(Reader, Class)
this.Redo(Class);
};
function CChangesMathTextFill(NewValue, OldValue)
{
this.New = NewValue;
this.Old = OldValue;
}
CChangesMathTextFill.prototype.Type = historyitem_Math_CtrPrpTextFill;
CChangesMathTextFill.prototype.Undo = function(Class)
{
Class.raw_SetTextFill(this.Old);
};
CChangesMathTextFill.prototype.Redo = function(Class)
{
Class.raw_SetTextFill(this.New);
};
CChangesMathTextFill.prototype.Save_Changes = function(Writer)
{
// Bool : IsUndefined
if ( undefined !== this.New )
{
Writer.WriteBool(false);
this.New.Write_ToBinary(Writer);
}
else
{
Writer.WriteBool(true);
}
};
CChangesMathTextFill.prototype.Load_Changes = function(Reader, Class)
{
// Bool : IsUndefined
if ( Reader.GetBool() == false)
{
this.New = new CUniFill();
this.New.Read_FromBinary(Reader);
}
else
{
this.New = undefined;
}
this.Redo(Class);
};
function CChangesMathTextOutline(NewValue, OldValue)
{
this.New = NewValue;
this.Old = OldValue;
}
CChangesMathTextOutline.prototype.Type = historyitem_Math_CtrPrpTextOutline;
CChangesMathTextOutline.prototype.Undo = function(Class)
{
Class.raw_SetTextOutline(this.Old);
};
CChangesMathTextOutline.prototype.Redo = function(Class)
{
Class.raw_SetTextOutline(this.New);
};
CChangesMathTextOutline.prototype.Save_Changes = function(Writer)
{
// Bool : IsUndefined
if ( undefined !== this.New )
{
Writer.WriteBool(false);
this.New.Write_ToBinary(Writer);
}
else
{
Writer.WriteBool(true);
}
};
CChangesMathTextOutline.prototype.Load_Changes = function(Reader, Class)
{
// Bool : IsUndefined
if ( Reader.GetBool() == false)
{
this.New = new CLn();
this.New.Read_FromBinary(Reader);
}
else
{
this.New = undefined;
}
this.Redo(Class);
};
function CChangesMathUnderline(NewValue, OldValue)
{
this.New = NewValue;
......
......@@ -873,22 +873,56 @@ CMathBase.prototype.Apply_TextPr = function(TextPr, IncFontSize, ApplyToAll)
}
else
{
if(TextPr.AscFill || TextPr.AscLine || TextPr.AscUnifill)
{
var oCompiledPr = this.Get_CompiledCtrPrp();
if(TextPr.AscFill)
{
this.Set_TextFill(CorrectUniFill(TextPr.AscFill, oCompiledPr.TextFill, 0));
}
if(TextPr.AscUnifill)
{
this.Set_Unifill(CorrectUniFill(TextPr.AscUnifill, oCompiledPr.Unifill, 0));
}
if(TextPr.AscLine)
{
this.Set_TextOutline(CorrectUniStroke(TextPr.AscLine, oCompiledPr.TextOutline, 0));
}
return;
}
if(TextPr.FontSize !== undefined)
this.Set_FontSizeCtrPrp(TextPr.FontSize);
if(TextPr.Shd !== undefined)
this.Set_Shd(TextPr.Shd);
if ( undefined !== TextPr.Color && undefined === TextPr.Unifill )
if(undefined != TextPr.Unifill)
{
this.Set_Color( null === TextPr.Color ? undefined : TextPr.Color );
this.Set_Unifill( undefined );
this.Set_Unifill(TextPr.Unifill.createDuplicate());
if(undefined != this.CtrPrp.Color)
{
this.Set_Color(undefined);
}
if(undefined != this.CtrPrp.TextFill)
{
this.Set_TextFill(undefined);
}
}
if ( undefined !== TextPr.Unifill )
if(undefined != TextPr.TextOutline)
{
this.Set_TextOutline(TextPr.TextOutline);
}
if(undefined != TextPr.TextFill)
{
this.Set_Unifill(null === TextPr.Unifill ? undefined : TextPr.Unifill);
this.Set_Color(undefined);
this.Set_TextFill(TextPr.TextFill);
if(undefined != this.CtrPrp.Color)
{
this.Set_Color(undefined);
}
if(undefined != this.CtrPrp.Unifill)
{
this.Set_Unifill(undefined);
}
}
if ( undefined != TextPr.HighLight )
......@@ -975,6 +1009,22 @@ CMathBase.prototype.Set_Unifill = function(Value)
this.raw_SetUnifill(Value);
}
};
CMathBase.prototype.Set_TextFill = function(Value)
{
if ( ( undefined === Value && undefined !== this.CtrPrp.TextFill ) || ( Value instanceof CUniFill && ( undefined === this.CtrPrp.TextFill || false === CompareUnifillBool(this.CtrPrp.TextFill, Value) ) ) )
{
History.Add(this, new CChangesMathTextFill(Value, this.CtrPrp.TextFill));
this.raw_SetTextFill(Value);
}
};
CMathBase.prototype.Set_TextOutline = function(Value)
{
if ( ( undefined === Value && undefined !== this.CtrPrp.TextOutline ) || ( Value instanceof CLn && ( undefined === this.CtrPrp.TextOutline || false === Value.IsIdentical(this.CtrPrp.TextOutline) ) ) )
{
History.Add(this, new CChangesMathTextOutline(Value, this.CtrPrp.TextOutline));
this.raw_SetTextOutline(Value);
}
};
CMathBase.prototype.Set_HighLight = function(Value)
{
var OldValue = this.CtrPrp.HighLight;
......@@ -1126,6 +1176,16 @@ CMathBase.prototype.raw_SetUnifill = function(Value)
this.CtrPrp.Unifill = Value;
this.NeedUpdate_CtrPrp();
};
CMathBase.prototype.raw_SetTextFill = function(Value)
{
this.CtrPrp.TextFill = Value;
this.NeedUpdate_CtrPrp();
};
CMathBase.prototype.raw_SetTextOutline = function(Value)
{
this.CtrPrp.TextOutline = Value;
this.NeedUpdate_CtrPrp();
};
CMathBase.prototype.raw_SetHighLight = function(Value)
{
this.CtrPrp.HighLight = Value;
......
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