wizards/source/sfdocuments/SF_Form.xba |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit 3044d81586365cd35b6f3ed51b7be9ec4f50638d
Author:     Jean-Pierre Ledure <[email protected]>
AuthorDate: Tue Mar 15 17:26:13 2022 +0100
Commit:     Jean-Pierre Ledure <[email protected]>
CommitDate: Wed Mar 16 09:44:59 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.
    
    Change-Id: Icdee6ee9909f577f6c01ba96864fe3d6eaf3e750
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131618
    Tested-by: Jean-Pierre Ledure <[email protected]>
    Tested-by: Jenkins
    Reviewed-by: Jean-Pierre Ledure <[email protected]>

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, &quot;Parent&quot;) Then 
Set oParent = oParent.Parent Else Set oParent = Nothing

Reply via email to