diff options
author | Jean-Pierre Ledure <jp@ledure.be> | 2022-03-15 17:26:13 +0100 |
---|---|---|
committer | Jean-Pierre Ledure <jp@ledure.be> | 2022-03-16 09:44:59 +0100 |
commit | 3044d81586365cd35b6f3ed51b7be9ec4f50638d (patch) | |
tree | 75ff8632498527bbcc567f94e29f8ae1c355fb89 /wizards | |
parent | 5b320aa058504becae6ac6746926b481b326a24d (diff) |
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.
Change-Id: Icdee6ee9909f577f6c01ba96864fe3d6eaf3e750
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131618
Tested-by: Jean-Pierre Ledure <jp@ledure.be>
Tested-by: Jenkins
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
Diffstat (limited to 'wizards')
-rw-r--r-- | wizards/source/sfdocuments/SF_Form.xba | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/wizards/source/sfdocuments/SF_Form.xba b/wizards/source/sfdocuments/SF_Form.xba index 15c3d498e78e..404c24bd3b20 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 |