Some fixes for smartarts with opening on client

This commit is contained in:
Vladimir Privezenov
2024-09-09 19:25:47 +03:00
committed by Sergey Luzyanin
parent b8326cef1b
commit de27dc067e
4 changed files with 22 additions and 5 deletions

View File

@ -10465,11 +10465,12 @@ Because of this, the display is sometimes not correct.
this.drawing = new Drawing();
this.drawing.setBDeleted(false);
this.addToSpTree(0, this.drawing);
if (!this.drawing.spPr) {
const spPr = new AscFormat.CSpPr();
this.drawing.setSpPr(spPr);
spPr.setParent(this.drawing);
}
const spPr = new AscFormat.CSpPr();
this.drawing.setSpPr(spPr);
spPr.setParent(this.drawing);
const nvSpPr = new AscFormat.UniNvPr();
nvSpPr.cNvPr.setId(0);
this.drawing.setNvSpPr(nvSpPr);
}
}
SmartArt.prototype.generateDrawingPart = function () {

View File

@ -1205,6 +1205,16 @@
this.WriteXmlAttributeDouble(name, val)
}
};
this.WriteXmlNullableAttributeAnyNumber = function(name, val)
{
if (null !== val && undefined !== val) {
if (val === Infinity) {
this.WriteXmlAttributeString(name, "INF");
} else {
this.WriteXmlAttributeDouble(name, val);
}
}
};
this.WriteXmlNullableAttributeNumber = function(name, val)
{
if (null !== val && undefined !== val) {

View File

@ -1602,6 +1602,9 @@
const shapeTrack = new AscFormat.NewShapeTrack(this.getEditorShapeType(), this.x, this.y, initObjects.theme, initObjects.master, initObjects.layout, initObjects.slide, 0, undefined, undefined, undefined, true);
shapeTrack.track({}, this.x + this.width, this.y + this.height);
const shape = shapeTrack.getShape(false, initObjects.drawingDocument, initObjects.drawingObjects);
const nvSpPr = new AscFormat.UniNvPr();
nvSpPr.cNvPr.setId(0);
shape.setNvSpPr(nvSpPr);
shape.spPr.xfrm.setExtX(this.width);
shape.spPr.xfrm.setExtY(this.height);
shape.setBDeleted(false);

3
vendor/easysax.js vendored
View File

@ -1414,6 +1414,9 @@ StaxParser.prototype.GetDoubleOrNaN = function (val, def) {
if(val === "NaN") {
return NaN;
}
if (val === "INF") {
return Infinity;
}
return this.GetDouble(val, def);
};
StaxParser.prototype.GetValueBool = function () {