Compare commits

..

2 Commits

Author SHA1 Message Date
a4d9f27d54 [bu][de] - Added method for creating ApiComplexForm objects. 2022-11-17 17:35:25 +05:00
a9365fd7e3 remove unused change 2022-11-03 18:24:20 +03:00
2 changed files with 21 additions and 2 deletions

View File

@ -333,6 +333,26 @@
CheckFormKey(oCC);
return new AscBuilder.ApiPictureForm(oCC);
};
/**
* Creates a complex form with the specified base form properties.
* @memberof Api
* @param {FormPrBase} oFormPr - base form property.
* @returns {ApiComplexForm}
*/
Api.prototype.CreateComplexForm = function(oFormPr)
{
if (!oFormPr)
oFormPr = {};
let oCC = CreateCommonForm(oFormPr);
let oComplexPr = new AscWord.CSdtComplexFormPr();
oCC.SetComplexFormPr(oComplexPr);
CheckFormKey(oCC);
return new AscBuilder.ApiComplexForm(oCC);
};
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Private area
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -388,5 +408,5 @@
Api.prototype["CreatePictureForm"] = Api.prototype.CreatePictureForm;
Api.prototype["CreateCheckBoxForm"] = Api.prototype.CreateCheckBoxForm;
Api.prototype["CreateComboBoxForm"] = Api.prototype.CreateComboBoxForm;
Api.prototype["CreateComplexForm"] = Api.prototype.CreateComplexForm;
}(window, null));

View File

@ -44,7 +44,6 @@
AscDFH.changesFactory[AscDFH.historyitem_FormFieldMaster_User] = CChangesContent;
AscDFH.changesFactory[AscDFH.historyitem_FormFieldMaster_Field] = CChangesObject;
AscDFH.changesFactory[AscDFH.historyitem_FormFieldMaster_SignRequest] = CChangesObject;
AscDFH.changesFactory[AscDFH.historyitem_FormField_FieldData] = CChangesString;
AscDFH.changesFactory[AscDFH.historyitem_FormField_Content] = CChangesObject;
AscDFH.changesFactory[AscDFH.historyitem_FormField_EncryptedData] = CChangesContent;
AscDFH.changesFactory[AscDFH.historyitem_FormField_FieldMaster] = CChangesObject;