From b3ede32dfef808eba83c73fad0271a27fd07337f Mon Sep 17 00:00:00 2001 From: Ilya Kirillov Date: Mon, 5 May 2025 16:54:49 +0300 Subject: [PATCH] For bug #70332 Add method for converting anchored drawing to inline --- word/Editor/Paragraph/ParaDrawing.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/word/Editor/Paragraph/ParaDrawing.js b/word/Editor/Paragraph/ParaDrawing.js index 62980e5a6a..4bda1152ff 100644 --- a/word/Editor/Paragraph/ParaDrawing.js +++ b/word/Editor/Paragraph/ParaDrawing.js @@ -1828,7 +1828,6 @@ ParaDrawing.prototype.Get_DrawingType = function() }; ParaDrawing.prototype.Is_Inline = function() { - if(this.Parent && this.Parent.Get_ParentTextTransform && this.Parent.Get_ParentTextTransform()) @@ -1847,12 +1846,26 @@ ParaDrawing.prototype.Is_Inline = function() return true; } - return ( drawing_Inline === this.DrawingType ? true : false ); + return drawing_Inline === this.DrawingType; }; ParaDrawing.prototype.IsInline = function() { return this.Is_Inline(); }; +ParaDrawing.prototype.MakeInline = function() +{ + if (drawing_Inline === this.Get_DrawingType()) + return; + + this.Set_DrawingType(drawing_Inline); + + if (AscCommon.isRealObject(this.GraphicObj.bounds) + && AscFormat.isRealNumber(this.GraphicObj.bounds.w) + && AscFormat.isRealNumber(this.GraphicObj.bounds.h)) + { + this.CheckWH(); + } +}; ParaDrawing.prototype.IsForm = function() { return this.Form;