summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorJean-Pierre Ledure <jp@ledure.be>2021-04-26 19:29:08 +0200
committerJean-Pierre Ledure <jp@ledure.be>2021-04-27 11:02:23 +0200
commitcf017d0b4316f52271fe91f8c18a5e648fd5d682 (patch)
tree03542e12d271f3bea3a8b6aabbde1b1bc90726ed /wizards
parentd507c8b3e2939f66a395f163b5f21c29ffe59d02 (diff)
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 <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
Diffstat (limited to 'wizards')
-rw-r--r--wizards/source/sfdialogs/SF_Register.xba4
1 files changed, 2 insertions, 2 deletions
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