summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorJean-Pierre Ledure <jp@ledure.be>2021-06-19 10:08:46 +0200
committerJean-Pierre Ledure <jp@ledure.be>2021-06-19 13:58:49 +0200
commite48dd86341fff8a010f514bbcd818468f3a92815 (patch)
tree843148d2d25abab4e408f2c69c194ae724ec93ff /wizards
parent5d4b54a7e1b78598501ad86c855d662652be7c8e (diff)
ScriptForge - (SF_PythonHelper.xba) fix signature of PyInputBox()
The last 2 arguments have resp. XPosTwips and YPosTwips as names. The signature in Python is correct. The signature in Basic still used the XPos and YPos names. No visibility towards users. No need to cherry-pick to the 7.2 branch. Change-Id: Id93de702cbcb0f3ae72a1f95247189299cb7cf30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117482 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/scriptforge/SF_PythonHelper.xba18
1 files changed, 9 insertions, 9 deletions
diff --git a/wizards/source/scriptforge/SF_PythonHelper.xba b/wizards/source/scriptforge/SF_PythonHelper.xba
index 71cdab87a7cb..931a37adb3c4 100644
--- a/wizards/source/scriptforge/SF_PythonHelper.xba
+++ b/wizards/source/scriptforge/SF_PythonHelper.xba
@@ -472,17 +472,17 @@ REM ----------------------------------------------------------------------------
Public Function PyInputBox(ByVal Msg As Variant _
, ByVal Title As Variant _
, ByVal Default As Variant _
- , Optional ByVal XPos As Variant _
- , Optional ByVal YPos As Variant _
+ , Optional ByVal XPosTwips As Variant _
+ , Optional ByVal YPosTwips As Variant _
) As String
&apos;&apos;&apos; Convenient function to replicate InputBox() in Python scripts
&apos;&apos;&apos; Args:
&apos;&apos;&apos; Msg: String expression displayed as the message in the dialog box
&apos;&apos;&apos; Title: String expression displayed in the title bar of the dialog box
&apos;&apos;&apos; Default: String expression displayed in the text box as default if no other input is given
-&apos;&apos;&apos; XPos: Integer expression that specifies the horizontal position of the dialog
-&apos;&apos;&apos; YPos: Integer expression that specifies the vertical position of the dialog
-&apos;&apos;&apos; If XPos and YPos are omitted, the dialog is centered on the screen
+&apos;&apos;&apos; XPosTwips: Integer expression that specifies the horizontal position of the dialog
+&apos;&apos;&apos; YPosTwips: Integer expression that specifies the vertical position of the dialog
+&apos;&apos;&apos; If XPosTwips and YPosTwips are omitted, the dialog is centered on the screen
&apos;&apos;&apos; The position is specified in twips.
&apos;&apos;&apos; Returns:
&apos;&apos;&apos; The entered value or &quot;&quot; if the user pressed the Cancel button
@@ -491,20 +491,20 @@ Public Function PyInputBox(ByVal Msg As Variant _
Dim sInput As String &apos; Return value
Const cstThisSub = &quot;Basic.InputBox&quot;
-Const cstSubArgs = &quot;msg, [title=&apos;&apos;], [default=&apos;&apos;], [xpos], [ypos]&quot;
+Const cstSubArgs = &quot;msg, [title=&apos;&apos;], [default=&apos;&apos;], [xpostwips], [ypostwips]&quot;
If SF_Utils._ErrorHandling() Then On Local Error GoTo Catch
sInput = &quot;&quot;
Check:
- If IsMissing(YPos) Then YPos = 1
+ If IsMissing(YPosTwips) Then YPosTwips = 1
SF_Utils._EnterFunction(cstThisSub, cstSubArgs)
Try:
- If IsMissing(XPos) Then
+ If IsMissing(XPosTwips) Then
sInput = InputBox(Msg, Title, Default)
Else
- sInput = InputBox(Msg, Title, Default, XPos, YPos)
+ sInput = InputBox(Msg, Title, Default, XPosTwips, YPosTwips)
End If
Finally: