Commit 8fcb0465 authored by Ilya.Kirillov's avatar Ilya.Kirillov Committed by Alexander.Trofimov

Исправлен баг в совместном редактировании при изменении размера текста в формулах.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@59346 954022d7-b5bf-4e40-9824-e11837661b57
parent 52a12817
...@@ -1861,12 +1861,26 @@ CChangesMathFontSize.prototype.Redo = function(Class) ...@@ -1861,12 +1861,26 @@ CChangesMathFontSize.prototype.Redo = function(Class)
}; };
CChangesMathFontSize.prototype.Save_Changes = function(Writer) CChangesMathFontSize.prototype.Save_Changes = function(Writer)
{ {
// Bool : IsUndefined
// Long : New // Long : New
Writer.WriteLong(this.New); if (undefined === this.New)
Writer.WriteBool(true);
else
{
Writer.WriteBool(false);
Writer.WriteLong(this.New);
}
}; };
CChangesMathFontSize.prototype.Load_Changes = function(Reader, Class) CChangesMathFontSize.prototype.Load_Changes = function(Reader, Class)
{ {
this.New = Reader.GetLong(); // Bool : IsUndefined
// Long : New
if (true === Reader.GetBool())
this.New = undefined;
else
this.New = Reader.GetLong();
this.Redo(Class); this.Redo(Class);
}; };
......
...@@ -1203,14 +1203,14 @@ ParaRun.prototype.Create_FontMap = function(Map, ArgSize) ...@@ -1203,14 +1203,14 @@ ParaRun.prototype.Create_FontMap = function(Map, ArgSize)
if ( undefined !== this.Paragraph && null !== this.Paragraph ) if ( undefined !== this.Paragraph && null !== this.Paragraph )
{ {
var TextPr; var TextPr;
var FontSize, FontSizeCS; var FontSize;
if(this.Type === para_Math_Run) if(this.Type === para_Math_Run)
{ {
TextPr = this.Get_CompiledPr(false); TextPr = this.Get_CompiledPr(false);
FontSize = TextPr.FontSize; FontSize = TextPr.FontSize;
if(this.Parent !== null) if(null !== this.Parent && undefined !== this.Paragraph)
TextPr.FontSize = this.Parent.ParaMath.ApplyArgSize(TextPr.FontSize, ArgSize.value); TextPr.FontSize = this.Parent.ParaMath.ApplyArgSize(TextPr.FontSize, ArgSize.value);
} }
else else
...@@ -1229,7 +1229,6 @@ ParaRun.prototype.Create_FontMap = function(Map, ArgSize) ...@@ -1229,7 +1229,6 @@ ParaRun.prototype.Create_FontMap = function(Map, ArgSize)
if(this.Type === para_Math_Run) if(this.Type === para_Math_Run)
{ {
TextPr.FontSize = FontSize; TextPr.FontSize = FontSize;
TextPr.FontSizeCS = FontSizeCS;
} }
} }
}; };
...@@ -4623,7 +4622,6 @@ ParaRun.prototype.Recalc_CompiledPr = function(RecalcMeasure) ...@@ -4623,7 +4622,6 @@ ParaRun.prototype.Recalc_CompiledPr = function(RecalcMeasure)
if ( true === RecalcMeasure ) if ( true === RecalcMeasure )
this.RecalcInfo.Measure = true; this.RecalcInfo.Measure = true;
// Если мы в формуле, тогда ее надо пересчитывать // Если мы в формуле, тогда ее надо пересчитывать
this.private_UpdateMathResize(); this.private_UpdateMathResize();
}; };
......
...@@ -928,6 +928,9 @@ CMathBase.prototype.Get_ParaContentPosByXY = function(SearchPos, Depth, _CurLine ...@@ -928,6 +928,9 @@ CMathBase.prototype.Get_ParaContentPosByXY = function(SearchPos, Depth, _CurLine
nCurIndex++; nCurIndex++;
} }
if (null === aBounds[nFindIndex])
return false;
SearchPos.CurX = aBounds[nFindIndex].X; SearchPos.CurX = aBounds[nFindIndex].X;
SearchPos.CurY = aBounds[nFindIndex].Y; SearchPos.CurY = aBounds[nFindIndex].Y;
......
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