Update remaining DevGuide wiki links.

My Kate editor decided to do some whitespace cleanup, but maybe
it's fine as the main changes are not targeting functional bits anyway.

Change-Id: I5292e77e43055f94a6256a7f72d49fd59287d194
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132928
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
This commit is contained in:
Ilmari Lauhakangas 2022-04-12 18:32:29 +03:00
parent c7970e3204
commit e568c9dca8
16 changed files with 222 additions and 222 deletions

View file

@ -19,7 +19,7 @@ You can develop for LibreOffice in one of two ways, one
recommended and one much less so. First the somewhat less recommended
way: it is possible to use the SDK to develop an extension,
for which you can read the API docs [here](https://api.libreoffice.org/)
and [here](https://wiki.openoffice.org/wiki/Documentation/DevGuide).
and [here](https://wiki.documentfoundation.org/Documentation/DevGuide).
This re-uses the (extremely generic) UNO APIs that are also used by
macro scripting in StarBasic.

View file

@ -452,7 +452,7 @@ T OResultSet::retrieveValue(const sal_Int32 nColumnIndex, const ISC_SHORT nType)
template <>
ORowSetValue OResultSet::retrieveValue(const sal_Int32 nColumnIndex, const ISC_SHORT /*nType*/)
{
// See http://wiki.openoffice.org/wiki/Documentation/DevGuide/Database/Using_the_getXXX_Methods
// See https://wiki.documentfoundation.org/Documentation/DevGuide/Database_Access#Using_the_getXXX_Methods
// (bottom of page) for a chart of possible conversions, we should allow all
// of these -- Blob/Clob will probably need some specialist handling especially
// w.r.t. to generating Strings for them.

View file

@ -210,10 +210,10 @@ sal_Int32 DatabaseMetaData::getDriverMinorVersion( )
sal_Bool DatabaseMetaData::usesLocalFiles( )
{
// LEM TODO:
// http://wiki.openoffice.org/wiki/Documentation/DevGuide/Database/XDatabaseMetaData_Interface
// https://wiki.documentfoundation.org/Documentation/DevGuide/Database_Access#XDatabaseMetaData_Interface
// says "Returns true when the catalog name of the
// database should not appear in the DatasourceBrowser
// of OpenOffice.org API, otherwise false is returned."
// of LibreOffice API, otherwise false is returned."
// So, hmmm, think about it.
return false;
}
@ -310,8 +310,8 @@ OUString DatabaseMetaData::getSQLKeywords( )
}
OUString DatabaseMetaData::getNumericFunctions( )
{
// See http://www.postgresql.org/docs/9.1/static/functions-math.html
// LEM TODO: Err... http://wiki.openoffice.org/wiki/Documentation/DevGuide/Database/Support_Scalar_Functions
// See https://www.postgresql.org/docs/9.1/static/functions-math.html
// LEM TODO: Err... https://wiki.documentfoundation.org/Documentation/DevGuide/Database_Access#Support_Scalar_Functions
// says this should be "Open Group CLI" names, not PostgreSQL names.
// Currently this is just a list of supported functions in PostgreSQL, with PostgreSQL names.
// And it is my job to map from Open Group CLI names/syntax to PostgreSQL names/syntax. Where? By parsing the SQL???

View file

@ -107,7 +107,7 @@ u"\n"
" <context>\n"
"\n"
"To learn more about the Extension Manager and extensions, see:\n"
"http://wiki.openoffice.org/wiki/Documentation/DevGuide/Extensions/Extensions\n\n";
"https://wiki.documentfoundation.org/Documentation/DevGuide/Extensions\n\n";
const OptionInfo s_option_infos [] = {

View file

@ -4,5 +4,5 @@ This is how StarBasic handles events.
## See Also
- <https://wiki.openoffice.org/wiki/Documentation/DevGuide/Forms/Programmatic_Assignment_of_Scripts_to_Events>
- <https://wiki.openoffice.org/wiki/Documentation/DevGuide/Forms/Scripting_and_Events>
- <https://wiki.documentfoundation.org/Documentation/DevGuide/Forms#Programmatic_Assignment_of_Scripts_to_Events>
- <https://wiki.documentfoundation.org/Documentation/DevGuide/Forms#Scripting_and_Events>

View file

@ -59,8 +59,8 @@ static sal_Int64 existMarkOffset = 0;
All dictionary searching and loading is performed in the xdictionary class.
The only thing you need to do is to derive your class from BreakIterator_CJK
and create an instance of the xdictionary with the language name and
pass it to the parent class." (from http://wiki.openoffice.org/wiki/
/Documentation/DevGuide/OfficeDev/Implementing_a_New_Locale - 27/01/2011)
pass it to the parent class." (from https://wiki.documentfoundation.org/
Documentation/DevGuide/Office_Development#Implementing_a_New_Locale - 27/01/2011)
*/
// C-standard guarantees that static variables are automatically initialized to 0

View file

@ -19,7 +19,7 @@ well as TLS 1.2 or later.
Our WebDAV `com.sun.star.ucb.ContentProvider` service implementation
registers the `vnd.sun.star.webdav` and `http` URI schemes (and their
encrypted TLS variants). See here for the specification:
https://wiki.openoffice.org/wiki/Documentation/DevGuide/AppendixC/The_WebDAV_Content_Provider
https://wiki.documentfoundation.org/Documentation/DevGuide/Universal_Content_Providers#The_WebDAV_Content_Provider
Historically, webdav had two ucps, one based on `neon`, the second one
based on `serf`. Both are superseded by the current `libcurl`

View file

@ -294,14 +294,14 @@ Dim oQuery As Object, oQueries As Object, i As Integer, sQueryName As String
If Not Utils._CheckArgument(pvSql, 2, vbString) Then Goto Exit_Function
If pvSql = &quot;&quot; Then Call _TraceArguments()
If Not Utils._CheckArgument(pvOption, 3, Utils._AddNumeric(), Array(cstNull, dbSQLPassThrough)) Then Goto Exit_Function
If _ReadOnly Then Goto Error_NoUpdate
Set oQuery = CreateUnoService(&quot;com.sun.star.sdb.QueryDefinition&quot;)
oQuery.rename(pvQueryName)
oQuery.Command = _ReplaceSquareBrackets(pvSql)
oQuery.EscapeProcessing = Not ( pvOption = dbSQLPassThrough )
Set oQueries = Document.DataSource.getQueryDefinitions()
With oQueries
For i = 0 To .getCount() - 1
@ -348,9 +348,9 @@ Dim vNameComponents() As Variant, iNames As Integer
If Not Utils._CheckArgument(pvTableName, 1, vbString) Then Goto Exit_Function
If pvTableName = &quot;&quot; Then Call _TraceArguments()
If _ReadOnly Then Goto Error_NoUpdate
Set oTables = Connection.getTables
With oTables
sTables = .ElementNames()
@ -561,7 +561,7 @@ Public Function getProperty(Optional ByVal pvProperty As Variant) As Variant
If IsMissing(pvProperty) Then Call _TraceArguments()
getProperty = _PropertyGet(pvProperty)
Utils._ResetCalledSub(&quot;Database.getProperty&quot;)
End Function &apos; getProperty
REM -----------------------------------------------------------------------------------------------------------------------
@ -570,7 +570,7 @@ Public Function hasProperty(ByVal Optional pvProperty As Variant) As Boolean
If IsMissing(pvProperty) Then hasProperty = PropertiesGet._hasProperty(_Type, _PropertiesList()) Else hasProperty = PropertiesGet._hasProperty(_Type, _PropertiesList(), pvProperty)
Exit Function
End Function &apos; hasProperty
REM -----------------------------------------------------------------------------------------------------------------------
@ -654,7 +654,7 @@ Dim iType As Integer, iOptions As Integer, iLockEdit As Integer
lCommandType = com.sun.star.sdb.CommandType.QUERY
End If
End Select
Set oObject = New Recordset
With oObject
._CommandType = lCommandType
@ -699,7 +699,7 @@ Public Function OpenSQL(Optional ByVal pvSQL As Variant _
Const cstThisSub = &quot;Database.OpenSQL&quot;
Utils._SetCalledSub(cstThisSub)
OpenSQL = False
If IsMissing(pvSQL) Then Call _TraceArguments()
If Not Utils._CheckArgument(pvSQL, 1, vbString) Then Goto Exit_Function
@ -763,7 +763,7 @@ Const cstThisSub = &quot;Database.OutputTo&quot;
Utils._SetCalledSub(cstThisSub)
OutputTo = False
If Not Utils._CheckArgument(pvObjectType, 1, Utils._AddNumeric(), Array(acOutputTable, acOutputQuery, acOutputArray)) Then Goto Exit_Function
If IsMissing(pvObjectName) Then Call _TraceArguments()
If Not Utils._CheckArgument(pvObjectName, 2, vbString) Then Goto Exit_Function
@ -804,7 +804,7 @@ Dim sOutputFormat As String, iTemplate As Integer, iOutputFile As Integer, bOutp
If pvObjectType = acOutputTable Then Set oTable = TableDefs(pvObjectName, True) Else Set oTable = Querydefs(pvObjectName, True)
If IsNull(oTable) Then Goto Error_NotFound
End If
&apos;Determine format and parameters
If pvOutputFormat = &quot;&quot; Then
sOutputFormat = _PromptFormat(Array(&quot;HTML&quot;, &quot;ODS&quot;, &quot;XLS&quot;, &quot;XLSX&quot;, &quot;TXT&quot;)) &apos; Prompt user for format
@ -826,7 +826,7 @@ Dim sOutputFormat As String, iTemplate As Integer, iOutputFile As Integer, bOutp
If sOutputFile = &quot;&quot; Then Goto Exit_Function
Else
sOutputFile = pvOutputFile
End If
End If
sOutputFile = ConvertToURL(sOutputFile)
&apos;Create file
@ -846,7 +846,7 @@ Dim sOutputFormat As String, iTemplate As Integer, iOutputFile As Integer, bOutp
Case UCase(acFormatTXT), &quot;TXT&quot;, &quot;CSV&quot;
bOutput = _OutputToCalc(oTable, sOutputFile, acFormatTXT, pvEncoding)
End Select
&apos;Launch application, if requested
If bOutput Then
If pvAutoStart Then Call _ShellExecute(sOutputFile)
@ -855,7 +855,7 @@ Dim sOutputFormat As String, iTemplate As Integer, iOutputFile As Integer, bOutp
End If
OutputTo = True
Exit_Function:
If Not IsNull(oTable) Then
oTable.Dispose()
@ -891,7 +891,7 @@ Dim vProperty As Variant, vPropertiesList() As Variant, sObject As String
vProperty._Value = _PropertyGet(vPropertiesList(pvIndex))
End If
Set vProperty._ParentDatabase = _This
Exit_Function:
Set Properties = vProperty
Utils._ResetCalledSub(&quot;Database.Properties&quot;)
@ -913,7 +913,7 @@ Dim i As Integer, bFound As Boolean, oQueries As Object
If Not IsMissing(pvIndex) Then
If Not Utils._CheckArgument(pvIndex, 1, Utils._AddNumeric(vbString)) Then Goto Exit_Function
End If
Set oQueries = Connection.getQueries
sObjects = oQueries.ElementNames()
Select Case True
@ -975,7 +975,7 @@ Public Function Recordsets(ByVal Optional pvIndex As Variant) As Object
If Not IsMissing(pvIndex) Then
If Not Utils._CheckArgument(pvIndex, 1, Utils._AddNumeric(vbString)) Then Goto Exit_Function
End If
Dim sObjects() As String, sObjectName As String, oObject As Object
Dim i As Integer, bFound As Boolean, oTables As Object
@ -1022,7 +1022,7 @@ Public Function RunSQL(Optional ByVal pvSQL As Variant _
Const cstThisSub = &quot;Database.RunSQL&quot;
Utils._SetCalledSub(cstThisSub)
RunSQL = False
If IsMissing(pvSQL) Then Call _TraceArguments()
If Not Utils._CheckArgument(pvSQL, 1, vbString) Then Goto Exit_Function
@ -1068,7 +1068,7 @@ Dim i As Integer, bFound As Boolean, oTables As Object
If Not IsMissing(pvIndex) Then
If Not Utils._CheckArgument(pvIndex, 1, Utils._AddNumeric(vbString)) Then Goto Exit_Function
End If
Set oTables = Connection.getTables
sObjects = oTables.ElementNames()
Select Case True
@ -1631,7 +1631,7 @@ Dim i As Integer, l As Long
lCurrentChar = Len(psString) + 1
End If
Loop
_OutputStringToHTML = sOutput
End Function &apos; _OutputStringToHTML V1.4.0
@ -1642,8 +1642,8 @@ Private Function _OutputToCalc(poData As Object _
, ByVal psFilter As String _
, Optional ByVal plEncoding As Long _
) As Boolean
&apos; https://wiki.openoffice.org/wiki/Documentation/DevGuide/Spreadsheets/Database_Import
&apos; https://wiki.openoffice.org/wiki/Documentation/DevGuide/Spreadsheets/Filter_Options
&apos; https://wiki.documentfoundation.org/Documentation/DevGuide/Spreadsheet_Documents#Database_Import
&apos; https://wiki.documentfoundation.org/Documentation/DevGuide/Spreadsheet_Documents#Filter_Options
Dim oCalcDoc As Object, oSheet As Object, vWin As Variant
Dim vImportDesc() As Variant, iSource As Integer
@ -1701,7 +1701,7 @@ Dim oRange As Object, i As Integer, iCol As Integer, oColumns As Object
, _MakePropertyValue(&quot;Overwrite&quot;, True) _
))
End Select
oCalcDoc.close(False)
_OutputToCalc = True
@ -1744,7 +1744,7 @@ Const cstTitleAlt = &quot;&lt;!--AccessTemplate_Title--&gt;&quot;, cstBodyAlt =
vTemplate = _ReadFileIntoArray(psTemplateFile)
If LBound(vTemplate) &gt; UBound(vTemplate) Then vTemplate() = vMinimalTemplate()
bDataArray = IsNull(pvTable)
&apos; Write output file
@ -1806,7 +1806,7 @@ Dim i As Integer, vEvents As Variant, sEvent As String, vEvent As Variant
Utils._SetCalledSub(&quot;Database.get&quot; &amp; psProperty)
_PropertyGet = EMPTY
Select Case UCase(psProperty)
Case UCase(&quot;Connect&quot;)
If IsNull(Document) Then _PropertyGet = &quot;&quot; Else _PropertyGet = Document.Datasource.URL
@ -1846,7 +1846,7 @@ Dim i As Integer, vEvents As Variant, sEvent As String, vEvent As Variant
Case Else
Goto Trace_Error
End Select
Exit_Function:
Utils._ResetCalledSub(&quot;Database.get&quot; &amp; psProperty)
Exit Function
@ -1868,7 +1868,7 @@ Public Function _ReplaceSquareBrackets(ByVal psSql As String) As String
Dim sQuote As String &apos;RDBMS specific quote character
Dim vSubStrings() As Variant, i As Integer
Const cstSingleQuote = &quot;&apos;&quot;
sQuote = MetaData.IdentifierQuoteString
If sQuote = &quot; &quot; Then &apos; IdentifierQuoteString returns a space &quot; &quot; if identifier quoting is not supported.
_ReplaceSquareBrackets = Trim(psSql)
@ -1881,9 +1881,9 @@ Const cstSingleQuote = &quot;&apos;&quot;
vSubStrings(i) = Join(Split(vSubStrings(i), &quot;]&quot;), sQuote)
End If
Next i
_ReplaceSquareBrackets = Trim(Join(vSubStrings, cstSingleQuote))
End Function &apos; ReplaceSquareBrackets V1.1.0
</script:module>
</script:module>

View file

@ -31,7 +31,7 @@ Type _Window
_Name As String &apos; Object Name
WindowType As Integer &apos; One of the object types
DocumentType As String &apos; Writer, Calc, ... - Only if WindowType = acDocument
End Type
End Type
REM VBA allows call to actions with missing arguments e.g. OpenForm(&quot;aaa&quot;,,&quot;[field]=2&quot;)
REM in StarBasic IsMissing requires Variant parameters
@ -48,7 +48,7 @@ Public Function ApplyFilter( _
Const cstThisSub = &quot;ApplyFilter&quot;
Utils._SetCalledSub(cstThisSub)
ApplyFilter = False
If IsMissing(pvFilter) And IsMissing(pvSQL) Then Call _TraceArguments()
If IsMissing(pvFilter) Then pvFilter = &quot;&quot;
If Not Utils._CheckArgument(pvFilter, 1, vbString) Then Goto Exit_Function
@ -89,7 +89,7 @@ Dim sFilter As String, oWindow As Object, oDatabase As Object, oTarget As Object
Exit_Function:
Utils._ResetCalledSub(cstThisSub)
Exit Function
Exit Function
Error_NotApplicable:
TraceError(TRACEFATAL, ERRACTION, Utils._CalledSub(), 0, 1, cstThisSub)
Goto Exit_Function
@ -115,13 +115,13 @@ Const cstThisSub = &quot;Close&quot;
And Utils._CheckArgument(pvObjectName, 2, vbString) _
And Utils._CheckArgument(pvSave, 3, Utils._AddNumeric(), Array(acSavePrompt)) _
) Then Goto Exit_Function
Dim sObjects() As String, sObjectName As String, oController As Object, oObject As Object
Dim i As Integer, bFound As Boolean, lComponent As Long
Dim oDatabase As Object
Set oDatabase = Application._CurrentDb()
If oDatabase._DbConnect &lt;&gt; DBCONNECTBASE Then Goto Error_NotApplicable
&apos; Check existence of object and find its exact (case-sensitive) name
Select Case pvObjectType
Case acForm
@ -146,7 +146,7 @@ Dim oDatabase As Object
End If
Next i
If Not bFound Then Goto Trace_NotFound
Select Case pvObjectType
Case acForm
Set oController = oDatabase.Document.getFormDocuments.getByHierarchicalName(sObjectName)
@ -204,7 +204,7 @@ Const cstThisSub = &quot;CopyObject&quot;
) Then Goto Exit_Function
If IsMissing(pvSourceName) Then Call _TraceArguments()
If Not Utils._CheckArgument(pvSourceName, 2, vbString) Then Goto Exit_Function
Dim oSource As Object, oSourceDatabase As Object, oTarget As Object, oDatabase As Object, bSameDatabase As Boolean
Dim oSourceTable As Object, oSourceColumns As Object, oSourceCol As Object, oTargetCol As Object, iRDBMS As Integer
Dim oSourceKeys As Object, oSourceKey As Object, oTargetKey As Object
@ -232,7 +232,7 @@ Const cstProgressMeterLimit = 100
Else
Set oSourceDatabase = pvSourceDatabase
End If
With oDatabase
iRDBMS = ._RDBMS
If ._DbConnect &lt;&gt; DBCONNECTBASE Then Goto Error_NotApplicable
@ -382,13 +382,13 @@ Const cstProgressMeterLimit = 100
Set oInput = Nothing
if bProgressMeter Then Application.SysCmd acSysCmdClearStatus
End Select
Case Else
End Select
End With
CopyObject = True
Exit_Function:
&apos; Avoid closing the current database or the database object given as source argument
If VarType(pvSourceDatabase) = vbString And Not bSameDatabase Then
@ -447,9 +447,9 @@ Dim vFindValue As Variant, oFindrecord As Object
&apos; Move cursor to the initial row. Operation based on last FindRecord, not on user interactions done inbetween
If ofForm.DatabaseForm.RowCount &lt;= 0 then Goto Exit_Function &apos; Dataset is empty
lInitialRow = .LastRow &apos; Used if Search = acSearchAll
bFound = False
lFindRow = .LastRow
b2ndRound = False
@ -484,7 +484,7 @@ Dim vFindValue As Variant, oFindrecord As Object
Else
.LastColumn = .LastColumn + 1
End If
&apos; Examine column contents
If .LastColumn &lt;= UBound(.ColumnNames) Then
For i = .LastColumn To UBound(.ColumnNames)
@ -506,7 +506,7 @@ Dim vFindValue As Variant, oFindrecord As Object
bFound = ( InStr(1, vFindValue, .FindWhat, 0) &gt; 0 )
Else
bFound = ( InStr(vFindValue, .FindWhat) &gt; 0 )
End If
End If
Case acEntire
If .MatchCase Then
bFound = ( .FindWhat = vFindValue )
@ -530,11 +530,11 @@ Dim vFindValue As Variant, oFindrecord As Object
If bFound Then
ocGrid.Controls(.ColumnNames(.LastColumn)).setFocus()
.FindRecord = 1
FindNext = True
FindNext = True
End If
End With
Exit_Function:
Utils._ResetCalledSub(&quot;FindNext&quot;)
Exit Function
@ -564,7 +564,7 @@ Public Function FindRecord(Optional ByVal pvFindWhat As Variant _
If _ErrorHandler() Then On Local Error Goto Error_Function
FindRecord = False
Utils._SetCalledSub(&quot;FindRecord&quot;)
If IsMissing(pvFindWhat) Or pvFindWhat = &quot;&quot; Then Call _TraceArguments()
If IsMissing(pvMatch) Then pvMatch = acEntire
@ -584,7 +584,7 @@ Public Function FindRecord(Optional ByVal pvFindWhat As Variant _
If VarType(pvTargetedField) &lt;&gt; vbString Then
If Not Utils._CheckArgument(pvTargetedField, 6, Utils._AddNumeric(), Array(acAll, acCurrent)) Then Exit Function
End If
Dim ocTarget As Object, i As Integer, j As Integer, vNames() As Variant, iCount As Integer, vIndexes() As Variant
Dim vColumn As Variant, vDataField As Variant, ofParentForm As Variant, oColumns As Object, vParentGrid As Object
Dim bFound As Boolean, ocGridControl As Object, iFocus As Integer
@ -597,16 +597,16 @@ Dim oFindRecord As _FindParams
.Search = pvSearch
.SearchAsFormatted = pvSearchAsFormatted
.FindFirst = pvFindFirst
&apos; Determine target
&apos; Either: pvTargetedField = Grid =&gt; search all fields
&apos; pvTargetedField = Control in Grid =&gt; search only in that column
&apos; pvTargetedField = acAll or acCurrent =&gt; determine focus
Select Case True
Case VarType(pvTargetedField) = vbString
Set ocTarget = getObject(pvTargetedField)
If ocTarget.SubType = CTLGRIDCONTROL Then
.OnlyCurrentField = acAll
.GridControl = ocTarget._Shortcut
@ -633,7 +633,7 @@ Dim oFindRecord As _FindParams
End If
End If
Next i
ElseIf ocTarget._Type = OBJCONTROL Then &apos; Control within a grid tbc
If IsNull(ocTarget.ControlModel.BoundField) Then Goto Error_Target &apos; Control MUST be bound to a database record or query
&apos; BoundField is in ControlModel, thanks PASTIM !
@ -657,7 +657,7 @@ Dim oFindRecord As _FindParams
End If
Next j
End If
Case Else &apos; Determine focus
iCount = Application.Forms()._Count
If iCount = 0 Then Goto Error_ActiveForm
@ -684,7 +684,7 @@ Dim oFindRecord As _FindParams
.GridControl= ocGridControl._Shortcut
iFocus = -1
iFocus = ocGridControl.ControlView.getCurrentColumnPosition() &apos; Deprecated but no alternative found !!
If pvTargetedField = acAll Or iFocus &lt; 0 Or iFocus &gt;= ocGridControl.ControlModel.Count Then &apos; Has a control within the grid the focus ? NO
.OnlyCurrentField = acAll
Set oColumns = ofParentForm.DatabaseForm.createResultSet().Columns
@ -707,7 +707,7 @@ Dim oFindRecord As _FindParams
End If
End If
Next i
Else &apos; Has a control within the grid the focus ? YES
.OnlyCurrentField = acCurrent
Set vColumn = ocGridControl.ControlModel.getByIndex(iFocus)
@ -728,7 +728,7 @@ Dim oFindRecord As _FindParams
End If
End Select
.Form = ofParentForm._Shortcut
.LastColumn = UBound(vNames)
.ColumnNames = vNames
@ -755,11 +755,11 @@ Dim oFindRecord As _FindParams
End If
.FindRecord = 1
End With
Set _A2B_.FindRecord = oFindRecord
FindRecord = DoCmd.Findnext()
Exit_Function:
Utils._ResetCalledSub(&quot;FindRecord&quot;)
Exit Function
@ -788,7 +788,7 @@ Public Function GetHiddenAttribute(ByVal Optional pvObjectType As Variant _
If _ErrorHandler() Then On Local Error Goto Error_Function
Const cstThisSub = &quot;GetHiddenAttribute&quot;
Utils._SetCalledSub(cstThisSub)
If IsMissing(pvObjectType) Then Call _TraceArguments()
If Not Utils._CheckArgument(pvObjectType, 1, Utils._AddNumeric(), _
Array(acDiagram, acForm, acQuery, acTable, acReport, acBasicIDE, acDatabaseWindow, acDocument) _
@ -802,7 +802,7 @@ Const cstThisSub = &quot;GetHiddenAttribute&quot;
Else
If Not Utils._CheckArgument(pvObjectName, 2, vbString) Then Goto Exit_Function
End If
Dim oWindow As Object
Set oWindow = _SelectWindow(pvObjectType, pvObjectName)
If IsNull(oWindow.Frame) Then Goto Error_NotFound
@ -828,7 +828,7 @@ Public Function GoToControl(Optional ByVal pvControlName As Variant) As Boolean
Utils._SetCalledSub(&quot;GoToControl&quot;)
If IsMissing(pvControlName) Then Call _TraceArguments()
If Not Utils._CheckArgument(pvControlName, 1, vbString) Then Goto Exit_Function
GoToControl = False
Dim oWindow As Object, ofForm As Object, ocControl As Object
Dim i As Integer, iCount As Integer
@ -849,7 +849,7 @@ Dim i As Integer, iCount As Integer
End If
Next i
End If
Exit_Function:
Utils._ResetCalledSub(&quot;GoToControl&quot;)
Exit Function
@ -869,7 +869,7 @@ Public Function GoToRecord(Optional ByVal pvObjectType As Variant _
If _ErrorHandler() Then On Local Error Goto Error_Function
GoToRecord = False
Const cstThisSub = &quot;GoTorecord&quot;
Utils._SetCalledSub(cstThisSub)
If IsMissing(pvObjectName) Then pvObjectName = &quot;&quot;
@ -885,7 +885,7 @@ Const cstThisSub = &quot;GoTorecord&quot;
) Then Goto Exit_Function
If pvObjectType = acActiveDataObject And pvObjectName &lt;&gt; &quot;&quot; Then Goto Error_Target
If pvOffset &lt; 0 And pvRecord &lt;&gt; acGoTo Then Goto Error_Offset
Dim ofForm As Object, oGeneric As Object, oResultSet As Object, oWindow As Object
Dim i As Integer, iCount As Integer, bFound As Boolean, lOffset As Long
Dim sObjectName, iLengthName As Integer
@ -923,7 +923,7 @@ Dim sObjectName, iLengthName As Integer
Case sObjectName = &quot;&quot;
Call _TraceArguments()
Case Else
Set ofForm = Application.Forms(pvObjectName)
Set ofForm = Application.Forms(pvObjectName)
End Select
Set oResultSet = ofForm.DatabaseForm
Case acDataQuery
@ -937,14 +937,14 @@ Dim sObjectName, iLengthName As Integer
Set oResultSet = oWindow.Frame.Controller.FormOperations.Cursor
Case Else
End Select
&apos; Check if current row updated =&gt; Save it
If oResultSet.IsNew Then
oResultSet.insertRow()
ElseIf oResultSet.IsModified Then
oResultSet.updateRow()
End If
lOffset = pvOffset
Select Case pvRecord
Case acFirst : GoToRecord = oResultSet.first()
@ -967,7 +967,7 @@ Dim sObjectName, iLengthName As Integer
GoToRecord = oResultSet.relative(- lOffset)
End If
End Select
Exit_Function:
Utils._ResetCalledSub(cstThisSub)
Exit Function
@ -1037,7 +1037,7 @@ Public Function MoveSize(ByVal Optional pvLeft As Variant _
If Not Utils._CheckArgument(pvTop, 2, Utils._AddNumeric()) Then Goto Exit_Function
If Not Utils._CheckArgument(pvWidth, 3, Utils._AddNumeric()) Then Goto Exit_Function
If Not Utils._CheckArgument(pvHeight, 4, Utils._AddNumeric()) Then Goto Exit_Function
Dim iArg As Integer, iWrong As Integer &apos; Check arguments values
iArg = 0
If pvHeight &lt; -1 Then
@ -1073,7 +1073,7 @@ Dim oWindow As Object
MoveSize = True
End If
End With
Exit_Function:
Utils._ResetCalledSub(&quot;MoveSize&quot;)
Exit Function
@ -1110,13 +1110,13 @@ Public Function OpenForm(Optional ByVal pvFormName As Variant _
And Utils._CheckArgument(pvDataMode, 5, Utils._AddNumeric(), Array(acFormAdd, acFormEdit, acFormPropertySettings, acFormReadOnly)) _
And Utils._CheckArgument(pvWindowMode, 6, Utils._AddNumeric(), Array(acDialog, acHidden, acIcon, acWindowNormal)) _
) Then Goto Exit_Function
Dim ofForm As Object, sWarning As String
Dim oDatabase As Object, oOpenForm As Object, bOpenMode As Boolean, oController As Object
Set oDatabase = Application._CurrentDb()
If oDatabase._DbConnect &lt;&gt; DBCONNECTBASE Then Goto Error_NotApplicable
Set ofForm = Application.AllForms(pvFormName)
If ofForm.IsLoaded Then
sWarning = _GetLabel(&quot;ERR&quot; &amp; ERRFORMYETOPEN)
@ -1155,7 +1155,7 @@ Dim sFilter As String, oForm As Object, oFormsCollection As Object
oForm.reload()
End If
End If
&apos;Housekeeping
Set ofForm = Application.AllForms(pvFormName) &apos; Redone to reinitialize all properties of ofForm now FormName is open
With ofForm
@ -1214,7 +1214,7 @@ Public Function OpenQuery(Optional ByVal pvQueryName As Variant _
If IsMissing(pvQueryName) Then Call _TraceArguments()
If IsMissing(pvView) Then pvView = acViewNormal
If IsMissing(pvDataMode) Then pvDataMode = acEdit
OpenQuery = DoCmd._OpenObject(&quot;Query&quot;, pvQueryName, pvView, pvDataMode)
OpenQuery = DoCmd._OpenObject(&quot;Query&quot;, pvQueryName, pvView, pvDataMode)
Exit_Function:
Utils._ResetCalledSub(&quot;OpenQuery&quot;)
@ -1236,7 +1236,7 @@ Public Function OpenReport(Optional ByVal pvReportName As Variant _
If IsMissing(pvReportName) Then Call _TraceArguments()
If IsMissing(pvView) Then pvView = acViewNormal
If IsMissing(pvDataMode) Then pvDataMode = acEdit
OpenReport = DoCmd._OpenObject(&quot;Report&quot;, pvReportName, pvView, pvDataMode)
OpenReport = DoCmd._OpenObject(&quot;Report&quot;, pvReportName, pvView, pvDataMode)
Exit_Function:
Utils._ResetCalledSub(&quot;OpenReport&quot;)
@ -1257,7 +1257,7 @@ Public Function OpenSQL(Optional ByVal pvSQL As Variant _
If _ErrorHandler() Then On Local Error Goto Error_Function
Utils._SetCalledSub(&quot;OpenSQL&quot;)
OpenSQL = False
If IsMissing(pvSQL) Then Call _TraceArguments()
If Not Utils._CheckArgument(pvSQL, 1, vbString) Then Goto Exit_Function
@ -1290,7 +1290,7 @@ Public Function OpenTable(Optional ByVal pvTableName As Variant _
If IsMissing(pvTableName) Then Call _TraceArguments()
If IsMissing(pvView) Then pvView = acViewNormal
If IsMissing(pvDataMode) Then pvDataMode = acEdit
OpenTable = DoCmd._OpenObject(&quot;Table&quot;, pvTableName, pvView, pvDataMode)
OpenTable = DoCmd._OpenObject(&quot;Table&quot;, pvTableName, pvView, pvDataMode)
Exit_Function:
Utils._ResetCalledSub(&quot;OpenTable&quot;)
@ -1311,7 +1311,7 @@ Public Function OutputTo(ByVal pvObjectType As Variant _
, ByVal Optional pvQuality As Variant _
) As Boolean
REM https://wiki.openoffice.org/wiki/Framework/Article/Filter/FilterList_OOo_3_0
REM https://wiki.openoffice.org/wiki/Documentation/DevGuide/Spreadsheets/Filter_Options
REM https://wiki.documentfoundation.org/Documentation/DevGuide/Spreadsheet_Documents#Filter_Options
REM https://msdn.microsoft.com/en-us/library/ms709353%28v=vs.85%29.aspx
&apos;Supported: acFormatPDF, acFormatODT, acFormatDOC, acFormatHTML for forms
&apos; acFormatHTML, acFormatODS, acFormatXLS, acFormatXLSX, acFormatTXT for tables and queries
@ -1321,7 +1321,7 @@ Const cstThisSub = &quot;OutputTo&quot;
Utils._SetCalledSub(cstThisSub)
OutputTo = False
If Not Utils._CheckArgument(pvObjectType, 1, Utils._AddNumeric(), Array(acOutputTable, acOutputQuery, acOutputForm)) Then Goto Exit_Function
If IsMissing(pvObjectName) Then pvObjectName = &quot;&quot;
If Not Utils._CheckArgument(pvObjectName, 2, vbString) Then Goto Exit_Function
@ -1358,7 +1358,7 @@ Const cstThisSub = &quot;OutputTo&quot;
)
GoTo Exit_Function
End If
Dim vWindow As Variant, sOutputFile As String, ofForm As Object, i As Integer, bFound As Boolean
&apos;Find applicable form
If pvObjectName = &quot;&quot; Then
@ -1376,7 +1376,7 @@ Dim vWindow As Variant, sOutputFile As String, ofForm As Object, i As Integer, b
Next i
If Not bFound Then Goto Error_NotFound
End If
&apos;Determine format and parameters
Dim sOutputFormat As String, sFilter As String, oFilterData As Object, oExport As Object, sSuffix As String
If pvOutputFormat = &quot;&quot; Then
@ -1410,26 +1410,26 @@ Dim sOutputFormat As String, sFilter As String, oFilterData As Object, oExport A
_MakePropertyValue(&quot;FilterName&quot;, sFilter), _
_MakePropertyValue(&quot;FilterData&quot;, oFilterData), _
)
&apos;Determine output file
If pvOutputFile = &quot;&quot; Then &apos; Prompt file picker to user
sOutputFile = _PromptFilePicker(sSuffix)
If sOutputFile = &quot;&quot; Then Goto Exit_Function
Else
sOutputFile = pvOutputFile
End If
End If
sOutputFile = ConvertToURL(sOutputFile)
&apos;Create file
On Local Error Goto Error_File
ofForm.Component.storeToURL(sOutputFile, oExport)
On Local Error Goto Error_Function
&apos;Launch application, if requested
If pvAutoStart Then Call _ShellExecute(sOutputFile)
OutputTo = True
Exit_Function:
Utils._ResetCalledSub(cstThisSub)
Exit Function
@ -1455,12 +1455,12 @@ Public Function Quit(Optional ByVal pvSave As Variant) As Variant
If _ErrorHandler() Then On Local Error Goto Error_Function
Const cstThisSub = &quot;Quit&quot;
Utils._SetCalledSub(cstThisSub)
If IsMissing(pvSave) Then pvSave = acQuitSaveAll
If Not Utils._CheckArgument(pvSave, 1, Utils._AddNumeric(), _
Array(acQuitPrompt, acQuitSaveAll, acQuitSaveNone) _
) Then Goto Exit_Function
Dim oDatabase As Object, oDoc As Object
Set oDatabase = Application._CurrentDb()
If oDatabase._DbConnect &lt;&gt; DBCONNECTBASE Then Goto Error_NotApplicable
@ -1484,7 +1484,7 @@ Dim oDatabase As Object, oDoc As Object
oDoc.dispose()
End If
End If
Exit_Function:
Utils._ResetCalledSub(cstThisSub)
Set oDatabase = Nothing
@ -1506,7 +1506,7 @@ Public Sub RunApp(Optional ByVal pvCommandLine As Variant)
If _ErrorHandler() Then On Local Error Goto Error_Sub
Utils._SetCalledSub(&quot;RunApp&quot;)
If IsMissing(pvCommandLine) Then Call _TraceArguments()
If Not Utils._CheckArgument(pvCommandLine, 1, vbString) Then Goto Exit_Sub
@ -1528,14 +1528,14 @@ Public Function RunCommand(Optional pvCommand As Variant, Optional pbReturnComma
If _ErrorHandler() Then On Local Error Goto Exit_Function &apos; Avoid any abort
Const cstThisSub = &quot;RunCommand&quot;
Utils._SetCalledSub(cstThisSub)
Dim iVBACommand As Integer, sOOCommand As String, sDispatch As String
If IsMissing(pvCommand) Then Call _TraceArguments()
If Not ( Utils._CheckArgument(pvCommand, 1, Utils._AddNumeric(vbString)) ) Then Goto Exit_Function
If IsMissing(pbReturnCommand) Then pbReturnCommand = False
RunCommand = True
Const cstUnoPrefix = &quot;.uno:&quot;
If VarType(pvCommand) = vbString Then
sOOCommand = pvCommand
@ -1548,7 +1548,7 @@ Const cstUnoPrefix = &quot;.uno:&quot;
sOOCommand = &quot;&quot;
iVBACommand = pvCommand
End If
Select Case True
Case iVBACommand = acCmdAboutMicrosoftAccess Or UCase(sOOCommand) = &quot;ABOUT&quot; : sDispatch = &quot;About&quot;
Case iVBACommand = acCmdAboutOpenOffice Or UCase(sOOCommand) = &quot;ABOUT&quot; : sDispatch = &quot;About&quot;
@ -1727,7 +1727,7 @@ Const cstUnoPrefix = &quot;.uno:&quot;
If iVBACommand &gt;= 0 Then Goto Exit_Function
sDispatch = pvCommand
End Select
If pbReturnCommand Then RunCommand = cstUnoPrefix &amp; sDispatch Else Call _DispatchCommand(cstUnoPrefix &amp; sDispatch)
Exit_Function:
@ -1748,7 +1748,7 @@ Public Function RunSQL(Optional ByVal pvSQL As Variant _
If _ErrorHandler() Then On Local Error Goto Error_Function
Utils._SetCalledSub(&quot;RunSQL&quot;)
RunSQL = False
If IsMissing(pvSQL) Then Call _TraceArguments()
If Not Utils._CheckArgument(pvSQL, 1, vbString) Then Goto Exit_Function
@ -1778,7 +1778,7 @@ Public Function SelectObject( ByVal Optional pvObjectType As Variant _
If _ErrorHandler() Then On Local Error Goto Error_Function
Const cstThisSub = &quot;SelectObject&quot;
Utils._SetCalledSub(cstThisSub)
If IsMissing(pvObjectType) Then Call _TraceArguments()
If Not Utils._CheckArgument(pvObjectType, 1, Utils._AddNumeric(), _
Array(acDiagram, acForm, acQuery, acTable, acReport, acBasicIDE, acDatabaseWindow, acDocument) _
@ -1795,7 +1795,7 @@ Const cstThisSub = &quot;SelectObject&quot;
If Not IsMissing(pvInDatabaseWindow) Then
If Not Utils._CheckArgument(pvInDatabaseWindow, 3, vbBoolean, False) Then Goto Exit_Function
End If
Dim oWindow As Object
Set oWindow = _SelectWindow(pvObjectType, pvObjectName)
If IsNull(oWindow.Frame) Then Goto Error_NotFound
@ -1835,7 +1835,7 @@ Public Function SendObject(ByVal Optional pvObjectType As Variant _
If _ErrorHandler() Then On Local Error Goto Error_Function
Utils._SetCalledSub(&quot;SendObject&quot;)
SendObject = False
If IsMissing(pvObjectType) Then pvObjectType = acSendNoObject
If Not Utils._CheckArgument(pvObjectType, 1, Utils._AddNumeric(), Array(acSendNoObject, acSendForm)) Then Goto Exit_Function
If IsMissing(pvObjectName) Then pvObjectName = &quot;&quot;
@ -1930,7 +1930,7 @@ Public Function SetHiddenAttribute(ByVal Optional pvObjectType As Variant _
SetHiddenAttribute = False
Const cstThisSub = &quot;SetHiddenAttribute&quot;
Utils._SetCalledSub(cstThisSub)
If IsMissing(pvObjectType) Then Call _TraceArguments()
If Not Utils._CheckArgument(pvObjectType, 1, Utils._AddNumeric(), _
Array(acDiagram, acForm, acQuery, acTable, acReport, acBasicIDE, acDatabaseWindow), acDocument _
@ -1949,7 +1949,7 @@ Const cstThisSub = &quot;SetHiddenAttribute&quot;
Else
If Not Utils._CheckArgument(pvHidden, 3, vbBoolean) Then Goto Exit_Function
End If
Dim oWindow As Object
Set oWindow = _SelectWindow(pvObjectType, pvObjectName)
If IsNull(oWindow.Frame) Then Goto Error_NotFound
@ -1978,7 +1978,7 @@ Public Function SetOrderBy( _
Const cstThisSub = &quot;SetOrderBy&quot;
Utils._SetCalledSub(cstThisSub)
SetOrderBy = False
If IsMissing(pvOrder) Then pvOrder = &quot;&quot;
If Not Utils._CheckArgument(pvOrder, 1, vbString) Then Goto Exit_Function
If IsMissing(pvControlName) Then pvControlName = &quot;&quot;
@ -2013,7 +2013,7 @@ Dim sOrder As String, oWindow As Object, oDatabase As Object, oTarget As Object
Exit_Function:
Utils._ResetCalledSub(cstThisSub)
Exit Function
Exit Function
Error_NotApplicable:
TraceError(TRACEFATAL, ERRACTION, Utils._CalledSub(), 0, 1, cstThisSub)
Goto Exit_Function
@ -2045,7 +2045,7 @@ Dim oWindow As Object, oDatabase As Object
Exit_Function:
Utils._ResetCalledSub(cstThisSub)
Exit Function
Exit Function
Error_NotApplicable:
TraceError(TRACEFATAL, ERRACTION, Utils._CalledSub(), 0, 1, cstThisSub)
Goto Exit_Function
@ -2076,7 +2076,7 @@ Dim bFound As Boolean
End With
_CheckColumnType = bFound
End Function &apos; _CheckColumnType V0.9.1
REM -----------------------------------------------------------------------------------------------------------------------
@ -2111,7 +2111,7 @@ Dim iNbTypes As Integer, iBestFit As Integer, lFitPrecision As Long, lPrecision
poTarget.IsCurrency = poSource.IsCurrency
poTarget.IsNullable = poSource.IsNullable
poTarget.Scale = poSource.Scale
If piSourceRDBMS = poDatabase._RDBMS Or poDatabase._RDBMS = DBMS_UNKNOWN Then
poTarget.Type = poSource.Type
poTarget.Precision = poSource.Precision
@ -2161,7 +2161,7 @@ Error_Sub:
TraceError(TRACEABORT, Err, &quot;_ConvertDataDescriptor&quot;, Erl)
Goto Exit_Sub
End Sub &apos; ConvertDataDescriptor V1.6.0
REM -----------------------------------------------------------------------------------------------------------------------
Private Function _DatabaseForm(psForm As String, psControl As String)
&apos;Return DatabaseForm element of Form object (based on psForm which is known as a real form name)
@ -2195,7 +2195,7 @@ Dim bFound As Boolean, i As Integer, sName As String
End If
Exit_Function:
Exit Function
Exit Function
Trace_NotFound:
TraceError(TRACEFATAL, ERRCONTROLNOTFOUND, Utils._CalledSub(), 0, , Array(psControl, psForm))
Goto Exit_Function
@ -2227,7 +2227,7 @@ Public Function _getUpperShortcut(ByVal psShortcut As String, ByVal psLastCompon
Else
_getUpperShortcut = psShortcut
End If
End Function &apos; _getUpperShortcut
REM -----------------------------------------------------------------------------------------------------------------------
@ -2247,10 +2247,10 @@ Private Function _OpenObject(ByVal psObjectType As String _
Dim oDatabase As Object
Set oDatabase = Application._CurrentDb()
If oDatabase._DbConnect &lt;&gt; DBCONNECTBASE Then Goto Error_NotApplicable
Dim sObjects() As String, sObjectName As String, oController As Object, oObject As Object
Dim i As Integer, bFound As Boolean, lComponent As Long, oQuery As Object
&apos; Check existence of object and find its exact (case-sensitive) name
Select Case psObjectType
Case &quot;Table&quot;
@ -2282,7 +2282,7 @@ Dim i As Integer, bFound As Boolean, lComponent As Long, oQuery As Object
End If
Set oController = oDatabase.Document.CurrentController
Set oObject = oController.loadComponent(lComponent, sObjectName, ( pvView = acViewDesign ))
_OpenObject = True
_OpenObject = True
Exit_Function:
Set oObject = Nothing
@ -2335,7 +2335,7 @@ Dim oDialog As Object, iOKCancel As Integer, oControl As Object
oControl.Text = &quot;&quot;
oControl.StringItemList = Array()
End If
iOKCancel = oDialog.Execute()
Select Case iOKCancel
Case 1 &apos; OK
@ -2347,7 +2347,7 @@ Dim oDialog As Object, iOKCancel As Integer, oControl As Object
oDialog.Dispose()
End Function &apos; _PromptFormat V0.8.5
REM -----------------------------------------------------------------------------------------------------------------------
Public Function _SelectWindow(Optional ByVal piWindowType As Integer, Optional ByVal psWindow As String) As Object
&apos; No argument: find active window
@ -2445,7 +2445,7 @@ Dim vPersistent As Variant, oForm As Object
Select Case sImplementation
Case &quot;org.openoffice.comp.dbu.OTableDesign&quot; : iType = acTable
Case &quot;org.openoffice.comp.dbu.OQueryDesign&quot; : iType = acQuery
End Select
End Select
sName = Right(oComp.Title, Len(psWindow))
End If
Else
@ -2486,7 +2486,7 @@ Dim vPersistent As Variant, oForm As Object
Exit Do
End If
Loop
If bFound Then
Set oWindow.Frame = oFrame
oWindow._Name = sName
@ -2495,7 +2495,7 @@ Dim vPersistent As Variant, oForm As Object
Else
Set oWindow.Frame = Nothing
End If
Exit_Function:
Set _SelectWindow = oWindow
Exit Function
@ -2518,7 +2518,7 @@ Private Function _SendWithAttachment( _
&apos; Send message with attachments
If _ErrorHandler() Then On Local Error Goto Error_Function
_SendWithAttachment = False
Const cstWindows = 1
Const cstLinux = 4
Const cstSemiColon = &quot;;&quot;
@ -2599,7 +2599,7 @@ Dim vCc() As Variant, i As Integer, iOS As Integer, sProduct As String, bMailPro
End If
_SendWithAttachment = True
Exit_Function:
Exit Function
Error_Function:
@ -2626,7 +2626,7 @@ Const cstComma = &quot;,&quot;
If UBound(pvTo) &gt;= 0 Then sTo = Trim(Join(pvTo, cstComma)) Else sTo = &quot;&quot;
If UBound(pvCc) &gt;= 0 Then sCc = Trim(Join(pvCc, cstComma)) Else sCc = &quot;&quot;
If UBound(pvBcc) &gt;= 0 Then sBcc = Trim(Join(pvBcc, cstComma)) Else sBcc = &quot;&quot;
sMailTo = &quot;mailto:&quot; _
&amp; sTo &amp; &quot;?&quot; _
&amp; Iif(sCc = &quot;&quot;, &quot;&quot;, &quot;cc=&quot; &amp; sCc &amp; &quot;&amp;&quot;) _
@ -2635,7 +2635,7 @@ Const cstComma = &quot;,&quot;
&amp; Iif(psBody = &quot;&quot;, &quot;&quot;, &quot;body=&quot; &amp; psBody &amp; &quot;&amp;&quot;)
If Right(sMailTo, 1) = &quot;&amp;&quot; Or Right(sMailTo, 1) = &quot;?&quot; Then sMailTo = Left(sMailTo, Len(sMailTo) - 1)
sMailTo = ConvertToUrl(sMailTo)
oDispatch = createUnoService( &quot;com.sun.star.frame.DispatchHelper&quot;)
oDispatch.executeDispatch(StarDesktop, sMailTo, &quot;&quot;, 0, Array())
@ -2659,4 +2659,4 @@ Dim oShell As Object
End Sub &apos; _ShellExecute V0.8.5
</script:module>
</script:module>

View file

@ -38,16 +38,16 @@ Dim i As Integer, vNewList() As Variant, vNumeric() As Variant, iSize As Integer
Else
vNewList = Array(pvTypes)
End If
vNumeric = Array(vbInteger, vbLong, vbSingle, vbDouble, vbCurrency, vbBigint, vbDecimal, vbBoolean)
iSize = UBound(vNewlist)
ReDim Preserve vNewList(iSize + UBound(vNumeric) + 1)
For i = 0 To UBound(vNumeric)
vNewList(iSize + i + 1) = vNumeric(i)
Next i
_AddNumeric = vNewList
_AddNumeric = vNewList
End Function &apos; _AddNumeric V0.8.0
@ -104,7 +104,7 @@ Public Function _CheckArgument(pvItem As Variant _
&apos; pvError If True (default), error handling in this routine. False in _setProperty methods in class modules.
_CheckArgument = False
Dim iVarType As Integer, bValidIsMissing As Boolean
If IsArray(pvType) Then iVarType = VarType(pvType(LBound(pvType))) Else iVarType = VarType(pvType)
If iVarType = vbString Then &apos; pvType is a pseudo-type string
@ -114,7 +114,7 @@ Dim iVarType As Integer, bValidIsMissing As Boolean
If Not bValidIsMissing Then bValidIsMissing = IsMissing(pvValid)
If bValidIsMissing Then _CheckArgument = Utils._IsScalar(pvItem, pvType) Else _CheckArgument = Utils._IsScalar(pvItem, pvType, pvValid)
End If
If VarType(pvItem) = vbCurrency Or VarType(pvItem) = vbDecimal Or VarType(pvItem) = vbBigint Then pvItem = CDbl(pvItem)
Exit_Function:
@ -201,12 +201,12 @@ Const cstByteLength = 25
Case Else : sArg = CStr(pvArg)
End Select
End If
If pbShort And Len(sArg) &gt; cstLength Then
If pbShort And Len(sArg) &gt; cstLength Then
sLength = &quot;(&quot; &amp; Len(sArg) &amp; &quot;)&quot;
sArg = Left(sArg, cstLength - 5 - Len(slength)) &amp; &quot; ... &quot; &amp; sLength
End If
_CStr = sArg
End Function &apos; CStr V0.9.5
REM -----------------------------------------------------------------------------------------------------------------------
@ -276,12 +276,12 @@ End Function
REM -----------------------------------------------------------------------------------------------------------------------
Private Function _ExtensionLocation() As String
&apos; Return the URL pointing to the location where OO installed the Access2Base extension
&apos; Adapted from http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Extensions/Location_of_Installed_Extensions
&apos; Adapted from https://wiki.documentfoundation.org/Documentation/DevGuide/Extensions#Location_of_Installed_Extensions
Dim oPip As Object, sLocation As String
Set oPip = GetDefaultContext.getByName(&quot;/singletons/com.sun.star.deployment.PackageInformationProvider&quot;)
_ExtensionLocation = oPip.getPackageLocation(&quot;Access2Base&quot;)
End Function &apos; ExtensionLocation
REM -----------------------------------------------------------------------------------------------------------------------
@ -289,7 +289,7 @@ Private Function _GetDialogLib() As Object
&apos; Return actual Access2Base dialogs library
Dim oDialogLib As Object
Set oDialogLib = DialogLibraries
If oDialogLib.hasByName(&quot;Access2BaseDev&quot;) Then
If Not oDialogLib.IsLibraryLoaded(&quot;Access2BaseDev&quot;) Then oDialogLib.loadLibrary(&quot;Access2BaseDev&quot;)
@ -309,7 +309,7 @@ Public Function _GetEventName(ByVal psProperty As String) As String
&apos; Corrects the typo on ErrorOccur(r?)ed
_GetEventName = Replace(LCase(Mid(psProperty, 3, 1)) &amp; Right(psProperty, Len(psProperty) - 3), &quot;errorOccurred&quot;, &quot;errorOccured&quot;)
End Function &apos; _GetEventName V1.7.0
REM -----------------------------------------------------------------------------------------------------------------------
@ -326,7 +326,7 @@ Dim i As Integer, vEvents As Variant, sEvent As String, oParent As Object, iInde
_GetEventScriptCode = &quot;&quot;
If Not Utils._hasUNOMethod(poObject, &quot;getParent&quot;) Then Exit Function
&apos; Find form index i.e. find control via getByIndex()
&apos; Find form index i.e. find control via getByIndex()
If IsMissing(pbExtendName) Then pbExtendName = False
Set oParent = poObject.getParent()
iIndex = -1
@ -338,7 +338,7 @@ Dim i As Integer, vEvents As Variant, sEvent As String, oParent As Object, iInde
End If
Next i
If iIndex &lt; 0 Then Exit Function
&apos; Find script event
vEvents = oParent.getScriptEvents(iIndex) &apos; Returns an array
sEvent = Utils._GetEventName(psEvent) &apos; Targeted event method
@ -360,7 +360,7 @@ REM Modified from Roberto Benitez&apos;s BaseTools
REM get the data for the column specified by ColIndex
REM If pbReturnBinary = False (default) then return length of binary field
REM get type name from metadata
Dim vValue As Variant, iType As Integer, vDateTime As Variant, oValue As Object
Dim bNullable As Boolean, lSize As Long
Const cstMaxTextLength = 65535
@ -435,9 +435,9 @@ Const cstMaxBinlength = 2 * 65535
If poResultSet.wasNull() Then vValue = Null
End If
End With
_GetResultSetColumnValue = vValue
End Function &apos; GetResultSetColumnValue V 1.5.0
REM -----------------------------------------------------------------------------------------------------------------------
@ -459,7 +459,7 @@ Dim sComponents() As String, sSubComponents() As String
Case Else
Exit Function
End Select
End Function &apos; FinalProperty
REM -----------------------------------------------------------------------------------------------------------------------
@ -512,14 +512,14 @@ End Function &apos; GetRegistryKeyContent V0.8.5
REM -----------------------------------------------------------------------------------------------------------------------
Public Function _getTempDirectoryURL() As String
&apos; Return the temporary directory defined in the OO Options (Paths)
Dim sDirectory As String, oSettings As Object, oPathSettings As Object
Dim sDirectory As String, oSettings As Object, oPathSettings As Object
If _ErrorHandler() Then On Local Error Goto Error_Function
_getTempDirectoryURL = &quot;&quot;
oPathSettings = createUnoService( &quot;com.sun.star.util.PathSettings&quot; )
sDirectory = oPathSettings.GetPropertyValue( &quot;Temp&quot; )
_getTempDirectoryURL = sDirectory
Exit_Function:
@ -583,9 +583,9 @@ Dim sObjectType As String
On Local Error Resume Next
sObjectType = pvObject.getImplementationName()
If sObjectType = &quot;&quot; Then sObjectType = _getUNOTypeName(pvObject)
_ImplementationName = sObjectType
End Function &apos; ImplementationName
REM -----------------------------------------------------------------------------------------------------------------------
@ -645,9 +645,9 @@ Dim iTop As Integer, iBottom As Integer, iFound As Integer
End If
End If
End If
Exit Function
Exit Function
End Function &apos; InList V1.1.0
REM -----------------------------------------------------------------------------------------------------------------------
@ -703,7 +703,7 @@ Public Function _IsPseudo(pvObject As Variant, ByVal pvType As Variant) As Boole
Dim bIsPseudo As Boolean, bPseudoExists As Boolean, vObject As Variant
If _ErrorHandler() Then On Local Error Goto Exit_False
_IsPseudo = False
bIsPseudo = False
vObject = pvObject &apos; To avoid &quot;Object variable not set&quot; error message
@ -725,12 +725,12 @@ Dim bIsPseudo As Boolean, bPseudoExists As Boolean, vObject As Variant
End Select
End With
End Select
If Not bIsPseudo Then Goto Exit_Function
Dim oDoc As Object, oForms As Variant
Const cstSeparator = &quot;\;&quot;
bPseudoExists = False
With vObject
Select Case ._Type
@ -784,7 +784,7 @@ Const cstSeparator = &quot;\;&quot;
Case Else
End Select
End With
_IsPseudo = ( bIsPseudo And bPseudoExists )
Exit_Function:
@ -812,9 +812,9 @@ Private Function _IsScalar(ByVal pvArg As Variant, ByVal pvType As Variant, ByVa
If Not IsMissing(pvValid) Then
If Not _InList(pvArg, pvValid) Then Exit Function
End If
_IsScalar = True
Exit_Function:
Exit Function
End Function &apos; IsScalar V0.7.5
@ -834,7 +834,7 @@ Dim vSubStrings() As Variant, i As Integer, iLen As Integer
End If
Next i
_PCase = Join(vSubStrings, &quot; &quot;)
End Function &apos; PCase V0.9.0
REM -----------------------------------------------------------------------------------------------------------------------
@ -844,7 +844,7 @@ Private Function _PercentEncode(ByVal psChar As String) As String
Dim lChar As Long, sByte1 As String, sByte2 As String, sByte3 As String
lChar = Asc(psChar)
Select Case lChar
Case 48 To 57, 65 To 90, 97 To 122 &apos; 0-9, A-Z, a-z
_PercentEncode = psChar
@ -868,7 +868,7 @@ Dim lChar As Long, sByte1 As String, sByte2 As String, sByte3 As String
Case Else &apos; Not supported
_PercentEncode = psChar
End Select
Exit Function
End Function &apos; _PercentEncode V1.4.0
@ -905,7 +905,7 @@ Const cstMaxLines = 16000 &apos; +/- the limit of array sizes in Basic
Loop
Close #iFile
Exit_Function:
Exit_Function:
_ReadFileIntoArray() = vLines()
Exit Function
Error_Function:
@ -1009,7 +1009,7 @@ Dim i As Integer, oEvent As Object, sEvent As String, oParent As Object, iIndex
_RegisterEventScript = False
If Not _hasUNOMethod(poObject, &quot;getParent&quot;) Then Exit Function
&apos; Find object internal index i.e. how to reach it via getByIndex()
&apos; Find object internal index i.e. how to reach it via getByIndex()
If IsMissing(pbExtendName) Then pbExtendName = False
Set oParent = poObject.getParent()
iIndex = -1
@ -1117,11 +1117,11 @@ Public Function _Trim(ByVal psString As String) As String
Const cstSquareOpen = &quot;[&quot;
Const cstSquareClose = &quot;]&quot;
Dim sTrim As String
sTrim = Trim(Replace(psString, vbTab, &quot; &quot;))
_Trim = sTrim
If Len(sTrim) &lt;= 2 Then Exit Function
If Left(sTrim, 1) = cstSquareOpen Then
If Right(sTrim, 1) = cstSquareClose Then
_Trim = Mid(sTrim, 2, Len(sTrim) - 2)
@ -1172,7 +1172,7 @@ Private Function _UpdateResultSetColumnValue(piRDBMS As Integer _
) As Boolean
REM store the pvValue for the column specified by ColIndex
REM get type name from metadata
Dim iType As Integer, vDateTime As Variant, oValue As Object
Dim bNullable As Boolean, lSize As Long, iValueType As Integer, sValueTypeName As String
Const cstMaxTextLength = 65535
@ -1234,9 +1234,9 @@ Const cstMaxBinlength = 2 * 65535
End If
End With
_UpdateResultSetColumnValue = True
End Function &apos; UpdateResultSetColumnValue V 1.6.0
REM -----------------------------------------------------------------------------------------------------------------------
@ -1276,7 +1276,7 @@ Dim lCurrentChar As Long, bQuestionMark As Boolean
End If
End Select
Next lCurrentChar
_URLEncode = sEncoded
End Function &apos; _URLEncode V1.4.0
@ -1305,4 +1305,4 @@ Private Function _UTF8Encode(ByVal psChar As String) As String
End Function &apos; _UTF8Encode V1.4.0
</script:module>
</script:module>

View file

@ -13,7 +13,7 @@ Option Explicit
&apos;&apos;&apos; ==========
&apos;&apos;&apos; Singleton class implementing the &quot;ScriptForge.Session&quot; service
&apos;&apos;&apos; Implemented as a usual Basic module
&apos;&apos;&apos;
&apos;&apos;&apos;
&apos;&apos;&apos; Gathers diverse general-purpose properties and methods about :
&apos;&apos;&apos; - installation/execution environment
&apos;&apos;&apos; - UNO introspection utilities
@ -138,7 +138,7 @@ Public Function ExecuteBasicScript(Optional ByVal Scope As Variant _
&apos;&apos;&apos; library =&gt; The library may be not loaded yet
&apos;&apos;&apos; module =&gt; Must not be a class module
&apos;&apos;&apos; method =&gt; Sub or Function
&apos;&apos;&apos; Read https://wiki.openoffice.org/wiki/Documentation/DevGuide/Scripting/Scripting_Framework_URI_Specification
&apos;&apos;&apos; Read https://wiki.documentfoundation.org/Documentation/DevGuide/Scripting_Framework#Scripting_Framework_URI_Specification
&apos;&apos;&apos; pvArgs: the arguments of the called script
&apos;&apos;&apos; Returns:
&apos;&apos;&apos; The value returned by the call to the script
@ -253,7 +253,7 @@ Public Function ExecutePythonScript(Optional ByVal Scope As Variant _
&apos;&apos;&apos; myScript =&gt; The directory containing the python module
&apos;&apos;&apos; module.py =&gt; The python module
&apos;&apos;&apos; method =&gt; The python function
&apos;&apos;&apos; Read https://wiki.openoffice.org/wiki/Documentation/DevGuide/Scripting/Scripting_Framework_URI_Specification
&apos;&apos;&apos; Read https://wiki.documentfoundation.org/Documentation/DevGuide/Scripting_Framework#Scripting_Framework_URI_Specification
&apos;&apos;&apos; pvArgs: the arguments of the called script
&apos;&apos;&apos; Date arguments are converted to iso format. However dates in arrays are not converted
&apos;&apos;&apos; Returns:
@ -323,7 +323,7 @@ Public Function GetPDFExportOptions() As Variant
&apos;&apos;&apos; Return the actual values of the PDF export options
&apos;&apos;&apos; The PDF options are described on https://wiki.openoffice.org/wiki/API/Tutorials/PDF_export
&apos;&apos;&apos; PDF options are set at each use of the Export as ... PDF command by the user and kept
&apos;&apos;&apos; permanently until their reset by script or by a new export
&apos;&apos;&apos; permanently until their reset by script or by a new export
&apos;&apos;&apos; Args:
&apos;&apos;&apos; Returns:
&apos;&apos;&apos; A ScriptForge dictionary instance listing the 40+ properties and their value
@ -703,7 +703,7 @@ Try:
&apos; Send using the mail service
oMail.sendSimpleMailMessage(oMessage, lFlag)
Finally:
SF_Utils._ExitFunction(cstThisSub)
Exit Sub
@ -767,7 +767,7 @@ Try:
Set oDict = PDFOptions
oOptions.setPropertyValues(oDict.Keys, oDict.Items)
oOptions.commitChanges()
bSetPDF = True
Finally:
@ -990,7 +990,7 @@ Private Function _ExecuteScript(ByVal psScript As String _
) As Variant
&apos;&apos;&apos; Execute the script expressed in the scripting framework_URI notation
&apos;&apos;&apos; Args:
&apos;&apos;&apos; psScript: read https://wiki.openoffice.org/wiki/Documentation/DevGuide/Scripting/Scripting_Framework_URI_Specification
&apos;&apos;&apos; psScript: read https://wiki.documentfoundation.org/Documentation/DevGuide/Scripting_Framework#Scripting_Framework_URI_Specification
&apos;&apos;&apos; pvArg: the unique argument to pass to the called script.
&apos;&apos;&apos; It is often an event object that triggered the execution of the script.
&apos;&apos;&apos; Returns:
@ -1035,7 +1035,7 @@ Private Function _GetScript(ByVal psLanguage As String _
&apos;&apos;&apos; The SCRIPTISOXT constant is an alias for 2 cases, extension either
&apos;&apos;&apos; installed for one user only, or for all users
&apos;&apos;&apos; Managed here by trial and error
&apos;&apos;&apos; psScript: Read https://wiki.openoffice.org/wiki/Documentation/DevGuide/Scripting/Scripting_Framework_URI_Specification
&apos;&apos;&apos; psScript: Read https://wiki.documentfoundation.org/Documentation/DevGuide/Scripting_Framework#Scripting_Framework_URI_Specification
&apos;&apos;&apos; Returns:
&apos;&apos;&apos; A com.sun.star.script.provider.XScript object

View file

@ -212,7 +212,7 @@ class ScriptForge(object, metaclass = _Singleton):
fullscript = script
paramarray = True
# Build the URI specification described in
# https://wiki.openoffice.org/wiki/Documentation/DevGuide/Scripting/Scripting_Framework_URI_Specification
# https://wiki.documentfoundation.org/Documentation/DevGuide/Scripting_Framework#Scripting_Framework_URI_Specification
elif len(script) > 0:
# Check ParamArray arguments
paramarray = False

View file

@ -44,7 +44,7 @@ Option Explicit
&apos;&apos;&apos; &apos; or Set oDoc = CreateScriptService(&quot;SFDocuments.Calc&quot;, &quot;Untitled 1&quot;) &apos; Untitled 1 is presumed a Calc document
&apos;&apos;&apos; &apos; The substring &quot;SFDocuments.&quot; in the service name is optional
&apos;&apos;&apos;
&apos;&apos;&apos; Definitions:
&apos;&apos;&apos; Definitions:
&apos;&apos;&apos; Many methods require a &quot;Sheet&quot; or a &quot;Range&quot; as argument. (NB: a single cell is considered as a special case of a Range)
&apos;&apos;&apos; Usually, within a specific Calc instance, sheets and ranges are given as a string: &quot;SheetX&quot; and &quot;D2:F6&quot;
&apos;&apos;&apos; Multiple ranges are not supported in this context.
@ -517,7 +517,7 @@ Try:
If Len(ChartName) &gt; 0 And IsNull(oChart) Then
If Not ScriptForge.SF_Utils._Validate(ChartName, &quot;ChartName&quot;, V_STRING, vCharts) Then GoTo Finally
End If
Finally:
If Len(ChartName) = 0 Then Charts = vCharts Else Set Charts = oChart
ScriptForge.SF_Utils._ExitFunction(cstThisSub)
@ -1198,7 +1198,7 @@ Try:
&apos; Restore selection in source
_RestoreSelections(.Component, oSelect)
End With
sCopy = _Offset(oDestRange, 0, 0, lHeight, lWidth).RangeName
Finally:
@ -1274,7 +1274,7 @@ Try:
Set oChart = Charts(SheetName, ChartName)
oChart._Shape.Name = ChartName &apos; Both user-defined and internal names match ChartName
oChart._Diagram.Wall.FillColor = RGB(255, 255, 255) &apos; Align on background color set by the user interface by default
Finally:
Set CreateChart = oChart
ScriptForge.SF_Utils._ExitFunction(cstThisSub)
@ -1566,7 +1566,7 @@ Function GetColumnName(Optional ByVal ColumnNumber As Variant) As String
&apos;&apos;&apos; If ColumnNumber is not in the allowed range, returns a zero-length string
&apos;&apos;&apos; Example:
&apos;&apos;&apos; MsgBox oDoc.GetColumnName(1022) &apos; &quot;AMH&quot;
&apos;&apos;&apos; Adapted from a Python function by sundar nataraj
&apos;&apos;&apos; Adapted from a Python function by sundar nataraj
&apos;&apos;&apos; http://stackoverflow.com/questions/23861680/convert-spreadsheet-number-to-column-letter
Dim sCol As String &apos; Return value
@ -1730,7 +1730,7 @@ Public Function ImportFromCSVFile(Optional ByVal FileName As Variant _
&apos;&apos;&apos; DestinationCell: the destination of the copied range of cells, as a string
&apos;&apos;&apos; If given as range, the destination will be reduced to its top-left cell
&apos;&apos;&apos; FilterOptions: The arguments of the CSV input filter.
&apos;&apos;&apos; Read https://wiki.openoffice.org/wiki/Documentation/DevGuide/Spreadsheets/Filter_Options#Filter_Options_for_the_CSV_Filter
&apos;&apos;&apos; Read https://wiki.documentfoundation.org/Documentation/DevGuide/Spreadsheet_Documents#Filter_Options_for_the_CSV_Filter
&apos;&apos;&apos; Default: input file encoding is UTF8
&apos;&apos;&apos; separator = comma, semi-colon or tabulation
&apos;&apos;&apos; string delimiter = double quote
@ -1834,7 +1834,7 @@ Const cstSubArgs = &quot;[FileName=&quot;&quot;&quot;&quot;], [RegistrationName=
&apos; If ScriptForge.SF_Utils._ErrorHandling() Then On Local Error GoTo Catch
Check:
If IsMissing(FileName) Or IsEmpty(FileName) Then FileName = &quot;&quot;
If IsMissing(RegistrationName) Or IsEmpty(RegistrationName) Then RegistrationName = &quot;&quot;
If IsMissing(DirectSQL) Or IsEmpty(DirectSQL) Then DirectSQL = False
@ -1852,9 +1852,9 @@ Check:
Set oDBContext = ScriptForge.SF_Utils._GetUNOService(&quot;DatabaseContext&quot;)
If Not oDBContext.hasRegisteredDatabase(RegistrationName) Then GoTo CatchError
FileName = ScriptForge.SF_FileSystem._ConvertFromUrl(oDBContext.getDatabaseLocation(RegistrationName))
End If
End If
If Not ScriptForge.SF_FileSystem.FileExists(FileName) Then GoTo CatchError
Try:
&apos; Check command type
Set oDatabase = ScriptForge.SF_Services.CreateScriptService(&quot;SFDatabases.Database&quot;, FileName, , True) &apos; Read-only
@ -2386,7 +2386,7 @@ Check:
If IsMissing(SheetName) Or IsEmpty(SheetName) Then SheetName = &quot;&quot;
If IsMissing(Pages) Or IsEmpty(Pages) Then Pages = &quot;&quot;
If IsMissing(Copies) Or IsEmpty(Copies) Then Copies = 1
If ScriptForge.SF_Utils._EnterFunction(cstThisSub, cstSubArgs) Then
If Not _IsStillAlive() Then GoTo Finally
If Not _ValidateSheet(SheetName, &quot;SheetName&quot;, , True, True) Then GoTo Finally
@ -3506,7 +3506,7 @@ Try:
For j = 0 To lMax2
vArray(i, j) = pvDataArray(i)(j)
Next j
Next i
Next i
End Select
End If
End If
@ -3623,7 +3623,7 @@ Try:
End Select
End If
ReDim vDataArray(0 To lRows)
&apos; Feed the output array row by row, each row being a vector
For i = 0 To lRows
ReDim vVector(0 To lCols)
@ -3656,7 +3656,7 @@ Try:
Finally:
_ConvertToDataArray = vDataArray
Exit Function
Exit Function
End Function &apos; SF_Documents.SF_Calc._ConvertToDataArray
REM -----------------------------------------------------------------------------
@ -3721,7 +3721,7 @@ Function _GetColumnName(ByVal plColumnNumber As Long) As String
&apos;&apos;&apos; ColumnNumber: the column number, must be in the interval 1 ... 1024
&apos;&apos;&apos; Returns:
&apos;&apos;&apos; a string representation of the column name, in range &apos;A&apos;..&apos;AMJ&apos;
&apos;&apos;&apos; Adapted from a Python function by sundar nataraj
&apos;&apos;&apos; Adapted from a Python function by sundar nataraj
&apos;&apos;&apos; http://stackoverflow.com/questions/23861680/convert-spreadsheet-number-to-column-letter
Dim sCol As String &apos; Return value
@ -3911,7 +3911,7 @@ Dim oSelect As Object &apos; Current selection
.ServiceName = SERVICEREFERENCE
.RawAddress = psAddress
Set .XSpreadSheet = Nothing : Set .XCellRange = Nothing
&apos; Remove leading &apos;$&apos;
If Left(psAddress, 1) = &quot;$&quot; Then sAddress = Mid(psAddress, 2) Else sAddress = psAddress
&apos; Split in sheet and range components - Check presence of surrounding single quotes or dot
@ -4130,7 +4130,7 @@ Const cstSubArgs = &quot;&quot;
Else
If Not _ValidateSheet(pvArg, &quot;SheetName&quot;, , True) Then GoTo Finally
Set _PropertyGet = _Component.getSheets.getByName(pvArg)
End If
End If
Case Else
_PropertyGet = Null
End Select
@ -4286,7 +4286,7 @@ Try:
End If
End If
bValid = True
Finally:
_ValidateSheet = bValid
Exit Function

View file

@ -711,7 +711,7 @@ Check:
If IsMissing(Pages) Or IsEmpty(Pages) Then Pages = &quot;&quot;
If IsMissing(Copies) Or IsEmpty(Copies) Then Copies = 1
If IsMissing(_Document) Or IsEmpty(_Document) Or IsNull(_Document) Then Set _Document = _Component
If ScriptForge.SF_Utils._EnterFunction(cstThisSub, cstSubArgs) Then
If Not _IsStillAlive() Then GoTo Finally
If Not ScriptForge.SF_Utils._Validate(Pages, &quot;Pages&quot;, V_STRING) Then GoTo Finally
@ -842,7 +842,7 @@ Public Sub RunCommand(Optional ByVal Command As Variant _
&apos;&apos;&apos; Command: Case-sensitive. The command itself is not checked.
&apos;&apos;&apos; If the command does not contain the &quot;.uno:&quot; prefix, it is added.
&apos;&apos;&apos; If nothing happens, then the command is probably wrong
&apos;&apos;&apos; Args: Pairs of arguments name (string), value (any)
&apos;&apos;&apos; Args: Pairs of arguments name (string), value (any)
&apos;&apos;&apos; Returns:
&apos;&apos;&apos; Examples:
&apos;&apos;&apos; oDoc.RunCommand(&quot;EditDoc&quot;, &quot;Editable&quot;, False) &apos; Toggle edit mode
@ -1172,7 +1172,7 @@ Check:
If IsMissing(Orientation) Or IsEmpty(Orientation) Then Orientation = &quot;&quot;
If IsMissing(PaperFormat) Or IsEmpty(PaperFormat) Then PaperFormat = &quot;&quot;
If IsMissing(_PrintComponent) Or IsEmpty(_PrintComponent) Then Set _PrintComponent = _Component
ScriptForge.SF_Utils._EnterFunction(cstThisSub, cstSubArgs) &apos; Unconditional validation
If Not _IsStillAlive() Then GoTo Finally
If VarType(Printer) = V_STRING Then
@ -1300,7 +1300,7 @@ Dim sFilter As String &apos; A single filter name
Dim iCount As Integer &apos; Filters counter
Dim vFilter As Variant &apos; A filter descriptor as an array of Name/Value pairs
Dim sType As String &apos; The filter type to be compared with the document service
Dim lFlags As Long &apos; Read https://wiki.openoffice.org/wiki/Documentation/DevGuide/OfficeDev/Properties_of_a_Filter
Dim lFlags As Long &apos; Read https://wiki.documentfoundation.org/Documentation/DevGuide/Office_Development#Properties_of_a_Filter
Dim bExport As Boolean &apos; Filter valid for export when True
Dim bImport As Boolean &apos; Filter valid for import when True
Dim bImportExport As Boolean &apos; Filter valid both for import and export when True
@ -1335,7 +1335,7 @@ Try:
End If
End If
Next sFilter
If iCount &gt; -1 Then
ReDim Preserve vFilters(0 To iCount)
End If

View file

@ -15,7 +15,7 @@ Option Explicit
&apos;&apos;&apos; The ScriptForge framework includes
&apos;&apos;&apos; the master ScriptForge library
&apos;&apos;&apos; a number of &quot;associated&quot; libraries SF*
&apos;&apos;&apos; any user/contributor extension wanting to fit into the framework
&apos;&apos;&apos; any user/contributor extension wanting to fit into the framework
&apos;&apos;&apos;
&apos;&apos;&apos; The main methods in this module allow the current library to cling to ScriptForge
&apos;&apos;&apos; - RegisterScriptServices
@ -106,14 +106,14 @@ Try:
lIndex = lIndex + 1
ReDim Preserve vCacheArray(0 To lIndex)
End If
With vCache
.Terminated = False
Set .XUnoForm = pvUnoForm
Set .BasicForm = pvBasicForm
End With
Set vCacheArray(lIndex) = vCache
_SF_.SFForms = vCacheArray
Finally:
@ -140,7 +140,7 @@ Dim vCache As New _FormCache &apos; Cleaned entry
End With
.SFForms(plIndex) = vCache
End With
Finally:
Exit Sub
End Sub &apos; SFDocuments.SF_Register._CleanCacheEntry
@ -254,7 +254,7 @@ Try:
&apos; FORM EVENT
If oSession.UnoObjectType(vEvent.Source) = &quot;com.sun.star.comp.forms.ODatabaseForm&quot; Then
Set oSource = SF_Register._NewForm(vEvent.Source, pbForceInit := True)
&apos; CONTROL EVENT
Else
&apos; A SF_FormControl instance is always created from its parent, either a form, a subform or a table control
@ -293,7 +293,7 @@ Public Function _GetEventScriptCode(poObject As Object _
&apos;&apos;&apos; psName: the name of the object to be identified from the parent object
&apos;&apos;&apos; Returns:
&apos;&apos;&apos; The script to trigger when psEvent occurs
&apos;&apos;&apos; See Scripting Framework URI Specification : https://wiki.openoffice.org/wiki/Documentation/DevGuide/Scripting/Scripting_Framework_URI_Specification
&apos;&apos;&apos; See Scripting Framework URI Specification : https://wiki.documentfoundation.org/Documentation/DevGuide/Scripting_Framework#Scripting_Framework_URI_Specification
Dim vEvents As Variant &apos; List of available events in the parent object
&apos; Array of com.sun.star.script.ScriptEventDescriptor
@ -320,7 +320,7 @@ Try:
End If
Next i
If lIndex &lt; 0 Then GoTo Finally &apos; Not found, should not happen
&apos; Find script triggered by event
vEvents = oParent.getScriptEvents(lIndex) &apos; Returns an array
&apos; Fix historical typo error
@ -490,7 +490,7 @@ Public Function _RegisterEventScript(poObject As Object _
&apos;&apos;&apos; psEvent: the &quot;On...&quot; name of the event
&apos;&apos;&apos; psListener: the listener name corresponding with the event
&apos;&apos;&apos; psScriptCode: The script to trigger when psEvent occurs
&apos;&apos;&apos; See Scripting Framework URI Specification : https://wiki.openoffice.org/wiki/Documentation/DevGuide/Scripting/Scripting_Framework_URI_Specification
&apos;&apos;&apos; See Scripting Framework URI Specification : https://wiki.documentfoundation.org/Documentation/DevGuide/Scripting_Framework#Scripting_Framework_URI_Specification
&apos;&apos;&apos; psName: the name of the object to associate with the event
&apos;&apos;&apos; Returns:
&apos;&apos;&apos; True when successful
@ -507,7 +507,7 @@ Dim i As Long
If Not ScriptForge.SF_Session.HasUnoMethod(poObject, &quot;getParent&quot;) Then GoTo Finally
Try:
&apos; Find object&apos;s internal index i.e. how to reach it via getByIndex()
&apos; Find object&apos;s internal index i.e. how to reach it via getByIndex()
Set oParent = poObject.getParent()
lIndex = -1
For i = 0 To oParent.getCount() - 1

View file

@ -173,7 +173,7 @@ Public Function AddCheckBox(Optional ByVal MenuItem As Variant _
&apos;&apos;&apos; Tooltip: The help text to be displayed as a tooltip
&apos;&apos;&apos; Command: A menu command like &quot;.uno:About&quot;. The validity of the command is not checked.
&apos;&apos;&apos; Script: a Basic or Python script (determined by its URI notation) to be run when the item is clicked
&apos;&apos;&apos; Read https://wiki.openoffice.org/wiki/Documentation/DevGuide/Scripting/Scripting_Framework_URI_Specification
&apos;&apos;&apos; Read https://wiki.documentfoundation.org/Documentation/DevGuide/Scripting_Framework#Scripting_Framework_URI_Specification
&apos;&apos;&apos; Next string argument will be passed to the called script : a comma-separated string of 4 components:
&apos;&apos;&apos; - the menu header
&apos;&apos;&apos; - the name of the clicked menu item
@ -254,7 +254,7 @@ Public Function AddItem(Optional ByVal MenuItem As Variant _
&apos;&apos;&apos; Tooltip: The help text to be displayed as a tooltip
&apos;&apos;&apos; Command: A menu command like &quot;.uno:About&quot;. The validity of the command is not checked.
&apos;&apos;&apos; Script: a Basic or Python script (determined by its URI notation) to be run when the item is clicked
&apos;&apos;&apos; Read https://wiki.openoffice.org/wiki/Documentation/DevGuide/Scripting/Scripting_Framework_URI_Specification
&apos;&apos;&apos; Read https://wiki.documentfoundation.org/Documentation/DevGuide/Scripting_Framework#Scripting_Framework_URI_Specification
&apos;&apos;&apos; Next string argument will be passed to the called script : a comma-separated string of 4 components:
&apos;&apos;&apos; - the menu header
&apos;&apos;&apos; - the name of the clicked menu item
@ -335,7 +335,7 @@ Public Function AddRadioButton(Optional ByVal MenuItem As Variant _
&apos;&apos;&apos; Tooltip: The help text to be displayed as a tooltip
&apos;&apos;&apos; Command: A menu command like &quot;.uno:About&quot;. The validity of the command is not checked.
&apos;&apos;&apos; Script: a Basic or Python script (determined by its URI notation) to be run when the item is clicked
&apos;&apos;&apos; Read https://wiki.openoffice.org/wiki/Documentation/DevGuide/Scripting/Scripting_Framework_URI_Specification
&apos;&apos;&apos; Read https://wiki.documentfoundation.org/Documentation/DevGuide/Scripting_Framework#Scripting_Framework_URI_Specification
&apos;&apos;&apos; Next string argument will be passed to the called script : a comma-separated string of 4 components:
&apos;&apos;&apos; - the menu header
&apos;&apos;&apos; - the name of the clicked menu item