Skip to content

Commit

Permalink
Fix bug #73125
Browse files Browse the repository at this point in the history
  • Loading branch information
KhromovNikita authored and KirillovIlya committed Feb 6, 2025
1 parent 636053a commit ecb0aa3
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 3 deletions.
17 changes: 17 additions & 0 deletions word/Editor/Paragraph.js
Original file line number Diff line number Diff line change
Expand Up @@ -16367,11 +16367,16 @@ Paragraph.prototype.GetText = function(oPr)
oText.SetParaSeparator(oPr.ParaSeparator);
else if (oPr && undefined !== oPr.ParaEndToSpace ? oPr.ParaEndToSpace: true)
oText.SetParaSeparator(" ");
else
oText.SetParaSeparator("\r\n");

oText.SetParaNumbering(oPr && undefined !== oPr.Numbering ? oPr.Numbering: true);
oText.SetParaMath(oPr && undefined !== oPr.Math ? oPr.Math: true);
oText.SetParaTabSymbol(oPr && undefined !== oPr.TabSymbol ? oPr.TabSymbol: " ");
oText.SetParaNewLineSeparator(oPr && undefined !== oPr.NewLineSeparator ? oPr.NewLineSeparator: "\r");
oText.SetNewLineParagraph(oPr && undefined !== oPr.NewLineParagraph ? oPr.NewLineParagraph: false);
oText.SetTableCellSeparator(oPr && undefined !== oPr.TableCellSeparator ? oPr.TableCellSeparator: "\t");
oText.SetTableRowSeparator(oPr && undefined !== oPr.TableRowSeparator ? oPr.TableRowSeparator: "\r\n");

if (true === oText.Numbering)
{
Expand Down Expand Up @@ -19822,6 +19827,18 @@ CParagraphGetText.prototype.SetParaTabSymbol = function(sValue)
{
this.TabSymbol = sValue;
};
CParagraphGetText.prototype.SetNewLineParagraph = function(bValue)
{
this.NewLineParagraph = bValue;
};
CParagraphGetText.prototype.SetTableCellSeparator = function(sValue)
{
this.TableCellSeparator = sValue;
};
CParagraphGetText.prototype.SetTableRowSeparator = function(sValue)
{
this.TableRowSeparator = sValue;
};

function CParagraphNearPos()
{
Expand Down
20 changes: 17 additions & 3 deletions word/Editor/Run.js
Original file line number Diff line number Diff line change
Expand Up @@ -472,11 +472,25 @@ ParaRun.prototype.Get_Text = function(Text)
{
Text.Text = null;
bBreak = true;
break;
}

if (Text.ParaSeparator)
Text.Text += Text.ParaSeparator;

if (Text && true === Text.NewLineParagraph)
{
let oParagraph = this.GetParagraph();
if (oParagraph && null === oParagraph.Get_DocumentNext() && oParagraph.IsTableCellContent())
{
if (!oParagraph.Parent.IsLastTableCellInRow(false))
Text.Text += Text.TableCellSeparator ? Text.TableCellSeparator : '\t';
else
Text.Text += Text.TableRowSeparator ? Text.TableRowSeparator : '\r\n';
}
else
{
Text.Text += Text.ParaSeparator ? Text.ParaSeparator : '\r\n';
}
}

break;
}

Expand Down

0 comments on commit ecb0aa3

Please sign in to comment.