Commit 22c8b9c5 authored by Ilya Kirillov's avatar Ilya Kirillov

Fixed bug #33582

parent d2310545
......@@ -11347,7 +11347,6 @@ CDocument.prototype.controller_AddNewParagraph = function(bRecalculate, bForceAd
NextId = StyleId;
}
if (StyleId === NextId)
{
// Продолжаем (в плане настроек) новый параграф
......@@ -11368,6 +11367,14 @@ CDocument.prototype.controller_AddNewParagraph = function(bRecalculate, bForceAd
Item.Set_SectionPr(undefined);
NewParagraph.Set_SectionPr(SectPr);
}
var LastRun = Item.Content[Item.Content.length - 1];
if (LastRun && LastRun.Pr.Lang && LastRun.Pr.Lang.Val)
{
NewParagraph.Select_All();
NewParagraph.Add(new ParaTextPr({Lang : LastRun.Pr.Lang.Copy()}));
NewParagraph.Selection_Remove();
}
}
else
{
......
......@@ -2207,6 +2207,14 @@ CDocumentContent.prototype.Add_NewParagraph = function()
else
NewParagraph.Style_Add(NextId, true);
}
var LastRun = Item.Content[Item.Content.length - 1];
if (LastRun && LastRun.Pr.Lang && LastRun.Pr.Lang.Val)
{
NewParagraph.Select_All();
NewParagraph.Add(new ParaTextPr({Lang : LastRun.Pr.Lang.Copy()}));
NewParagraph.Selection_Remove();
}
}
else
Item.Split(NewParagraph);
......
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