Commit b89d02d8 authored by Ilya Kirillov's avatar Ilya Kirillov

Fixed bug #34540

parent fac01b2d
...@@ -11914,11 +11914,17 @@ CDocument.prototype.controller_AddToParagraph = function(ParaItem, bRecalculate) ...@@ -11914,11 +11914,17 @@ CDocument.prototype.controller_AddToParagraph = function(ParaItem, bRecalculate)
var Item = this.Content[this.CurPos.ContentPos]; var Item = this.Content[this.CurPos.ContentPos];
var ItemType = Item.GetType(); var ItemType = Item.GetType();
if (para_NewLine === ParaItem.Type && true === ParaItem.Is_PageOrColumnBreak()) if (para_NewLine === ParaItem.Type && true === ParaItem.IsPageOrColumnBreak())
{ {
if (type_Paragraph === ItemType) if (type_Paragraph === ItemType)
{ {
if (true === Item.Cursor_IsStart()) if (true === Item.Cursor_IsStart())
{
if (ParaItem.IsColumnBreak())
{
this.Content[this.CurPos.ContentPos].Add(ParaItem);
}
else
{ {
this.Add_NewParagraph(undefined, true); this.Add_NewParagraph(undefined, true);
var CurPos = this.CurPos.ContentPos - 1; var CurPos = this.CurPos.ContentPos - 1;
...@@ -11926,6 +11932,16 @@ CDocument.prototype.controller_AddToParagraph = function(ParaItem, bRecalculate) ...@@ -11926,6 +11932,16 @@ CDocument.prototype.controller_AddToParagraph = function(ParaItem, bRecalculate)
this.Content[CurPos].Add(ParaItem); this.Content[CurPos].Add(ParaItem);
this.Content[CurPos].Clear_Formatting(); this.Content[CurPos].Clear_Formatting();
} }
}
else
{
if (ParaItem.IsColumnBreak())
{
this.Add_NewParagraph(undefined, true);
var CurPos = this.CurPos.ContentPos;
this.Content[CurPos].Cursor_MoveToStartPos();
this.Content[CurPos].Add(ParaItem);
}
else else
{ {
this.Add_NewParagraph(undefined, true); this.Add_NewParagraph(undefined, true);
...@@ -11935,6 +11951,7 @@ CDocument.prototype.controller_AddToParagraph = function(ParaItem, bRecalculate) ...@@ -11935,6 +11951,7 @@ CDocument.prototype.controller_AddToParagraph = function(ParaItem, bRecalculate)
this.Content[CurPos].Add(ParaItem); this.Content[CurPos].Add(ParaItem);
this.Content[CurPos].Clear_Formatting(); this.Content[CurPos].Clear_Formatting();
} }
}
if (false != bRecalculate) if (false != bRecalculate)
{ {
......
...@@ -1109,6 +1109,19 @@ ParaNewLine.prototype = ...@@ -1109,6 +1109,19 @@ ParaNewLine.prototype =
return false; return false;
} }
}; };
ParaNewLine.prototype.IsPageOrColumnBreak = function()
{
return (break_Page === this.BreakType || break_Column === this.BreakType);
};
ParaNewLine.prototype.IsPageBreak = function()
{
return (break_Page === this.BreakType);
};
ParaNewLine.prototype.IsColumnBreak = function()
{
return (break_Column === this.BreakType);
};
// Класс ParaNumbering // Класс ParaNumbering
function ParaNumbering() function ParaNumbering()
......
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