diff options
author | Andrea Gelmini <andrea.gelmini@gelma.net> | 2021-03-06 19:00:58 +0100 |
---|---|---|
committer | Jean-Pierre Ledure <jp@ledure.be> | 2021-03-07 12:26:46 +0100 |
commit | 476a37f76c218e7f54ff9ff4a0a6645f44517680 (patch) | |
tree | 98ee263e9617d50cd9f720a2650d979c6372effe /wizards | |
parent | a02cc6c60946991849452013aeaf2679f76d36c4 (diff) |
Fix typos
Change-Id: I0a6b74356bd689b54883efc4608a06fb9446e828
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112024
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
Tested-by: Jenkins
Tested-by: Jean-Pierre Ledure <jp@ledure.be>
Diffstat (limited to 'wizards')
-rw-r--r-- | wizards/source/scriptforge/SF_PythonHelper.xba | 18 | ||||
-rw-r--r-- | wizards/source/scriptforge/python/scriptforge.py | 12 |
2 files changed, 15 insertions, 15 deletions
diff --git a/wizards/source/scriptforge/SF_PythonHelper.xba b/wizards/source/scriptforge/SF_PythonHelper.xba index 443a75d4afdb..b90454dcd88d 100644 --- a/wizards/source/scriptforge/SF_PythonHelper.xba +++ b/wizards/source/scriptforge/SF_PythonHelper.xba @@ -20,7 +20,7 @@ Option Explicit ''' bas = CreateScriptService('Basic') ''' ''' This service proposes a collection of methods to be executed in a Python context -''' to simulate the exact behaviour of the identical Basic buitin method. +''' to simulate the exact behaviour of the identical Basic builtin method. ''' Typical example: ''' bas.MsgBox('This has to be displayed in a message box') ''' @@ -161,7 +161,7 @@ Public Function PyDateAdd(ByVal Add As Variant _ ''' Count: how many times to add (might be negative) ''' DateArg: a date as a string in iso format ''' Returns: -''' The new date date as a string in iso format +''' The new date as a string in iso format ''' Example: (Python code) ''' a = bas.DateAdd('d', 1, bas.Now()) ' Tomorrow @@ -320,7 +320,7 @@ Public Function PyFormat(ByVal Value As Variant _ Dim sFormat As String ' Return value Dim vValue As Variant ' Alias of Value Const cstThisSub = "Basic.Format" -Const cstSubArgs = "value, oattern" +Const cstSubArgs = "value, pattern" If SF_Utils._ErrorHandling() Then On Local Error GoTo Catch sFormat = "" @@ -515,7 +515,7 @@ Public Function _PythonDispatcher(ByRef BasicObject As Variant _ ''' with the given arguments ''' The invocation of the method can be a Property Get, Property Let or a usual call ''' NB: arguments and return values must not be 2D arrays -''' The implementation intends to be as AGNOSTIC as possible in termes of objects nature and methods called +''' The implementation intends to be as AGNOSTIC as possible in terms of objects nature and methods called ''' Args: ''' BasicObject: a module or a class instance - May also be the reserved string: "SF_Services" ''' CallType: one of the constants applicable to a CallByName statement + optional protocol flags @@ -533,7 +533,7 @@ Public Function _PythonDispatcher(ByRef BasicObject As Variant _ ''' [3] The object's ObjectType ''' [4] The object's service name ''' [5] The object's name -''' When an error occurs Python receives None as a scalar. This determines the occurence of a failure +''' When an error occurs Python receives None as a scalar. This determines the occurrence of a failure Dim vReturn As Variant ' The value returned by the invoked property or method Dim vReturnArray As Variant ' Return value @@ -570,7 +570,7 @@ Check: ' Ignore Null basic objects (Null = Null or Nothing) If IsNull(BasicObject) Or IsEmpty(BasicObject) Then GoTo Catch - ' Reinterprete arguments one by one into vArgs, examine iso-dates and conventional NoArgs/Empty/Null values + ' Reinterpret arguments one by one into vArgs, examine iso-dates and conventional NoArgs/Empty/Null values iNbArgs = -1 vArgs = Array() If UBound(Args) >= 0 Then @@ -605,7 +605,7 @@ Try: ' (2) Python has tuples and tuple of tuples, not 2D arrays ' (3) Passing 2D arrays through a script provider always transform it into a sequence of sequences ' 1. Methods in usual modules are called by ExecuteBasicScript() except if they use a ParamArray - ' 2. Properies in any service are got and set with obj.GetProperty/SetProperty(...) + ' 2. Properties in any service are got and set with obj.GetProperty/SetProperty(...) ' 3. Methods in class modules are invoked with CallByName ' 4. Methods in class modules using a 2D array or returning arrays, or methods using ParamArray, ''' are hardcoded as exceptions or are not implemented @@ -659,7 +659,7 @@ Try: Case 7 : vReturn = sess.ExecuteBasicScript(, sScript, vArgs(0), vArgs(1), vArgs(2), vArgs(3), vArgs(4), vArgs(5), vArgs(6), vArgs(7)) End Select - ' Properies in any service are got and set with obj.GetProperty/SetProperty(...) + ' Properties in any service are got and set with obj.GetProperty/SetProperty(...) ElseIf (CallType And vbGet) = vbGet Then ' vReturn = sess.ExecuteBasicScript(, sLibrary & "." & sObjectType & ".GetProperty", Script) vReturn = vBasicObject.GetProperty(Script) @@ -749,4 +749,4 @@ Private Function _Repr() As String End Function ' ScriptForge.SF_PythonHelper._Repr REM ================================================= END OF SCRIPTFORGE.SF_PythonHelper -</script:module>
\ No newline at end of file +</script:module> diff --git a/wizards/source/scriptforge/python/scriptforge.py b/wizards/source/scriptforge/python/scriptforge.py index 189a7f3049a4..fd1b3e0df957 100644 --- a/wizards/source/scriptforge/python/scriptforge.py +++ b/wizards/source/scriptforge/python/scriptforge.py @@ -220,7 +220,7 @@ class ScriptForge(object, metaclass = _Singleton): @classmethod def InvokeBasicService(cls, basicobject, flags, method, *args): """ - Execute a given Basic script and interprete its result + Execute a given Basic script and interpret its result This method has as counterpart the ScriptForge.SF_PythonHelper._PythonDispatcher() Basic method :param basicobject: a Service subclass :param flags: see the vb* and flg* constants below @@ -237,7 +237,7 @@ class ScriptForge(object, metaclass = _Singleton): [3] The object's ObjectType [4] The object's ServiceName [5] The object's name - When an error occurs Python receives None as a scalar. This determines the occurence of a failure + When an error occurs Python receives None as a scalar. This determines the occurrence of a failure The method returns either - the 0th element of the tuple when scalar, tuple or UNO object - a new Service() object or one of its subclasses otherwise @@ -256,7 +256,7 @@ class ScriptForge(object, metaclass = _Singleton): args = (basicobject,) + (flags,) + (method,) + args returntuple = cls.InvokeSimpleScript(script, args) # - # Interprete the result + # Interpret the result # Did an error occur in the Basic world ? if not isinstance(returntuple, (tuple, list)): raise RuntimeError("The execution of the method '" + method + "' failed. Execution stops.") @@ -355,7 +355,7 @@ class SFServices(object): """ Trivial initialization of internal properties If the subclass has its own __init()__ method, a call to this one should be its first statement. - Afterwards localProperties should be filled with the list of its own propertties + Afterwards localProperties should be filled with the list of its own properties """ self.objectreference = reference # the index in the Python storage where the Basic object is stored self.objecttype = objtype # ('SF_String', 'DICTIONARY', ...) @@ -542,7 +542,7 @@ class SFScriptForge: # ######################################################################### class SF_String(SFServices, metaclass = _Singleton): """ - A collection of methods focussed on string manipulation, user input validation, + A collection of methods focused on string manipulation, user input validation, regular expressions, encodings, parsing and hashing algorithms. Many of them are less efficient than their Python equivalents. """ @@ -673,4 +673,4 @@ def CreateScriptService(service, *args): # lists the scripts, that shall be visible inside the Basic/Python IDE # ###################################################################### -g_exportedScripts = ()
\ No newline at end of file +g_exportedScripts = () |