[oform] Work on xml writer

This commit is contained in:
KirillovIlya
2022-12-23 10:28:01 +03:00
parent 50952a7b75
commit 2f4100e62d
4 changed files with 62 additions and 20 deletions

View File

@ -64,6 +64,20 @@
{
return this.Format;
};
OForm.prototype.fromZip = function(zip)
{
let xmlPkg = new AscOForm.XmlPackage(zip);
xmlPkg.setContext(new AscOForm.XmlReaderContext(xmlPkg));
this.Format.fromPkg(xmlPkg);
};
OForm.prototype.toZip = function(zip)
{
let writer = new AscCommon.CMemory();
let xmlPkg = new AscOForm.XmlPackage(zip, writer);
xmlPkg.setContext(new AscOForm.XmlWriterContext(xmlPkg));
writer.context = xmlPkg.getContext();
this.Format.toPkg(xmlPkg);
};
OForm.prototype.setCurrentRole = function(roleName)
{
let role = this.getRole(roleName);