Compare commits

...

8 Commits

Author SHA1 Message Date
1970ce1d9b Merge branch release/v7.4.0 into master 2023-06-13 11:23:34 +00:00
5fa0d5013e Merge remote-tracking branch 'remotes/origin/hotfix/v7.3.3' into release/v7.4.0 2023-05-17 19:55:04 +05:00
93f3d5c0c9 Fix bug #62455
Fix issue with minimization
2023-05-04 13:56:34 +03:00
390d472b51 Fix bug #62375
Fix positioning of the added fixed form
2023-05-02 16:30:03 +03:00
e8037d127e Merge pull request #37 from ONLYOFFICE/feature/spi-docs
Api documentation
2023-04-28 18:48:27 +05:00
25754f8445 updated api docs 2023-04-28 16:42:25 +03:00
8a0aa0fdb4 Merge branch hotfix/v7.3.3 into master 2023-03-15 10:51:27 +00:00
b4073edd9a [oform] Fix problem with lock check when setting form value 2023-02-08 23:52:26 +05:00
2 changed files with 28 additions and 4 deletions

24
api.js
View File

@ -488,6 +488,11 @@ window["AscOForm"] = window.AscOForm = AscOForm;
|| !oForm.IsForm())
return;
// При проверке лока внутри параграфа мы ориентируемся на выделение внутри этого параграфа
// поэтому нужно выделить форму
let state = oLogicDocument.SaveDocumentState();
oForm.SelectContentControl();
let oParagraph = oForm.GetParagraph();
oForm.SkipFillingFormModeCheck(true);
@ -499,10 +504,12 @@ window["AscOForm"] = window.AscOForm = AscOForm;
CheckType : AscCommon.changestype_Paragraph_Content
}, true, oLogicDocument.IsFillingFormMode()))
{
oLogicDocument.LoadDocumentState(state);
oForm.SkipFillingFormModeCheck(false);
oForm.SkipSpecialContentControlLock(false);
return;
}
oLogicDocument.LoadDocumentState(state);
oForm.SkipFillingFormModeCheck(false);
oForm.SkipSpecialContentControlLock(false);
@ -646,8 +653,25 @@ window["AscOForm"] = window.AscOForm = AscOForm;
let drawing = form.ConvertFormToFixed();
if (drawing)
{
logicDocument.Recalculate(true);
let x = drawing.Internal_Position.Calculate_X_Value(Asc.c_oAscRelativeFromH.Page);
let y = drawing.Internal_Position.Calculate_Y_Value(Asc.c_oAscRelativeFromV.Page);
let drawingPr = new Asc.asc_CImgProperty();
drawingPr.asc_putWrappingStyle(Asc.c_oAscWrapStyle2.Square);
let positionH = new Asc.CImagePositionH();
drawingPr.asc_putPositionH(positionH);
positionH.put_UseAlign(false);
positionH.put_RelativeFrom(Asc.c_oAscRelativeFromH.Page);
positionH.put_Value(x);
let positionV = new Asc.CImagePositionV();
drawingPr.asc_putPositionV(positionV);
positionV.put_UseAlign(false);
positionV.put_RelativeFrom(Asc.c_oAscRelativeFromV.Page);
positionV.put_Value(y);
drawing.Set_Props(drawingPr);
drawing.SelectAsDrawing();
}

View File

@ -80,8 +80,8 @@
/**
* Form insertion specific properties.
* @typedef {Object} FormInsertPr
* @property {boolean} [placeholderFromSelection=false] - Specifies if the currently selected text should be saved as placeholder for the inserted form.
* @property {boolean} [keepSelectedTextInForm=true] - Specifies if the currently selected text should be saved as content for the inserted form.
* @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.
*/
/**
@ -340,9 +340,9 @@
return new AscBuilder.ApiPictureForm(oCC);
};
/**
* Insert a text box with the specified text box properties over of the selected text.
* Inserts a text box with the specified text box properties over the selected text.
* @memberof ApiDocument
* @param {TextFormPr} oFormPr - Text field properties.
* @param {TextFormInsertPr} oFormPr - Properties for inserting a text field.
* @returns {ApiTextForm}
*/
ApiDocument.prototype.InsertTextForm = function(oFormPr)