mirror of
https://github.com/ONLYOFFICE/sdkjs.git
synced 2026-04-07 14:09:12 +08:00
Fix bug #77520
Don't treat complex field with out ffData as a form field
This commit is contained in:
@ -2093,7 +2093,12 @@ CComplexField.prototype.IsFormFieldEnabled = function()
|
||||
};
|
||||
CComplexField.prototype.IsFormCheckBox = function()
|
||||
{
|
||||
return this.CheckType(AscWord.fieldtype_FORMCHECKBOX);
|
||||
if (!this.CheckType(AscWord.fieldtype_FORMCHECKBOX))
|
||||
return false;
|
||||
|
||||
let beginChar = this.GetBeginChar();
|
||||
let ffData = beginChar ? beginChar.GetFFData() : null;
|
||||
return ffData && ffData.isCheckBox();
|
||||
};
|
||||
CComplexField.prototype.ToggleFormCheckBox = function()
|
||||
{
|
||||
|
||||
@ -200,6 +200,10 @@
|
||||
writer.WriteLong(flags);
|
||||
writer.Seek(endPos);
|
||||
};
|
||||
FFData.prototype.isCheckBox = function()
|
||||
{
|
||||
return (!!this.checkBox);
|
||||
};
|
||||
FFData.fromBinary = function(reader)
|
||||
{
|
||||
let ffData = new FFData();
|
||||
|
||||
@ -4861,7 +4861,7 @@ ParaRun.prototype.Recalculate_Range = function(PRS, ParaPr, Depth)
|
||||
}
|
||||
isVisualFieldChar = true;
|
||||
}
|
||||
else if (oInstruction && AscWord.fieldtype_FORMCHECKBOX === oInstruction.GetType())
|
||||
else if (oComplexField.IsFormCheckBox())
|
||||
{
|
||||
isVisualFieldChar = true;
|
||||
Item.SetFormCheckBox(true);
|
||||
|
||||
Reference in New Issue
Block a user