mirror of
https://github.com/ONLYOFFICE/sdkjs.git
synced 2026-04-07 14:09:12 +08:00
[pdf] Fix bug #80437
This commit is contained in:
committed by
Ilya Kirillov
parent
f51d4c74eb
commit
33ad26f511
@ -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);
|
||||
|
||||
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user