[pdf] Fix bug #80437

This commit is contained in:
Nikita Khromov
2026-03-03 19:40:16 +07:00
committed by Ilya Kirillov
parent f51d4c74eb
commit 33ad26f511
2 changed files with 25 additions and 0 deletions

View File

@ -294,6 +294,12 @@
CPdfRunSpace.prototype.GetWidth = AscWord.CPdfRunText.prototype.GetWidth;
CPdfRunSpace.prototype.GetWidthVisible = AscWord.CPdfRunText.prototype.GetWidthVisible;
CPdfRunSpace.prototype.SetMetrics = AscWord.CPdfRunText.prototype.SetMetrics;
CPdfRunSpace.prototype.Copy = function()
{
return new CPdfRunSpace(this.charGid, this.Value, this.originWidth, this.originSize);
};
CPdfRunSpace.prototype.GetWidth = function()
{
return (this.originSize && this.originWidth ? this.originWidth * this.originCoeff + this.spacing : this.Width / AscWord.TEXTWIDTH_DIVIDER);

View File

@ -792,6 +792,25 @@
CPdfRunText.prototype = Object.create(CRunText.prototype);
CPdfRunText.prototype.constructor = CPdfRunText;
CPdfRunText.prototype.Copy = function()
{
let t = new CPdfRunText(this.charGid, this.Value, this.originWidth, this.originSize);
t.Width = this.Width;
t.Flags = this.Flags;
t.Grapheme = this.Grapheme;
if (this.Flags & FLAGS_TEMPORARY)
{
t.TempWidth = this.TempWidth;
t.TempGrapheme = this.TempGrapheme;
}
if (this.Flags & FLAGS_VISIBLE_WIDTH)
t.WidthVisible = this.WidthVisible;
return t;
};
CPdfRunText.prototype.IsPdfText = function()
{
return true;