[Libreoffice-commits] core.git: wizards/source

Jean-Pierre Ledure (via logerrit) logerrit at kemper.freedesktop.org
Sat Jun 19 11:59:30 UTC 2021


 wizards/source/scriptforge/SF_PythonHelper.xba |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

New commits:
commit e48dd86341fff8a010f514bbcd818468f3a92815
Author:     Jean-Pierre Ledure <jp at ledure.be>
AuthorDate: Sat Jun 19 10:08:46 2021 +0200
Commit:     Jean-Pierre Ledure <jp at ledure.be>
CommitDate: Sat Jun 19 13:58:49 2021 +0200

    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 at ledure.be>
    Tested-by: Jenkins
    Reviewed-by: Jean-Pierre Ledure <jp at ledure.be>

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
 '''	Convenient function to replicate InputBox() in Python scripts
 '''	Args:
 '''		Msg: String expression displayed as the message in the dialog box
 '''		Title: String expression displayed in the title bar of the dialog box
 '''		Default: String expression displayed in the text box as default if no other input is given
-'''		XPos: Integer expression that specifies the horizontal position of the dialog
-'''		YPos: Integer expression that specifies the vertical position of the dialog
-'''			If XPos and YPos are omitted, the dialog is centered on the screen
+'''		XPosTwips: Integer expression that specifies the horizontal position of the dialog
+'''		YPosTwips: Integer expression that specifies the vertical position of the dialog
+'''			If XPosTwips and YPosTwips are omitted, the dialog is centered on the screen
 '''			The position is specified in twips.
 '''	Returns:
 '''		The entered value or "" if the user pressed the Cancel button
@@ -491,20 +491,20 @@ Public Function PyInputBox(ByVal Msg As Variant _
 
 Dim sInput As String		'	Return value
 Const cstThisSub = "Basic.InputBox"
-Const cstSubArgs = "msg, [title=''], [default=''], [xpos], [ypos]"
+Const cstSubArgs = "msg, [title=''], [default=''], [xpostwips], [ypostwips]"
 
 	If SF_Utils._ErrorHandling() Then On Local Error GoTo Catch
 	sInput = ""
 
 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:


More information about the Libreoffice-commits mailing list