mirror of
https://github.com/ONLYOFFICE/sdkjs-forms.git
synced 2026-03-31 10:23:35 +08:00
check format on saving
This commit is contained in:
@ -167,13 +167,15 @@
|
||||
this.SignRequest.toXml(writer, oUsersIdMap);
|
||||
}
|
||||
writer.WriteXmlNodeEnd("FieldMaster");
|
||||
if(this.Field) {
|
||||
let oPart = writer.context.docPart.part.addPartWithoutRels(AscCommon.openXml.Types.field);
|
||||
let oMemory = new AscCommon.CMemory();
|
||||
oMemory.context = writer.context;
|
||||
oPart.setDataXml(this.Field, oMemory);
|
||||
oMemory.Seek(0);
|
||||
oPart.addRelationship(AscCommon.openXml.Types.fieldMaster.relationType, oContext.part.uri)
|
||||
if(writer.context.fileType === Asc.c_oAscFileType.OFORM) {
|
||||
if(this.Field) {
|
||||
let oPart = writer.context.docPart.part.addPartWithoutRels(AscCommon.openXml.Types.field);
|
||||
let oMemory = new AscCommon.CMemory();
|
||||
oMemory.context = writer.context;
|
||||
oPart.setDataXml(this.Field, oMemory);
|
||||
oMemory.Seek(0);
|
||||
oPart.addRelationship(AscCommon.openXml.Types.fieldMaster.relationType, oContext.part.uri)
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -300,16 +300,11 @@
|
||||
for(let nFldMaster = 0; nFldMaster < this.Fields.length; ++nFldMaster) {
|
||||
let oFieldMaster = this.Fields[nFldMaster];
|
||||
let oPart = oFldMasterPartMap[oFieldMaster.Id];
|
||||
if(!oPart) {
|
||||
oPart = writer.context.part.addPart(AscCommon.openXml.Types.fieldMaster);
|
||||
let oFldMemory = new AscCommon.CMemory();
|
||||
oFldMemory.context = writer.context;
|
||||
oPart.part.setDataXml(oFieldMaster, oFldMemory);
|
||||
oFldMasterPartMap[oFieldMaster.Id] = oPart;
|
||||
if(oPart) {
|
||||
let oNode = new CT_XmlNode();
|
||||
oNode.attributes["r:id"] = oContext.part.addRelationship(AscCommon.openXml.Types.fieldMaster.relationType, oPart.part.uri);
|
||||
oNode.toXml(writer, "Field");
|
||||
}
|
||||
let oNode = new CT_XmlNode();
|
||||
oNode.attributes["r:id"] = oContext.part.addRelationship(AscCommon.openXml.Types.fieldMaster.relationType, oPart.part.uri);
|
||||
oNode.toXml(writer, "Field");
|
||||
}
|
||||
|
||||
writer.WriteXmlNodeEnd("FieldsGroup");
|
||||
|
||||
Reference in New Issue
Block a user