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