wizards/source/sfdocuments/SF_Form.xba | 1 + 1 file changed, 1 insertion(+)
New commits: commit 0b2f9de17be252222533f4775c9357f527cdd1b1 Author: Jean-Pierre Ledure <[email protected]> AuthorDate: Wed Mar 16 11:24:51 2022 +0100 Commit: Jean-Pierre Ledure <[email protected]> CommitDate: Wed Mar 16 16:07:23 2022 +0100 ScriptForge - (SF_Form) fix use of BaseForm Context: Base documents. In a form or formcontrol event, a user script might need the name of the form document in which the form or control is located, f.i. to close it. The name of the form document is supposed to be found in the SF_Form.BaseForm property. The property is set correctly when the Base form document to form/formcontrol path is taken (top-down), not when the opposite path is taken (bottom-up), typically in events. In the latter case BaseForm is equal to an empty string. The actual commit initializes correctly the BaseForm property with the hierarchical name of the form document. Fix on master: https://gerrit.libreoffice.org/c/core/+/131618 Change-Id: I1fc98c87c8f72a6b92d456fa74395c7919ce284c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131649 Tested-by: Jenkins Tested-by: Jean-Pierre Ledure <[email protected]> Reviewed-by: Jean-Pierre Ledure <[email protected]> diff --git a/wizards/source/sfdocuments/SF_Form.xba b/wizards/source/sfdocuments/SF_Form.xba index 93beee283c37..034f803b3bf3 100644 --- a/wizards/source/sfdocuments/SF_Form.xba +++ b/wizards/source/sfdocuments/SF_Form.xba @@ -1259,6 +1259,7 @@ Try: Set _Component = oParent If IsNull([_Parent]._FormDocuments) Then Set [_Parent]._FormDocuments = _Component.getFormDocuments() Set _FormDocument = [_Parent]._FindByPersistentName([_Parent]._FormDocuments, sPersistentName) + _FormDocumentName = _FormDocument.HierarchicalName Case Else End Select If oSession.HasUnoProperty(oParent, "Parent") Then Set oParent = oParent.Parent Else Set oParent = Nothing
