From 33ad26f5117fc6fcdd385e77069f3461b2a62233 Mon Sep 17 00:00:00 2001 From: Nikita Khromov Date: Tue, 3 Mar 2026 19:40:16 +0700 Subject: [PATCH] [pdf] Fix bug #80437 --- word/Editor/Paragraph/RunContent/Space.js | 6 ++++++ word/Editor/Paragraph/RunContent/Text.js | 19 +++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/word/Editor/Paragraph/RunContent/Space.js b/word/Editor/Paragraph/RunContent/Space.js index c516ee05c9..1a396f3dfa 100644 --- a/word/Editor/Paragraph/RunContent/Space.js +++ b/word/Editor/Paragraph/RunContent/Space.js @@ -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); diff --git a/word/Editor/Paragraph/RunContent/Text.js b/word/Editor/Paragraph/RunContent/Text.js index c0912285dd..c2be5008b0 100644 --- a/word/Editor/Paragraph/RunContent/Text.js +++ b/word/Editor/Paragraph/RunContent/Text.js @@ -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;