[pe][bug] fix the problem with broken file after inserting chart with replacePlaceholder

This commit is contained in:
Sergey Luzyanin
2026-02-05 14:12:27 +03:00
parent 938b1af126
commit 1fe785bb9c

View File

@ -6307,9 +6307,19 @@
pr.FrameHeight = this.GetHeight() / 36000;
pr.Force = true;
oDrawing.Drawing.recalculate();
oDrawing.Drawing.setFrameTransform(pr);
}
else if(oDrawing.GetClassType() === "chart")
{
AscFormat.CheckSpPrXfrm(oDrawing.Drawing);
let xfrm = oDrawing.Drawing.spPr.xfrm;
xfrm.setOffX(this.GetPosX() / 36000);
xfrm.setOffY(this.GetPosY() / 36000);
xfrm.setExtX(this.GetWidth() / 36000);
xfrm.setExtY(this.GetHeight() / 36000);
oDrawing.Drawing.recalculate();
}
return true;
};