calc: on editing invalidation of view with different zoom is wrong
[LibreOffice.git] / wizards / source / scriptforge / SF_Root.xba
blob8c9a0dbcf6be22874dbac2561ef8316bdf68c3e6
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
84 &apos; Specific persistent services objects or properties
85 Private FileSystemNaming As String &apos; If &quot;SYS&quot;, file and folder naming is based on operating system notation
86 Private PythonHelper As String &apos; File name of Python helper functions (stored in $(inst)/share/Scripts/python)
87 Private PythonHelper2 As String &apos; Alternate Python helper file name for test purposes
88 Private LocalizedInterface As Object &apos; ScriptForge own L10N service
89 Private OSName As String &apos; WIN, LINUX, MACOS
90 Private SFDialogs As Variant &apos; Persistent storage for the SFDialogs library
91 Private SFForms As Variant &apos; Persistent storage for the SF_Form class in the SFDocuments library
92 Private PythonStorage As Variant &apos; Persistent storage for the objects created and processed in Python
93 Private PythonPermanent As Long &apos; Number of permanent entries in PythonStorage containing standard module objects
95 REM ====================================================== CONSTRUCTOR/DESTRUCTOR
97 REM -----------------------------------------------------------------------------
98 Private Sub Class_Initialize()
99 Set [Me] = Nothing
100 Set [_Parent] = Nothing
101 ObjectType = &quot;ROOT&quot;
102 MainFunction = &quot;&quot;
103 MainFunctionArgs = &quot;&quot;
104 StackLevel = 0
105 ErrorHandler = True
106 ConsoleLines = Array()
107 Set ConsoleDialog = Nothing
108 Set ConsoleControl = Nothing
109 DisplayEnabled = True
110 StopWhenError = True
111 TriggeredByPython = False
112 DebugMode = False
113 Set ProgressBarDialog = Nothing
114 Set ProgressBarText = Nothing
115 Set progressBarBar = Nothing
116 Set Statusbar = Nothing
117 ServicesList = Empty
118 Set FunctionAccess = Nothing
119 Set PathSettings = Nothing
120 Set PathSubstitution = Nothing
121 Set ScriptProvider = Nothing
122 Set SystemShellExecute = Nothing
123 Set CoreReflection = Nothing
124 Set DispatchHelper = Nothing
125 Set TextSearch = Nothing
126 Set SearchOptions = Nothing
127 Set SystemLocale = Nothing
128 Set OfficeLocale = Nothing
129 Set FormatLocale = Nothing
130 Set LocaleData = Nothing
131 Set CalendarImpl = Nothing
132 Set Number2Text = Nothing
133 Set PrinterServer = Nothing
134 Set CharacterClass = Nothing
135 Set FileAccess = Nothing
136 Set FilterFactory = Nothing
137 Set FolderPicker = Nothing
138 Set FilePicker = Nothing
139 Set URLTransformer = Nothing
140 Set Introspection = Nothing
141 FileSystemNaming = &quot;ANY&quot;
142 PythonHelper = &quot;ScriptForgeHelper.py&quot;
143 PythonHelper2 = &quot;&quot;
144 Set LocalizedInterface = Nothing
145 Set BrowseNodeFactory = Nothing
146 Set DatabaseContext = Nothing
147 Set ConfigurationProvider = Nothing
148 Set PackageProvider = Nothing
149 Set MailService = Nothing
150 Set GraphicExportFilter = Nothing
151 Set Toolkit = Nothing
152 OSName = &quot;&quot;
153 SFDialogs = Empty
154 SFForms = Empty
155 PythonStorage = Empty
156 PythonPermanent = -1
157 End Sub &apos; ScriptForge.SF_Root Constructor
159 REM -----------------------------------------------------------------------------
160 Private Sub Class_Terminate()
161 Call Class_Initialize()
162 End Sub &apos; ScriptForge.SF_Root Destructor
164 REM -----------------------------------------------------------------------------
165 Public Function Dispose() As Variant
166 Call Class_Terminate()
167 Set Dispose = Nothing
168 End Function &apos; ScriptForge.SF_Root Explicit destructor
170 REM =========================================================== PRIVATE FUNCTIONS
172 REM -----------------------------------------------------------------------------
173 Public Sub _AddToConsole(ByVal psLine As String)
174 &apos;&apos;&apos; Add a new line to the console
175 &apos;&apos;&apos; TAB characters are expanded before the insertion of the line
176 &apos;&apos;&apos; NB: Array redimensioning of a member of an object must be done in the class module
177 &apos;&apos;&apos; Args:
178 &apos;&apos;&apos; psLine: the line to add
180 Dim lConsole As Long &apos; UBound of ConsoleLines
181 Dim sLine As String &apos; Alias of psLine
183 &apos; Resize ConsoleLines
184 lConsole = UBound(ConsoleLines)
185 If lConsole &lt; 0 Then
186 ReDim ConsoleLines(0)
187 Else
188 ReDim Preserve ConsoleLines(0 To lConsole + 1)
189 End If
191 &apos; Add a timestamp to the line and insert it (without date)
192 sLine = Mid(SF_Utils._Repr(Now()), 12) &amp; &quot; -&gt; &quot; &amp; psLine
193 ConsoleLines(lConsole + 1) = sLine
195 &apos; Add the new line to the actual (probably non-modal) console, if active
196 If Not IsNull(ConsoleDialog) Then
197 If ConsoleDialog._IsStillAlive(False) Then &apos; False to not raise an error
198 If IsNull(ConsoleControl) Then Set ConsoleControl = ConsoleDialog.Controls(SF_Exception.CONSOLENAME) &apos; Should not happen ...
199 ConsoleControl.WriteLine(sLine)
200 End If
201 End If
203 End Sub &apos; ScriptForge.SF_Root._AddToConsole
205 REM -----------------------------------------------------------------------------
206 Public Function _AddToPythonStorage(ByRef poObject As Object) As Long
207 &apos;&apos;&apos; Insert a newly created object in the Python persistent storage
208 &apos;&apos;&apos; and return the index of the used entry
209 &apos;&apos;&apos; The persistent storage is a simple array of objects
210 &apos;&apos;&apos; Args:
211 &apos;&apos;&apos; poObject: the object to insert
213 Dim lIndex As Long &apos; Return value
214 Dim lSize As Long &apos; UBound of the persistent storage
215 Dim i As Long
217 Check:
218 lIndex = -1
219 If IsNull(poObject) Then Exit Function
220 On Local Error GoTo Finally
221 lSize = UBound(PythonStorage)
223 Try:
224 &apos; Can an empty entry be reused ?
225 For i = PythonPermanent + 1 To lSize
226 If IsNull(PythonStorage(i)) Then
227 lIndex = i
228 Exit For
229 End If
230 Next i
232 &apos; Resize Python storage if no empty space
233 If lIndex &lt; 0 Then
234 lSize = lSize + 1
235 ReDim Preserve PythonStorage(0 To lSize)
236 lIndex = lSize
237 End If
239 &apos; Insert new object
240 Set PythonStorage(lIndex) = poObject
242 Finally:
243 _AddToPythonStorage = lIndex
244 Exit Function
245 End Function &apos; ScriptForge.SF_Root._AddToPythonStorage
247 REM ------------------------------------------------------------------------------
248 Public Function _GetLocalizedInterface() As Object
249 &apos;&apos;&apos; Returns the LN object instance related to the ScriptForge internal localization
250 &apos;&apos;&apos; If not yet done, load it from the shipped po files
251 &apos;&apos;&apos; Makes that the localized user interface is loaded only when needed
253 Try:
254 If IsNull(LocalizedInterface) Then _LoadLocalizedInterface()
256 Finally:
257 Set _GetLocalizedInterface = LocalizedInterface
258 Exit Function
259 End Function &apos; ScriptForge.SF_Root._GetLocalizedInterface
261 REM -----------------------------------------------------------------------------
262 Public Sub _InitPythonStorage()
263 &apos;&apos;&apos; Make PythonStorage an array
264 &apos;&apos;&apos; In prevision to an abundant use of those objects in Python, hardcode to optimize the performance and memory :
265 &apos;&apos;&apos; Initialize the first entries with the standard module objects located in the ScriptForge library
267 Try:
268 If Not IsArray(PythonStorage) Then
269 PythonPermanent = 8
270 PythonStorage = Array()
271 ReDim PythonStorage(0 To PythonPermanent)
272 &apos; Initialize each entry
273 PythonStorage(0) = ScriptForge.SF_Array
274 PythonStorage(1) = ScriptForge.SF_Exception
275 PythonStorage(2) = ScriptForge.SF_FileSystem
276 PythonStorage(3) = ScriptForge.SF_Platform
277 PythonStorage(4) = ScriptForge.SF_Region
278 PythonStorage(5) = ScriptForge.SF_Services
279 PythonStorage(6) = ScriptForge.SF_Session
280 PythonStorage(7) = ScriptForge.SF_String
281 PythonStorage(8) = ScriptForge.SF_UI
282 End If
284 Finally:
285 Exit Sub
286 End Sub &apos; ScriptForge.SF_Root._InitPythonStorage
288 REM -----------------------------------------------------------------------------
289 Public Sub _LoadLocalizedInterface(Optional ByVal psMode As String)
290 &apos;&apos;&apos; Build the user interface in a persistent L10N object
291 &apos;&apos;&apos; Executed - only once - at first request of a label inside the LocalizedInterface dictionary
292 &apos;&apos;&apos; Args:
293 &apos;&apos;&apos; psMode: ADDTEXT =&gt; the (english) labels are loaded from code below
294 &apos;&apos;&apos; POFILE =&gt; the localized labels are loaded from a PO file
295 &apos;&apos;&apos; the name of the file is &quot;la.po&quot; where la = language part of locale
296 &apos;&apos;&apos; (fallback to ADDTEXT mode if file does not exist)
298 Dim sInstallFolder As String &apos; ScriptForge installation directory
299 Dim sPOFolder As String &apos; Folder containing the PO files
300 Dim sPOFile As String &apos; PO File to load
301 Dim sLocale As String &apos; Locale
303 If ErrorHandler Then On Local Error GoTo Catch
305 Try:
306 &apos;TODO: Modify default value
307 If IsMissing(psMode) Then psMode = &quot;POFILE&quot;
309 If psMode = &quot;POFILE&quot; Then &apos; Use this mode in production
310 &apos; Build the po file name
311 With SF_FileSystem
312 sInstallFolder = ._SFInstallFolder() &apos; ScriptForge installation folder
313 sLocale = SF_Utils._GetUNOService(&quot;OfficeLocale&quot;).Language
314 sPOFolder = .BuildPath(sInstallFolder, &quot;po&quot;)
315 sPOFile = .BuildPath(sPOFolder, sLocale &amp; &quot;.po&quot;)
316 If sLocale = &quot;en&quot; Then &apos; LocalizedInterface loaded by code i.o. read from po file
317 psMode = &quot;ADDTEXT&quot;
318 ElseIf Not .FileExists(sPOFile) Then &apos; File not found =&gt; load texts from code below
319 psMode = &quot;ADDTEXT&quot;
320 Else
321 Set LocalizedInterface = CreateScriptService(&quot;L10N&quot;, sPOFolder, sLocale)
322 End If
323 End With
324 End If
326 If psMode = &quot;ADDTEXT&quot; Then &apos; Use this mode in development to prepare a new POT file
327 Set LocalizedInterface = CreateScriptService(&quot;L10N&quot;)
328 With LocalizedInterface
329 &apos; SF_Exception.Raise
330 .AddText( Context := &quot;ERRORNUMBER&quot; _
331 , MsgId := &quot;Error %1&quot; _
332 , Comment := &quot;Title in error message box\n&quot; _
333 &amp; &quot;%1: an error number&quot; _
335 .AddText( Context := &quot;ERRORLOCATION&quot; _
336 , MsgId := &quot;Location : %1&quot; _
337 , Comment := &quot;Error message box\n&quot; _
338 &amp; &quot;%1: a line number&quot; _
340 .AddText( Context := &quot;LONGERRORDESC&quot; _
341 , MsgId := &quot;Error %1 - Location = %2 - Description = %3&quot; _
342 , Comment := &quot;Logfile record&quot; _
344 .AddText( Context := &quot;STOPEXECUTION&quot; _
345 , MsgId := &quot;THE EXECUTION IS CANCELLED.&quot; _
346 , Comment := &quot;Any blocking error message&quot; _
348 .AddText( Context := &quot;NEEDMOREHELP&quot; _
349 , MsgId := &quot;Do you want to receive more information about the &apos;%1&apos; method ?&quot; _
350 , Comment := &quot;Any blocking error message\n&quot; _
351 &amp; &quot;%1: a method name&quot; _
353 &apos; SF_Exception.RaiseAbort
354 .AddText( Context := &quot;INTERNALERROR&quot; _
355 , MsgId := &quot;The ScriptForge library has crashed. The reason is unknown.\n&quot; _
356 &amp; &quot;Maybe a bug that could be reported on\n&quot; _
357 &amp; &quot;\thttps://bugs.documentfoundation.org/\n\n&quot; _
358 &amp; &quot;More details : \n\n&quot; _
359 , Comment := &quot;SF_Exception.RaiseAbort error message&quot; _
361 &apos; SF_Utils._Validate
362 .AddText( Context := &quot;VALIDATESOURCE&quot; _
363 , MsgId := &quot;Library : \t%1\nService : \t%2\nMethod : \t%3&quot; _
364 , Comment := &quot;SF_Utils._Validate error message\n&quot; _
365 &amp; &quot;%1: probably ScriptForge\n&quot; _
366 &amp; &quot;%2: service or module name\n&quot; _
367 &amp; &quot;%3: property or method name where the error occurred&quot; _
369 .AddText( Context := &quot;VALIDATEARGS&quot; _
370 , MsgId := &quot;Arguments: %1&quot; _
371 , Comment := &quot;SF_Utils._Validate error message\n&quot; _
372 &amp; &quot;%1: list of arguments of the method&quot; _
374 .AddText( Context := &quot;VALIDATEERROR&quot; _
375 , MsgId := &quot;A serious error has been detected in your code on argument : « %1 ».&quot; _
376 , Comment := &quot;SF_Utils._Validate error message\n&quot; _
377 &amp; &quot;%1: Wrong argument name&quot; _
379 .AddText( Context := &quot;VALIDATIONRULES&quot; _
380 , MsgId := &quot;\tValidation rules :&quot;, Comment := &quot;SF_Utils.Validate error message&quot; _
382 .AddText( Context := &quot;VALIDATETYPES&quot; _
383 , MsgId := &quot;\t\t« %1 » must have next type (or one of next types) : %2&quot; _
384 , Comment := &quot;SF_Utils._Validate error message\n&quot; _
385 &amp; &quot;%1: Wrong argument name\n&quot; _
386 &amp; &quot;%2: Comma separated list of allowed types&quot; _
388 .AddText( Context := &quot;VALIDATEVALUES&quot; _
389 , MsgId := &quot;\t\t« %1 » must contain one of next values : %2&quot; _
390 , Comment := &quot;SF_Utils._Validate error message\n&quot; _
391 &amp; &quot;%1: Wrong argument name\n&quot; _
392 &amp; &quot;%2: Comma separated list of allowed values&quot; _
394 .AddText( Context := &quot;VALIDATEREGEX&quot; _
395 , MsgId := &quot;\t\t« %1 » must match next regular expression : %2&quot; _
396 , Comment := &quot;SF_Utils._Validate error message\n&quot; _
397 &amp; &quot;%1: Wrong argument name\n&quot; _
398 &amp; &quot;%2: A regular expression&quot; _
400 .AddText( Context := &quot;VALIDATECLASS&quot; _
401 , MsgId := &quot;\t\t« %1 » must be a Basic object of class : %2&quot; _
402 , Comment := &quot;SF_Utils._Validate error message\n&quot; _
403 &amp; &quot;%1: Wrong argument name\n&quot; _
404 &amp; &quot;%2: The name of a Basic class&quot; _
406 .AddText( Context := &quot;VALIDATEACTUAL&quot; _
407 , MsgId := &quot;The actual value of « %1 » is : &apos;%2&apos;&quot; _
408 , Comment := &quot;SF_Utils._Validate error message\n&quot; _
409 &amp; &quot;%1: Wrong argument name\n&quot; _
410 &amp; &quot;%2: The value of the argument as a string&quot; _
412 .AddText( Context := &quot;VALIDATEMISSING&quot; _
413 , MsgId := &quot;The « %1 » argument is mandatory, yet it is missing.&quot; _
414 , Comment := &quot;SF_Utils._Validate error message\n&quot; _
415 &amp; &quot;%1: Wrong argument name&quot; _
417 &apos; SF_Utils._ValidateArray
418 .AddText( Context := &quot;VALIDATEARRAY&quot; _
419 , MsgId := &quot;\t\t« %1 » must be an array.&quot; _
420 , Comment := &quot;SF_Utils._ValidateArray error message\n&quot; _
421 &amp; &quot;%1: Wrong argument name&quot; _
423 .AddText( Context := &quot;VALIDATEDIMS&quot; _
424 , MsgId := &quot;\t\t« %1 » must have exactly %2 dimension(s).&quot; _
425 , Comment := &quot;SF_Utils._ValidateArray error message\n&quot; _
426 &amp; &quot;%1: Wrong argument name\n&quot; _
427 &amp; &quot;%2: Number of dimensions of the array&quot; _
429 .AddText( Context := &quot;VALIDATEALLTYPES&quot; _
430 , MsgId := &quot;\t\t« %1 » must have all elements of the same type : %2&quot; _
431 , Comment := &quot;SF_Utils._ValidateArray error message\n&quot; _
432 &amp; &quot;%1: Wrong argument name\n&quot; _
433 &amp; &quot;%2: Either one single type or &apos;String, Date, Numeric&apos;&quot; _
435 .AddText( Context := &quot;VALIDATENOTNULL&quot; _
436 , MsgId := &quot;\t\t« %1 » must not contain any NULL or EMPTY elements.&quot; _
437 , Comment := &quot;SF_Utils._ValidateArray error message\n&quot; _
438 &amp; &quot;%1: Wrong argument name\n&quot; _
439 &amp; &quot;NULL and EMPTY should not be translated&quot; _
441 &apos; SF_Utils._ValidateFile
442 .AddText( Context := &quot;VALIDATEFILE&quot; _
443 , MsgId := &quot;\t\t« %1 » must be of type String.&quot; _
444 , Comment := &quot;SF_Utils._ValidateFile error message\n&quot; _
445 &amp; &quot;%1: Wrong argument name\n&quot; _
446 &amp; &quot;&apos;String&apos; should not be translated&quot; _
448 .AddText( Context := &quot;VALIDATEFILESYS&quot; _
449 , MsgId := &quot;\t\t« %1 » must be a valid file or folder name expressed in the operating system native notation.&quot; _
450 , Comment := &quot;SF_Utils._ValidateFile error message\n&quot; _
451 &amp; &quot;%1: Wrong argument name&quot; _
453 .AddText( Context := &quot;VALIDATEFILEURL&quot; _
454 , MsgId := &quot;\t\t« %1 » must be a valid file or folder name expressed in the portable URL notation.&quot; _
455 , Comment := &quot;SF_Utils._ValidateFile error message\n&quot; _
456 &amp; &quot;%1: Wrong argument name\n&quot; _
457 &amp; &quot;&apos;URL&apos; should not be translated&quot; _
459 .AddText( Context := &quot;VALIDATEFILEANY&quot; _
460 , MsgId := &quot;\t\t« %1 » must be a valid file or folder name.&quot; _
461 , Comment := &quot;SF_Utils._ValidateFile error message\n&quot; _
462 &amp; &quot;%1: Wrong argument name&quot; _
464 .AddText( Context := &quot;VALIDATEWILDCARD&quot; _
465 , MsgId := &quot;\t\t« %1 » may contain one or more wildcard characters (?, *) in its last path component only.&quot; _
466 , Comment := &quot;SF_Utils._ValidateFile error message\n&quot; _
467 &amp; &quot;%1: Wrong argument name\n&quot; _
468 &amp; &quot;&apos;(?, *)&apos; is to be left as is&quot; _
470 &apos; SF_Array.RangeInit
471 .AddText( Context := &quot;ARRAYSEQUENCE&quot; _
472 , MsgId := &quot;The respective values of &apos;From&apos;, &apos;UpTo&apos; and &apos;ByStep&apos; are incoherent.\n\n&quot; _
473 &amp; &quot;\t« From » = %1\n&quot; _
474 &amp; &quot;\t« UpTo » = %2\n&quot; _
475 &amp; &quot;\t« ByStep » = %3&quot; _
476 , Comment := &quot;SF_Array.RangeInit error message\n&quot; _
477 &amp; &quot;%1, %2, %3: Numeric values\n&quot; _
478 &amp; &quot;&apos;From&apos;, &apos;UpTo&apos;, &apos;ByStep&apos; should not be translated&quot; _
480 &apos; SF_Array.AppendColumn, AppendRow, PrependColumn, PrependRow
481 .AddText( Context := &quot;ARRAYINSERT&quot; _
482 , MsgId := &quot;The array and the vector to insert have incompatible sizes.\n\n&quot; _
483 &amp; &quot;\t« Array_2D » = %2\n&quot; _
484 &amp; &quot;\t« %1 » = %3&quot; _
485 , Comment := &quot;SF_Array.AppendColumn (...) error message\n&quot; _
486 &amp; &quot;%1: &apos;Column&apos; or &apos;Row&apos; of a matrix\n&quot; _
487 &amp; &quot;%2, %3: array contents\n&quot; _
488 &amp; &quot;&apos;Array_2D&apos; should not be translated&quot; _
490 &apos; SF_Array.ExtractColumn, ExtractRow
491 .AddText( Context := &quot;ARRAYINDEX1&quot; _
492 , MsgId := &quot;The given index does not fit within the bounds of the array.\n\n&quot; _
493 &amp; &quot;\t« Array_2D » = %2\n&quot; _
494 &amp; &quot;\t« %1 » = %3&quot; _
495 , Comment := &quot;SF_Array.ExtractColumn (...) error message\n&quot; _
496 &amp; &quot;%1: &apos;Column&apos; or &apos;Row&apos; of a matrix\n&quot; _
497 &amp; &quot;%2, %3: array contents\n&quot; _
498 &amp; &quot;&apos;Array_2D&apos; should not be translated&quot; _
500 &apos; SF_Array.ExtractColumn, ExtractRow
501 .AddText( Context := &quot;ARRAYINDEX2&quot; _
502 , MsgId := &quot;The given slice limits do not fit within the bounds of the array.\n\n&quot; _
503 &amp; &quot;\t« Array_1D » = %1\n&quot; _
504 &amp; &quot;\t« From » = %2\n&quot; _
505 &amp; &quot;\t« UpTo » = %3&quot; _
506 , Comment := &quot;SF_Array.ExtractColumn (...) error message\n&quot; _
507 &amp; &quot;%1: &apos;Column&apos; or &apos;Row&apos; of a matrix\n&quot; _
508 &amp; &quot;%2, %3: array contents\n&quot; _
509 &amp; &quot;&apos;Array_1D&apos;, &apos;From&apos; and &apos;UpTo&apos; should not be translated&quot; _
511 &apos; SF_Array.ImportFromCSVFile
512 .AddText( Context := &quot;CSVPARSING&quot; _
513 , MsgId := &quot;The given file could not be parsed as a valid CSV file.\n\n&quot; _
514 &amp; &quot;\t« File name » = %1\n&quot; _
515 &amp; &quot;\tLine number = %2\n&quot; _
516 &amp; &quot;\tContent = %3&quot; _
517 , Comment := &quot;SF_Array.ImportFromCSVFile error message\n&quot; _
518 &amp; &quot;%1: a file name\n&quot; _
519 &amp; &quot;%2: numeric\n&quot; _
520 &amp; &quot;%3: a long string&quot; _
522 &apos; SF_Dictionary.Add/ReplaceKey
523 .AddText( Context := &quot;DUPLICATEKEY&quot; _
524 , MsgId := &quot;The insertion of a new key &quot; _
525 &amp; &quot;into a dictionary failed because the key already exists.\n&quot; _
526 &amp; &quot;Note that the comparison between keys is NOT case-sensitive.\n\n&quot; _
527 &amp; &quot;« %1 » = %2&quot; _
528 , Comment := &quot;SF_Dictionary Add/ReplaceKey error message\n&quot; _
529 &amp; &quot;%1: An identifier&quot; _
530 &amp; &quot;%2: a (potentially long) string&quot; _
532 &apos; SF_Dictionary.Remove/ReplaceKey/ReplaceItem
533 .AddText( Context := &quot;UNKNOWNKEY&quot; _
534 , MsgId := &quot;The requested key does not exist in the dictionary.\n\n&quot; _
535 &amp; &quot;« %1 » = %2&quot; _
536 , Comment := &quot;SF_Dictionary Remove/ReplaceKey/ReplaceItem error message\n&quot; _
537 &amp; &quot;%1: An identifier&quot; _
538 &amp; &quot;%2: a (potentially long) string&quot; _
540 &apos; SF_Dictionary.Add/ReplaceKey
541 .AddText( Context := &quot;INVALIDKEY&quot; _
542 , MsgId := &quot;The insertion or the update of an entry &quot; _
543 &amp; &quot;into a dictionary failed because the given key contains only spaces.&quot; _
544 , Comment := &quot;SF_Dictionary Add/ReplaceKey error message\n&quot; _
546 &apos; SF_FileSystem.CopyFile/MoveFile/DeleteFile/CreateScriptService(&quot;L10N&quot;)
547 .AddText( Context := &quot;UNKNOWNFILE&quot; _
548 , MsgId := &quot;The given file could not be found on your system.\n\n&quot; _
549 &amp; &quot;« %1 » = %2&quot; _
550 , Comment := &quot;SF_FileSystem copy/move/delete error message\n&quot; _
551 &amp; &quot;%1: An identifier\n&quot; _
552 &amp; &quot;%2: A file name&quot; _
554 &apos; SF_FileSystem.CopyFolder/MoveFolder/DeleteFolder/Files/SubFolders
555 .AddText( Context := &quot;UNKNOWNFOLDER&quot; _
556 , MsgId := &quot;The given folder could not be found on your system.\n\n&quot; _
557 &amp; &quot;« %1 » = %2&quot; _
558 , Comment := &quot;SF_FileSystem copy/move/delete error message\n&quot; _
559 &amp; &quot;%1: An identifier\n&quot; _
560 &amp; &quot;%2: A folder name&quot; _
562 &apos; SF_FileSystem.CopyFile/MoveFolder/DeleteFile
563 .AddText( Context := &quot;NOTAFILE&quot; _
564 , MsgId := &quot;« %1 » contains the name of an existing folder, not that of a file.\n\n&quot; _
565 &amp; &quot;« %1 » = %2&quot; _
566 , Comment := &quot;SF_FileSystem copy/move/delete error message\n&quot; _
567 &amp; &quot;%1: An identifier\n&quot; _
568 &amp; &quot;%2: A file name&quot; _
570 &apos; SF_FileSystem.CopyFolder/MoveFolder/DeleteFolder/Files/SubFolders
571 .AddText( Context := &quot;NOTAFOLDER&quot; _
572 , MsgId := &quot;« %1 » contains the name of an existing file, not that of a folder.\n\n&quot; _
573 &amp; &quot;« %1 » = %2&quot; _
574 , Comment := &quot;SF_FileSystem copy/move/delete error message\n&quot; _
575 &amp; &quot;%1: An identifier\n&quot; _
576 &amp; &quot;%2: A folder name&quot; _
578 &apos; SF_FileSystem.Copy+Move/File+Folder/CreateTextFile/OpenTextFile
579 .AddText( Context := &quot;OVERWRITE&quot; _
580 , MsgId := &quot;You tried to create a new file which already exists. Overwriting it has been rejected.\n\n&quot; _
581 &amp; &quot;« %1 » = %2&quot; _
582 , Comment := &quot;SF_FileSystem copy/move/... error message\n&quot; _
583 &amp; &quot;%1: An identifier\n&quot; _
584 &amp; &quot;%2: A file name&quot; _
586 &apos; SF_FileSystem.Copy+Move+Delete/File+Folder
587 .AddText( Context := &quot;READONLY&quot; _
588 , 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; _
589 &amp; &quot;« %1 » = %2&quot; _
590 , Comment := &quot;SF_FileSystem copy/move/delete error message\n&quot; _
591 &amp; &quot;%1: An identifier\n&quot; _
592 &amp; &quot;%2: A file name&quot; _
594 &apos; SF_FileSystem.Copy+Move+Delete/File+Folder
595 .AddText( Context := &quot;NOFILEMATCH&quot; _
596 , 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; _
597 &amp; &quot;« %1 » = %2&quot; _
598 , Comment := &quot;SF_FileSystem copy/move/delete error message\n&quot; _
599 &amp; &quot;%1: An identifier\n&quot; _
600 &amp; &quot;%2: A file or folder name with wildcards&quot; _
602 &apos; SF_FileSystem.CreateFolder
603 .AddText( Context := &quot;FOLDERCREATION&quot; _
604 , MsgId := &quot;« %1 » contains the name of an existing file or an existing folder. The operation is rejected.\n\n&quot; _
605 &amp; &quot;« %1 » = %2&quot; _
606 , Comment := &quot;SF_FileSystem CreateFolder error message\n&quot; _
607 &amp; &quot;%1: An identifier\n&quot; _
608 &amp; &quot;%2: A file or folder name&quot; _
610 &apos; SF_Services.CreateScriptService
611 .AddText( Context := &quot;UNKNOWNSERVICE&quot; _
612 , MsgId := &quot;No service named &apos;%4&apos; has been registered for the library &apos;%3&apos;.\n\n&quot; _
613 &amp; &quot;« %1 » = %2&quot; _
614 , Comment := &quot;SF_Services.CreateScriptService error message\n&quot; _
615 &amp; &quot;%1: An identifier\n&quot; _
616 &amp; &quot;%2: A string\n&quot; _
617 &amp; &quot;%3: A Basic library name\n&quot; _
618 &amp; &quot;%4: A service (1 word) name&quot; _
620 &apos; SF_Services.CreateScriptService
621 .AddText( Context := &quot;SERVICESNOTLOADED&quot; _
622 , MsgId := &quot;The library &apos;%3&apos; and its services could not been loaded.\n&quot; _
623 &amp; &quot;The reason is unknown.\n&quot; _
624 &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; _
625 &amp; &quot;« %1 » = %2&quot; _
626 , Comment := &quot;SF_Services.CreateScriptService error message\n&quot; _
627 &amp; &quot;%1: An identifier\n&quot; _
628 &amp; &quot;%2: A string\n&quot; _
629 &amp; &quot;%3: A Basic library name&quot; _
631 &apos; SF_Session.ExecuteCalcFunction
632 .AddText( Context := &quot;CALCFUNC&quot; _
633 , MsgId := &quot;The Calc &apos;%1&apos; function encountered an error. Either the given function does not exist or its arguments are invalid.&quot; _
634 , Comment := &quot;SF_Session.ExecuteCalcFunction error message\n&quot; _
635 &amp; &quot;&apos;Calc&apos; should not be translated&quot; _
637 &apos; SF_Session._GetScript
638 .AddText( Context := &quot;NOSCRIPT&quot; _
639 , MsgId := &quot;The requested %1 script could not be located in the given libraries and modules.\n&quot; _
640 &amp; &quot;« %2 » = %3\n&quot; _
641 &amp; &quot;« %4 » = %5&quot; _
642 , Comment := &quot;SF_Session._GetScript error message\n&quot; _
643 &amp; &quot;%1: &apos;Basic&apos; or &apos;Python&apos;\n&quot; _
644 &amp; &quot;%2: An identifier\n&quot; _
645 &amp; &quot;%3: A string\n&quot; _
646 &amp; &quot;%4: An identifier\n&quot; _
647 &amp; &quot;%5: A string&quot; _
649 &apos; SF_Session.ExecuteBasicScript
650 .AddText( Context := &quot;SCRIPTEXEC&quot; _
651 , MsgId := &quot;An exception occurred during the execution of the Basic script.\n&quot; _
652 &amp; &quot;Cause: %3\n&quot; _
653 &amp; &quot;« %1 » = %2&quot; _
654 , Comment := &quot;SF_Session.ExecuteBasicScript error message\n&quot; _
655 &amp; &quot;%1: An identifier\n&quot; _
656 &amp; &quot;%2: A string\n&quot; _
657 &amp; &quot;%3: A (long) string&quot; _
659 &apos; SF_Session.SendMail
660 .AddText( Context := &quot;WRONGEMAIL&quot; _
661 , MsgId := &quot;One of the email addresses has been found invalid.\n&quot; _
662 &amp; &quot;Invalid mail = « %1 »&quot; _
663 , Comment := &quot;SF_Session.SendMail error message\n&quot; _
664 &amp; &quot;%1 = a mail address&quot; _
666 &apos; SF_Session.SendMail
667 .AddText( Context := &quot;SENDMAIL&quot; _
668 , MsgId := &quot;The message could not be sent due to a system error.\n&quot; _
669 &amp; &quot;A possible cause is that LibreOffice could not find any mail client.&quot; _
670 , Comment := &quot;SF_Session.SendMail error message&quot; _
672 &apos; SF_TextStream._IsFileOpen
673 .AddText( Context := &quot;FILENOTOPEN&quot; _
674 , MsgId := &quot;The requested file operation could not be executed because the file was closed previously.\n\n&quot; _
675 &amp; &quot;File name = &apos;%1&apos;&quot; _
676 , Comment := &quot;SF_TextStream._IsFileOpen error message\n&quot; _
677 &amp; &quot;%1: A file name&quot; _
679 &apos; SF_TextStream._IsFileOpen
680 .AddText( Context := &quot;FILEOPENMODE&quot; _
681 , 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; _
682 &amp; &quot;File name = &apos;%1&apos;\n&quot; _
683 &amp; &quot;Open mode = %2&quot; _
684 , Comment := &quot;SF_TextStream._IsFileOpen error message\n&quot; _
685 &amp; &quot;%1: A file name\n&quot; _
686 &amp; &quot;%2: READ, WRITE or APPEND&quot; _
688 &apos; SF_TextStream.ReadLine, ReadAll, SkipLine
689 .AddText( Context := &quot;ENDOFFILE&quot; _
690 , MsgId := &quot;The requested file read operation could not be completed because an unexpected end-of-file was encountered.\n\n&quot; _
691 &amp; &quot;File name = &apos;%1&apos;&quot; _
692 , Comment := &quot;SF_TextStream.ReadLine/ReadAll/SkipLine error message\n&quot; _
693 &amp; &quot;%1: A file name&quot; _
695 &apos; SF_UI.Document
696 .AddText( Context := &quot;DOCUMENT&quot; _
697 , MsgId := &quot;The requested document could not be found.\n\n&quot; _
698 &amp; &quot;%1 = &apos;%2&apos;&quot; _
699 , Comment := &quot;SF_UI.GetDocument error message\n&quot; _
700 &amp; &quot;%1: An identifier\n&quot; _
701 &amp; &quot;%2: A string&quot; _
703 &apos; SF_UI.Create
704 .AddText( Context := &quot;DOCUMENTCREATION&quot; _
705 , MsgId := &quot;The creation of a new document failed.\n&quot; _
706 &amp; &quot;Something must be wrong with some arguments.\n\n&quot; _
707 &amp; &quot;Either the document type is unknown, or no template file was given,\n&quot; _
708 &amp; &quot;or the given template file was not found on your system.\n\n&quot; _
709 &amp; &quot;%1 = &apos;%2&apos;\n&quot; _
710 &amp; &quot;%3 = &apos;%4&apos;&quot; _
711 , Comment := &quot;SF_UI.GetDocument error message\n&quot; _
712 &amp; &quot;%1: An identifier\n&quot; _
713 &amp; &quot;%2: A string\n&quot; _
714 &amp; &quot;%3: An identifier\n&quot; _
715 &amp; &quot;%4: A string&quot; _
717 &apos; SF_UI.OpenDocument
718 .AddText( Context := &quot;DOCUMENTOPEN&quot; _
719 , MsgId := &quot;The opening of the document failed.\n&quot; _
720 &amp; &quot;Something must be wrong with some arguments.\n\n&quot; _
721 &amp; &quot;Either the file does not exist, or the password is wrong, or the given filter is invalid.\n\n&quot; _
722 &amp; &quot;%1 = &apos;%2&apos;\n&quot; _
723 &amp; &quot;%3 = &apos;%4&apos;\n&quot; _
724 &amp; &quot;%5 = &apos;%6&apos;&quot; _
725 , Comment := &quot;SF_UI.OpenDocument error message\n&quot; _
726 &amp; &quot;%1: An identifier\n&quot; _
727 &amp; &quot;%2: A string\n&quot; _
728 &amp; &quot;%3: An identifier\n&quot; _
729 &amp; &quot;%4: A string\n&quot; _
730 &amp; &quot;%5: An identifier\n&quot; _
731 &amp; &quot;%6: A string&quot; _
733 &apos; SF_UI.OpenBaseDocument
734 .AddText( Context := &quot;BASEDOCUMENTOPEN&quot; _
735 , MsgId := &quot;The opening of the Base document failed.\n&quot; _
736 &amp; &quot;Something must be wrong with some arguments.\n\n&quot; _
737 &amp; &quot;Either the file does not exist, or the file is not registered under the given name.\n\n&quot; _
738 &amp; &quot;%1 = &apos;%2&apos;\n&quot; _
739 &amp; &quot;%3 = &apos;%4&apos;&quot; _
740 , Comment := &quot;SF_UI.OpenDocument error message\n&quot; _
741 &amp; &quot;%1: An identifier\n&quot; _
742 &amp; &quot;%2: A string\n&quot; _
743 &amp; &quot;%3: An identifier\n&quot; _
744 &amp; &quot;%4: A string&quot; _
746 &apos; SF_Document._IsStillAlive
747 .AddText( Context := &quot;DOCUMENTDEAD&quot; _
748 , MsgId := &quot;The requested action could not be executed because the document was closed inadvertently.\n\n&quot; _
749 &amp; &quot;The concerned document is &apos;%1&apos;&quot; _
750 , Comment := &quot;SF_Document._IsStillAlive error message\n&quot; _
751 &amp; &quot;%1: A file name&quot; _
753 &apos; SF_Document.Save
754 .AddText( Context := &quot;DOCUMENTSAVE&quot; _
755 , MsgId := &quot;The document could not be saved.\n&quot; _
756 &amp; &quot;Either the document has been opened read-only, or the destination file has a read-only attribute set, &quot; _
757 &amp; &quot;or the file where to save to is undefined.\n\n&quot; _
758 &amp; &quot;%1 = &apos;%2&apos;&quot; _
759 , Comment := &quot;SF_Document.SaveAs error message\n&quot; _
760 &amp; &quot;%1: An identifier\n&quot; _
761 &amp; &quot;%2: A file name\n&quot; _
763 &apos; SF_Document.SaveAs
764 .AddText( Context := &quot;DOCUMENTSAVEAS&quot; _
765 , MsgId := &quot;The document could not be saved.\n&quot; _
766 &amp; &quot;Either the document must not be overwritten, or the destination file has a read-only attribute set, &quot; _
767 &amp; &quot;or the given filter is invalid.\n\n&quot; _
768 &amp; &quot;%1 = &apos;%2&apos;\n&quot; _
769 &amp; &quot;%3 = %4\n&quot; _
770 &amp; &quot;%5 = &apos;%6&apos;&quot; _
771 , Comment := &quot;SF_Document.SaveAs error message\n&quot; _
772 &amp; &quot;%1: An identifier\n&quot; _
773 &amp; &quot;%2: A file name\n&quot; _
774 &amp; &quot;%3: An identifier\n&quot; _
775 &amp; &quot;%4: True or False\n&quot; _
776 &amp; &quot;%5: An identifier\n&quot; _
777 &amp; &quot;%6: A string&quot; _
779 &apos; SF_Document.any update
780 .AddText( Context := &quot;DOCUMENTREADONLY&quot; _
781 , MsgId := &quot;You tried to edit a document which is not modifiable. The document has not been changed.\n\n&quot; _
782 &amp; &quot;« %1 » = %2&quot; _
783 , Comment := &quot;SF_Document any update\n&quot; _
784 &amp; &quot;%1: An identifier\n&quot; _
785 &amp; &quot;%2: A file name&quot; _
787 &apos; SF_Base.GetDatabase
788 .AddText( Context := &quot;DBCONNECT&quot; _
789 , MsgId := &quot;The database related to the actual Base document could not be retrieved.\n&quot; _
790 &amp; &quot;Check the connection/login parameters.\n\n&quot; _
791 &amp; &quot;« %1 » = &apos;%2&apos;\n&quot; _
792 &amp; &quot;« %3 » = &apos;%4&apos;\n&quot; _
793 &amp; &quot;« Document » = %5&quot; _
794 , Comment := &quot;SF_Base GetDatabase\n&quot; _
795 &amp; &quot;%1: An identifier\n&quot; _
796 &amp; &quot;%2: A user name\n&quot; _
797 &amp; &quot;%3: An identifier\n&quot; _
798 &amp; &quot;%4: A password\n&quot; _
799 &amp; &quot;%5: A file name&quot; _
801 &apos; SF_Calc._ParseAddress (sheet)
802 .AddText( Context := &quot;CALCADDRESS1&quot; _
803 , MsgId := &quot;The given address does not correspond with a valid sheet name.\n\n&quot; _
804 &amp; &quot;« %1 » = %2\n&quot; _
805 &amp; &quot;« %3 » = %4&quot; _
806 , Comment := &quot;SF_Calc _ParseAddress (sheet)\n&quot; _
807 &amp; &quot;%1: An identifier\n&quot; _
808 &amp; &quot;%2: A string\n&quot; _
809 &amp; &quot;%3: An identifier\n&quot; _
810 &amp; &quot;%4: A file name&quot; _
812 &apos; SF_Calc._ParseAddress (range)
813 .AddText( Context := &quot;CALCADDRESS2&quot; _
814 , MsgId := &quot;The given address does not correspond with a valid range of cells.\n\n&quot; _
815 &amp; &quot;« %1 » = %2\n&quot; _
816 &amp; &quot;« %3 » = %4&quot; _
817 , Comment := &quot;SF_Calc _ParseAddress (range)\n&quot; _
818 &amp; &quot;%1: An identifier\n&quot; _
819 &amp; &quot;%2: A string\n&quot; _
820 &amp; &quot;%3: An identifier\n&quot; _
821 &amp; &quot;%4: A file name&quot; _
823 &apos; SF_Calc.InsertSheet
824 .AddText( Context := &quot;DUPLICATESHEET&quot; _
825 , MsgId := &quot;There exists already in the document a sheet with the same name.\n\n&quot; _
826 &amp; &quot;« %1 » = %2\n&quot; _
827 &amp; &quot;« %3 » = %4&quot; _
828 , Comment := &quot;SF_Calc InsertSheet\n&quot; _
829 &amp; &quot;%1: An identifier\n&quot; _
830 &amp; &quot;%2: A string\n&quot; _
831 &amp; &quot;%3: An identifier\n&quot; _
832 &amp; &quot;%4: A file name&quot; _
834 &apos; SF_Calc.Offset
835 .AddText( Context := &quot;OFFSETADDRESS&quot; _
836 , MsgId := &quot;The computed range falls beyond the sheet boundaries or is meaningless.\n\n&quot; _
837 &amp; &quot;« %1 » = %2\n&quot; _
838 &amp; &quot;« %3 » = %4\n&quot; _
839 &amp; &quot;« %5 » = %6\n&quot; _
840 &amp; &quot;« %7 » = %8\n&quot; _
841 &amp; &quot;« %9 » = %10\n&quot; _
842 &amp; &quot;« %11 » = %12&quot; _
843 , Comment := &quot;SF_Calc Offset\n&quot; _
844 &amp; &quot;%1: An identifier\n&quot; _
845 &amp; &quot;%2: A Calc reference\n&quot; _
846 &amp; &quot;%3: An identifier\n&quot; _
847 &amp; &quot;%4: A number\n&quot; _
848 &amp; &quot;%5: An identifier\n&quot; _
849 &amp; &quot;%6: A number\n&quot; _
850 &amp; &quot;%7: An identifier\n&quot; _
851 &amp; &quot;%8: A number\n&quot; _
852 &amp; &quot;%9: An identifier\n&quot; _
853 &amp; &quot;%10: A number\n&quot; _
854 &amp; &quot;%11: An identifier\n&quot; _
855 &amp; &quot;%12: A file name&quot; _
857 &apos; SF_Calc.CreateChart
858 .AddText( Context := &quot;DUPLICATECHART&quot; _
859 , MsgId := &quot;A chart with the same name exists already in the sheet.\n\n&quot; _
860 &amp; &quot;« %1 » = %2\n&quot; _
861 &amp; &quot;« %3 » = %4\n&quot; _
862 &amp; &quot;« %5 » = %6\n&quot; _
863 , Comment := &quot;SF_Calc CreateChart\n&quot; _
864 &amp; &quot;%1: An identifier\n&quot; _
865 &amp; &quot;%2: A string\n&quot; _
866 &amp; &quot;%3: An identifier\n&quot; _
867 &amp; &quot;%4: A string\n&quot; _
868 &amp; &quot;%5: An identifier\n&quot; _
869 &amp; &quot;%6: A file name&quot; _
871 &apos; SF_Calc.ExportRangeToFile
872 .AddText( Context := &quot;RANGEEXPORT&quot; _
873 , MsgId := &quot;The given range could not be exported.\n&quot; _
874 &amp; &quot;Either the destination file must not be overwritten, or it has a read-only attribute set.\n\n&quot; _
875 &amp; &quot;%1 = &apos;%2&apos;\n&quot; _
876 &amp; &quot;%3 = %4&quot; _
877 , Comment := &quot;SF_Calc.ExportRangeToFile error message\n&quot; _
878 &amp; &quot;%1: An identifier\n&quot; _
879 &amp; &quot;%2: A file name\n&quot; _
880 &amp; &quot;%3: An identifier\n&quot; _
881 &amp; &quot;%4: True or False\n&quot; _
883 &apos; SF_Chart.ExportToFile
884 .AddText( Context := &quot;CHARTEXPORT&quot; _
885 , MsgId := &quot;The chart could not be exported.\n&quot; _
886 &amp; &quot;Either the destination file must not be overwritten, or it has a read-only attribute set.\n\n&quot; _
887 &amp; &quot;%1 = &apos;%2&apos;\n&quot; _
888 &amp; &quot;%3 = %4&quot; _
889 , Comment := &quot;SF_Chart.ExportToFile error message\n&quot; _
890 &amp; &quot;%1: An identifier\n&quot; _
891 &amp; &quot;%2: A file name\n&quot; _
892 &amp; &quot;%3: An identifier\n&quot; _
893 &amp; &quot;%4: True or False\n&quot; _
895 &apos; SF_Form._IsStillAlive
896 .AddText( Context := &quot;FORMDEAD&quot; _
897 , MsgId := &quot;The requested action could not be executed because the form is not open or the document was closed inadvertently.\n\n&quot; _
898 &amp; &quot;The concerned form is &apos;%1&apos; in document &apos;%2&apos;.&quot; _
899 , Comment := &quot;SF_Dialog._IsStillAlive error message\n&quot; _
900 &amp; &quot;%1: An identifier&quot; _
901 &amp; &quot;%2: A file name&quot; _
903 &apos; SF_Calc.Forms
904 .AddText( Context := &quot;CALCFORMNOTFOUND&quot; _
905 , MsgId := &quot;The requested form could not be found in the Calc sheet. The given index is off-limits.\n\n&quot; _
906 &amp; &quot;The concerned Calc document is &apos;%3&apos;.\n\n&quot; _
907 &amp; &quot;The name of the sheet = &apos;%2&apos;\n&quot; _
908 &amp; &quot;The index = %1.&quot; _
909 , Comment := &quot;SF_Form determination\n&quot; _
910 &amp; &quot;%1: A number\n&quot; _
911 &amp; &quot;%2: A sheet name\n&quot; _
912 &amp; &quot;%3: A file name&quot; _
914 &apos; SF_Document.Forms
915 .AddText( Context := &quot;WRITERFORMNOTFOUND&quot; _
916 , MsgId := &quot;The requested form could not be found in the Writer document. The given index is off-limits.\n\n&quot; _
917 &amp; &quot;The concerned Writer document is &apos;%2&apos;.\n\n&quot; _
918 &amp; &quot;The index = %1.&quot; _
919 , Comment := &quot;SF_Form determination\n&quot; _
920 &amp; &quot;%1: A number\n&quot; _
921 &amp; &quot;%2: A file name&quot; _
923 &apos; SF_Base.Forms
924 .AddText( Context := &quot;BASEFORMNOTFOUND&quot; _
925 , 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; _
926 &amp; &quot;The concerned Base document is &apos;%3&apos;.\n\n&quot; _
927 &amp; &quot;The index = %1.&quot; _
928 , Comment := &quot;SF_Form determination\n&quot; _
929 &amp; &quot;%1: A number\n&quot; _
930 &amp; &quot;%2: A string\n&quot; _
931 &amp; &quot;%3: A file name&quot; _
933 &apos; SF_Form.Subforms
934 .AddText( Context := &quot;SUBFORMNOTFOUND&quot; _
935 , MsgId := &quot;The requested subform could not be found below the given main form.\n\n&quot; _
936 &amp; &quot;The main form = &apos;%2&apos;.\n&quot; _
937 &amp; &quot;The subform = &apos;%1&apos;.&quot; _
938 , Comment := &quot;SF_Form determination\n&quot; _
939 &amp; &quot;%1: A form name\n&quot; _
940 &amp; &quot;%2: A form name&quot; _
942 &apos; SF_FormControl._SetProperty
943 .AddText( Context := &quot;FORMCONTROLTYPE&quot; _
944 , MsgId := &quot;The control &apos;%1&apos; in form &apos;%2&apos; is of type &apos;%3&apos;.\n&quot; _
945 &amp; &quot;The property or method &apos;%4&apos; is not applicable on that type of form controls.&quot; _
946 , Comment := &quot;SF_FormControl property setting\n&quot; _
947 &amp; &quot;%1: An identifier\n&quot; _
948 &amp; &quot;%2: An identifier\n&quot; _
949 &amp; &quot;%3: A string\n&quot; _
950 &amp; &quot;%4: An identifier&quot; _
952 &apos; SF_Dialog._NewDialog
953 .AddText( Context := &quot;DIALOGNOTFOUND&quot; _
954 , MsgId := &quot;The requested dialog could not be located in the given container or library.\n&quot; _
955 &amp; &quot;« %1 » = %2\n&quot; _
956 &amp; &quot;« %3 » = %4\n&quot; _
957 &amp; &quot;« %5 » = %6\n&quot; _
958 &amp; &quot;« %7 » = %8&quot; _
959 , Comment := &quot;SF_Dialog creation\n&quot; _
960 &amp; &quot;%1: An identifier\n&quot; _
961 &amp; &quot;%2: A string\n&quot; _
962 &amp; &quot;%3: An identifier\n&quot; _
963 &amp; &quot;%4: A file name\n&quot; _
964 &amp; &quot;%5: An identifier\n&quot; _
965 &amp; &quot;%6: A string\n&quot; _
966 &amp; &quot;%7: An identifier\n&quot; _
967 &amp; &quot;%8: A string&quot; _
969 &apos; SF_Dialog._IsStillAlive
970 .AddText( Context := &quot;DIALOGDEAD&quot; _
971 , MsgId := &quot;The requested action could not be executed because the dialog was closed inadvertently.\n\n&quot; _
972 &amp; &quot;The concerned dialog is &apos;%1&apos;.&quot; _
973 , Comment := &quot;SF_Dialog._IsStillAlive error message\n&quot; _
974 &amp; &quot;%1: An identifier&quot; _
976 &apos; SF_DialogControl._SetProperty
977 .AddText( Context := &quot;CONTROLTYPE&quot; _
978 , MsgId := &quot;The control &apos;%1&apos; in dialog &apos;%2&apos; is of type &apos;%3&apos;.\n&quot; _
979 &amp; &quot;The property or method &apos;%4&apos; is not applicable on that type of dialog controls.&quot; _
980 , Comment := &quot;SF_DialogControl property setting\n&quot; _
981 &amp; &quot;%1: An identifier\n&quot; _
982 &amp; &quot;%2: An identifier\n&quot; _
983 &amp; &quot;%3: A string\n&quot; _
984 &amp; &quot;%4: An identifier&quot; _
986 &apos; SF_DialogControl.WriteLine
987 .AddText( Context := &quot;TEXTFIELD&quot; _
988 , MsgId := &quot;The control &apos;%1&apos; in dialog &apos;%2&apos; is not a multiline text field.\n&quot; _
989 &amp; &quot;The requested method could not be executed.&quot; _
990 , Comment := &quot;SF_DialogControl add line in textbox\n&quot; _
991 &amp; &quot;%1: An identifier\n&quot; _
992 &amp; &quot;%2: An identifier&quot; _
994 &apos; SF_Dialog.SetPageManager
995 .AddText( Context := &quot;PAGEMANAGER&quot; _
996 , MsgId := &quot;The Page Manager could not be setup due to inconsistent arguments.\n\n&quot; _
997 &amp; &quot; %1 : « %2 »\n&quot; _
998 &amp; &quot; %3 : « %4 »\n&quot; _
999 &amp; &quot; %5 : « %6 »&quot; _
1000 , Comment := &quot;SF_Dialog Page Manager setting\n&quot; _
1001 &amp; &quot;%1: An identifier\n&quot; _
1002 &amp; &quot;%2: A list of names separated by commas\n&quot; _
1003 &amp; &quot;%3: An identifier\n&quot; _
1004 &amp; &quot;%4: A list of names separated by commas\n&quot; _
1005 &amp; &quot;%5: An identifier\n&quot; _
1006 &amp; &quot;%6: A list of names separated by commas&quot; _
1008 &apos; SF_Database.RunSql
1009 .AddText( Context := &quot;DBREADONLY&quot; _
1010 , MsgId := &quot;The database has been opened in read-only mode.\n&quot; _
1011 &amp; &quot;The &apos;%1&apos; method must not be executed in this context.&quot; _
1012 , Comment := &quot;SF_Database when running update SQL statement\n&quot; _
1013 &amp; &quot;%1: The concerned method&quot; _
1015 &apos; SF_Database._ExecuteSql
1016 .AddText( Context := &quot;SQLSYNTAX&quot; _
1017 , MsgId := &quot;An SQL statement could not be interpreted or executed by the database system.\n&quot; _
1018 &amp; &quot;Check its syntax, table and/or field names, ...\n\n&quot; _
1019 &amp; &quot;SQL Statement : « %1 »&quot; _
1020 , Comment := &quot;SF_Database can&apos;t interpret SQL statement\n&quot; _
1021 &amp; &quot;%1: The statement&quot; _
1023 &apos; SF_Exception.PythonShell (Python only)
1024 .AddText( Context := &quot;PYTHONSHELL&quot; _
1025 , MsgId := &quot;The APSO extension could not be located in your LibreOffice installation.&quot; _
1026 , Comment := &quot;SF_Exception.PythonShell error message&quot; _
1027 &amp; &quot;APSO: to leave unchanged&quot; _
1029 &apos; SFUnitTests._NewUnitTest
1030 .AddText( Context := &quot;UNITTESTLIBRARY&quot; _
1031 , MsgId := &quot;The requested library could not be located.\n&quot; _
1032 &amp; &quot;The UnitTest service has not been initialized.\n\n&quot; _
1033 &amp; &quot;Library name : « %1 »&quot; _
1034 , Comment := &quot;SFUnitTest could not locate the library gven as argument\n&quot; _
1035 &amp; &quot;%1: The name of the library&quot; _
1037 &apos; SFUnitTests.SF_UnitTest
1038 .AddText( Context := &quot;UNITTESTMETHOD&quot; _
1039 , MsgId := &quot;The method &apos;%1&apos; is unexpected in the current context.\n&quot; _
1040 &amp; &quot;The UnitTest service cannot proceed further with the on-going test.&quot; _
1041 , Comment := &quot;SFUnitTest finds a RunTest() call in a inappropriate location\n&quot; _
1042 &amp; &quot;%1: The name of a method&quot; _
1044 End With
1045 End If
1047 Finally:
1048 Exit Sub
1049 Catch:
1050 GoTo Finally
1051 End Sub &apos; ScriptForge.SF_Root._LoadLocalizedInterface
1053 REM -----------------------------------------------------------------------------
1054 Public Function _Repr() As String
1055 &apos;&apos;&apos; Convert the unique SF_Root instance to a readable string, typically for debugging purposes (DebugPrint ...)
1056 &apos;&apos;&apos; Args:
1057 &apos;&apos;&apos; Return:
1058 &apos;&apos;&apos; &quot;[Root] (MainFunction: xxx, Console: yyy lines, ServicesList)&quot;
1060 Dim sRoot As String &apos; Return value
1061 Const cstRoot = &quot;[Root] (&quot;
1063 sRoot = cstRoot &amp; &quot;MainFunction: &quot; &amp; MainFunction &amp; &quot;, Console: &quot; &amp; UBound(ConsoleLines) + 1 &amp; &quot; lines&quot; _
1064 &amp; &quot;, Libraries:&quot; &amp; SF_Utils._Repr(ServicesList.Keys) _
1065 &amp; &quot;)&quot;
1067 _Repr = sRoot
1069 End Function &apos; ScriptForge.SF_Root._Repr
1071 REM -----------------------------------------------------------------------------
1072 Public Sub _StackReset()
1073 &apos;&apos;&apos; Reset private members after a fatal/abort error to leave
1074 &apos;&apos;&apos; a stable persistent storage after an unwanted interrupt
1076 MainFunction = &quot;&quot;
1077 MainFunctionArgs = &quot;&quot;
1078 StackLevel = 0
1079 TriggeredByPython = False
1081 End Sub &apos; ScriptForge.SF_Root._StackReset
1083 REM ================================================== END OF SCRIPTFORGE.SF_ROOT
1084 </script:module>