Commit 90ab9782 authored by Ilya Kirillov's avatar Ilya Kirillov

Fixed bug #33746. Also fixed bug with updating hint on a footnote and bug with...

Fixed bug #33746. Also fixed bug with updating hint on a footnote and bug with style of run that contain footnote reference.
parent d403b2ce
...@@ -1853,6 +1853,14 @@ CDocument.prototype.Recalculate = function(bOneParagraph, bRecalcContentLast, _R ...@@ -1853,6 +1853,14 @@ CDocument.prototype.Recalculate = function(bOneParagraph, bRecalcContentLast, _R
this.DrawingDocument.OnEndRecalculate(false, true); this.DrawingDocument.OnEndRecalculate(false, true);
History.Reset_RecalcIndex(); History.Reset_RecalcIndex();
this.private_UpdateCursorXY(true, true); this.private_UpdateCursorXY(true, true);
if (Para.Parent && Para.Parent.Get_TopDocumentContent)
{
var oTopDocument = Para.Parent.Get_TopDocumentContent();
if (oTopDocument instanceof CFootEndnote)
oTopDocument.OnFastRecalculate();
}
return; return;
} }
} }
...@@ -1883,7 +1891,15 @@ CDocument.prototype.Recalculate = function(bOneParagraph, bRecalcContentLast, _R ...@@ -1883,7 +1891,15 @@ CDocument.prototype.Recalculate = function(bOneParagraph, bRecalcContentLast, _R
this.DrawingDocument.OnEndRecalculate(false, true); this.DrawingDocument.OnEndRecalculate(false, true);
History.Reset_RecalcIndex(); History.Reset_RecalcIndex();
this.private_UpdateCursorXY(true, true); this.private_UpdateCursorXY(true, true);
return;
if (SimplePara.Parent && SimplePara.Parent.Get_TopDocumentContent)
{
var oTopDocument = SimplePara.Parent.Get_TopDocumentContent();
if (oTopDocument instanceof CFootEndnote)
oTopDocument.OnFastRecalculate();
}
return;
} }
} }
} }
......
...@@ -173,6 +173,10 @@ CFootEndnote.prototype.GetPositionInfo = function() ...@@ -173,6 +173,10 @@ CFootEndnote.prototype.GetPositionInfo = function()
{ {
return this.PositionInfo; return this.PositionInfo;
}; };
CFootEndnote.prototype.OnFastRecalculate = function()
{
this.NeedUpdateHint = true;
};
//--------------------------------------------------------export---------------------------------------------------- //--------------------------------------------------------export----------------------------------------------------
window['AscCommonWord'] = window['AscCommonWord'] || {}; window['AscCommonWord'] = window['AscCommonWord'] || {};
......
...@@ -409,6 +409,7 @@ ParaRun.prototype.Add = function(Item, bMath) ...@@ -409,6 +409,7 @@ ParaRun.prototype.Add = function(Item, bMath)
var NewRun = this.private_SplitRunInCurPos(); var NewRun = this.private_SplitRunInCurPos();
if (NewRun) if (NewRun)
{ {
NewRun.Set_VertAlign(undefined);
NewRun.Set_RStyle(oStyles.GetDefaultFootnoteReference()); NewRun.Set_RStyle(oStyles.GetDefaultFootnoteReference());
NewRun.Cursor_MoveToStartPos(); NewRun.Cursor_MoveToStartPos();
NewRun.Add(Item, bMath); NewRun.Add(Item, bMath);
...@@ -2458,14 +2459,17 @@ ParaRun.prototype.Recalculate_Range = function(PRS, ParaPr, Depth) ...@@ -2458,14 +2459,17 @@ ParaRun.prototype.Recalculate_Range = function(PRS, ParaPr, Depth)
if (para_ContinuationSeparator === ItemType) if (para_ContinuationSeparator === ItemType)
Item.Update_Width(PRS); Item.Update_Width(PRS);
if (para_FootnoteReference === ItemType) if (true !== PRS.IsFastRecalculate())
{ {
Item.UpdateNumber(PRS); if (para_FootnoteReference === ItemType)
PRS.AddFootnoteReference(Item, PRS.GetCurrentContentPos(Pos)); {
} Item.UpdateNumber(PRS);
else if (para_FootnoteRef === ItemType) PRS.AddFootnoteReference(Item, PRS.GetCurrentContentPos(Pos));
{ }
Item.UpdateNumber(PRS.TopDocument); else if (para_FootnoteRef === ItemType)
{
Item.UpdateNumber(PRS.TopDocument);
}
} }
// При проверке, убирается ли слово, мы должны учитывать ширину предшествующих пробелов. // При проверке, убирается ли слово, мы должны учитывать ширину предшествующих пробелов.
......
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