Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / wizards / source / scriptforge / SF_Root.xba
blobe2649d0ce1d18c67f346e70a8430173491fffaea
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
3 <script:module xmlns:script="http://openoffice.org/2000/script" script:name="SF_Root" script:language="StarBasic" script:moduleType="normal">REM =======================================================================================================================
4 REM === The ScriptForge library and its associated libraries are part of the LibreOffice project. ===
5 REM === Full documentation is available on https://help.libreoffice.org/ ===
6 REM =======================================================================================================================
8 Option Compatible
9 Option ClassModule
10 Option Private Module
12 Option Explicit
14 &apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;
15 &apos;&apos;&apos; SF_Root
16 &apos;&apos;&apos; =======
17 &apos;&apos;&apos; FOR INTERNAL USE ONLY
18 &apos;&apos;&apos; Singleton class holding all persistent variables shared
19 &apos;&apos;&apos; by all the modules of the ScriptForge library
20 &apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;
22 REM ============================================================= PRIVATE MEMBERS
24 &apos; Internals
25 Private [Me] As Object
26 Private [_Parent] As Object
27 Private ObjectType As String &apos; Must be &quot;ROOT&quot;
28 Private MainFunction As String &apos; Name of method or property called by user script
29 Private MainFunctionArgs As String &apos; Syntax of method called by user script
30 Private StackLevel As Integer &apos; Depth of calls between internal methods
32 &apos; Error management
33 Private ErrorHandler As Boolean &apos; True = error handling active, False = internal debugging
34 Private ConsoleLines() As Variant &apos; Array of messages displayable in console
35 Private ConsoleDialog As Object &apos; SFDialogs.Dialog object
36 Private ConsoleControl As Object &apos; SFDialogs.DialogControl object
37 Private DisplayEnabled As Boolean &apos; When True, display of console or error messages is allowed
38 Private StopWhenError As Boolean &apos; When True, process stops after error &gt; &quot;WARNING&quot;
39 Private TriggeredByPython As Boolean &apos; When True, the actual user script is a Python script
40 Private DebugMode As Boolean &apos; When True, log enter/exit each official Sub
42 &apos; Progress and status bars
43 Private ProgressBarDialog As Object &apos; SFDialogs.Dialog object
44 Private ProgressBarText As Object &apos; SFDialogs.DialogControl object
45 Private ProgressBarBar As Object &apos; SFDialogs.DialogControl object
46 Private Statusbar As Object
48 &apos; Services management
49 Private ServicesList As Variant &apos; Dictionary of provided services
51 &apos; Usual UNO services
52 Private FunctionAccess As Object &apos; com.sun.star.sheet.FunctionAccess
53 Private PathSettings As Object &apos; com.sun.star.util.PathSettings
54 Private PathSubstitution As Object &apos; com.sun.star.util.PathSubstitution
55 Private ScriptProvider As Object &apos; com.sun.star.script.provider.MasterScriptProviderFactory
56 Private SystemShellExecute As Object &apos; com.sun.star.system.SystemShellExecute
57 Private CoreReflection As Object &apos; com.sun.star.reflection.CoreReflection
58 Private DispatchHelper As Object &apos; com.sun.star.frame.DispatchHelper
59 Private TextSearch As Object &apos; com.sun.star.util.TextSearch
60 Private SearchOptions As Object &apos; com.sun.star.util.SearchOptions
61 Private SystemLocale As Object &apos; com.sun.star.lang.Locale
62 Private OfficeLocale As Object &apos; com.sun.star.lang.Locale
63 Private FormatLocale As Object &apos; com.sun.star.lang.Locale
64 Private LocaleData As Object &apos; com.sun.star.i18n.LocaleData
65 Private CalendarImpl As Object &apos; com.sun.star.i18n.CalendarImpl
66 Private Number2Text As Object &apos; com.sun.star.linguistic2.NumberText
67 Private PrinterServer As Object &apos; com.sun.star.awt.PrinterServer
68 Private CharacterClass As Object &apos; com.sun.star.i18n.CharacterClassification
69 Private FileAccess As Object &apos; com.sun.star.ucb.SimpleFileAccess
70 Private FilterFactory As Object &apos; com.sun.star.document.FilterFactory
71 Private FolderPicker As Object &apos; com.sun.star.ui.dialogs.FolderPicker
72 Private FilePicker As Object &apos; com.sun.star.ui.dialogs.FilePicker
73 Private URLTransformer As Object &apos; com.sun.star.util.URLTransformer
74 Private Introspection As Object &apos; com.sun.star.beans.Introspection
75 Private BrowseNodeFactory As Object &apos; com.sun.star.script.browse.BrowseNodeFactory
76 Private DatabaseContext As Object &apos; com.sun.star.sdb.DatabaseContext
77 Private ConfigurationProvider _
78 As Object &apos; com.sun.star.configuration.ConfigurationProvider
79 Private PackageProvider As Object &apos; com.sun.star.comp.deployment.PackageInformationProvider
80 Private MailService As Object &apos; com.sun.star.system.SimpleCommandMail or com.sun.star.system.SimpleSystemMail
81 Private GraphicExportFilter As Object &apos; com.sun.star.drawing.GraphicExportFilter
82 Private Toolkit As Object &apos; com.sun.star.awt.Toolkit
83 Private ModuleUIConfigurationManagerSupplier As Object
84 &apos; com.sun.star.ui.ModuleUIConfigurationManagerSupplier
86 &apos; Specific persistent services objects or properties
87 Private FileSystemNaming As String &apos; If &quot;SYS&quot;, file and folder naming is based on operating system notation
88 Private PythonHelper As String &apos; File name of Python helper functions (stored in $(inst)/share/Scripts/python)
89 Private PythonHelper2 As String &apos; Alternate Python helper file name for test purposes
90 Private LocalizedInterface As Object &apos; ScriptForge own L10N service
91 Private OSName As String &apos; WIN, LINUX, MACOS
92 Private SFDialogs As Variant &apos; Persistent storage for the SFDialogs library
93 Private SFForms As Variant &apos; Persistent storage for the SF_Form class in the SFDocuments library
94 Private PythonStorage As Variant &apos; Persistent storage for the objects created and processed in Python
95 Private PythonPermanent As Long &apos; Number of permanent entries in PythonStorage containing standard module objects
97 REM ====================================================== CONSTRUCTOR/DESTRUCTOR
99 REM -----------------------------------------------------------------------------
100 Private Sub Class_Initialize()
101 Set [Me] = Nothing
102 Set [_Parent] = Nothing
103 ObjectType = &quot;ROOT&quot;
104 MainFunction = &quot;&quot;
105 MainFunctionArgs = &quot;&quot;
106 StackLevel = 0
107 ErrorHandler = True
108 ConsoleLines = Array()
109 Set ConsoleDialog = Nothing
110 Set ConsoleControl = Nothing
111 DisplayEnabled = True
112 StopWhenError = True
113 TriggeredByPython = False
114 DebugMode = False
115 Set ProgressBarDialog = Nothing
116 Set ProgressBarText = Nothing
117 Set progressBarBar = Nothing
118 Set Statusbar = Nothing
119 ServicesList = Empty
120 Set FunctionAccess = Nothing
121 Set PathSettings = Nothing
122 Set PathSubstitution = Nothing
123 Set ScriptProvider = Nothing
124 Set SystemShellExecute = Nothing
125 Set CoreReflection = Nothing
126 Set DispatchHelper = Nothing
127 Set TextSearch = Nothing
128 Set SearchOptions = Nothing
129 Set SystemLocale = Nothing
130 Set OfficeLocale = Nothing
131 Set FormatLocale = Nothing
132 Set LocaleData = Nothing
133 Set CalendarImpl = Nothing
134 Set Number2Text = Nothing
135 Set PrinterServer = Nothing
136 Set CharacterClass = Nothing
137 Set FileAccess = Nothing
138 Set FilterFactory = Nothing
139 Set FolderPicker = Nothing
140 Set FilePicker = Nothing
141 Set URLTransformer = Nothing
142 Set Introspection = Nothing
143 FileSystemNaming = &quot;ANY&quot;
144 PythonHelper = &quot;ScriptForgeHelper.py&quot;
145 PythonHelper2 = &quot;&quot;
146 Set LocalizedInterface = Nothing
147 Set BrowseNodeFactory = Nothing
148 Set DatabaseContext = Nothing
149 Set ConfigurationProvider = Nothing
150 Set PackageProvider = Nothing
151 Set MailService = Nothing
152 Set GraphicExportFilter = Nothing
153 Set Toolkit = Nothing
154 Set ModuleUIConfigurationManagerSupplier = Nothing
155 OSName = &quot;&quot;
156 SFDialogs = Empty
157 SFForms = Empty
158 PythonStorage = Empty
159 PythonPermanent = -1
160 End Sub &apos; ScriptForge.SF_Root Constructor
162 REM -----------------------------------------------------------------------------
163 Private Sub Class_Terminate()
164 Call Class_Initialize()
165 End Sub &apos; ScriptForge.SF_Root Destructor
167 REM -----------------------------------------------------------------------------
168 Public Function Dispose() As Variant
169 Call Class_Terminate()
170 Set Dispose = Nothing
171 End Function &apos; ScriptForge.SF_Root Explicit destructor
173 REM =========================================================== PRIVATE FUNCTIONS
175 REM -----------------------------------------------------------------------------
176 Public Sub _AddToConsole(ByVal psLine As String)
177 &apos;&apos;&apos; Add a new line to the console
178 &apos;&apos;&apos; TAB characters are expanded before the insertion of the line
179 &apos;&apos;&apos; NB: Array redimensioning of a member of an object must be done in the class module
180 &apos;&apos;&apos; Args:
181 &apos;&apos;&apos; psLine: the line to add
183 Dim lConsole As Long &apos; UBound of ConsoleLines
184 Dim sLine As String &apos; Alias of psLine
186 &apos; Resize ConsoleLines
187 lConsole = UBound(ConsoleLines)
188 If lConsole &lt; 0 Then
189 ReDim ConsoleLines(0)
190 Else
191 ReDim Preserve ConsoleLines(0 To lConsole + 1)
192 End If
194 &apos; Add a timestamp to the line and insert it (without date)
195 sLine = Mid(SF_Utils._Repr(Now()), 12) &amp; &quot; -&gt; &quot; &amp; psLine
196 ConsoleLines(lConsole + 1) = sLine
198 &apos; Add the new line to the actual (probably non-modal) console, if active
199 If Not IsNull(ConsoleDialog) Then
200 If ConsoleDialog._IsStillAlive(False) Then &apos; False to not raise an error
201 If IsNull(ConsoleControl) Then Set ConsoleControl = ConsoleDialog.Controls(SF_Exception.CONSOLENAME) &apos; Should not happen ...
202 ConsoleControl.WriteLine(sLine)
203 End If
204 End If
206 End Sub &apos; ScriptForge.SF_Root._AddToConsole
208 REM -----------------------------------------------------------------------------
209 Public Function _AddToPythonStorage(ByRef poObject As Object) As Long
210 &apos;&apos;&apos; Insert a newly created object in the Python persistent storage
211 &apos;&apos;&apos; and return the index of the used entry
212 &apos;&apos;&apos; The persistent storage is a simple array of objects
213 &apos;&apos;&apos; Args:
214 &apos;&apos;&apos; poObject: the object to insert
216 Dim lIndex As Long &apos; Return value
217 Dim lSize As Long &apos; UBound of the persistent storage
218 Dim i As Long
220 Check:
221 lIndex = -1
222 If IsNull(poObject) Then Exit Function
223 On Local Error GoTo Finally
224 lSize = UBound(PythonStorage)
226 Try:
227 &apos; Can an empty entry be reused ?
228 For i = PythonPermanent + 1 To lSize
229 If IsNull(PythonStorage(i)) Then
230 lIndex = i
231 Exit For
232 End If
233 Next i
235 &apos; Resize Python storage if no empty space
236 If lIndex &lt; 0 Then
237 lSize = lSize + 1
238 ReDim Preserve PythonStorage(0 To lSize)
239 lIndex = lSize
240 End If
242 &apos; Insert new object
243 Set PythonStorage(lIndex) = poObject
245 Finally:
246 _AddToPythonStorage = lIndex
247 Exit Function
248 End Function &apos; ScriptForge.SF_Root._AddToPythonStorage
250 REM ------------------------------------------------------------------------------
251 Public Function _GetLocalizedInterface() As Object
252 &apos;&apos;&apos; Returns the LN object instance related to the ScriptForge internal localization
253 &apos;&apos;&apos; If not yet done, load it from the shipped po files
254 &apos;&apos;&apos; Makes that the localized user interface is loaded only when needed
256 Try:
257 If IsNull(LocalizedInterface) Then _LoadLocalizedInterface()
259 Finally:
260 Set _GetLocalizedInterface = LocalizedInterface
261 Exit Function
262 End Function &apos; ScriptForge.SF_Root._GetLocalizedInterface
264 REM -----------------------------------------------------------------------------
265 Public Sub _InitPythonStorage()
266 &apos;&apos;&apos; Make PythonStorage an array
267 &apos;&apos;&apos; In prevision to an abundant use of those objects in Python, hardcode to optimize the performance and memory :
268 &apos;&apos;&apos; Initialize the first entries with the standard module objects located in the ScriptForge library
270 Try:
271 If Not IsArray(PythonStorage) Then
272 PythonPermanent = 8
273 PythonStorage = Array()
274 ReDim PythonStorage(0 To PythonPermanent)
275 &apos; Initialize each entry
276 PythonStorage(0) = ScriptForge.SF_Array
277 PythonStorage(1) = ScriptForge.SF_Exception
278 PythonStorage(2) = ScriptForge.SF_FileSystem
279 PythonStorage(3) = ScriptForge.SF_Platform
280 PythonStorage(4) = ScriptForge.SF_Region
281 PythonStorage(5) = ScriptForge.SF_Services
282 PythonStorage(6) = ScriptForge.SF_Session
283 PythonStorage(7) = ScriptForge.SF_String
284 PythonStorage(8) = ScriptForge.SF_UI
285 End If
287 Finally:
288 Exit Sub
289 End Sub &apos; ScriptForge.SF_Root._InitPythonStorage
291 REM -----------------------------------------------------------------------------
292 Public Sub _LoadLocalizedInterface(Optional ByVal psMode As String)
293 &apos;&apos;&apos; Build the user interface in a persistent L10N object
294 &apos;&apos;&apos; Executed - only once - at first request of a label inside the LocalizedInterface dictionary
295 &apos;&apos;&apos; Args:
296 &apos;&apos;&apos; psMode: ADDTEXT =&gt; the (english) labels are loaded from code below
297 &apos;&apos;&apos; POFILE =&gt; the localized labels are loaded from a PO file
298 &apos;&apos;&apos; the name of the file is &quot;la.po&quot; where la = language part of locale
299 &apos;&apos;&apos; (fallback to ADDTEXT mode if file does not exist)
301 Dim sInstallFolder As String &apos; ScriptForge installation directory
302 Dim sPOFolder As String &apos; Folder containing the PO files
303 Dim sPOFile As String &apos; PO File to load
304 Dim sLocale As String &apos; Locale
306 If ErrorHandler Then On Local Error GoTo Catch
308 Try:
309 &apos;TODO: Modify default value
310 If IsMissing(psMode) Then psMode = &quot;POFILE&quot;
312 If psMode = &quot;POFILE&quot; Then &apos; Use this mode in production
313 &apos; Build the po file name
314 With SF_FileSystem
315 sInstallFolder = ._SFInstallFolder() &apos; ScriptForge installation folder
316 sLocale = SF_Utils._GetUNOService(&quot;OfficeLocale&quot;).Language
317 sPOFolder = .BuildPath(sInstallFolder, &quot;po&quot;)
318 sPOFile = .BuildPath(sPOFolder, sLocale &amp; &quot;.po&quot;)
319 If sLocale = &quot;en&quot; Then &apos; LocalizedInterface loaded by code i.o. read from po file
320 psMode = &quot;ADDTEXT&quot;
321 ElseIf Not .FileExists(sPOFile) Then &apos; File not found =&gt; load texts from code below
322 psMode = &quot;ADDTEXT&quot;
323 Else
324 Set LocalizedInterface = CreateScriptService(&quot;L10N&quot;, sPOFolder, sLocale)
325 End If
326 End With
327 End If
329 If psMode = &quot;ADDTEXT&quot; Then &apos; Use this mode in development to prepare a new POT file
330 Set LocalizedInterface = CreateScriptService(&quot;L10N&quot;)
331 With LocalizedInterface
332 &apos; SF_Exception.Raise
333 .AddText( Context := &quot;ERRORNUMBER&quot; _
334 , MsgId := &quot;Error %1&quot; _
335 , Comment := &quot;Title in error message box\n&quot; _
336 &amp; &quot;%1: an error number&quot; _
338 .AddText( Context := &quot;ERRORLOCATION&quot; _
339 , MsgId := &quot;Location : %1&quot; _
340 , Comment := &quot;Error message box\n&quot; _
341 &amp; &quot;%1: a line number&quot; _
343 .AddText( Context := &quot;LONGERRORDESC&quot; _
344 , MsgId := &quot;Error %1 - Location = %2 - Description = %3&quot; _
345 , Comment := &quot;Logfile record&quot; _
347 .AddText( Context := &quot;STOPEXECUTION&quot; _
348 , MsgId := &quot;THE EXECUTION IS CANCELLED.&quot; _
349 , Comment := &quot;Any blocking error message&quot; _
351 .AddText( Context := &quot;NEEDMOREHELP&quot; _
352 , MsgId := &quot;Do you want to receive more information about the &apos;%1&apos; method ?&quot; _
353 , Comment := &quot;Any blocking error message\n&quot; _
354 &amp; &quot;%1: a method name&quot; _
356 &apos; SF_Exception.RaiseAbort
357 .AddText( Context := &quot;INTERNALERROR&quot; _
358 , MsgId := &quot;The ScriptForge library has crashed. The reason is unknown.\n&quot; _
359 &amp; &quot;Maybe a bug that could be reported on\n&quot; _
360 &amp; &quot;\thttps://bugs.documentfoundation.org/\n\n&quot; _
361 &amp; &quot;More details : \n\n&quot; _
362 , Comment := &quot;SF_Exception.RaiseAbort error message&quot; _
364 &apos; SF_Utils._Validate
365 .AddText( Context := &quot;VALIDATESOURCE&quot; _
366 , MsgId := &quot;Library : \t%1\nService : \t%2\nMethod : \t%3&quot; _
367 , Comment := &quot;SF_Utils._Validate error message\n&quot; _
368 &amp; &quot;%1: probably ScriptForge\n&quot; _
369 &amp; &quot;%2: service or module name\n&quot; _
370 &amp; &quot;%3: property or method name where the error occurred&quot; _
372 .AddText( Context := &quot;VALIDATEARGS&quot; _
373 , MsgId := &quot;Arguments: %1&quot; _
374 , Comment := &quot;SF_Utils._Validate error message\n&quot; _
375 &amp; &quot;%1: list of arguments of the method&quot; _
377 .AddText( Context := &quot;VALIDATEERROR&quot; _
378 , MsgId := &quot;A serious error has been detected in your code on argument : « %1 ».&quot; _
379 , Comment := &quot;SF_Utils._Validate error message\n&quot; _
380 &amp; &quot;%1: Wrong argument name&quot; _
382 .AddText( Context := &quot;VALIDATIONRULES&quot; _
383 , MsgId := &quot;\tValidation rules :&quot;, Comment := &quot;SF_Utils.Validate error message&quot; _
385 .AddText( Context := &quot;VALIDATETYPES&quot; _
386 , MsgId := &quot;\t\t« %1 » must have next type (or one of next types) : %2&quot; _
387 , Comment := &quot;SF_Utils._Validate error message\n&quot; _
388 &amp; &quot;%1: Wrong argument name\n&quot; _
389 &amp; &quot;%2: Comma separated list of allowed types&quot; _
391 .AddText( Context := &quot;VALIDATEVALUES&quot; _
392 , MsgId := &quot;\t\t« %1 » must contain one of next values : %2&quot; _
393 , Comment := &quot;SF_Utils._Validate error message\n&quot; _
394 &amp; &quot;%1: Wrong argument name\n&quot; _
395 &amp; &quot;%2: Comma separated list of allowed values&quot; _
397 .AddText( Context := &quot;VALIDATEREGEX&quot; _
398 , MsgId := &quot;\t\t« %1 » must match next regular expression : %2&quot; _
399 , Comment := &quot;SF_Utils._Validate error message\n&quot; _
400 &amp; &quot;%1: Wrong argument name\n&quot; _
401 &amp; &quot;%2: A regular expression&quot; _
403 .AddText( Context := &quot;VALIDATECLASS&quot; _
404 , MsgId := &quot;\t\t« %1 » must be a Basic object of class : %2&quot; _
405 , Comment := &quot;SF_Utils._Validate error message\n&quot; _
406 &amp; &quot;%1: Wrong argument name\n&quot; _
407 &amp; &quot;%2: The name of a Basic class&quot; _
409 .AddText( Context := &quot;VALIDATEACTUAL&quot; _
410 , MsgId := &quot;The actual value of « %1 » is : &apos;%2&apos;&quot; _
411 , Comment := &quot;SF_Utils._Validate error message\n&quot; _
412 &amp; &quot;%1: Wrong argument name\n&quot; _
413 &amp; &quot;%2: The value of the argument as a string&quot; _
415 .AddText( Context := &quot;VALIDATEMISSING&quot; _
416 , MsgId := &quot;The « %1 » argument is mandatory, yet it is missing.&quot; _
417 , Comment := &quot;SF_Utils._Validate error message\n&quot; _
418 &amp; &quot;%1: Wrong argument name&quot; _
420 &apos; SF_Utils._ValidateArray
421 .AddText( Context := &quot;VALIDATEARRAY&quot; _
422 , MsgId := &quot;\t\t« %1 » must be an array.&quot; _
423 , Comment := &quot;SF_Utils._ValidateArray error message\n&quot; _
424 &amp; &quot;%1: Wrong argument name&quot; _
426 .AddText( Context := &quot;VALIDATEDIMS&quot; _
427 , MsgId := &quot;\t\t« %1 » must have exactly %2 dimension(s).&quot; _
428 , Comment := &quot;SF_Utils._ValidateArray error message\n&quot; _
429 &amp; &quot;%1: Wrong argument name\n&quot; _
430 &amp; &quot;%2: Number of dimensions of the array&quot; _
432 .AddText( Context := &quot;VALIDATEALLTYPES&quot; _
433 , MsgId := &quot;\t\t« %1 » must have all elements of the same type : %2&quot; _
434 , Comment := &quot;SF_Utils._ValidateArray error message\n&quot; _
435 &amp; &quot;%1: Wrong argument name\n&quot; _
436 &amp; &quot;%2: Either one single type or &apos;String, Date, Numeric&apos;&quot; _
438 .AddText( Context := &quot;VALIDATENOTNULL&quot; _
439 , MsgId := &quot;\t\t« %1 » must not contain any NULL or EMPTY elements.&quot; _
440 , Comment := &quot;SF_Utils._ValidateArray error message\n&quot; _
441 &amp; &quot;%1: Wrong argument name\n&quot; _
442 &amp; &quot;NULL and EMPTY should not be translated&quot; _
444 &apos; SF_Utils._ValidateFile
445 .AddText( Context := &quot;VALIDATEFILE&quot; _
446 , MsgId := &quot;\t\t« %1 » must be of type String.&quot; _
447 , Comment := &quot;SF_Utils._ValidateFile error message\n&quot; _
448 &amp; &quot;%1: Wrong argument name\n&quot; _
449 &amp; &quot;&apos;String&apos; should not be translated&quot; _
451 .AddText( Context := &quot;VALIDATEFILESYS&quot; _
452 , MsgId := &quot;\t\t« %1 » must be a valid file or folder name expressed in the operating system native notation.&quot; _
453 , Comment := &quot;SF_Utils._ValidateFile error message\n&quot; _
454 &amp; &quot;%1: Wrong argument name&quot; _
456 .AddText( Context := &quot;VALIDATEFILEURL&quot; _
457 , MsgId := &quot;\t\t« %1 » must be a valid file or folder name expressed in the portable URL notation.&quot; _
458 , Comment := &quot;SF_Utils._ValidateFile error message\n&quot; _
459 &amp; &quot;%1: Wrong argument name\n&quot; _
460 &amp; &quot;&apos;URL&apos; should not be translated&quot; _
462 .AddText( Context := &quot;VALIDATEFILEANY&quot; _
463 , MsgId := &quot;\t\t« %1 » must be a valid file or folder name.&quot; _
464 , Comment := &quot;SF_Utils._ValidateFile error message\n&quot; _
465 &amp; &quot;%1: Wrong argument name&quot; _
467 .AddText( Context := &quot;VALIDATEWILDCARD&quot; _
468 , MsgId := &quot;\t\t« %1 » may contain one or more wildcard characters (?, *) in its last path component only.&quot; _
469 , Comment := &quot;SF_Utils._ValidateFile error message\n&quot; _
470 &amp; &quot;%1: Wrong argument name\n&quot; _
471 &amp; &quot;&apos;(?, *)&apos; is to be left as is&quot; _
473 &apos; SF_Array.RangeInit
474 .AddText( Context := &quot;ARRAYSEQUENCE&quot; _
475 , MsgId := &quot;The respective values of &apos;From&apos;, &apos;UpTo&apos; and &apos;ByStep&apos; are incoherent.\n\n&quot; _
476 &amp; &quot;\t« From » = %1\n&quot; _
477 &amp; &quot;\t« UpTo » = %2\n&quot; _
478 &amp; &quot;\t« ByStep » = %3&quot; _
479 , Comment := &quot;SF_Array.RangeInit error message\n&quot; _
480 &amp; &quot;%1, %2, %3: Numeric values\n&quot; _
481 &amp; &quot;&apos;From&apos;, &apos;UpTo&apos;, &apos;ByStep&apos; should not be translated&quot; _
483 &apos; SF_Array.AppendColumn, AppendRow, PrependColumn, PrependRow
484 .AddText( Context := &quot;ARRAYINSERT&quot; _
485 , MsgId := &quot;The array and the vector to insert have incompatible sizes.\n\n&quot; _
486 &amp; &quot;\t« Array_2D » = %2\n&quot; _
487 &amp; &quot;\t« %1 » = %3&quot; _
488 , Comment := &quot;SF_Array.AppendColumn (...) error message\n&quot; _
489 &amp; &quot;%1: &apos;Column&apos; or &apos;Row&apos; of a matrix\n&quot; _
490 &amp; &quot;%2, %3: array contents\n&quot; _
491 &amp; &quot;&apos;Array_2D&apos; should not be translated&quot; _
493 &apos; SF_Array.ExtractColumn, ExtractRow
494 .AddText( Context := &quot;ARRAYINDEX1&quot; _
495 , MsgId := &quot;The given index does not fit within the bounds of the array.\n\n&quot; _
496 &amp; &quot;\t« Array_2D » = %2\n&quot; _
497 &amp; &quot;\t« %1 » = %3&quot; _
498 , Comment := &quot;SF_Array.ExtractColumn (...) error message\n&quot; _
499 &amp; &quot;%1: &apos;Column&apos; or &apos;Row&apos; of a matrix\n&quot; _
500 &amp; &quot;%2, %3: array contents\n&quot; _
501 &amp; &quot;&apos;Array_2D&apos; should not be translated&quot; _
503 &apos; SF_Array.ExtractColumn, ExtractRow
504 .AddText( Context := &quot;ARRAYINDEX2&quot; _
505 , MsgId := &quot;The given slice limits do not fit within the bounds of the array.\n\n&quot; _
506 &amp; &quot;\t« Array_1D » = %1\n&quot; _
507 &amp; &quot;\t« From » = %2\n&quot; _
508 &amp; &quot;\t« UpTo » = %3&quot; _
509 , Comment := &quot;SF_Array.ExtractColumn (...) error message\n&quot; _
510 &amp; &quot;%1: &apos;Column&apos; or &apos;Row&apos; of a matrix\n&quot; _
511 &amp; &quot;%2, %3: array contents\n&quot; _
512 &amp; &quot;&apos;Array_1D&apos;, &apos;From&apos; and &apos;UpTo&apos; should not be translated&quot; _
514 &apos; SF_Array.ImportFromCSVFile
515 .AddText( Context := &quot;CSVPARSING&quot; _
516 , MsgId := &quot;The given file could not be parsed as a valid CSV file.\n\n&quot; _
517 &amp; &quot;\t« File name » = %1\n&quot; _
518 &amp; &quot;\tLine number = %2\n&quot; _
519 &amp; &quot;\tContent = %3&quot; _
520 , Comment := &quot;SF_Array.ImportFromCSVFile error message\n&quot; _
521 &amp; &quot;%1: a file name\n&quot; _
522 &amp; &quot;%2: numeric\n&quot; _
523 &amp; &quot;%3: a long string&quot; _
525 &apos; SF_Dictionary.Add/ReplaceKey
526 .AddText( Context := &quot;DUPLICATEKEY&quot; _
527 , MsgId := &quot;The insertion of a new key &quot; _
528 &amp; &quot;into a dictionary failed because the key already exists.\n&quot; _
529 &amp; &quot;Note that the comparison between keys is NOT case-sensitive.\n\n&quot; _
530 &amp; &quot;« %1 » = %2&quot; _
531 , Comment := &quot;SF_Dictionary Add/ReplaceKey error message\n&quot; _
532 &amp; &quot;%1: An identifier&quot; _
533 &amp; &quot;%2: a (potentially long) string&quot; _
535 &apos; SF_Dictionary.Remove/ReplaceKey/ReplaceItem
536 .AddText( Context := &quot;UNKNOWNKEY&quot; _
537 , MsgId := &quot;The requested key does not exist in the dictionary.\n\n&quot; _
538 &amp; &quot;« %1 » = %2&quot; _
539 , Comment := &quot;SF_Dictionary Remove/ReplaceKey/ReplaceItem error message\n&quot; _
540 &amp; &quot;%1: An identifier&quot; _
541 &amp; &quot;%2: a (potentially long) string&quot; _
543 &apos; SF_Dictionary.Add/ReplaceKey
544 .AddText( Context := &quot;INVALIDKEY&quot; _
545 , MsgId := &quot;The insertion or the update of an entry &quot; _
546 &amp; &quot;into a dictionary failed because the given key contains only spaces.&quot; _
547 , Comment := &quot;SF_Dictionary Add/ReplaceKey error message\n&quot; _
549 &apos; SF_FileSystem.CopyFile/MoveFile/DeleteFile/CreateScriptService(&quot;L10N&quot;)
550 .AddText( Context := &quot;UNKNOWNFILE&quot; _
551 , MsgId := &quot;The given file could not be found on your system.\n\n&quot; _
552 &amp; &quot;« %1 » = %2&quot; _
553 , Comment := &quot;SF_FileSystem copy/move/delete error message\n&quot; _
554 &amp; &quot;%1: An identifier\n&quot; _
555 &amp; &quot;%2: A file name&quot; _
557 &apos; SF_FileSystem.CopyFolder/MoveFolder/DeleteFolder/Files/SubFolders
558 .AddText( Context := &quot;UNKNOWNFOLDER&quot; _
559 , MsgId := &quot;The given folder could not be found on your system.\n\n&quot; _
560 &amp; &quot;« %1 » = %2&quot; _
561 , Comment := &quot;SF_FileSystem copy/move/delete error message\n&quot; _
562 &amp; &quot;%1: An identifier\n&quot; _
563 &amp; &quot;%2: A folder name&quot; _
565 &apos; SF_FileSystem.CopyFile/MoveFolder/DeleteFile
566 .AddText( Context := &quot;NOTAFILE&quot; _
567 , MsgId := &quot;« %1 » contains the name of an existing folder, not that of a file.\n\n&quot; _
568 &amp; &quot;« %1 » = %2&quot; _
569 , Comment := &quot;SF_FileSystem copy/move/delete error message\n&quot; _
570 &amp; &quot;%1: An identifier\n&quot; _
571 &amp; &quot;%2: A file name&quot; _
573 &apos; SF_FileSystem.CopyFolder/MoveFolder/DeleteFolder/Files/SubFolders
574 .AddText( Context := &quot;NOTAFOLDER&quot; _
575 , MsgId := &quot;« %1 » contains the name of an existing file, not that of a folder.\n\n&quot; _
576 &amp; &quot;« %1 » = %2&quot; _
577 , Comment := &quot;SF_FileSystem copy/move/delete error message\n&quot; _
578 &amp; &quot;%1: An identifier\n&quot; _
579 &amp; &quot;%2: A folder name&quot; _
581 &apos; SF_FileSystem.Copy+Move/File+Folder/CreateTextFile/OpenTextFile
582 .AddText( Context := &quot;OVERWRITE&quot; _
583 , MsgId := &quot;You tried to create a new file which already exists. Overwriting it has been rejected.\n\n&quot; _
584 &amp; &quot;« %1 » = %2&quot; _
585 , Comment := &quot;SF_FileSystem copy/move/... error message\n&quot; _
586 &amp; &quot;%1: An identifier\n&quot; _
587 &amp; &quot;%2: A file name&quot; _
589 &apos; SF_FileSystem.Copy+Move+Delete/File+Folder
590 .AddText( Context := &quot;READONLY&quot; _
591 , MsgId := &quot;Copying or moving a file to a destination which has its read-only attribute set, or deleting such a file or folder is forbidden.\n\n&quot; _
592 &amp; &quot;« %1 » = %2&quot; _
593 , Comment := &quot;SF_FileSystem copy/move/delete error message\n&quot; _
594 &amp; &quot;%1: An identifier\n&quot; _
595 &amp; &quot;%2: A file name&quot; _
597 &apos; SF_FileSystem.Copy+Move+Delete/File+Folder
598 .AddText( Context := &quot;NOFILEMATCH&quot; _
599 , MsgId := &quot;When « %1 » contains wildcards. at least one file or folder must match the given filter. Otherwise the operation is rejected.\n\n&quot; _
600 &amp; &quot;« %1 » = %2&quot; _
601 , Comment := &quot;SF_FileSystem copy/move/delete error message\n&quot; _
602 &amp; &quot;%1: An identifier\n&quot; _
603 &amp; &quot;%2: A file or folder name with wildcards&quot; _
605 &apos; SF_FileSystem.CreateFolder
606 .AddText( Context := &quot;FOLDERCREATION&quot; _
607 , MsgId := &quot;« %1 » contains the name of an existing file or an existing folder. The operation is rejected.\n\n&quot; _
608 &amp; &quot;« %1 » = %2&quot; _
609 , Comment := &quot;SF_FileSystem CreateFolder error message\n&quot; _
610 &amp; &quot;%1: An identifier\n&quot; _
611 &amp; &quot;%2: A file or folder name&quot; _
613 &apos; SF_Services.CreateScriptService
614 .AddText( Context := &quot;UNKNOWNSERVICE&quot; _
615 , MsgId := &quot;No service named &apos;%4&apos; has been registered for the library &apos;%3&apos;.\n\n&quot; _
616 &amp; &quot;« %1 » = %2&quot; _
617 , Comment := &quot;SF_Services.CreateScriptService error message\n&quot; _
618 &amp; &quot;%1: An identifier\n&quot; _
619 &amp; &quot;%2: A string\n&quot; _
620 &amp; &quot;%3: A Basic library name\n&quot; _
621 &amp; &quot;%4: A service (1 word) name&quot; _
623 &apos; SF_Services.CreateScriptService
624 .AddText( Context := &quot;SERVICESNOTLOADED&quot; _
625 , MsgId := &quot;The library &apos;%3&apos; and its services could not been loaded.\n&quot; _
626 &amp; &quot;The reason is unknown.\n&quot; _
627 &amp; &quot;However, checking the &apos;%3.SF_Services.RegisterScriptServices()&apos; function and its return value can be a good starting point.\n\n&quot; _
628 &amp; &quot;« %1 » = %2&quot; _
629 , Comment := &quot;SF_Services.CreateScriptService error message\n&quot; _
630 &amp; &quot;%1: An identifier\n&quot; _
631 &amp; &quot;%2: A string\n&quot; _
632 &amp; &quot;%3: A Basic library name&quot; _
634 &apos; SF_Session.ExecuteCalcFunction
635 .AddText( Context := &quot;CALCFUNC&quot; _
636 , MsgId := &quot;The Calc &apos;%1&apos; function encountered an error. Either the given function does not exist or its arguments are invalid.&quot; _
637 , Comment := &quot;SF_Session.ExecuteCalcFunction error message\n&quot; _
638 &amp; &quot;&apos;Calc&apos; should not be translated&quot; _
640 &apos; SF_Session._GetScript
641 .AddText( Context := &quot;NOSCRIPT&quot; _
642 , MsgId := &quot;The requested %1 script could not be located in the given libraries and modules.\n&quot; _
643 &amp; &quot;« %2 » = %3\n&quot; _
644 &amp; &quot;« %4 » = %5&quot; _
645 , Comment := &quot;SF_Session._GetScript error message\n&quot; _
646 &amp; &quot;%1: &apos;Basic&apos; or &apos;Python&apos;\n&quot; _
647 &amp; &quot;%2: An identifier\n&quot; _
648 &amp; &quot;%3: A string\n&quot; _
649 &amp; &quot;%4: An identifier\n&quot; _
650 &amp; &quot;%5: A string&quot; _
652 &apos; SF_Session.ExecuteBasicScript
653 .AddText( Context := &quot;SCRIPTEXEC&quot; _
654 , MsgId := &quot;An exception occurred during the execution of the Basic script.\n&quot; _
655 &amp; &quot;Cause: %3\n&quot; _
656 &amp; &quot;« %1 » = %2&quot; _
657 , Comment := &quot;SF_Session.ExecuteBasicScript error message\n&quot; _
658 &amp; &quot;%1: An identifier\n&quot; _
659 &amp; &quot;%2: A string\n&quot; _
660 &amp; &quot;%3: A (long) string&quot; _
662 &apos; SF_Session.SendMail
663 .AddText( Context := &quot;WRONGEMAIL&quot; _
664 , MsgId := &quot;One of the email addresses has been found invalid.\n&quot; _
665 &amp; &quot;Invalid mail = « %1 »&quot; _
666 , Comment := &quot;SF_Session.SendMail error message\n&quot; _
667 &amp; &quot;%1 = a mail address&quot; _
669 &apos; SF_Session.SendMail
670 .AddText( Context := &quot;SENDMAIL&quot; _
671 , MsgId := &quot;The message could not be sent due to a system error.\n&quot; _
672 &amp; &quot;A possible cause is that LibreOffice could not find any mail client.&quot; _
673 , Comment := &quot;SF_Session.SendMail error message&quot; _
675 &apos; SF_TextStream._IsFileOpen
676 .AddText( Context := &quot;FILENOTOPEN&quot; _
677 , MsgId := &quot;The requested file operation could not be executed because the file was closed previously.\n\n&quot; _
678 &amp; &quot;File name = &apos;%1&apos;&quot; _
679 , Comment := &quot;SF_TextStream._IsFileOpen error message\n&quot; _
680 &amp; &quot;%1: A file name&quot; _
682 &apos; SF_TextStream._IsFileOpen
683 .AddText( Context := &quot;FILEOPENMODE&quot; _
684 , MsgId := &quot;The requested file operation could not be executed because it is incompatible with the mode in which the file was opened.\n\n&quot; _
685 &amp; &quot;File name = &apos;%1&apos;\n&quot; _
686 &amp; &quot;Open mode = %2&quot; _
687 , Comment := &quot;SF_TextStream._IsFileOpen error message\n&quot; _
688 &amp; &quot;%1: A file name\n&quot; _
689 &amp; &quot;%2: READ, WRITE or APPEND&quot; _
691 &apos; SF_TextStream.ReadLine, ReadAll, SkipLine
692 .AddText( Context := &quot;ENDOFFILE&quot; _
693 , MsgId := &quot;The requested file read operation could not be completed because an unexpected end-of-file was encountered.\n\n&quot; _
694 &amp; &quot;File name = &apos;%1&apos;&quot; _
695 , Comment := &quot;SF_TextStream.ReadLine/ReadAll/SkipLine error message\n&quot; _
696 &amp; &quot;%1: A file name&quot; _
698 &apos; SF_UI.Document
699 .AddText( Context := &quot;DOCUMENT&quot; _
700 , MsgId := &quot;The requested document could not be found.\n\n&quot; _
701 &amp; &quot;%1 = &apos;%2&apos;&quot; _
702 , Comment := &quot;SF_UI.GetDocument error message\n&quot; _
703 &amp; &quot;%1: An identifier\n&quot; _
704 &amp; &quot;%2: A string&quot; _
706 &apos; SF_UI.Create
707 .AddText( Context := &quot;DOCUMENTCREATION&quot; _
708 , MsgId := &quot;The creation of a new document failed.\n&quot; _
709 &amp; &quot;Something must be wrong with some arguments.\n\n&quot; _
710 &amp; &quot;Either the document type is unknown, or no template file was given,\n&quot; _
711 &amp; &quot;or the given template file was not found on your system.\n\n&quot; _
712 &amp; &quot;%1 = &apos;%2&apos;\n&quot; _
713 &amp; &quot;%3 = &apos;%4&apos;&quot; _
714 , Comment := &quot;SF_UI.GetDocument error message\n&quot; _
715 &amp; &quot;%1: An identifier\n&quot; _
716 &amp; &quot;%2: A string\n&quot; _
717 &amp; &quot;%3: An identifier\n&quot; _
718 &amp; &quot;%4: A string&quot; _
720 &apos; SF_UI.OpenDocument
721 .AddText( Context := &quot;DOCUMENTOPEN&quot; _
722 , MsgId := &quot;The opening of the document failed.\n&quot; _
723 &amp; &quot;Something must be wrong with some arguments.\n\n&quot; _
724 &amp; &quot;Either the file does not exist, or the password is wrong, or the given filter is invalid.\n\n&quot; _
725 &amp; &quot;%1 = &apos;%2&apos;\n&quot; _
726 &amp; &quot;%3 = &apos;%4&apos;\n&quot; _
727 &amp; &quot;%5 = &apos;%6&apos;&quot; _
728 , Comment := &quot;SF_UI.OpenDocument error message\n&quot; _
729 &amp; &quot;%1: An identifier\n&quot; _
730 &amp; &quot;%2: A string\n&quot; _
731 &amp; &quot;%3: An identifier\n&quot; _
732 &amp; &quot;%4: A string\n&quot; _
733 &amp; &quot;%5: An identifier\n&quot; _
734 &amp; &quot;%6: A string&quot; _
736 &apos; SF_UI.OpenBaseDocument
737 .AddText( Context := &quot;BASEDOCUMENTOPEN&quot; _
738 , MsgId := &quot;The opening of the Base document failed.\n&quot; _
739 &amp; &quot;Something must be wrong with some arguments.\n\n&quot; _
740 &amp; &quot;Either the file does not exist, or the file is not registered under the given name.\n\n&quot; _
741 &amp; &quot;%1 = &apos;%2&apos;\n&quot; _
742 &amp; &quot;%3 = &apos;%4&apos;&quot; _
743 , Comment := &quot;SF_UI.OpenDocument error message\n&quot; _
744 &amp; &quot;%1: An identifier\n&quot; _
745 &amp; &quot;%2: A string\n&quot; _
746 &amp; &quot;%3: An identifier\n&quot; _
747 &amp; &quot;%4: A string&quot; _
749 &apos; SF_Document._IsStillAlive
750 .AddText( Context := &quot;DOCUMENTDEAD&quot; _
751 , MsgId := &quot;The requested action could not be executed because the document was closed inadvertently.\n\n&quot; _
752 &amp; &quot;The concerned document is &apos;%1&apos;&quot; _
753 , Comment := &quot;SF_Document._IsStillAlive error message\n&quot; _
754 &amp; &quot;%1: A file name&quot; _
756 &apos; SF_Document.Save
757 .AddText( Context := &quot;DOCUMENTSAVE&quot; _
758 , MsgId := &quot;The document could not be saved.\n&quot; _
759 &amp; &quot;Either the document has been opened read-only, or the destination file has a read-only attribute set, &quot; _
760 &amp; &quot;or the file where to save to is undefined.\n\n&quot; _
761 &amp; &quot;%1 = &apos;%2&apos;&quot; _
762 , Comment := &quot;SF_Document.SaveAs error message\n&quot; _
763 &amp; &quot;%1: An identifier\n&quot; _
764 &amp; &quot;%2: A file name\n&quot; _
766 &apos; SF_Document.SaveAs
767 .AddText( Context := &quot;DOCUMENTSAVEAS&quot; _
768 , MsgId := &quot;The document could not be saved.\n&quot; _
769 &amp; &quot;Either the document must not be overwritten, or the destination file has a read-only attribute set, &quot; _
770 &amp; &quot;or the given filter is invalid.\n\n&quot; _
771 &amp; &quot;%1 = &apos;%2&apos;\n&quot; _
772 &amp; &quot;%3 = %4\n&quot; _
773 &amp; &quot;%5 = &apos;%6&apos;&quot; _
774 , Comment := &quot;SF_Document.SaveAs error message\n&quot; _
775 &amp; &quot;%1: An identifier\n&quot; _
776 &amp; &quot;%2: A file name\n&quot; _
777 &amp; &quot;%3: An identifier\n&quot; _
778 &amp; &quot;%4: True or False\n&quot; _
779 &amp; &quot;%5: An identifier\n&quot; _
780 &amp; &quot;%6: A string&quot; _
782 &apos; SF_Document.any update
783 .AddText( Context := &quot;DOCUMENTREADONLY&quot; _
784 , MsgId := &quot;You tried to edit a document which is not modifiable. The document has not been changed.\n\n&quot; _
785 &amp; &quot;« %1 » = %2&quot; _
786 , Comment := &quot;SF_Document any update\n&quot; _
787 &amp; &quot;%1: An identifier\n&quot; _
788 &amp; &quot;%2: A file name&quot; _
790 &apos; SF_Base.GetDatabase
791 .AddText( Context := &quot;DBCONNECT&quot; _
792 , MsgId := &quot;The database related to the actual Base document could not be retrieved.\n&quot; _
793 &amp; &quot;Check the connection/login parameters.\n\n&quot; _
794 &amp; &quot;« %1 » = &apos;%2&apos;\n&quot; _
795 &amp; &quot;« %3 » = &apos;%4&apos;\n&quot; _
796 &amp; &quot;« Document » = %5&quot; _
797 , Comment := &quot;SF_Base GetDatabase\n&quot; _
798 &amp; &quot;%1: An identifier\n&quot; _
799 &amp; &quot;%2: A user name\n&quot; _
800 &amp; &quot;%3: An identifier\n&quot; _
801 &amp; &quot;%4: A password\n&quot; _
802 &amp; &quot;%5: A file name&quot; _
804 &apos; SF_Calc._ParseAddress (sheet)
805 .AddText( Context := &quot;CALCADDRESS1&quot; _
806 , MsgId := &quot;The given address does not correspond with a valid sheet name.\n\n&quot; _
807 &amp; &quot;« %1 » = %2\n&quot; _
808 &amp; &quot;« %3 » = %4&quot; _
809 , Comment := &quot;SF_Calc _ParseAddress (sheet)\n&quot; _
810 &amp; &quot;%1: An identifier\n&quot; _
811 &amp; &quot;%2: A string\n&quot; _
812 &amp; &quot;%3: An identifier\n&quot; _
813 &amp; &quot;%4: A file name&quot; _
815 &apos; SF_Calc._ParseAddress (range)
816 .AddText( Context := &quot;CALCADDRESS2&quot; _
817 , MsgId := &quot;The given address does not correspond with a valid range of cells.\n\n&quot; _
818 &amp; &quot;« %1 » = %2\n&quot; _
819 &amp; &quot;« %3 » = %4&quot; _
820 , Comment := &quot;SF_Calc _ParseAddress (range)\n&quot; _
821 &amp; &quot;%1: An identifier\n&quot; _
822 &amp; &quot;%2: A string\n&quot; _
823 &amp; &quot;%3: An identifier\n&quot; _
824 &amp; &quot;%4: A file name&quot; _
826 &apos; SF_Calc.InsertSheet
827 .AddText( Context := &quot;DUPLICATESHEET&quot; _
828 , MsgId := &quot;There exists already in the document a sheet with the same name.\n\n&quot; _
829 &amp; &quot;« %1 » = %2\n&quot; _
830 &amp; &quot;« %3 » = %4&quot; _
831 , Comment := &quot;SF_Calc InsertSheet\n&quot; _
832 &amp; &quot;%1: An identifier\n&quot; _
833 &amp; &quot;%2: A string\n&quot; _
834 &amp; &quot;%3: An identifier\n&quot; _
835 &amp; &quot;%4: A file name&quot; _
837 &apos; SF_Calc.Offset
838 .AddText( Context := &quot;OFFSETADDRESS&quot; _
839 , MsgId := &quot;The computed range falls beyond the sheet boundaries or is meaningless.\n\n&quot; _
840 &amp; &quot;« %1 » = %2\n&quot; _
841 &amp; &quot;« %3 » = %4\n&quot; _
842 &amp; &quot;« %5 » = %6\n&quot; _
843 &amp; &quot;« %7 » = %8\n&quot; _
844 &amp; &quot;« %9 » = %10\n&quot; _
845 &amp; &quot;« %11 » = %12&quot; _
846 , Comment := &quot;SF_Calc Offset\n&quot; _
847 &amp; &quot;%1: An identifier\n&quot; _
848 &amp; &quot;%2: A Calc reference\n&quot; _
849 &amp; &quot;%3: An identifier\n&quot; _
850 &amp; &quot;%4: A number\n&quot; _
851 &amp; &quot;%5: An identifier\n&quot; _
852 &amp; &quot;%6: A number\n&quot; _
853 &amp; &quot;%7: An identifier\n&quot; _
854 &amp; &quot;%8: A number\n&quot; _
855 &amp; &quot;%9: An identifier\n&quot; _
856 &amp; &quot;%10: A number\n&quot; _
857 &amp; &quot;%11: An identifier\n&quot; _
858 &amp; &quot;%12: A file name&quot; _
860 &apos; SF_Calc.CreateChart
861 .AddText( Context := &quot;DUPLICATECHART&quot; _
862 , MsgId := &quot;A chart with the same name exists already in the sheet.\n\n&quot; _
863 &amp; &quot;« %1 » = %2\n&quot; _
864 &amp; &quot;« %3 » = %4\n&quot; _
865 &amp; &quot;« %5 » = %6\n&quot; _
866 , Comment := &quot;SF_Calc CreateChart\n&quot; _
867 &amp; &quot;%1: An identifier\n&quot; _
868 &amp; &quot;%2: A string\n&quot; _
869 &amp; &quot;%3: An identifier\n&quot; _
870 &amp; &quot;%4: A string\n&quot; _
871 &amp; &quot;%5: An identifier\n&quot; _
872 &amp; &quot;%6: A file name&quot; _
874 &apos; SF_Calc.ExportRangeToFile
875 .AddText( Context := &quot;RANGEEXPORT&quot; _
876 , MsgId := &quot;The given range could not be exported.\n&quot; _
877 &amp; &quot;Either the destination file must not be overwritten, or it has a read-only attribute set.\n\n&quot; _
878 &amp; &quot;%1 = &apos;%2&apos;\n&quot; _
879 &amp; &quot;%3 = %4&quot; _
880 , Comment := &quot;SF_Calc.ExportRangeToFile error message\n&quot; _
881 &amp; &quot;%1: An identifier\n&quot; _
882 &amp; &quot;%2: A file name\n&quot; _
883 &amp; &quot;%3: An identifier\n&quot; _
884 &amp; &quot;%4: True or False\n&quot; _
886 &apos; SF_Chart.ExportToFile
887 .AddText( Context := &quot;CHARTEXPORT&quot; _
888 , MsgId := &quot;The chart could not be exported.\n&quot; _
889 &amp; &quot;Either the destination file must not be overwritten, or it has a read-only attribute set.\n\n&quot; _
890 &amp; &quot;%1 = &apos;%2&apos;\n&quot; _
891 &amp; &quot;%3 = %4&quot; _
892 , Comment := &quot;SF_Chart.ExportToFile error message\n&quot; _
893 &amp; &quot;%1: An identifier\n&quot; _
894 &amp; &quot;%2: A file name\n&quot; _
895 &amp; &quot;%3: An identifier\n&quot; _
896 &amp; &quot;%4: True or False\n&quot; _
898 &apos; SF_Form._IsStillAlive
899 .AddText( Context := &quot;FORMDEAD&quot; _
900 , MsgId := &quot;The requested action could not be executed because the form is not open or the document was closed inadvertently.\n\n&quot; _
901 &amp; &quot;The concerned form is &apos;%1&apos; in document &apos;%2&apos;.&quot; _
902 , Comment := &quot;SF_Dialog._IsStillAlive error message\n&quot; _
903 &amp; &quot;%1: An identifier&quot; _
904 &amp; &quot;%2: A file name&quot; _
906 &apos; SF_Calc.Forms
907 .AddText( Context := &quot;CALCFORMNOTFOUND&quot; _
908 , MsgId := &quot;The requested form could not be found in the Calc sheet. The given index is off-limits.\n\n&quot; _
909 &amp; &quot;The concerned Calc document is &apos;%3&apos;.\n\n&quot; _
910 &amp; &quot;The name of the sheet = &apos;%2&apos;\n&quot; _
911 &amp; &quot;The index = %1.&quot; _
912 , Comment := &quot;SF_Form determination\n&quot; _
913 &amp; &quot;%1: A number\n&quot; _
914 &amp; &quot;%2: A sheet name\n&quot; _
915 &amp; &quot;%3: A file name&quot; _
917 &apos; SF_Document.Forms
918 .AddText( Context := &quot;WRITERFORMNOTFOUND&quot; _
919 , MsgId := &quot;The requested form could not be found in the Writer document. The given index is off-limits.\n\n&quot; _
920 &amp; &quot;The concerned Writer document is &apos;%2&apos;.\n\n&quot; _
921 &amp; &quot;The index = %1.&quot; _
922 , Comment := &quot;SF_Form determination\n&quot; _
923 &amp; &quot;%1: A number\n&quot; _
924 &amp; &quot;%2: A file name&quot; _
926 &apos; SF_Base.Forms
927 .AddText( Context := &quot;BASEFORMNOTFOUND&quot; _
928 , MsgId := &quot;The requested form could not be found in the form document &apos;%2&apos;. The given index is off-limits.\n\n&quot; _
929 &amp; &quot;The concerned Base document is &apos;%3&apos;.\n\n&quot; _
930 &amp; &quot;The index = %1.&quot; _
931 , Comment := &quot;SF_Form determination\n&quot; _
932 &amp; &quot;%1: A number\n&quot; _
933 &amp; &quot;%2: A string\n&quot; _
934 &amp; &quot;%3: A file name&quot; _
936 &apos; SF_Form.Subforms
937 .AddText( Context := &quot;SUBFORMNOTFOUND&quot; _
938 , MsgId := &quot;The requested subform could not be found below the given main form.\n\n&quot; _
939 &amp; &quot;The main form = &apos;%2&apos;.\n&quot; _
940 &amp; &quot;The subform = &apos;%1&apos;.&quot; _
941 , Comment := &quot;SF_Form determination\n&quot; _
942 &amp; &quot;%1: A form name\n&quot; _
943 &amp; &quot;%2: A form name&quot; _
945 &apos; SF_FormControl._SetProperty
946 .AddText( Context := &quot;FORMCONTROLTYPE&quot; _
947 , MsgId := &quot;The control &apos;%1&apos; in form &apos;%2&apos; is of type &apos;%3&apos;.\n&quot; _
948 &amp; &quot;The property or method &apos;%4&apos; is not applicable on that type of form controls.&quot; _
949 , Comment := &quot;SF_FormControl property setting\n&quot; _
950 &amp; &quot;%1: An identifier\n&quot; _
951 &amp; &quot;%2: An identifier\n&quot; _
952 &amp; &quot;%3: A string\n&quot; _
953 &amp; &quot;%4: An identifier&quot; _
955 &apos; SF_Dialog._NewDialog
956 .AddText( Context := &quot;DIALOGNOTFOUND&quot; _
957 , MsgId := &quot;The requested dialog could not be located in the given container or library.\n&quot; _
958 &amp; &quot;« %1 » = %2\n&quot; _
959 &amp; &quot;« %3 » = %4\n&quot; _
960 &amp; &quot;« %5 » = %6\n&quot; _
961 &amp; &quot;« %7 » = %8&quot; _
962 , Comment := &quot;SF_Dialog creation\n&quot; _
963 &amp; &quot;%1: An identifier\n&quot; _
964 &amp; &quot;%2: A string\n&quot; _
965 &amp; &quot;%3: An identifier\n&quot; _
966 &amp; &quot;%4: A file name\n&quot; _
967 &amp; &quot;%5: An identifier\n&quot; _
968 &amp; &quot;%6: A string\n&quot; _
969 &amp; &quot;%7: An identifier\n&quot; _
970 &amp; &quot;%8: A string&quot; _
972 &apos; SF_Dialog._IsStillAlive
973 .AddText( Context := &quot;DIALOGDEAD&quot; _
974 , MsgId := &quot;The requested action could not be executed because the dialog was closed inadvertently.\n\n&quot; _
975 &amp; &quot;The concerned dialog is &apos;%1&apos;.&quot; _
976 , Comment := &quot;SF_Dialog._IsStillAlive error message\n&quot; _
977 &amp; &quot;%1: An identifier&quot; _
979 &apos; SF_DialogControl._SetProperty
980 .AddText( Context := &quot;CONTROLTYPE&quot; _
981 , MsgId := &quot;The control &apos;%1&apos; in dialog &apos;%2&apos; is of type &apos;%3&apos;.\n&quot; _
982 &amp; &quot;The property or method &apos;%4&apos; is not applicable on that type of dialog controls.&quot; _
983 , Comment := &quot;SF_DialogControl property setting\n&quot; _
984 &amp; &quot;%1: An identifier\n&quot; _
985 &amp; &quot;%2: An identifier\n&quot; _
986 &amp; &quot;%3: A string\n&quot; _
987 &amp; &quot;%4: An identifier&quot; _
989 &apos; SF_DialogControl.WriteLine
990 .AddText( Context := &quot;TEXTFIELD&quot; _
991 , MsgId := &quot;The control &apos;%1&apos; in dialog &apos;%2&apos; is not a multiline text field.\n&quot; _
992 &amp; &quot;The requested method could not be executed.&quot; _
993 , Comment := &quot;SF_DialogControl add line in textbox\n&quot; _
994 &amp; &quot;%1: An identifier\n&quot; _
995 &amp; &quot;%2: An identifier&quot; _
997 &apos; SF_Dialog.SetPageManager
998 .AddText( Context := &quot;PAGEMANAGER&quot; _
999 , MsgId := &quot;The Page Manager could not be setup due to inconsistent arguments.\n\n&quot; _
1000 &amp; &quot; %1 : « %2 »\n&quot; _
1001 &amp; &quot; %3 : « %4 »\n&quot; _
1002 &amp; &quot; %5 : « %6 »&quot; _
1003 , Comment := &quot;SF_Dialog Page Manager setting\n&quot; _
1004 &amp; &quot;%1: An identifier\n&quot; _
1005 &amp; &quot;%2: A list of names separated by commas\n&quot; _
1006 &amp; &quot;%3: An identifier\n&quot; _
1007 &amp; &quot;%4: A list of names separated by commas\n&quot; _
1008 &amp; &quot;%5: An identifier\n&quot; _
1009 &amp; &quot;%6: A list of names separated by commas&quot; _
1011 &apos; SF_Dialog.CreateControl
1012 .AddText( Context := &quot;DUPLICATECONTROL&quot; _
1013 , MsgId := &quot;A control with the same name exists already in the dialog &apos;%3&apos;.\n\n&quot; _
1014 &amp; &quot;« %1 » = %2\n&quot; _
1015 , Comment := &quot;SF_Dialog CreateControl\n&quot; _
1016 &amp; &quot;%1: An identifier\n&quot; _
1017 &amp; &quot;%2: A string\n&quot; _
1018 &amp; &quot;%3: A dialog name&quot; _
1020 &apos; SF_Database.RunSql
1021 .AddText( Context := &quot;DBREADONLY&quot; _
1022 , MsgId := &quot;The database has been opened in read-only mode.\n&quot; _
1023 &amp; &quot;The &apos;%1&apos; method must not be executed in this context.&quot; _
1024 , Comment := &quot;SF_Database when running update SQL statement\n&quot; _
1025 &amp; &quot;%1: The concerned method&quot; _
1027 &apos; SF_Database._ExecuteSql
1028 .AddText( Context := &quot;SQLSYNTAX&quot; _
1029 , MsgId := &quot;An SQL statement could not be interpreted or executed by the database system.\n&quot; _
1030 &amp; &quot;Check its syntax, table and/or field names, ...\n\n&quot; _
1031 &amp; &quot;SQL Statement : « %1 »&quot; _
1032 , Comment := &quot;SF_Database can&apos;t interpret SQL statement\n&quot; _
1033 &amp; &quot;%1: The statement&quot; _
1035 &apos; SF_Exception.PythonShell (Python only)
1036 .AddText( Context := &quot;PYTHONSHELL&quot; _
1037 , MsgId := &quot;The APSO extension could not be located in your LibreOffice installation.&quot; _
1038 , Comment := &quot;SF_Exception.PythonShell error message&quot; _
1039 &amp; &quot;APSO: to leave unchanged&quot; _
1041 &apos; SFUnitTests._NewUnitTest
1042 .AddText( Context := &quot;UNITTESTLIBRARY&quot; _
1043 , MsgId := &quot;The requested library could not be located.\n&quot; _
1044 &amp; &quot;The UnitTest service has not been initialized.\n\n&quot; _
1045 &amp; &quot;Library name : « %1 »&quot; _
1046 , Comment := &quot;SFUnitTest could not locate the library gven as argument\n&quot; _
1047 &amp; &quot;%1: The name of the library&quot; _
1049 &apos; SFUnitTests.SF_UnitTest
1050 .AddText( Context := &quot;UNITTESTMETHOD&quot; _
1051 , MsgId := &quot;The method &apos;%1&apos; is unexpected in the current context.\n&quot; _
1052 &amp; &quot;The UnitTest service cannot proceed further with the on-going test.&quot; _
1053 , Comment := &quot;SFUnitTest finds a RunTest() call in a inappropriate location\n&quot; _
1054 &amp; &quot;%1: The name of a method&quot; _
1056 End With
1057 End If
1059 Finally:
1060 Exit Sub
1061 Catch:
1062 GoTo Finally
1063 End Sub &apos; ScriptForge.SF_Root._LoadLocalizedInterface
1065 REM -----------------------------------------------------------------------------
1066 Public Function _Repr() As String
1067 &apos;&apos;&apos; Convert the unique SF_Root instance to a readable string, typically for debugging purposes (DebugPrint ...)
1068 &apos;&apos;&apos; Args:
1069 &apos;&apos;&apos; Return:
1070 &apos;&apos;&apos; &quot;[Root] (MainFunction: xxx, Console: yyy lines, ServicesList)&quot;
1072 Dim sRoot As String &apos; Return value
1073 Const cstRoot = &quot;[Root] (&quot;
1075 sRoot = cstRoot &amp; &quot;MainFunction: &quot; &amp; MainFunction &amp; &quot;, Console: &quot; &amp; UBound(ConsoleLines) + 1 &amp; &quot; lines&quot; _
1076 &amp; &quot;, Libraries:&quot; &amp; SF_Utils._Repr(ServicesList.Keys) _
1077 &amp; &quot;)&quot;
1079 _Repr = sRoot
1081 End Function &apos; ScriptForge.SF_Root._Repr
1083 REM -----------------------------------------------------------------------------
1084 Public Sub _StackReset()
1085 &apos;&apos;&apos; Reset private members after a fatal/abort error to leave
1086 &apos;&apos;&apos; a stable persistent storage after an unwanted interrupt
1088 MainFunction = &quot;&quot;
1089 MainFunctionArgs = &quot;&quot;
1090 StackLevel = 0
1091 TriggeredByPython = False
1093 End Sub &apos; ScriptForge.SF_Root._StackReset
1095 REM ================================================== END OF SCRIPTFORGE.SF_ROOT
1096 </script:module>