Convert drawing to inline form when adding picture content control
This commit is contained in:
Ilya Kirillov
2025-05-05 16:55:41 +03:00
parent 1da45dde0e
commit ea7e3c0f02

11
api.js
View File

@ -189,6 +189,17 @@ window["AscOForm"] = window.AscOForm = AscOForm;
let h = isSignature ? 32 / 72 * 25.4 : undefined; let h = isSignature ? 32 / 72 * 25.4 : undefined;
var oCC = oLogicDocument.AddContentControlPicture(w, h); var oCC = oLogicDocument.AddContentControlPicture(w, h);
// MSWord can't open files with anchored picture content controls (70332)
if (oCC && !oFormPr)
{
let allDrawings = oCC.GetAllDrawingObjects();
for (let i = 0; i < allDrawings.length; ++i)
{
allDrawings[i].MakeInline();
}
}
let oFormParaDrawing = null; let oFormParaDrawing = null;
if (oCC && oFormPr) if (oCC && oFormPr)
{ {