SF_Base.xba 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464
  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_Base" script:language="StarBasic" script:moduleType="normal">REM =======================================================================================================================
  4. REM === The ScriptForge library and its associated libraries are part of the LibreOffice project. ===
  5. REM === The SFDocuments library is one of the associated libraries. ===
  6. REM === Full documentation is available on https://help.libreoffice.org/ ===
  7. REM =======================================================================================================================
  8. Option Compatible
  9. Option ClassModule
  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_Base
  13. &apos;&apos;&apos; =======
  14. &apos;&apos;&apos;
  15. &apos;&apos;&apos; The SFDocuments library gathers a number of methods and properties making easy
  16. &apos;&apos;&apos; the management and several manipulations of LibreOffice documents
  17. &apos;&apos;&apos;
  18. &apos;&apos;&apos; Some methods are generic for all types of documents: they are combined in the SF_Document module.
  19. &apos;&apos;&apos; Specific properties and methods are implemented in the concerned subclass(es) SF_Calc, SF_Writer, ...
  20. &apos;&apos;&apos;
  21. &apos;&apos;&apos; To workaround the absence of class inheritance in LibreOffice Basic, some redundancy is necessary
  22. &apos;&apos;&apos; Each subclass MUST implement also the generic methods and properties, even if they only call
  23. &apos;&apos;&apos; the parent methods and properties.
  24. &apos;&apos;&apos; They should also duplicate some generic private members as a subset of their own set of members
  25. &apos;&apos;&apos;
  26. &apos;&apos;&apos; The SF_Base module is provided only to block parent properties that are NOT applicable to Base documents
  27. &apos;&apos;&apos;
  28. &apos;&apos;&apos; The current module is closely related to the &quot;UI&quot; service of the ScriptForge library
  29. &apos;&apos;&apos;
  30. &apos;&apos;&apos; Service invocation examples:
  31. &apos;&apos;&apos; 1) From the UI service
  32. &apos;&apos;&apos; Dim ui As Object, oDoc As Object
  33. &apos;&apos;&apos; Set ui = CreateScriptService(&quot;UI&quot;)
  34. &apos;&apos;&apos; Set oDoc = ui.CreateBaseDocument(&quot;C:\Me\MyFile.odb&quot;, ...)
  35. &apos;&apos;&apos; &apos; or Set oDoc = ui.OpenDocument(&quot;C:\Me\MyFile.odb&quot;)
  36. &apos;&apos;&apos; 2) Directly if the document is already opened
  37. &apos;&apos;&apos; Dim oDoc As Object
  38. &apos;&apos;&apos; Set oDoc = CreateScriptService(&quot;SFDocuments.Base&quot;, &quot;MyFile.odb&quot;)
  39. &apos;&apos;&apos; &apos; The substring &quot;SFDocuments.&quot; in the service name is optional
  40. &apos;&apos;&apos;
  41. &apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;&apos;
  42. REM ================================================================== EXCEPTIONS
  43. Private Const DBCONNECTERROR = &quot;DBCONNECTERROR&quot;
  44. REM ============================================================= PRIVATE MEMBERS
  45. Private [Me] As Object
  46. Private [_Parent] As Object
  47. Private [_Super] As Object &apos; Document superclass, which the current instance is a subclass of
  48. Private ObjectType As String &apos; Must be BASE
  49. Private ServiceName As String
  50. &apos; Window component
  51. Private _Component As Object &apos; com.sun.star.comp.dba.ODatabaseDocument
  52. Private _DataSource As Object &apos; com.sun.star.comp.dba.ODatabaseSource
  53. Private _Database As Object &apos; SFDatabases.Database service instance
  54. REM ============================================================ MODULE CONSTANTS
  55. REM ===================================================== CONSTRUCTOR/DESTRUCTOR
  56. REM -----------------------------------------------------------------------------
  57. Private Sub Class_Initialize()
  58. Set [Me] = Nothing
  59. Set [_Parent] = Nothing
  60. Set [_Super] = Nothing
  61. ObjectType = &quot;BASE&quot;
  62. ServiceName = &quot;SFDocuments.Base&quot;
  63. Set _Component = Nothing
  64. Set _DataSource = Nothing
  65. Set _Database = Nothing
  66. End Sub &apos; SFDocuments.SF_Base Constructor
  67. REM -----------------------------------------------------------------------------
  68. Private Sub Class_Terminate()
  69. Call Class_Initialize()
  70. End Sub &apos; SFDocuments.SF_Base Destructor
  71. REM -----------------------------------------------------------------------------
  72. Public Function Dispose() As Variant
  73. If Not IsNull([_Super]) Then Set [_Super] = [_Super].Dispose()
  74. Call Class_Terminate()
  75. Set Dispose = Nothing
  76. End Function &apos; SFDocuments.SF_Base Explicit Destructor
  77. REM ================================================================== PROPERTIES
  78. REM ===================================================================== METHODS
  79. REM -----------------------------------------------------------------------------
  80. Public Function CloseDocument(Optional ByVal SaveAsk As Variant) As Boolean
  81. &apos;&apos;&apos; The closure of a Base document requires the closures of
  82. &apos;&apos;&apos; 1) the connection =&gt; done in the CloseDatabase() method
  83. &apos;&apos;&apos; 2) the data source
  84. &apos;&apos;&apos; 3) the document itself =&gt; done in the superclass
  85. Const cstThisSub = &quot;SFDocuments.Base.CloseDocument&quot;
  86. Const cstSubArgs = &quot;[SaveAsk=True]&quot;
  87. If ScriptForge.SF_Utils._ErrorHandling() Then On Local Error GoTo Catch
  88. Check:
  89. If IsMissing(SaveAsk) Or IsEmpty(SaveAsk) Then SaveAsk = True
  90. If ScriptForge.SF_Utils._EnterFunction(cstThisSub, cstSubArgs) Then
  91. If Not [_Super]._IsStillAlive(True) Then GoTo Finally
  92. If Not ScriptForge.SF_Utils._Validate(SaveAsk, &quot;SaveAsk&quot;, V_BOOLEAN) Then GoTo Finally
  93. End If
  94. Try:
  95. If Not IsNull(_Database) Then _Database.CloseDatabase()
  96. If Not IsNull(_DataSource) Then _DataSource.dispose()
  97. CloseDocument = [_Super].CloseDocument(SaveAsk)
  98. Finally:
  99. ScriptForge.SF_Utils._ExitFunction(cstThisSub)
  100. Exit Function
  101. Catch:
  102. GoTo Finally
  103. End Function &apos; SFDocuments.SF_Base.CloseDocument
  104. REM -----------------------------------------------------------------------------
  105. Public Function GetDatabase(Optional ByVal User As Variant _
  106. , Optional ByVal Password As Variant _
  107. ) As Object
  108. &apos;&apos;&apos; Returns a Database instance (service = SFDatabases.Database) giving access
  109. &apos;&apos;&apos; to the execution of SQL commands on the database defined and/or stored in
  110. &apos;&apos;&apos; the actual Base document
  111. &apos;&apos;&apos; Args:
  112. &apos;&apos;&apos; User, Password: the login parameters as strings. Defaults = &quot;&quot;
  113. &apos;&apos;&apos; Returns:
  114. &apos;&apos;&apos; A SFDatabases.Database instance or Nothing
  115. &apos;&apos;&apos; Example:
  116. &apos;&apos;&apos; Dim myDb As Object
  117. &apos;&apos;&apos; Set myDb = oDoc.GetDatabase()
  118. Const cstThisSub = &quot;SFDocuments.Base.GetDatabase&quot;
  119. Const cstSubArgs = &quot;[User=&quot;&quot;&quot;&quot;], [Password=&quot;&quot;&quot;&quot;]&quot;
  120. If ScriptForge.SF_Utils._ErrorHandling() Then On Local Error GoTo Catch
  121. Set GetDatabase = Nothing
  122. Check:
  123. If IsMissing(User) Or IsEmpty(User) Then User = &quot;&quot;
  124. If IsMissing(Password) Or IsEmpty(Password) Then Password = &quot;&quot;
  125. If ScriptForge.SF_Utils._EnterFunction(cstThisSub, cstSubArgs) Then
  126. If Not [_Super]._IsStillAlive(True) Then GoTo Finally
  127. If Not ScriptForge.SF_Utils._Validate(User, &quot;User&quot;, V_STRING) Then GoTo Finally
  128. If Not ScriptForge.SF_Utils._Validate(Password, &quot;Password&quot;, V_STRING) Then GoTo Finally
  129. End If
  130. Try:
  131. If IsNull(_Database) Then &apos; 1st connection from the current document instance
  132. If IsNull(_DataSource) Then GoTo CatchConnect
  133. Set _Database = ScriptForge.SF_Services.CreateScriptService(&quot;SFDatabases.DatabaseFromDocument&quot; _
  134. , _DataSource, User, Password)
  135. If IsNull(_Database) Then GoTo CatchConnect
  136. _Database._Location = [_Super]._WindowFileName
  137. EndIf
  138. Finally:
  139. Set GetDatabase = _Database
  140. ScriptForge.SF_Utils._ExitFunction(cstThisSub)
  141. Exit Function
  142. Catch:
  143. GoTo Finally
  144. CatchConnect:
  145. ScriptForge.SF_Exception.RaiseFatal(DBCONNECTERROR, &quot;User&quot;, User, &quot;Password&quot;, Password, [_Super]._FileIdent())
  146. GoTo Finally
  147. End Function &apos; SFDocuments.SF_Base.GetDatabase
  148. REM -----------------------------------------------------------------------------
  149. Public Function GetProperty(Optional ByVal PropertyName As Variant) As Variant
  150. &apos;&apos;&apos; Return the actual value of the given property
  151. &apos;&apos;&apos; Args:
  152. &apos;&apos;&apos; PropertyName: the name of the property as a string
  153. &apos;&apos;&apos; Returns:
  154. &apos;&apos;&apos; The actual value of the property
  155. &apos;&apos;&apos; Exceptions:
  156. &apos;&apos;&apos; ARGUMENTERROR The property does not exist
  157. Const cstThisSub = &quot;SFDocuments.Base.GetProperty&quot;
  158. Const cstSubArgs = &quot;&quot;
  159. If ScriptForge.SF_Utils._ErrorHandling() Then On Local Error GoTo Catch
  160. GetProperty = Null
  161. Check:
  162. If ScriptForge.SF_Utils._EnterFunction(cstThisSub, cstSubArgs) Then
  163. If Not ScriptForge.SF_Utils._Validate(PropertyName, &quot;PropertyName&quot;, V_STRING, Properties()) Then GoTo Catch
  164. End If
  165. Try:
  166. &apos; Superclass or subclass property ?
  167. If ScriptForge.SF_Array.Contains([_Super].Properties(), PropertyName) Then
  168. GetProperty = [_Super].GetProperty(PropertyName)
  169. Else
  170. GetProperty = _PropertyGet(PropertyName)
  171. End If
  172. Finally:
  173. ScriptForge.SF_Utils._ExitFunction(cstThisSub)
  174. Exit Function
  175. Catch:
  176. GoTo Finally
  177. End Function &apos; SFDocuments.SF_Base.GetProperty
  178. REM -----------------------------------------------------------------------------
  179. Public Function Methods() As Variant
  180. &apos;&apos;&apos; Return the list of public methods of the Model service as an array
  181. Methods = Array( _
  182. &quot;Activate&quot; _
  183. , &quot;CloseDocument&quot; _
  184. , &quot;GetDatabase&quot; _
  185. , &quot;RunCommand&quot; _
  186. , &quot;Save&quot; _
  187. , &quot;SaveAs&quot; _
  188. , &quot;SaveCopyAs&quot; _
  189. )
  190. End Function &apos; SFDocuments.SF_Base.Methods
  191. REM -----------------------------------------------------------------------------
  192. Public Function Properties() As Variant
  193. &apos;&apos;&apos; Return the list or properties of the Timer class as an array
  194. Properties = Array( _
  195. &quot;DocumentType&quot; _
  196. , &quot;IsBase&quot; _
  197. , &quot;IsCalc&quot; _
  198. , &quot;IsDraw &quot; _
  199. , &quot;IsImpress&quot; _
  200. , &quot;IsMath&quot; _
  201. , &quot;IsWriter&quot; _
  202. , &quot;XComponent&quot; _
  203. )
  204. End Function &apos; SFDocuments.SF_Base.Properties
  205. REM -----------------------------------------------------------------------------
  206. Public Function SetProperty(Optional ByVal PropertyName As Variant _
  207. , Optional ByRef Value As Variant _
  208. ) As Boolean
  209. &apos;&apos;&apos; Set a new value to the given property
  210. &apos;&apos;&apos; Args:
  211. &apos;&apos;&apos; PropertyName: the name of the property as a string
  212. &apos;&apos;&apos; Value: its new value
  213. &apos;&apos;&apos; Exceptions
  214. &apos;&apos;&apos; ARGUMENTERROR The property does not exist
  215. Const cstThisSub = &quot;SFDocuments.Base.SetProperty&quot;
  216. Const cstSubArgs = &quot;PropertyName, Value&quot;
  217. If SF_Utils._ErrorHandling() Then On Local Error GoTo Catch
  218. SetProperty = False
  219. Check:
  220. If SF_Utils._EnterFunction(cstThisSub, cstSubArgs) Then
  221. If Not SF_Utils._Validate(PropertyName, &quot;PropertyName&quot;, V_STRING, Properties()) Then GoTo Catch
  222. End If
  223. Try:
  224. Select Case UCase(PropertyName)
  225. Case Else
  226. End Select
  227. Finally:
  228. SF_Utils._ExitFunction(cstThisSub)
  229. Exit Function
  230. Catch:
  231. GoTo Finally
  232. End Function &apos; SFDocuments.SF_Documents.SetProperty
  233. REM ======================================================= SUPERCLASS PROPERTIES
  234. REM -----------------------------------------------------------------------------
  235. &apos;Property Get CustomProperties() As Variant
  236. &apos; CustomProperties = [_Super].GetProperty(&quot;CustomProperties&quot;)
  237. &apos;End Property &apos; SFDocuments.SF_Base.CustomProperties
  238. REM -----------------------------------------------------------------------------
  239. &apos;Property Let CustomProperties(Optional ByVal pvCustomProperties As Variant)
  240. &apos; [_Super].CustomProperties = pvCustomProperties
  241. &apos;End Property &apos; SFDocuments.SF_Base.CustomProperties
  242. REM -----------------------------------------------------------------------------
  243. &apos;Property Get Description() As Variant
  244. &apos; Description = [_Super].GetProperty(&quot;Description&quot;)
  245. &apos;End Property &apos; SFDocuments.SF_Base.Description
  246. REM -----------------------------------------------------------------------------
  247. &apos;Property Let Description(Optional ByVal pvDescription As Variant)
  248. &apos; [_Super].Description = pvDescription
  249. &apos;End Property &apos; SFDocuments.SF_Base.Description
  250. REM -----------------------------------------------------------------------------
  251. &apos;Property Get DocumentProperties() As Variant
  252. &apos; DocumentProperties = [_Super].GetProperty(&quot;DocumentProperties&quot;)
  253. &apos;End Property &apos; SFDocuments.SF_Base.DocumentProperties
  254. REM -----------------------------------------------------------------------------
  255. Property Get DocumentType() As String
  256. DocumentType = [_Super].GetProperty(&quot;DocumentType&quot;)
  257. End Property &apos; SFDocuments.SF_Base.DocumentType
  258. REM -----------------------------------------------------------------------------
  259. Property Get IsBase() As Boolean
  260. IsBase = [_Super].GetProperty(&quot;IsBase&quot;)
  261. End Property &apos; SFDocuments.SF_Base.IsBase
  262. REM -----------------------------------------------------------------------------
  263. Property Get IsCalc() As Boolean
  264. IsCalc = [_Super].GetProperty(&quot;IsCalc&quot;)
  265. End Property &apos; SFDocuments.SF_Base.IsCalc
  266. REM -----------------------------------------------------------------------------
  267. Property Get IsDraw() As Boolean
  268. IsDraw = [_Super].GetProperty(&quot;IsDraw&quot;)
  269. End Property &apos; SFDocuments.SF_Base.IsDraw
  270. REM -----------------------------------------------------------------------------
  271. Property Get IsImpress() As Boolean
  272. IsImpress = [_Super].GetProperty(&quot;IsImpress&quot;)
  273. End Property &apos; SFDocuments.SF_Base.IsImpress
  274. REM -----------------------------------------------------------------------------
  275. Property Get IsMath() As Boolean
  276. IsMath = [_Super].GetProperty(&quot;IsMath&quot;)
  277. End Property &apos; SFDocuments.SF_Base.IsMath
  278. REM -----------------------------------------------------------------------------
  279. Property Get IsWriter() As Boolean
  280. IsWriter = [_Super].GetProperty(&quot;IsWriter&quot;)
  281. End Property &apos; SFDocuments.SF_Base.IsWriter
  282. REM -----------------------------------------------------------------------------
  283. &apos;Property Get Keywords() As Variant
  284. &apos; Keywords = [_Super].GetProperty(&quot;Keywords&quot;)
  285. &apos;End Property &apos; SFDocuments.SF_Base.Keywords
  286. REM -----------------------------------------------------------------------------
  287. &apos;Property Let Keywords(Optional ByVal pvKeywords As Variant)
  288. &apos; [_Super].Keywords = pvKeywords
  289. &apos;End Property &apos; SFDocuments.SF_Base.Keywords
  290. REM -----------------------------------------------------------------------------
  291. &apos;Property Get Readonly() As Variant
  292. &apos; Readonly = [_Super].GetProperty(&quot;Readonly&quot;)
  293. &apos;End Property &apos; SFDocuments.SF_Base.Readonly
  294. REM -----------------------------------------------------------------------------
  295. &apos;Property Get Subject() As Variant
  296. &apos; Subject = [_Super].GetProperty(&quot;Subject&quot;)
  297. &apos;End Property &apos; SFDocuments.SF_Base.Subject
  298. REM -----------------------------------------------------------------------------
  299. &apos;Property Let Subject(Optional ByVal pvSubject As Variant)
  300. &apos; [_Super].Subject = pvSubject
  301. &apos;End Property &apos; SFDocuments.SF_Base.Subject
  302. REM -----------------------------------------------------------------------------
  303. &apos;Property Get Title() As Variant
  304. &apos; Title = [_Super].GetProperty(&quot;Title&quot;)
  305. &apos;End Property &apos; SFDocuments.SF_Base.Title
  306. REM -----------------------------------------------------------------------------
  307. &apos;Property Let Title(Optional ByVal pvTitle As Variant)
  308. &apos; [_Super].Title = pvTitle
  309. &apos;End Property &apos; SFDocuments.SF_Base.Title
  310. REM -----------------------------------------------------------------------------
  311. Property Get XComponent() As Variant
  312. XComponent = [_Super].GetProperty(&quot;XComponent&quot;)
  313. End Property &apos; SFDocuments.SF_Base.XComponent
  314. REM ========================================================== SUPERCLASS METHODS
  315. REM -----------------------------------------------------------------------------
  316. Public Function Activate() As Boolean
  317. Activate = [_Super].Activate()
  318. End Function &apos; SFDocuments.SF_Base.Activate
  319. REM -----------------------------------------------------------------------------
  320. Public Sub RunCommand(Optional ByVal Command As Variant)
  321. [_Super].RunCommand(Command)
  322. End Sub &apos; SFDocuments.SF_Base.RunCommand
  323. REM -----------------------------------------------------------------------------
  324. Public Function Save() As Boolean
  325. Save = [_Super].Save()
  326. End Function &apos; SFDocuments.SF_Base.Save
  327. REM -----------------------------------------------------------------------------
  328. Public Function SaveAs(Optional ByVal FileName As Variant _
  329. , Optional ByVal Overwrite As Variant _
  330. , Optional ByVal Password As Variant _
  331. , Optional ByVal FilterName As Variant _
  332. , Optional ByVal FilterOptions As Variant _
  333. ) As Boolean
  334. SaveAs = [_Super].SaveAs(FileName, Overwrite, Password, FilterName, FilterOptions)
  335. End Function &apos; SFDocuments.SF_Base.SaveAs
  336. REM -----------------------------------------------------------------------------
  337. Public Function SaveCopyAs(Optional ByVal FileName As Variant _
  338. , Optional ByVal Overwrite As Variant _
  339. , Optional ByVal Password As Variant _
  340. , Optional ByVal FilterName As Variant _
  341. , Optional ByVal FilterOptions As Variant _
  342. ) As Boolean
  343. SaveCopyAs = [_Super].SaveCopyAs(FileName, Overwrite, Password, FilterName, FilterOptions)
  344. End Function &apos; SFDocuments.SF_Base.SaveCopyAs
  345. REM =========================================================== PRIVATE FUNCTIONS
  346. REM -----------------------------------------------------------------------------
  347. Private Function _PropertyGet(Optional ByVal psProperty As String _
  348. , Optional ByVal pvArg As Variant _
  349. ) As Variant
  350. &apos;&apos;&apos; Return the value of the named property
  351. &apos;&apos;&apos; Args:
  352. &apos;&apos;&apos; psProperty: the name of the property
  353. Dim oProperties As Object &apos; Document or Custom properties
  354. Dim vLastCell As Variant &apos; Coordinates of last used cell in a sheet
  355. Dim oSelect As Object &apos; Current selection
  356. Dim vRanges As Variant &apos; List of selected ranges
  357. Dim i As Long
  358. Dim cstThisSub As String
  359. Const cstSubArgs = &quot;&quot;
  360. _PropertyGet = False
  361. cstThisSub = &quot;SFDocuments.SF_Base.get&quot; &amp; psProperty
  362. ScriptForge.SF_Utils._EnterFunction(cstThisSub, cstSubArgs)
  363. If Not [_Super]._IsStillAlive() Then GoTo Finally
  364. Select Case psProperty
  365. Case Else
  366. _PropertyGet = Null
  367. End Select
  368. Finally:
  369. ScriptForge.SF_Utils._ExitFunction(cstThisSub)
  370. Exit Function
  371. End Function &apos; SFDocuments.SF_Base._PropertyGet
  372. REM -----------------------------------------------------------------------------
  373. Private Function _Repr() As String
  374. &apos;&apos;&apos; Convert the SF_Base instance to a readable string, typically for debugging purposes (DebugPrint ...)
  375. &apos;&apos;&apos; Args:
  376. &apos;&apos;&apos; Return:
  377. &apos;&apos;&apos; &quot;[Base]: Type/File&quot;
  378. _Repr = &quot;[Base]: &quot; &amp; [_Super]._FileIdent()
  379. End Function &apos; SFDocuments.SF_Base._Repr
  380. REM ============================================ END OF SFDOCUMENTS.SF_BASE
  381. </script:module>