SF_Root.xba 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822
  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 =======================================================================================================================
  7. Option Compatible
  8. Option ClassModule
  9. Option Private Module
  10. Option Explicit
  11. &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;
  12. &apos;&apos;&apos; SF_Root
  13. &apos;&apos;&apos; =======
  14. &apos;&apos;&apos; FOR INTERNAL USE ONLY
  15. &apos;&apos;&apos; Singleton class holding all persistent variables shared
  16. &apos;&apos;&apos; by all the modules of the ScriptForge library
  17. &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;
  18. REM ============================================================= PRIVATE MEMBERS
  19. &apos; Internals
  20. Private [Me] As Object
  21. Private [_Parent] As Object
  22. Private ObjectType As String &apos; Must be &quot;ROOT&quot;
  23. Private MainFunction As String &apos; Name of method or property called by user script
  24. Private MainFunctionArgs As String &apos; Syntax of method called by user script
  25. Private StackLevel As Integer &apos; Depth of calls between internal methods
  26. &apos; Error management
  27. Private ErrorHandler As Boolean &apos; True = error handling active, False = internal debugging
  28. Private ConsoleLines() As Variant &apos; Array of messages displayable in console
  29. Private ConsoleDialog As Object &apos; SFDialogs.Dialog object
  30. Private ConsoleControl As Object &apos; SFDialogs.DialogControl object
  31. Private DisplayEnabled As Boolean &apos; When True, display of console or error messages is allowed
  32. Private StopWhenError As Boolean &apos; When True, process stops after error &gt; &quot;WARNING&quot;
  33. Private DebugMode As Boolean &apos; When True, log enter/exit each official Sub
  34. &apos; Services management
  35. Private ServicesList As Variant &apos; Dictionary of provided services
  36. &apos; Usual UNO services
  37. Private FunctionAccess As Object &apos; com.sun.star.sheet.FunctionAccess
  38. Private PathSettings As Object &apos; com.sun.star.util.PathSettings
  39. Private PathSubstitution As Object &apos; com.sun.star.util.PathSubstitution
  40. Private ScriptProvider As Object &apos; com.sun.star.script.provider.MasterScriptProviderFactory
  41. Private SystemShellExecute As Object &apos; com.sun.star.system.SystemShellExecute
  42. Private CoreReflection As Object &apos; com.sun.star.reflection.CoreReflection
  43. Private DispatchHelper As Object &apos; com.sun.star.frame.DispatchHelper
  44. Private TextSearch As Object &apos; com.sun.star.util.TextSearch
  45. Private SearchOptions As Object &apos; com.sun.star.util.SearchOptions
  46. Private Locale As Object &apos; com.sun.star.lang.Locale
  47. Private CharacterClass As Object &apos; com.sun.star.i18n.CharacterClassification
  48. Private FileAccess As Object &apos; com.sun.star.ucb.SimpleFileAccess
  49. Private FilterFactory As Object &apos; com.sun.star.document.FilterFactory
  50. Private FolderPicker As Object &apos; com.sun.star.ui.dialogs.FolderPicker
  51. Private FilePicker As Object &apos; com.sun.star.ui.dialogs.FilePicker
  52. Private URLTransformer As Object &apos; com.sun.star.util.URLTransformer
  53. Private Introspection As Object &apos; com.sun.star.beans.Introspection
  54. Private BrowseNodeFactory As Object &apos; com.sun.star.script.browse.BrowseNodeFactory
  55. Private DatabaseContext As Object &apos; com.sun.star.sdb.DatabaseContext
  56. Private ConfigurationProvider _
  57. As Object &apos; com.sun.star.configuration.ConfigurationProvider
  58. Private MailService As Object &apos; com.sun.star.system.SimpleCommandMail or com.sun.star.system.SimpleSystemMail
  59. &apos; Specific persistent services objects or properties
  60. Private FileSystemNaming As String &apos; If &quot;SYS&quot;, file and folder naming is based on operating system notation
  61. Private PythonHelper As String &apos; File name of Python helper functions (stored in $(inst)/share/Scripts/python)
  62. Private Interface As Object &apos; ScriptForge own L10N service
  63. Private OSName As String &apos; WIN, LINUX, MACOS
  64. Private SFDialogs As Variant &apos; Persistent storage for the SFDialogs library
  65. REM ====================================================== CONSTRUCTOR/DESTRUCTOR
  66. REM -----------------------------------------------------------------------------
  67. Private Sub Class_Initialize()
  68. Set [Me] = Nothing
  69. Set [_Parent] = Nothing
  70. ObjectType = &quot;ROOT&quot;
  71. MainFunction = &quot;&quot;
  72. MainFunctionArgs = &quot;&quot;
  73. StackLevel = 0
  74. ErrorHandler = True
  75. ConsoleLines = Array()
  76. Set ConsoleDialog = Nothing
  77. Set ConsoleControl = Nothing
  78. DisplayEnabled = True
  79. StopWhenError = True
  80. DebugMode = False
  81. ServicesList = Empty
  82. Set FunctionAccess = Nothing
  83. Set PathSettings = Nothing
  84. Set PathSubstitution = Nothing
  85. Set ScriptProvider = Nothing
  86. Set SystemShellExecute = Nothing
  87. Set CoreReflection = Nothing
  88. Set DispatchHelper = Nothing
  89. Set TextSearch = Nothing
  90. Set SearchOptions = Nothing
  91. Set Locale = Nothing
  92. Set CharacterClass = Nothing
  93. Set FileAccess = Nothing
  94. Set FilterFactory = Nothing
  95. Set FolderPicker = Nothing
  96. Set FilePicker = Nothing
  97. Set URLTransformer = Nothing
  98. Set Introspection = Nothing
  99. FileSystemNaming = &quot;ANY&quot;
  100. PythonHelper = &quot;ScriptForgeHelper.py&quot;
  101. Set Interface = Nothing
  102. Set BrowseNodeFactory = Nothing
  103. Set DatabaseContext = Nothing
  104. Set ConfigurationProvider = Nothing
  105. Set MailService = Nothing
  106. OSName = &quot;&quot;
  107. SFDialogs = Empty
  108. End Sub &apos; ScriptForge.SF_Root Constructor
  109. REM -----------------------------------------------------------------------------
  110. Private Sub Class_Terminate()
  111. Call Class_Initialize()
  112. End Sub &apos; ScriptForge.SF_Root Destructor
  113. REM -----------------------------------------------------------------------------
  114. Public Function Dispose() As Variant
  115. Call Class_Terminate()
  116. Set Dispose = Nothing
  117. End Function &apos; ScriptForge.SF_Root Explicit destructor
  118. REM =========================================================== PRIVATE FUNCTIONS
  119. REM -----------------------------------------------------------------------------
  120. Public Sub _AddToConsole(ByVal psLine As String)
  121. &apos;&apos;&apos; Add a new line to the console
  122. &apos;&apos;&apos; TAB characters are expanded before the insertion of the line
  123. &apos;&apos;&apos; NB: Array redimensioning of a member of an object must be done in the class module
  124. &apos;&apos;&apos; Args:
  125. &apos;&apos;&apos; psLine: the line to add
  126. Dim lConsole As Long &apos; UBound of ConsoleLines
  127. Dim sLine As String &apos; Alias of psLine
  128. &apos; Resize ConsoleLines
  129. lConsole = UBound(ConsoleLines)
  130. If lConsole &lt; 0 Then
  131. ReDim ConsoleLines(0)
  132. Else
  133. ReDim Preserve ConsoleLines(0 To lConsole + 1)
  134. End If
  135. &apos; Add a timestamp to the line and insert it (without date)
  136. sLine = Mid(SF_Utils._Repr(Now()), 12) &amp; &quot; -&gt; &quot; &amp; psLine
  137. ConsoleLines(lConsole + 1) = Mid(SF_Utils._Repr(Now()), 12) &amp; &quot; -&gt; &quot; &amp; psLine
  138. &apos; Add the new line to the actual (probably non-modal) console, if active
  139. If Not IsNull(ConsoleDialog) Then
  140. If ConsoleDialog._IsStillAlive(False) Then &apos; False to not raise an error
  141. If IsNull(ConsoleControl) Then Set ConsoleControl = ConsoleDialog.Controls(SF_Exception.CONSOLENAME) &apos; Should not happen ...
  142. ConsoleControl.WriteLine(sLine)
  143. End If
  144. End If
  145. End Sub &apos; ScriptForge.SF_Root._AddToConsole
  146. REM -----------------------------------------------------------------------------
  147. Public Sub _LoadLocalizedInterface(Optional ByVal psMode As String)
  148. &apos;&apos;&apos; Build the user interface in a persistent L10N object
  149. &apos;&apos;&apos; Executed - only once - at first ScriptForge invocation by a user script
  150. &apos;&apos;&apos; Args:
  151. &apos;&apos;&apos; psMode: ADDTEXT =&gt; the (english) labels are loaded from code below
  152. &apos;&apos;&apos; POFILE =&gt; the localized labels are loaded from a PO file
  153. &apos;&apos;&apos; the name of the file is &quot;la.po&quot; where la = language part of locale
  154. &apos;&apos;&apos; (fallback to ADDTEXT mode if file does not exist)
  155. Dim sInstallFolder As String &apos; ScriptForge installation directory
  156. Dim sPOFolder As String &apos; Folder containing the PO files
  157. Dim sPOFile As String &apos; PO File to load
  158. Dim sLocale As String &apos; Locale
  159. If ErrorHandler Then On Local Error GoTo Catch
  160. Try:
  161. &apos;TODO: Modify default value
  162. If IsMissing(psMode) Then psMode = &quot;POFILE&quot;
  163. If psMode = &quot;POFILE&quot; Then &apos; Use this mode in production
  164. &apos; Build the po file name
  165. With SF_FileSystem
  166. sInstallFolder = ._SFInstallFolder() &apos; ScriptForge installation folder
  167. sLocale = SF_Utils._GetUNOService(&quot;Locale&quot;).Language
  168. sPOFolder = .BuildPath(sInstallFolder, &quot;po&quot;)
  169. sPOFile = .BuildPath(sPOFolder, sLocale &amp; &quot;.po&quot;)
  170. If Not .FileExists(sPOFile) Then &apos; File not found =&gt; load texts from code below
  171. psMode = &quot;ADDTEXT&quot;
  172. Else
  173. Set Interface = CreateScriptService(&quot;L10N&quot;, sPOFolder, sLocale)
  174. End If
  175. End With
  176. End If
  177. If psMode = &quot;ADDTEXT&quot; Then &apos; Use this mode in development to prepare a new POT file
  178. Set Interface = CreateScriptService(&quot;L10N&quot;)
  179. With Interface
  180. &apos; SF_Exception.Raise
  181. .AddText( Context := &quot;CLOSEBUTTON&quot; _
  182. , MsgId := &quot;Close&quot; _
  183. , Comment := &quot;Text in close buttons of progress and console dialog boxes&quot; _
  184. )
  185. .AddText( Context := &quot;ERRORNUMBER&quot; _
  186. , MsgId := &quot;Error %1&quot; _
  187. , Comment := &quot;Title in error message box\n&quot; _
  188. &amp; &quot;%1: an error number&quot; _
  189. )
  190. .AddText( Context := &quot;ERRORLOCATION&quot; _
  191. , MsgId := &quot;Location : %1&quot; _
  192. , Comment := &quot;Error message box\n&quot; _
  193. &amp; &quot;%1: a line number&quot; _
  194. )
  195. .AddText( Context := &quot;LONGERRORDESC&quot; _
  196. , MsgId := &quot;Error %1 - Location = %2 - Description = %3&quot; _
  197. , Comment := &quot;Logfile record&quot; _
  198. )
  199. .AddText( Context := &quot;STOPEXECUTION&quot; _
  200. , MsgId := &quot;THE EXECUTION IS CANCELLED.&quot; _
  201. , Comment := &quot;SF_Utils._Validate error message&quot; _
  202. )
  203. &apos; SF_Exception.RaiseAbort
  204. .AddText( Context := &quot;INTERNALERROR&quot; _
  205. , MsgId := &quot;The ScriptForge library has crashed. The reason is unknown.\n&quot; _
  206. &amp; &quot;Maybe a bug that could be reported on\n&quot; _
  207. &amp; &quot;\thttps://bugs.documentfoundation.org/\n\n&quot; _
  208. &amp; &quot;More details : \n\n&quot; _
  209. , Comment := &quot;SF_Exception.RaiseAbort error message&quot; _
  210. )
  211. &apos; SF_Utils._Validate
  212. .AddText( Context := &quot;VALIDATESOURCE&quot; _
  213. , MsgId := &quot;Library : \t%1\nService : \t%2\nMethod : \t%3&quot; _
  214. , Comment := &quot;SF_Utils._Validate error message\n&quot; _
  215. &amp; &quot;%1: probably ScriptForge\n&quot; _
  216. &amp; &quot;%2: service or module name\n&quot; _
  217. &amp; &quot;%3: property or method name where the error occurred&quot; _
  218. )
  219. .AddText( Context := &quot;VALIDATEARGS&quot; _
  220. , MsgId := &quot;Arguments: %1&quot; _
  221. , Comment := &quot;SF_Utils._Validate error message\n&quot; _
  222. &amp; &quot;%1: list of arguments of the method&quot; _
  223. )
  224. .AddText( Context := &quot;VALIDATEERROR&quot; _
  225. , MsgId := &quot;A serious error has been detected in your code on argument : « %1 ».&quot; _
  226. , Comment := &quot;SF_Utils._Validate error message\n&quot; _
  227. &amp; &quot;%1: Wrong argument name&quot; _
  228. )
  229. .AddText( Context := &quot;VALIDATIONRULES&quot; _
  230. , MsgId := &quot;\tValidation rules :&quot;, Comment := &quot;SF_Utils.Validate error message&quot; _
  231. )
  232. .AddText( Context := &quot;VALIDATETYPES&quot; _
  233. , MsgId := &quot;\t\t« %1 » must have next type (or one of next types) : %2&quot; _
  234. , Comment := &quot;SF_Utils._Validate error message\n&quot; _
  235. &amp; &quot;%1: Wrong argument name\n&quot; _
  236. &amp; &quot;%2: Comma separated list of allowed types&quot; _
  237. )
  238. .AddText( Context := &quot;VALIDATEVALUES&quot; _
  239. , MsgId := &quot;\t\t« %1 » must contain one of next values : %2&quot; _
  240. , Comment := &quot;SF_Utils._Validate error message\n&quot; _
  241. &amp; &quot;%1: Wrong argument name\n&quot; _
  242. &amp; &quot;%2: Comma separated list of allowed values&quot; _
  243. )
  244. .AddText( Context := &quot;VALIDATEREGEX&quot; _
  245. , MsgId := &quot;\t\t« %1 » must match next regular expression : %2&quot; _
  246. , Comment := &quot;SF_Utils._Validate error message\n&quot; _
  247. &amp; &quot;%1: Wrong argument name\n&quot; _
  248. &amp; &quot;%2: A regular expression&quot; _
  249. )
  250. .AddText( Context := &quot;VALIDATECLASS&quot; _
  251. , MsgId := &quot;\t\t« %1 » must be a Basic object of class : %2&quot; _
  252. , Comment := &quot;SF_Utils._Validate error message\n&quot; _
  253. &amp; &quot;%1: Wrong argument name\n&quot; _
  254. &amp; &quot;%2: The name of a Basic class&quot; _
  255. )
  256. .AddText( Context := &quot;VALIDATEACTUAL&quot; _
  257. , MsgId := &quot;The actual value of « %1 » is : &apos;%2&apos;&quot; _
  258. , Comment := &quot;SF_Utils._Validate error message\n&quot; _
  259. &amp; &quot;%1: Wrong argument name\n&quot; _
  260. &amp; &quot;%2: The value of the argument as a string&quot; _
  261. )
  262. .AddText( Context := &quot;VALIDATEMISSING&quot; _
  263. , MsgId := &quot;The « %1 » argument is mandatory, yet it is missing.&quot; _
  264. , Comment := &quot;SF_Utils._Validate error message\n&quot; _
  265. &amp; &quot;%1: Wrong argument name&quot; _
  266. )
  267. &apos; SF_Utils._ValidateArray
  268. .AddText( Context := &quot;VALIDATEARRAY&quot; _
  269. , MsgId := &quot;\t\t« %1 » must be an array.&quot; _
  270. , Comment := &quot;SF_Utils._ValidateArray error message\n&quot; _
  271. &amp; &quot;%1: Wrong argument name&quot; _
  272. )
  273. .AddText( Context := &quot;VALIDATEDIMS&quot; _
  274. , MsgId := &quot;\t\t« %1 » must have exactly %2 dimension(s).&quot; _
  275. , Comment := &quot;SF_Utils._ValidateArray error message\n&quot; _
  276. &amp; &quot;%1: Wrong argument name\n&quot; _
  277. &amp; &quot;%2: Number of dimensions of the array&quot; _
  278. )
  279. .AddText( Context := &quot;VALIDATEALLTYPES&quot; _
  280. , MsgId := &quot;\t\t« %1 » must have all elements of the same type : %2&quot; _
  281. , Comment := &quot;SF_Utils._ValidateArray error message\n&quot; _
  282. &amp; &quot;%1: Wrong argument name\n&quot; _
  283. &amp; &quot;%2: Either one single type or &apos;String, Date, Numeric&apos;&quot; _
  284. )
  285. .AddText( Context := &quot;VALIDATENOTNULL&quot; _
  286. , MsgId := &quot;\t\t« %1 » must not contain any NULL or EMPTY elements.&quot; _
  287. , Comment := &quot;SF_Utils._ValidateArray error message\n&quot; _
  288. &amp; &quot;%1: Wrong argument name\n&quot; _
  289. &amp; &quot;NULL and EMPTY should not be translated&quot; _
  290. )
  291. &apos; SF_Utils._ValidateFile
  292. .AddText( Context := &quot;VALIDATEFILE&quot; _
  293. , MsgId := &quot;\t\t« %1 » must be of type String.&quot; _
  294. , Comment := &quot;SF_Utils._ValidateFile error message\n&quot; _
  295. &amp; &quot;%1: Wrong argument name\n&quot; _
  296. &amp; &quot;&apos;String&apos; should not be translated&quot; _
  297. )
  298. .AddText( Context := &quot;VALIDATEFILESYS&quot; _
  299. , MsgId := &quot;\t\t« %1 » must be a valid file or folder name expressed in the operating system native notation.&quot; _
  300. , Comment := &quot;SF_Utils._ValidateFile error message\n&quot; _
  301. &amp; &quot;%1: Wrong argument name&quot; _
  302. )
  303. .AddText( Context := &quot;VALIDATEFILEURL&quot; _
  304. , MsgId := &quot;\t\t« %1 » must be a valid file or folder name expressed in the portable URL notation.&quot; _
  305. , Comment := &quot;SF_Utils._ValidateFile error message\n&quot; _
  306. &amp; &quot;%1: Wrong argument name\n&quot; _
  307. &amp; &quot;&apos;URL&apos; should not be translated&quot; _
  308. )
  309. .AddText( Context := &quot;VALIDATEFILEANY&quot; _
  310. , MsgId := &quot;\t\t« %1 » must be a valid file or folder name.&quot; _
  311. , Comment := &quot;SF_Utils._ValidateFile error message\n&quot; _
  312. &amp; &quot;%1: Wrong argument name&quot; _
  313. )
  314. .AddText( Context := &quot;VALIDATEWILDCARD&quot; _
  315. , MsgId := &quot;\t\t« %1 » may contain one or more wildcard characters (?, *) in its last path component only.&quot; _
  316. , Comment := &quot;SF_Utils._ValidateFile error message\n&quot; _
  317. &amp; &quot;%1: Wrong argument name\n&quot; _
  318. &amp; &quot;&apos;(?, *)&apos; is to be left as is&quot; _
  319. )
  320. &apos; SF_Array.RangeInit
  321. .AddText( Context := &quot;ARRAYSEQUENCE&quot; _
  322. , MsgId := &quot;The respective values of &apos;From&apos;, &apos;UpTo&apos; and &apos;ByStep&apos; are incoherent.\n\n&quot; _
  323. &amp; &quot;\t« From » = %1\n&quot; _
  324. &amp; &quot;\t« UpTo » = %2\n&quot; _
  325. &amp; &quot;\t« ByStep » = %3&quot; _
  326. , Comment := &quot;SF_Array.RangeInit error message\n&quot; _
  327. &amp; &quot;%1, %2, %3: Numeric values\n&quot; _
  328. &amp; &quot;&apos;From&apos;, &apos;UpTo&apos;, &apos;ByStep&apos; should not be translated&quot; _
  329. )
  330. &apos; SF_Array.AppendColumn, AppendRow, PrependColumn, PrependRow
  331. .AddText( Context := &quot;ARRAYINSERT&quot; _
  332. , MsgId := &quot;The array and the vector to insert have incompatible sizes.\n\n&quot; _
  333. &amp; &quot;\t« Array_2D » = %2\n&quot; _
  334. &amp; &quot;\t« %1 » = %3&quot; _
  335. , Comment := &quot;SF_Array.AppendColumn (...) error message\n&quot; _
  336. &amp; &quot;%1: &apos;Column&apos; or &apos;Row&apos; of a matrix\n&quot; _
  337. &amp; &quot;%2, %3: array contents\n&quot; _
  338. &amp; &quot;&apos;Array_2D&apos; should not be translated&quot; _
  339. )
  340. &apos; SF_Array.ExtractColumn, ExtractRow
  341. .AddText( Context := &quot;ARRAYINDEX1&quot; _
  342. , MsgId := &quot;The given index does not fit within the bounds of the array.\n\n&quot; _
  343. &amp; &quot;\t« Array_2D » = %2\n&quot; _
  344. &amp; &quot;\t« %1 » = %3&quot; _
  345. , Comment := &quot;SF_Array.ExtractColumn (...) error message\n&quot; _
  346. &amp; &quot;%1: &apos;Column&apos; or &apos;Row&apos; of a matrix\n&quot; _
  347. &amp; &quot;%2, %3: array contents\n&quot; _
  348. &amp; &quot;&apos;Array_2D&apos; should not be translated&quot; _
  349. )
  350. &apos; SF_Array.ExtractColumn, ExtractRow
  351. .AddText( Context := &quot;ARRAYINDEX2&quot; _
  352. , MsgId := &quot;The given slice limits do not fit within the bounds of the array.\n\n&quot; _
  353. &amp; &quot;\t« Array_2D » = %1\n&quot; _
  354. &amp; &quot;\t« From » = %2\n&quot; _
  355. &amp; &quot;\t« UpTo » = %3&quot; _
  356. , Comment := &quot;SF_Array.ExtractColumn (...) error message\n&quot; _
  357. &amp; &quot;%1: &apos;Column&apos; or &apos;Row&apos; of a matrix\n&quot; _
  358. &amp; &quot;%2, %3: array contents\n&quot; _
  359. &amp; &quot;&apos;Array_2D&apos;, &apos;From&apos; and &apos;UpTo&apos; should not be translated&quot; _
  360. )
  361. &apos; SF_Array.ImportFromCSVFile
  362. .AddText( Context := &quot;CSVPARSING&quot; _
  363. , MsgId := &quot;The given file could not be parsed as a valid CSV file.\n\n&quot; _
  364. &amp; &quot;\t« File name » = %1\n&quot; _
  365. &amp; &quot;\tLine number = %2\n&quot; _
  366. &amp; &quot;\tContent = %3&quot; _
  367. , Comment := &quot;SF_Array.ImportFromCSVFile error message\n&quot; _
  368. &amp; &quot;%1: a file name\n&quot; _
  369. &amp; &quot;%2: numeric\n&quot; _
  370. &amp; &quot;%3: a long string&quot; _
  371. )
  372. &apos; SF_Dictionary.Add/ReplaceKey
  373. .AddText( Context := &quot;DUPLICATEKEY&quot; _
  374. , MsgId := &quot;The insertion of a new key &quot; _
  375. &amp; &quot;into a dictionary failed because the key already exists.\n&quot; _
  376. &amp; &quot;Note that the comparison between keys is NOT case-sensitive.\n\n&quot; _
  377. &amp; &quot;« %1 » = %2&quot; _
  378. , Comment := &quot;SF_Dictionary Add/ReplaceKey error message\n&quot; _
  379. &amp; &quot;%1: An identifier&quot; _
  380. &amp; &quot;%2: a (potentially long) string&quot; _
  381. )
  382. &apos; SF_Dictionary.Remove/ReplaceKey/ReplaceItem
  383. .AddText( Context := &quot;UNKNOWNKEY&quot; _
  384. , MsgId := &quot;The requested key does not exist in the dictionary.\n\n&quot; _
  385. &amp; &quot;« %1 » = %2&quot; _
  386. , Comment := &quot;SF_Dictionary Remove/ReplaceKey/ReplaceItem error message\n&quot; _
  387. &amp; &quot;%1: An identifier&quot; _
  388. &amp; &quot;%2: a (potentially long) string&quot; _
  389. )
  390. &apos; SF_Dictionary.Add/ReplaceKey
  391. .AddText( Context := &quot;INVALIDKEY&quot; _
  392. , MsgId := &quot;The insertion or the update of an entry &quot; _
  393. &amp; &quot;into a dictionary failed because the given key contains only spaces.&quot; _
  394. , Comment := &quot;SF_Dictionary Add/ReplaceKey error message\n&quot; _
  395. )
  396. &apos; SF_FileSystem.CopyFile/MoveFile/DeleteFile/CreateScriptService(&quot;L10N&quot;)
  397. .AddText( Context := &quot;UNKNOWNFILE&quot; _
  398. , MsgId := &quot;The given file could not be found on your system.\n\n&quot; _
  399. &amp; &quot;« %1 » = %2&quot; _
  400. , Comment := &quot;SF_FileSystem copy/move/delete error message\n&quot; _
  401. &amp; &quot;%1: An identifier\n&quot; _
  402. &amp; &quot;%2: A file name&quot; _
  403. )
  404. &apos; SF_FileSystem.CopyFolder/MoveFolder/DeleteFolder/Files/SubFolders
  405. .AddText( Context := &quot;UNKNOWNFOLDER&quot; _
  406. , MsgId := &quot;The given folder could not be found on your system.\n\n&quot; _
  407. &amp; &quot;« %1 » = %2&quot; _
  408. , Comment := &quot;SF_FileSystem copy/move/delete error message\n&quot; _
  409. &amp; &quot;%1: An identifier\n&quot; _
  410. &amp; &quot;%2: A folder name&quot; _
  411. )
  412. &apos; SF_FileSystem.CopyFile/MoveFolder/DeleteFile
  413. .AddText( Context := &quot;NOTAFILE&quot; _
  414. , MsgId := &quot;« %1 » contains the name of an existing folder, not that of a file.\n\n&quot; _
  415. &amp; &quot;« %1 » = %2&quot; _
  416. , Comment := &quot;SF_FileSystem copy/move/delete error message\n&quot; _
  417. &amp; &quot;%1: An identifier\n&quot; _
  418. &amp; &quot;%2: A file name&quot; _
  419. )
  420. &apos; SF_FileSystem.CopyFolder/MoveFolder/DeleteFolder/Files/SubFolders
  421. .AddText( Context := &quot;NOTAFOLDER&quot; _
  422. , MsgId := &quot;« %1 » contains the name of an existing file, not that of a folder.\n\n&quot; _
  423. &amp; &quot;« %1 » = %2&quot; _
  424. , Comment := &quot;SF_FileSystem copy/move/delete error message\n&quot; _
  425. &amp; &quot;%1: An identifier\n&quot; _
  426. &amp; &quot;%2: A folder name&quot; _
  427. )
  428. &apos; SF_FileSystem.Copy+Move/File+Folder/CreateTextFile/OpenTextFile
  429. .AddText( Context := &quot;OVERWRITE&quot; _
  430. , MsgId := &quot;You tried to create a new file which already exists. Overwriting it has been rejected.\n\n&quot; _
  431. &amp; &quot;« %1 » = %2&quot; _
  432. , Comment := &quot;SF_FileSystem copy/move/... error message\n&quot; _
  433. &amp; &quot;%1: An identifier\n&quot; _
  434. &amp; &quot;%2: A file name&quot; _
  435. )
  436. &apos; SF_FileSystem.Copy+Move+Delete/File+Folder
  437. .AddText( Context := &quot;READONLY&quot; _
  438. , 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; _
  439. &amp; &quot;« %1 » = %2&quot; _
  440. , Comment := &quot;SF_FileSystem copy/move/delete error message\n&quot; _
  441. &amp; &quot;%1: An identifier\n&quot; _
  442. &amp; &quot;%2: A file name&quot; _
  443. )
  444. &apos; SF_FileSystem.Copy+Move+Delete/File+Folder
  445. .AddText( Context := &quot;NOFILEMATCH&quot; _
  446. , 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; _
  447. &amp; &quot;« %1 » = %2&quot; _
  448. , Comment := &quot;SF_FileSystem copy/move/delete error message\n&quot; _
  449. &amp; &quot;%1: An identifier\n&quot; _
  450. &amp; &quot;%2: A file or folder name with wildcards&quot; _
  451. )
  452. &apos; SF_FileSystem.CreateFolder
  453. .AddText( Context := &quot;FOLDERCREATION&quot; _
  454. , MsgId := &quot;« %1 » contains the name of an existing file or an existing folder. The operation is rejected.\n\n&quot; _
  455. &amp; &quot;« %1 » = %2&quot; _
  456. , Comment := &quot;SF_FileSystem CreateFolder error message\n&quot; _
  457. &amp; &quot;%1: An identifier\n&quot; _
  458. &amp; &quot;%2: A file or folder name&quot; _
  459. )
  460. &apos; SF_Services.CreateScriptService
  461. .AddText( Context := &quot;UNKNOWNSERVICE&quot; _
  462. , MsgId := &quot;No service named &apos;%4&apos; has been registered for the library &apos;%3&apos;.\n\n&quot; _
  463. &amp; &quot;« %1 » = %2&quot; _
  464. , Comment := &quot;SF_Services.CreateScriptService error message\n&quot; _
  465. &amp; &quot;%1: An identifier\n&quot; _
  466. &amp; &quot;%2: A string\n&quot; _
  467. &amp; &quot;%3: A Basic library name\n&quot; _
  468. &amp; &quot;%4: A service (1 word) name&quot; _
  469. )
  470. &apos; SF_Services.CreateScriptService
  471. .AddText( Context := &quot;SERVICESNOTLOADED&quot; _
  472. , MsgId := &quot;The library &apos;%3&apos; and its services could not been loaded.\n&quot; _
  473. &amp; &quot;The reason is unknown.\n&quot; _
  474. &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; _
  475. &amp; &quot;« %1 » = %2&quot; _
  476. , Comment := &quot;SF_Services.CreateScriptService error message\n&quot; _
  477. &amp; &quot;%1: An identifier\n&quot; _
  478. &amp; &quot;%2: A string\n&quot; _
  479. &amp; &quot;%3: A Basic library name&quot; _
  480. )
  481. &apos; SF_Session.ExecuteCalcFunction
  482. .AddText( Context := &quot;CALCFUNC&quot; _
  483. , MsgId := &quot;The Calc &apos;%1&apos; function encountered an error. Either the given function does not exist or its arguments are invalid.&quot; _
  484. , Comment := &quot;SF_Session.ExecuteCalcFunction error message\n&quot; _
  485. &amp; &quot;&apos;Calc&apos; should not be translated&quot; _
  486. )
  487. &apos; SF_Session._GetScript
  488. .AddText( Context := &quot;NOSCRIPT&quot; _
  489. , MsgId := &quot;The requested %1 script could not be located in the given libraries and modules.\n&quot; _
  490. &amp; &quot;« %2 » = %3\n&quot; _
  491. &amp; &quot;« %4 » = %5&quot; _
  492. , Comment := &quot;SF_Session._GetScript error message\n&quot; _
  493. &amp; &quot;%1: &apos;Basic&apos; or &apos;Python&apos;\n&quot; _
  494. &amp; &quot;%2: An identifier\n&quot; _
  495. &amp; &quot;%3: A string\n&quot; _
  496. &amp; &quot;%2: An identifier\n&quot; _
  497. &amp; &quot;%3: A string&quot; _
  498. )
  499. &apos; SF_Session.ExecuteBasicScript
  500. .AddText( Context := &quot;SCRIPTEXEC&quot; _
  501. , MsgId := &quot;An exception occurred during the execution of the Basic script.\n&quot; _
  502. &amp; &quot;Cause: %3\n&quot; _
  503. &amp; &quot;« %1 » = %2&quot; _
  504. , Comment := &quot;SF_Session.ExecuteBasicScript error message\n&quot; _
  505. &amp; &quot;%1: An identifier\n&quot; _
  506. &amp; &quot;%2: A string\n&quot; _
  507. &amp; &quot;%3: A (long) string&quot; _
  508. )
  509. &apos; SF_Session.SendMail
  510. .AddText( Context := &quot;WRONGEMAIL&quot; _
  511. , MsgId := &quot;One of the email addresses has been found invalid.\n&quot; _
  512. &amp; &quot;Invalid mail = « %1 »&quot; _
  513. , Comment := &quot;SF_Session.SendMail error message\n&quot; _
  514. &amp; &quot;%1 = a mail address&quot; _
  515. )
  516. &apos; SF_Session.SendMail
  517. .AddText( Context := &quot;SENDMAIL&quot; _
  518. , MsgId := &quot;The message could not be sent due to a system error.\n&quot; _
  519. &amp; &quot;A possible cause is that LibreOffice could not find any mail client.&quot; _
  520. , Comment := &quot;SF_Session.SendMail error message&quot; _
  521. )
  522. &apos; SF_TextStream._IsFileOpen
  523. .AddText( Context := &quot;FILENOTOPEN&quot; _
  524. , MsgId := &quot;The requested file operation could not be executed because the file was closed previously.\n\n&quot; _
  525. &amp; &quot;File name = &apos;%1&apos;&quot; _
  526. , Comment := &quot;SF_TextStream._IsFileOpen error message\n&quot; _
  527. &amp; &quot;%1: A file name&quot; _
  528. )
  529. &apos; SF_TextStream._IsFileOpen
  530. .AddText( Context := &quot;FILEOPENMODE&quot; _
  531. , 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; _
  532. &amp; &quot;File name = &apos;%1&apos;\n&quot; _
  533. &amp; &quot;Open mode = %2&quot; _
  534. , Comment := &quot;SF_TextStream._IsFileOpen error message\n&quot; _
  535. &amp; &quot;%1: A file name\n&quot; _
  536. &amp; &quot;%2: READ, WRITE or APPEND&quot; _
  537. )
  538. &apos; SF_UI.Document
  539. .AddText( Context := &quot;DOCUMENT&quot; _
  540. , MsgId := &quot;The requested document could not be found.\n\n&quot; _
  541. &amp; &quot;%1 = &apos;%2&apos;&quot; _
  542. , Comment := &quot;SF_UI.GetDocument error message\n&quot; _
  543. &amp; &quot;%1: An identifier\n&quot; _
  544. &amp; &quot;%2: A string&quot; _
  545. )
  546. &apos; SF_UI.Create
  547. .AddText( Context := &quot;DOCUMENTCREATION&quot; _
  548. , MsgId := &quot;The creation of a new document failed.\n&quot; _
  549. &amp; &quot;Something must be wrong with some arguments.\n\n&quot; _
  550. &amp; &quot;Either the document type is unknown, or no template file was given,\n&quot; _
  551. &amp; &quot;or the given template file was not found on your system.\n\n&quot; _
  552. &amp; &quot;%1 = &apos;%2&apos;\n&quot; _
  553. &amp; &quot;%3 = &apos;%4&apos;&quot; _
  554. , Comment := &quot;SF_UI.GetDocument error message\n&quot; _
  555. &amp; &quot;%1: An identifier\n&quot; _
  556. &amp; &quot;%2: A string\n&quot; _
  557. &amp; &quot;%3: An identifier\n&quot; _
  558. &amp; &quot;%4: A string&quot; _
  559. )
  560. &apos; SF_UI.OpenDocument
  561. .AddText( Context := &quot;DOCUMENTOPEN&quot; _
  562. , MsgId := &quot;The opening of the document failed.\n&quot; _
  563. &amp; &quot;Something must be wrong with some arguments.\n\n&quot; _
  564. &amp; &quot;Either the file does not exist, or the password is wrong, or the given filter is invalid.\n\n&quot; _
  565. &amp; &quot;%1 = &apos;%2&apos;\n&quot; _
  566. &amp; &quot;%3 = &apos;%4&apos;\n&quot; _
  567. &amp; &quot;%5 = &apos;%6&apos;&quot; _
  568. , Comment := &quot;SF_UI.OpenDocument error message\n&quot; _
  569. &amp; &quot;%1: An identifier\n&quot; _
  570. &amp; &quot;%2: A string\n&quot; _
  571. &amp; &quot;%3: An identifier\n&quot; _
  572. &amp; &quot;%4: A string\n&quot; _
  573. &amp; &quot;%5: An identifier\n&quot; _
  574. &amp; &quot;%6: A string&quot; _
  575. )
  576. &apos; SF_UI.OpenBaseDocument
  577. .AddText( Context := &quot;BASEDOCUMENTOPEN&quot; _
  578. , MsgId := &quot;The opening of the Base document failed.\n&quot; _
  579. &amp; &quot;Something must be wrong with some arguments.\n\n&quot; _
  580. &amp; &quot;Either the file does not exist, or the file is not registered under the given name.\n\n&quot; _
  581. &amp; &quot;%1 = &apos;%2&apos;\n&quot; _
  582. &amp; &quot;%3 = &apos;%4&apos;&quot; _
  583. , Comment := &quot;SF_UI.OpenDocument error message\n&quot; _
  584. &amp; &quot;%1: An identifier\n&quot; _
  585. &amp; &quot;%2: A string\n&quot; _
  586. &amp; &quot;%3: An identifier\n&quot; _
  587. &amp; &quot;%4: A string&quot; _
  588. )
  589. &apos; SF_Document._IsStillAlive
  590. .AddText( Context := &quot;DOCUMENTDEAD&quot; _
  591. , MsgId := &quot;The requested action could not be executed because the document was closed inadvertently.\n\n&quot; _
  592. &amp; &quot;The concerned document is &apos;%1&apos;&quot; _
  593. , Comment := &quot;SF_Document._IsStillAlive error message\n&quot; _
  594. &amp; &quot;%1: A file name&quot; _
  595. )
  596. &apos; SF_Document.Save
  597. .AddText( Context := &quot;DOCUMENTSAVE&quot; _
  598. , MsgId := &quot;The document could not be saved.\n&quot; _
  599. &amp; &quot;Either the document has been opened read-only, or the destination file has a read-only attribute set, &quot; _
  600. &amp; &quot;or the file where to save to is undefined.\n\n&quot; _
  601. &amp; &quot;%1 = &apos;%2&apos;&quot; _
  602. , Comment := &quot;SF_Document.SaveAs error message\n&quot; _
  603. &amp; &quot;%1: An identifier\n&quot; _
  604. &amp; &quot;%2: A file name\n&quot; _
  605. )
  606. &apos; SF_Document.SaveAs
  607. .AddText( Context := &quot;DOCUMENTSAVEAS&quot; _
  608. , MsgId := &quot;The document could not be saved.\n&quot; _
  609. &amp; &quot;Either the document must not be overwritten, or the destination file has a read-only attribute set, &quot; _
  610. &amp; &quot;or the given filter is invalid.\n\n&quot; _
  611. &amp; &quot;%1 = &apos;%2&apos;\n&quot; _
  612. &amp; &quot;%3 = %4\n&quot; _
  613. &amp; &quot;%5 = &apos;%6&apos;&quot; _
  614. , Comment := &quot;SF_Document.SaveAs error message\n&quot; _
  615. &amp; &quot;%1: An identifier\n&quot; _
  616. &amp; &quot;%2: A file name\n&quot; _
  617. &amp; &quot;%3: An identifier\n&quot; _
  618. &amp; &quot;%4: True or False\n&quot; _
  619. &amp; &quot;%5: An identifier\n&quot; _
  620. &amp; &quot;%6: A string&quot; _
  621. )
  622. &apos; SF_Document.any update
  623. .AddText( Context := &quot;DOCUMENTREADONLY&quot; _
  624. , MsgId := &quot;You tried to edit a document which is not modifiable. The document has not been changed.\n\n&quot; _
  625. &amp; &quot;« %1 » = %2&quot; _
  626. , Comment := &quot;SF_Document any update\n&quot; _
  627. &amp; &quot;%1: An identifier\n&quot; _
  628. &amp; &quot;%2: A file name&quot; _
  629. )
  630. &apos; SF_Base.GetDatabase
  631. .AddText( Context := &quot;DBCONNECT&quot; _
  632. , MsgId := &quot;The database related to the actual Base document could not be retrieved.\n&quot; _
  633. &amp; &quot;Check the connection/login parameters.\n\n&quot; _
  634. &amp; &quot;« %1 » = &apos;%2&apos;\n&quot; _
  635. &amp; &quot;« %3 » = &apos;%4&apos;\n&quot; _
  636. &amp; &quot;« Document » = %5&quot; _
  637. , Comment := &quot;SF_Base GetDatabase\n&quot; _
  638. &amp; &quot;%1: An identifier\n&quot; _
  639. &amp; &quot;%2: A user name\n&quot; _
  640. &amp; &quot;%3: An identifier\n&quot; _
  641. &amp; &quot;%4: A password\n&quot; _
  642. &amp; &quot;%5: A file name&quot; _
  643. )
  644. &apos; SF_Calc._ParseAddress (sheet)
  645. .AddText( Context := &quot;CALCADDRESS1&quot; _
  646. , MsgId := &quot;The given address does not correspond with a valid sheet name.\n\n&quot; _
  647. &amp; &quot;« %1 » = %2\n&quot; _
  648. &amp; &quot;« %3 » = %4&quot; _
  649. , Comment := &quot;SF_Calc _ParseAddress (sheet)\n&quot; _
  650. &amp; &quot;%1: An identifier\n&quot; _
  651. &amp; &quot;%2: A string\n&quot; _
  652. &amp; &quot;%3: An identifier\n&quot; _
  653. &amp; &quot;%4: A file name&quot; _
  654. )
  655. &apos; SF_Calc._ParseAddress (range)
  656. .AddText( Context := &quot;CALCADDRESS2&quot; _
  657. , MsgId := &quot;The given address does not correspond with a valid range of cells.\n\n&quot; _
  658. &amp; &quot;« %1 » = %2\n&quot; _
  659. &amp; &quot;« %3 » = %4&quot; _
  660. , Comment := &quot;SF_Calc _ParseAddress (range)\n&quot; _
  661. &amp; &quot;%1: An identifier\n&quot; _
  662. &amp; &quot;%2: A string\n&quot; _
  663. &amp; &quot;%3: An identifier\n&quot; _
  664. &amp; &quot;%4: A file name&quot; _
  665. )
  666. &apos; SF_Calc.InsertSheet
  667. .AddText( Context := &quot;DUPLICATESHEET&quot; _
  668. , MsgId := &quot;There exists already in the document a sheet with the same name.\n\n&quot; _
  669. &amp; &quot;« %1 » = %2\n&quot; _
  670. &amp; &quot;« %3 » = %4&quot; _
  671. , Comment := &quot;SF_Calc InsertSheet\n&quot; _
  672. &amp; &quot;%1: An identifier\n&quot; _
  673. &amp; &quot;%2: A string\n&quot; _
  674. &amp; &quot;%3: An identifier\n&quot; _
  675. &amp; &quot;%4: A file name&quot; _
  676. )
  677. &apos; SF_Calc.Offset
  678. .AddText( Context := &quot;OFFSETADDRESS&quot; _
  679. , MsgId := &quot;The computed range falls beyond the sheet boundaries or is meaningless.\n\n&quot; _
  680. &amp; &quot;« %1 » = %2\n&quot; _
  681. &amp; &quot;« %3 » = %4\n&quot; _
  682. &amp; &quot;« %5 » = %6\n&quot; _
  683. &amp; &quot;« %7 » = %8\n&quot; _
  684. &amp; &quot;« %9 » = %10\n&quot; _
  685. &amp; &quot;« %11 » = %12&quot; _
  686. , Comment := &quot;SF_Calc Offset\n&quot; _
  687. &amp; &quot;%1: An identifier\n&quot; _
  688. &amp; &quot;%2: A Calc reference\n&quot; _
  689. &amp; &quot;%3: An identifier\n&quot; _
  690. &amp; &quot;%4: A number\n&quot; _
  691. &amp; &quot;%5: An identifier\n&quot; _
  692. &amp; &quot;%6: A number\n&quot; _
  693. &amp; &quot;%7: An identifier\n&quot; _
  694. &amp; &quot;%8: A number\n&quot; _
  695. &amp; &quot;%9: An identifier\n&quot; _
  696. &amp; &quot;%10: A number\n&quot; _
  697. &amp; &quot;%11: An identifier\n&quot; _
  698. &amp; &quot;%12: A file name&quot; _
  699. )
  700. &apos; SF_Dialog._NewDialog
  701. .AddText( Context := &quot;DIALOGNOTFOUND&quot; _
  702. , MsgId := &quot;The requested dialog could not be located in the given container or library.\n&quot; _
  703. &amp; &quot;« %1 » = %2\n&quot; _
  704. &amp; &quot;« %3 » = %4\n&quot; _
  705. &amp; &quot;« %5 » = %6\n&quot; _
  706. &amp; &quot;« %7 » = %8&quot; _
  707. , Comment := &quot;SF_Dialog creation\n&quot; _
  708. &amp; &quot;%1: An identifier\n&quot; _
  709. &amp; &quot;%2: A string\n&quot; _
  710. &amp; &quot;%3: An identifier\n&quot; _
  711. &amp; &quot;%4: A file name\n&quot; _
  712. &amp; &quot;%5: An identifier\n&quot; _
  713. &amp; &quot;%6: A string\n&quot; _
  714. &amp; &quot;%7: An identifier\n&quot; _
  715. &amp; &quot;%8: A string&quot; _
  716. )
  717. &apos; SF_Dialog._IsStillAlive
  718. .AddText( Context := &quot;DIALOGDEAD&quot; _
  719. , MsgId := &quot;The requested action could not be executed because the dialog was closed inadvertently.\n\n&quot; _
  720. &amp; &quot;The concerned dialog is &apos;%1&apos;.&quot; _
  721. , Comment := &quot;SF_Dialog._IsStillAlive error message\n&quot; _
  722. &amp; &quot;%1: An identifier&quot; _
  723. )
  724. &apos; SF_DialogControl._SetProperty
  725. .AddText( Context := &quot;CONTROLTYPE&quot; _
  726. , MsgId := &quot;The control &apos;%1&apos; in dialog &apos;%2&apos; is of type &apos;%3&apos;.\n&quot; _
  727. &amp; &quot;The property &apos;%4&apos; is not applicable on that type of dialog controls.&quot; _
  728. , Comment := &quot;SF_DialogControl property setting\n&quot; _
  729. &amp; &quot;%1: An identifier\n&quot; _
  730. &amp; &quot;%2: An identifier\n&quot; _
  731. &amp; &quot;%3: A string\n&quot; _
  732. &amp; &quot;%4: An identifier&quot; _
  733. )
  734. &apos; SF_DialogControl.WriteLine
  735. .AddText( Context := &quot;TEXTFIELD&quot; _
  736. , MsgId := &quot;The control &apos;%1&apos; in dialog &apos;%2&apos; is not a multiline text field.\n&quot; _
  737. &amp; &quot;The requested method could not be executed.&quot; _
  738. , Comment := &quot;SF_DialogControl add line in textbox\n&quot; _
  739. &amp; &quot;%1: An identifier\n&quot; _
  740. &amp; &quot;%2: An identifier&quot; _
  741. )
  742. &apos; SF_Database.RunSql
  743. .AddText( Context := &quot;DBREADONLY&quot; _
  744. , MsgId := &quot;The database has been opened in read-only mode.\n&quot; _
  745. &amp; &quot;The &apos;%1&apos; method must not be executed in this context.&quot; _
  746. , Comment := &quot;SF_Database when running update SQL statement\n&quot; _
  747. &amp; &quot;%1: The concerned method&quot; _
  748. )
  749. &apos; SF_Database._ExecuteSql
  750. .AddText( Context := &quot;SQLSYNTAX&quot; _
  751. , MsgId := &quot;An SQL statement could not be interpreted or executed by the database system.\n&quot; _
  752. &amp; &quot;Check its syntax, table and/or field names, ...\n\n&quot; _
  753. &amp; &quot;SQL Statement : « %1 »&quot; _
  754. , Comment := &quot;SF_Database can&apos;t interpret SQL statement\n&quot; _
  755. &amp; &quot;%1: The statement&quot; _
  756. )
  757. End With
  758. End If
  759. Finally:
  760. Exit Sub
  761. Catch:
  762. GoTo Finally
  763. End Sub &apos; ScriptForge.SF_Root._LoadLocalizedInterface
  764. REM -----------------------------------------------------------------------------
  765. Public Function _Repr() As String
  766. &apos;&apos;&apos; Convert the unique SF_Root instance to a readable string, typically for debugging purposes (DebugPrint ...)
  767. &apos;&apos;&apos; Args:
  768. &apos;&apos;&apos; Return:
  769. &apos;&apos;&apos; &quot;[Root] (MainFunction: xxx, Console: yyy lines, ServicesList)&quot;
  770. Dim sRoot As String &apos; Return value
  771. Const cstRoot = &quot;[Root] (&quot;
  772. sRoot = cstRoot &amp; &quot;MainFunction: &quot; &amp; MainFunction &amp; &quot;, Console: &quot; &amp; UBound(ConsoleLines) + 1 &amp; &quot; lines&quot; _
  773. &amp; &quot;, Libraries:&quot; &amp; SF_Utils._Repr(ServicesList.Keys) _
  774. &amp; &quot;)&quot;
  775. _Repr = sRoot
  776. End Function &apos; ScriptForge.SF_Root._Repr
  777. REM -----------------------------------------------------------------------------
  778. Public Sub _StackReset()
  779. &apos;&apos;&apos; Reset private members after a fatal/abort error to leave
  780. &apos;&apos;&apos; a stable persistent storage after an unwanted interrupt
  781. MainFunction = &quot;&quot;
  782. MainFunctionArgs = &quot;&quot;
  783. StackLevel = 0
  784. End Sub &apos; ScriptForge.SF_Root._StackReset
  785. REM ================================================== END OF SCRIPTFORGE.SF_ROOT
  786. </script:module>