@ -1,5 +1,5 @@
/*
* (c) Copyright Ascensio System SIA 2010-2023
* (c) Copyright Ascensio System SIA 2010-2024
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
@ -38,11 +38,13 @@
// Import
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const AscBuilder = window [ "AscBuilder" ] ;
const ApiDocument = AscBuilder . ApiDocument ;
const GetStringParameter = AscBuilder . GetStringParameter ;
const GetBool Parameter = AscBuilder . GetBool Parameter ;
const GetNumber Parameter = AscBuilder . GetNumber Parameter ;
const GetArray Parameter = AscBuilder . GetArray Parameter ;
const ApiDocument = AscBuilder . ApiDocument ;
const GetString Parameter = AscBuilder . GetString Parameter ;
const GetBool Parameter = AscBuilder . GetBool Parameter ;
const GetNumber Parameter = AscBuilder . GetNumber Parameter ;
const GetArrayParameter = AscBuilder . GetArrayParameter ;
const executeNoFormLockCheck = AscBuilder . executeNoFormLockCheck ;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
@ -60,6 +62,7 @@
* @property {string} tip - Form tip text.
* @property {boolean} required - Specifies if the form is required or not.
* @property {string} placeholder - Form placeholder text.
* @see office-js-api/Examples/Enumerations/FormPrBase.js
*/
/**
@ -70,11 +73,13 @@
* @property {number} cellWidth - The cell width for each character measured in millimeters. If this parameter is not specified or equal to 0 or less, then the width will be set automatically.
* @property {boolean} multiLine - Specifies if the current fixed size text field is multiline or not.
* @property {boolean} autoFit - Specifies if the text field content should be autofit, i.e. whether the font size adjusts to the size of the fixed size form.
* @see office-js-api/Examples/Enumerations/TextFormPrBase.js
*/
/**
* Text field properties.
* @typedef {FormPrBase | TextFormPrBase} TextFormPr
* @see office-js-api/Examples/Enumerations/TextFormPr.js
*/
/**
@ -82,11 +87,13 @@
* @typedef {Object} FormInsertPr
* @property {boolean} [placeholderFromSelection=false] - Specifies if the currently selected text should be saved as a placeholder of the inserted form.
* @property {boolean} [keepSelectedTextInForm=true] - Specifies if the currently selected text should be saved as the content of the inserted form.
* @see office-js-api/Examples/Enumerations/FormInsertPr.js
*/
/**
* Properties for inserting a text field.
* @typedef {FormPrBase | TextFormPrBase | FormInsertPr} TextFormInsertPr
* @see office-js-api/Examples/Enumerations/TextFormInsertPr.js
*/
@ -94,11 +101,13 @@
* Specific checkbox / radio button properties.
* @typedef {Object} CheckBoxFormPrBase
* @property {boolean} radio - Specifies if the current checkbox is a radio button. In this case, the key parameter is considered as an identifier for the group of radio buttons.
* @see office-js-api/Examples/Enumerations/CheckBoxFormPrBase.js
*/
/**
* Checkbox / radio button properties.
* @typedef {FormPrBase | CheckBoxFormPrBase} CheckBoxFormPr
* @see office-js-api/Examples/Enumerations/CheckBoxFormPr.js
*/
/**
@ -111,21 +120,25 @@
* If the array consists of single strings, then the displayed value and its meaning are the same.
* Example: ["First", ["Second", "2"], ["Third", "3"], "Fourth"].
* @see office-js-api/Examples/Enumerations/ComboBoxFormPrBase.js
*/
/**
* Combo box / dropdown list properties.
* @typedef {FormPrBase | ComboBoxFormPrBase} ComboBoxFormPr
* @see office-js-api/Examples/Enumerations/ComboBoxFormPr.js
*/
/**
* The condition to scale an image in the picture form.
* @typedef {"always" | "never" | "tooBig" | "tooSmall"} ScaleFlag
* @see office-js-api/Examples/Enumerations/ScaleFlag.js
*/
/**
* Value from 0 to 100.
* @typedef {number} percentage
* @see office-js-api/Examples/Enumerations/percentage.js
*/
/**
@ -142,231 +155,302 @@
* * <b>0</b> - the picture is placed on top;
* * <b>50</b> - the picture is placed in the center;
* * <b>100</b> - the picture is placed on the bottom.
* @see office-js-api/Examples/Enumerations/PictureFormPrBase.js
*/
/**
* Picture form properties.
* @typedef {FormPrBase | PictureFormPrBase} PictureFormPr
* @see office-js-api/Examples/Enumerations/PictureFormPr.js
*/
/**
* Specific date form properties.
* @typedef {Object} DateFormPrBase
* @property {string} format - The date format, ex: mm.dd.yyyy
* @property {string} lang - The date language. Possible value for this parameter is a language identifier as defined by
* RFC 4646/BCP 47. Example: "en-CA".
* @see office-js-api/Examples/Enumerations/DateFormPrBase.js
*/
/**
* Date form properties.
* @typedef {FormPrBase | DateFormPrBase} DateFormPr
* @see office-js-api/Examples/Enumerations/DateFormPr.js
*/
/**
* Creates a text field with the specified text field properties.
* @memberof Api
* @typeofeditors ["CDE", "CFE"]
* @param {TextFormPr} oFormPr - Text field properties.
* @returns {ApiTextForm}
* @see office-js-api/Examples/../Sdkjs-Forms/Api/Methods/CreateTextForm.js
*/
Api . prototype . CreateTextForm = function ( oFormPr )
{
if ( ! oFormPr )
oFormPr = { } ;
let f orm = CreateCommonForm ( oFormPr ) ;
ApplyTextFormPr ( form , oFormPr ) ;
Check FormKey ( f orm) ;
return new AscBuilder . Api TextForm( form ) ;
return executeNoFormLockCheck ( function ( )
{
if ( ! oFormPr )
oF ormPr = { } ;
let form = CreateCommon Form ( oF ormPr ) ;
Apply TextFormPr ( form , oFormPr );
CheckFormKey ( form ) ;
return new AscBuilder . ApiTextForm ( form ) ;
} , this ) ;
} ;
/**
* Creates a checkbox / radio button with the specified checkbox / radio button properties.
* @memberof Api
* @typeofeditors ["CDE", "CFE"]
* @param {CheckBoxFormPr} oFormPr - Checkbox / radio button properties.
* @returns {ApiCheckBoxForm}
* @see office-js-api/Examples/../Sdkjs-Forms/Api/Methods/CreateCheckBoxForm.js
*/
Api . prototype . CreateCheckBoxForm = function ( oFormPr )
{
if ( ! oFormPr )
oFormPr = { } ;
oFormPr [ "placeholder" ] = undefined ;
var oCC ;
var oCheckboxPr = new AscCommon . CSdtCheckBoxPr ( ) ;
if ( GetBoolParameter ( oFormPr [ "radio" ] , false ) )
return executeNoFormLockCheck ( function ( )
{
oCheckboxPr . CheckedSymbol = 0x25C9 ;
oCheckboxPr . UncheckedSymbol = 0x25CB ;
oCheckboxPr . GroupKey = GetStringParameter ( oFormPr [ "key" ] , "Group1" ) ;
}
else
{
oCheckboxPr . CheckedSymbol = 0x2611 ;
oCheckboxPr . UncheckedSymbol = 0x2610 ;
}
oCheckboxPr . C heckedFont = "Segoe UI Symbol" ;
oCheckboxPr . UncheckedFont = "Segoe UI Symbol" ;
var nCheckedSymbol = oCheckboxPr && oCheckboxPr . CheckedSymbol ? oCheckboxPr . CheckedSymbol : Asc . c _oAscSdtCheckBoxDefaults . CheckedSymbol ;
var nUncheckedSymbol = oCheckboxPr && oCheckboxPr . UncheckedSymbol ? oCheckboxPr . UncheckedSymbol : Asc . c _oAscSdtCheckBoxDefaults . UncheckedSymbol ;
var sCheckedFont = oCheckboxPr && oCheckboxPr . CheckedFont ? oCheckboxPr . CheckedFont : Asc . c _oAscSdtCheckBoxDefaults . CheckedFont ;
var sUncheckedFont = oCheckboxPr && oCheckboxPr . UncheckedFont ? oCheckboxPr && oCheckboxPr . UncheckedFont : Asc . c _oAscSdtCheckBoxDefaults . UncheckedFont ;
var isLoadFonts = false ;
if ( ! AscCommon . IsAscFontSupport ( s CheckedFont, nChecked Symbol) )
{
isLoadFonts = true ;
AscFonts . FontPickerByCharacter . getFontBySymbol ( n CheckedSymbol) ;
}
if ( ! AscCommon . IsAscFontSupport ( s UncheckedFont, nUncheckedSymbol ) )
{
isLoadFonts = tru e;
AscFonts . FontPickerByCharacter . getFontBySymbol ( nUnc heckedSymbol) ;
}
function private _PerformAddCheckBox ( )
{
oCC = CreateCommonForm ( oFormPr ) ;
oCC . ApplyCheckBoxPr ( oCheckboxPr ) ;
}
if ( isLoadFonts )
{
var oFonts = { } ;
oFonts [ sCheckedFont ] = true ;
oFonts [ sUncheckedFont ] = true ;
AscCommon . Check _LoadingDataBeforePrepaste ( this , oFonts , { } , private _PerformAdd CheckB ox) ;
}
else
{
private _PerformAddCheckBox ( ) ;
}
CheckFormKey ( oCC ) ;
return new AscBuilder . ApiCheckBoxForm ( oCC ) ;
if ( ! oFormPr )
oFormPr = { } ;
oFormPr [ "placeholder" ] = undefined ;
var oCC ;
var oCheckboxPr = new AscCommon . CSdtCheckBoxPr ( ) ;
if ( GetBoolParameter ( oFormPr [ "radio" ] , false ) )
{
oCheckboxPr . CheckedSymbol = 0x25C9 ;
oCheckboxPr . Unc heckedSymbol = 0x25CB ;
oCheckboxPr . GroupKey = GetStringParameter ( oFormPr [ "key" ] , "Group1" ) ;
}
else
{
oCheckboxPr . CheckedSymbol = 0x2611 ;
oCheckboxPr . UncheckedSymbol = 0x2610 ;
}
oCheckboxPr . CheckedFont = "Segoe UI Symbol" ;
oCheckboxPr . UncheckedFont = "Segoe UI Symbol" ;
var nCheckedSymbol = oCheckboxPr && oCheckboxPr . CheckedSymbol ? oCheckboxPr . CheckedSymbol : Asc . c _oAscSdtCheckBoxDefaults . CheckedSymbol;
var nUncheckedSymbol = oCheckboxPr && oCheckboxPr . UncheckedSymbol ? oCheckboxPr . UncheckedSymbol : Asc . c _oAscSdtCheckBoxDefaults . UncheckedSymbol ;
var sCheckedFont = oCheckboxPr && oCheckboxPr . CheckedFont ? oCheckboxPr . CheckedFont : Asc . c _oAscSdtCheckBoxDefaults . CheckedFont ;
var sUncheckedFont = oCheckboxPr && oCheckboxPr . UncheckedFont ? oCheckboxPr && oCheckboxPr . UncheckedFont : Asc . c _oAscSdtCheckBoxDefaults . UncheckedFont ;
var isLoadFonts = fals e;
if ( ! AscCommon . IsAscFontSupport ( sCheckedFont , nC heckedSymbol) )
{
isLoadFonts = true ;
AscFonts . FontPickerByCharacter . getFontBySymbol ( nCheckedSymbol ) ;
}
if ( ! AscCommon . IsAscFontSupport ( sUncheckedFont , nUncheckedSymbol ) )
{
isLoadFonts = true ;
AscFonts . FontPickerByCharacter . getFontBySymbol ( nUncheckedSymbol ) ;
}
function private _PerformAddCheckBox ( )
{
oCC = CreateCommonForm ( oFormPr ) ;
oCC . ApplyCheckBoxPr ( o Checkb oxPr ) ;
}
if ( isLoadFonts )
{
var oFonts = { } ;
oFonts [ sCheckedFont ] = true ;
oFonts [ sUncheckedFont ] = true ;
AscCommon . Check _LoadingDataBeforePrepaste ( this , oFonts , { } , private _PerformAddCheckBox ) ;
}
else
{
private _PerformAddCheckBox ( ) ;
}
CheckFormKey ( oCC ) ;
return new AscBuilder . ApiCheckBoxForm ( oCC ) ;
} , this ) ;
} ;
/**
* Creates a combo box / dropdown list with the specified combo box / dropdown list properties.
* @memberof Api
* @typeofeditors ["CDE", "CFE"]
* @param {ComboBoxFormPr} oFormPr - Combo box / dropdown list properties.
* @returns {ApiComboBoxForm}
* @see office-js-api/Examples/../Sdkjs-Forms/Api/Methods/CreateComboBoxForm.js
*/
Api . prototype . CreateComboBoxForm = function ( oFormPr )
{
if ( ! oFormPr )
oFormPr = { } ;
var oPr = new AscCommon . CSdtComboBoxPr ( ) ;
oPr . AddItem ( AscCommon . translateManager . getValue ( "Choose an item" ) , "" ) ;
var oCC = CreateCommonForm ( oFormPr ) ;
let sPlaceholder = GetStringParameter ( oFormPr [ "placeholder" ] , undefined ) ;
let arrList = GetArrayParameter ( oFormPr [ "items" ] , [ ] ) ;
for ( let nIndex = 0 , nCount = arrList . length ; nIndex < nCount ; ++ nIndex )
return executeNoFormLockCheck ( function ( )
{
let oItem = arrList [ nIndex ] ;
if ( GetStringParameter ( oItem , null ) )
if ( ! oFormPr )
oFormPr = { } ;
var oPr = new AscCommon . CSdtComboBoxPr ( ) ;
oPr . AddItem ( AscCommon . translateManager . getValue ( "Choose an item" ) , "" ) ;
var oCC = CreateCommonForm ( oFormPr ) ;
let sPlaceholder = GetStringParameter ( oFormPr [ "placeholder" ] , undefined ) ;
let arrList = GetArrayParameter ( oFormPr [ "items" ] , [ ] ) ;
for ( let nIndex = 0 , nCount = arrList . length ; nIndex < nCount ; ++ nIndex )
{
oPr . AddItem ( oItem , oItem ) ;
let oItem = arrList [ nIndex ] ;
if ( GetStringParameter ( oItem , null ) )
{
oPr . AddItem ( oItem , oItem ) ;
}
else if ( GetArrayParameter ( oItem , null ) )
{
let sDisplay = GetStringParameter ( oItem [ 0 ] , null ) ;
let sValue = GetStringParameter ( oItem [ 1 ] , null ) ;
if ( null !== sDisplay && null !== sValue )
oPr . AddItem ( sDisplay , sValue ) ;
}
}
else if ( GetArray Parameter ( oItem , null ) )
oPr . SetAutoFit ( GetBool Parameter ( oFormPr [ "autoFit" ] , false ) ) ;
if ( ! GetBoolParameter ( oFormPr [ "editable" ] , false ) )
{
let sDisplay = GetStringParameter ( oItem [ 0 ] , null ) ;
let sValue = GetStringParameter ( oItem [ 1 ] , null ) ;
if ( null !== sDisplay && null !== sValue )
oPr . AddItem ( sDisplay , sValue ) ;
}
}
oPr . SetAutoFit ( GetBoolParameter ( oFormPr [ "autoFit" ] , false ) ) ;
if ( ! GetBoolParameter ( oFormPr [ "editable" ] , false ) )
{
if ( sPlaceholder )
{
oCC . ApplyDropDownListPr ( oPr ) ;
if ( sPlaceholder )
{
oCC . ApplyDropDownListPr ( oPr ) ;
}
else
{
oCC . SetDropDownListPr ( oPr ) ;
oCC . SelectListItem ( ) ;
}
}
else
{
oCC . SetDropDownListPr ( oP r) ;
oCC . SelectListItem ( ) ;
if ( sPlaceholde r)
{
oCC . ApplyComboBoxPr ( oPr ) ;
}
else
{
oCC . SetComboBoxPr ( oPr ) ;
oCC . SelectListItem ( ) ;
}
}
}
else
{
if ( sPlaceholder )
{
oCC . ApplyComboBoxPr ( oPr ) ;
}
else
{
oCC . SetComboBoxPr ( oPr ) ;
oCC . SelectListItem ( ) ;
}
}
CheckFormKey ( oCC ) ;
return new AscBuilder . ApiComboBoxForm ( oCC ) ;
CheckFormKey ( oCC ) ;
return new AscBuilder . ApiComboBoxForm ( oCC ) ;
} , this ) ;
} ;
/**
* Creates a picture form with the specified picture form properties.
* @memberof Api
* @typeofeditors ["CDE", "CFE"]
* @param {PictureFormPr} oFormPr - Picture form properties.
* @returns {ApiPictureForm}
* @see office-js-api/Examples/../Sdkjs-Forms/Api/Methods/CreatePictureForm.js
*/
Api . prototype . CreatePictureForm = function ( oFormPr )
{
if ( ! oFormPr )
oFormPr = { } ;
if ( GetStringParameter ( "placeholder" , null ) )
oFormPr [ "placeholder" ] = AscCommon . translateManager . getValue ( "Click to load image" ) ;
var oCC = CreateCommonForm ( oFormPr ) ;
oCC . ApplyPicturePr ( true ) ;
oCC . ConvertFormToFixed ( ) ;
let oPr = new AscCommon . CSdtPictureFormPr ( ) ;
let sScale = GetStringParameter ( oFormPr [ "scaleFlag" ] , undefined ) ;
switch ( sScale )
return executeNoFormLockCheck ( function ( )
{
case "always" : oPr . SetScaleFlag ( Asc . c _oAscPictureFormScaleFlag . Always ) ; break ;
case "never" : oPr . SetScaleFlag ( Asc . c _oAscPictureFormScaleFlag . Never ) ; break ;
case "tooBig" : oPr . SetScaleFlag ( Asc . c _oAscPictureFormScaleFlag . Bigger ) ; break ;
case "tooSmall" : oPr . S etScaleFlag ( Asc . c _oAscPictureFormScaleFlag . Smaller ) ; break ;
}
oPr . SetConstantProportions ( GetBoolParameter ( oFormPr [ "lockAspectRatio" ] , true ) ) ;
oPr . SetRespectBorders ( GetBoolParameter ( oFormPr [ "respectBorders" ] , false ) ) ;
oPr . SetShiftX ( Math . max ( 0 , Math . min ( 100 , GetNumberParameter ( oFormPr [ "shiftX" ] , 50 ) ) ) / 100 ) ;
oPr . SetShiftY ( Math . max ( 0 , Math . min ( 100 , GetNumberParameter ( oFormPr [ "shiftY" ] , 50 ) ) ) / 100 ) ;
oCC . SetPictureFormPr ( oPr ) ;
CheckFormKey ( oCC ) ;
return new AscBuilder . ApiPictureForm ( oCC ) ;
if ( ! oFormPr )
oFormPr = { } ;
if ( G etStringParameter ( "placeholder" , null ) )
oFormPr [ "placeholder" ] = AscCommon . translateManager . getValue ( "Click to load image" ) ;
var oCC = CreateCommonForm ( oFormPr ) ;
oCC . ApplyPicturePr ( true ) ;
oCC . ConvertFormToFixed ( ) ;
let oPr = new AscCommon . CSdtPictureFormPr ( ) ;
let sScale = GetStringParameter ( oFormPr [ "scaleFlag" ] , undefined ) ;
switch ( sScale )
{
case "always" :
oPr . SetScaleFlag ( Asc . c _oAscPictureFormScaleFlag . Always ) ;
break ;
case "never" :
oPr . SetScaleFlag ( Asc . c _oAscPictureFormScaleFlag . Never ) ;
break ;
case "tooBig" :
oPr . SetScaleFlag ( Asc . c _oAscPictureFormScaleFlag . Bigger ) ;
break ;
case "tooSmall" :
oPr . SetScaleFlag ( Asc . c _oAscPictureFormScaleFlag . Smaller ) ;
break ;
}
oPr . SetConstantProportions ( GetBoolParameter ( oFormPr [ "lockAspectRatio" ] , true ) ) ;
oPr . SetRespectBorders ( GetBoolParameter ( oFormPr [ "respectBorders" ] , false ) ) ;
oPr . SetShiftX ( Math . max ( 0 , Math . min ( 100 , GetNumberParameter ( oFormPr [ "shiftX" ] , 50 ) ) ) / 100 ) ;
oPr . SetShiftY ( Math . max ( 0 , Math . min ( 100 , GetNumberParameter ( oFormPr [ "shiftY" ] , 50 ) ) ) / 100 ) ;
oCC . SetPictureFormPr ( oPr ) ;
CheckFormKey ( oCC ) ;
return new AscBuilder . ApiPictureForm ( oCC ) ;
} , this ) ;
} ;
/**
* Creates a date form with the specified date form properties.
* @memberof Api
* @typeofeditors ["CDE", "CFE"]
* @param {DateFormPr} oFormPr - Date form properties.
* @returns {ApiDateForm}
* @see office-js-api/Examples/../Sdkjs-Forms/Api/Methods/CreateDateForm.js
*/
Api . prototype . CreateDateForm = function ( oFormPr )
{
return executeNoFormLockCheck ( function ( )
{
if ( ! oFormPr )
oFormPr = { } ;
let form = CreateCommonForm ( oFormPr ) ;
ApplyDateFormPr ( form , oFormPr ) ;
CheckFormKey ( form ) ;
return new AscBuilder . ApiDateForm ( form ) ;
} , this ) ;
} ;
/**
* Inserts a text box with the specified text box properties over the selected text.
* @memberof ApiDocument
* @typeofeditors ["CDE", "CFE"]
* @param {TextFormInsertPr} oFormPr - Properties for inserting a text field.
* @returns {ApiTextForm}
* @see office-js-api/Examples/../Sdkjs-Forms/ApiDocument/Methods/InsertTextForm.js
*/
ApiDocument . prototype . InsertTextForm = function ( oFormPr )
{
if ( ! oFormPr )
oFormPr = { } ;
let logicDocument = this . Document ;
let placeholder = GetStringParameter ( oFormPr [ "placeholder" ] , undefined ) ;
if ( GetBoolParameter ( oFormPr [ "placeholderFromSelection" ] , false ) )
placeholder = logicDocument . GetSelectedText ( ) ;
if ( ! GetBoolParameter ( oFormPr [ "keepSelectedTextInForm" ] , true ) )
logicDocument . RemoveBeforePaste ( ) ;
let contentControl = logicDocument . AddContentControl ( c _oAscSdtLevelType . Inline ) ;
if ( ! contentControl )
return null ;
ApplyCommonFormPr ( contentControl , oFormPr ) ;
SetFormPlaceholder ( contentControl , placeholder ) ;
ApplyText FormPr ( contentControl , oFormPr , true );
CheckFormKey ( contentControl ) ;
return new AscBuilder . Api TextForm( contentControl ) ;
return executeNoFormLockCheck ( function ( )
{
if ( ! oFormPr )
oFormPr = { } ;
let logicDocument = this . Document ;
let placeholder = GetStringParameter ( oFormPr [ "placeholder" ] , undefined ) ;
if ( GetBoolParameter ( oFormPr [ "placeholderFromSelection" ] , false ) )
placeholder = logicDocument . GetSelectedText ( ) ;
if ( ! GetBoolParameter ( oFormPr [ "keepSelectedTextInForm" ] , true ) )
logicDocument . RemoveBeforePaste ( ) ;
let contentControl = logicDocument . AddContentControl ( c _oAscSdtLevelType . Inline ) ;
if ( ! contentControl )
return null ;
ApplyCommon FormPr ( contentControl , oFormPr ) ;
SetFormPlaceholder ( contentControl , placeholder );
Apply TextFormPr ( contentControl , oFormPr , true );
CheckFormKey ( contentControl ) ;
return new AscBuilder . ApiTextForm ( contentControl ) ;
} , this ) ;
} ;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Private area
@ -412,6 +496,19 @@
textFormPr . SetWidth ( ( GetNumberParameter ( formPr [ "cellWidth" ] , 0 ) * 72 * 20 / 25.4 ) | 0 ) ;
form . ApplyTextFormPr ( textFormPr , keepContent ) ;
}
function ApplyDateFormPr ( form , formPr )
{
let datePickerPr = new AscCommon . CSdtDatePickerPr ( ) ;
var nLcid = Asc . g _oLcidNameToIdMap [ formPr [ "lang" ] ] ;
if ( undefined == nLcid )
nLcid = 1033 ;
datePickerPr . SetDateFormat ( GetStringParameter ( formPr [ "format" ] , "mm/dd/yyyy" ) ) ;
datePickerPr . SetLangId ( nLcid ) ;
form . ApplyDatePickerPr ( datePickerPr ) ;
}
function CheckFormKey ( form )
{
let logicDocument = editor && editor . WordControl && editor . WordControl . m _oLogicDocument ;
@ -438,9 +535,11 @@
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Api . prototype [ "CreateTextForm" ] = Api . prototype . CreateTextForm ;
Api . prototype [ "CreatePictureForm" ] = Api . prototype . CreatePictureForm ;
Api . prototype [ "CreateDateForm" ] = Api . prototype . CreateDateForm ;
Api . prototype [ "CreateCheckBoxForm" ] = Api . prototype . CreateCheckBoxForm ;
Api . prototype [ "CreateComboBoxForm" ] = Api . prototype . CreateComboBoxForm ;
ApiDocument . prototype [ "InsertTextForm" ] = ApiDocument . prototype . InsertTextForm ;
} ( window , null ) ) ;