wizards/source/sfdialogs/SF_Register.xba |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit cf017d0b4316f52271fe91f8c18a5e648fd5d682
Author:     Jean-Pierre Ledure <j...@ledure.be>
AuthorDate: Mon Apr 26 19:29:08 2021 +0200
Commit:     Jean-Pierre Ledure <j...@ledure.be>
CommitDate: Tue Apr 27 11:02:23 2021 +0200

    ScriptForge - (SFDialogs.SF_Register) DialogProvider
    
    When launching a dialog from a Python script while the
    dialog is contained in a document, the DialogProvider setup
    from that context was built by the wrong method.
    
    Use createInstanceWithArguments()
    i.o. createInstanceWithContext()
    
    This caused a LibreOffice crash.
    
    Change-Id: I3615c55068134085579662004f5bb085de008cbd
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114677
    Tested-by: Jean-Pierre Ledure <j...@ledure.be>
    Tested-by: Jenkins
    Reviewed-by: Jean-Pierre Ledure <j...@ledure.be>

diff --git a/wizards/source/sfdialogs/SF_Register.xba 
b/wizards/source/sfdialogs/SF_Register.xba
index 8a807346babf..b99c9e337526 100644
--- a/wizards/source/sfdialogs/SF_Register.xba
+++ b/wizards/source/sfdialogs/SF_Register.xba
@@ -311,7 +311,7 @@ Try:
                Case Not IsNull(vContext) And IsNull(oComp)             &apos;  
Python and GlobalScope
                        Set oDialogProvider = 
vContext.getServiceManager().createInstanceWithContext(&quot;com.sun.star.awt.DialogProvider&quot;,
 vContext)
                Case Not IsNull(vContext) And Not IsNull(oComp) &apos;  Python 
and Document
-                       Set oDialogProvider = 
vContext.getServiceManager().createInstanceWithContext(&quot;com.sun.star.awt.DialogProvider&quot;,
 Array(oComp))
+                       Set oDialogProvider = 
vContext.getServiceManager().createInstanceWithArguments(&quot;com.sun.star.awt.DialogProvider&quot;,
 Array(oComp))
        End Select
 
        &apos;  Create the graphical interface
@@ -344,4 +344,4 @@ CatchNotFound:
 End Function   &apos;  SFDialogs.SF_Register._NewDialog
 
 REM ============================================== END OF SFDIALOGS.SF_REGISTER
-</script:module>
+</script:module>
\ No newline at end of file
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to