bump product version to 5.0.4.1
[LibreOffice.git] / wizards / source / access2base / Compatible.xba
blobf3d3ad940626eb79db9ea582a681cb2650a39ee8
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="Compatible" script:language="StarBasic">REM =======================================================================================================================
4 REM === The Access2Base library is a part of the LibreOffice project. ===
5 REM === Full documentation is available on http://www.access2base.com ===
6 REM =======================================================================================================================
8 Option Compatible
9 Option Explicit
11 REM -----------------------------------------------------------------------------------------------------------------------
12 Public Sub DebugPrint(ParamArray pvArgs() As Variant)
14 &apos;Print arguments unconditionnally in console
15 &apos;Arguments are separated by a TAB (simulated by spaces)
16 &apos;Some pvArgs might be missing: a TAB is still generated
18 Dim vVarTypes() As Variant, i As Integer
19 Const cstTab = 5
20 On Local Error Goto Exit_Sub &apos; Never interrupt processing
21 Utils._SetCalledSub(&quot;DebugPrint&quot;)
22 vVarTypes = Utils._AddNumeric(Array(vbEmpty, vbNull, vbDate, vbString, vbBoolean, vbObject, vbVariant))
24 If UBound(pvArgs) &gt;= 0 Then
25 For i = 0 To UBound(pvArgs)
26 &apos; If IsError(pvArgs(i)) Then &apos; IsError gives &quot;Object variable not set&quot; in LO 4,0 ?!?
27 &apos; pvArgs(i) = &quot;[ERROR]&quot;
28 &apos; Else
29 If Not Utils._CheckArgument(pvArgs(i), i + 1, vVarTypes(), , False) Then pvArgs(i) = &quot;[TYPE?]&quot;
30 &apos; End If
31 Next i
32 End If
34 Dim sOutput As String, sArg As String
35 sOutput = &quot;&quot;
36 For i = 0 To UBound(pvArgs)
37 sArg = Utils._CStr(pvArgs(i))
38 &apos; Add argument to output
39 If i = 0 Then
40 sOutput = sArg
41 Else
42 sOutput = sOutput &amp; Space(cstTab - (Len(sOutput) Mod cstTab)) &amp; sArg
43 End If
44 Next i
46 TraceLog(TRACEANY, sOutput, False)
48 Exit_Sub:
49 Utils._ResetCalledSub(&quot;DebugPrint&quot;)
50 Exit Sub
51 End Sub &apos; DebugPrint V0.9.5
52 </script:module>