diff options
author | Jean-Pierre Ledure <jp@ledure.be> | 2021-04-26 19:29:08 +0200 |
---|---|---|
committer | Jean-Pierre Ledure <jp@ledure.be> | 2021-04-27 11:02:23 +0200 |
commit | cf017d0b4316f52271fe91f8c18a5e648fd5d682 (patch) | |
tree | 03542e12d271f3bea3a8b6aabbde1b1bc90726ed | |
parent | d507c8b3e2939f66a395f163b5f21c29ffe59d02 (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>
-rw-r--r-- | wizards/source/sfdialogs/SF_Register.xba | 4 |
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) ' Python and GlobalScope Set oDialogProvider = vContext.getServiceManager().createInstanceWithContext("com.sun.star.awt.DialogProvider", vContext) Case Not IsNull(vContext) And Not IsNull(oComp) ' Python and Document - Set oDialogProvider = vContext.getServiceManager().createInstanceWithContext("com.sun.star.awt.DialogProvider", Array(oComp)) + Set oDialogProvider = vContext.getServiceManager().createInstanceWithArguments("com.sun.star.awt.DialogProvider", Array(oComp)) End Select ' Create the graphical interface @@ -344,4 +344,4 @@ CatchNotFound: End Function ' SFDialogs.SF_Register._NewDialog REM ============================================== END OF SFDIALOGS.SF_REGISTER -</script:module> +</script:module>
\ No newline at end of file |