LibreOffice logo
The software tool for documenting your LibreOffice Base applications
Database file/home/jean-pierre/Documents/BaseDocumenter/www/databases/LODoc/Media_with_Macros.odb
File actual save date2018-06-27 15:23:25
Scanning done on2018-08-21 17:45:34
Documentation generated on2018-08-21 17:45:45
Table of contents
List of modules
Location Library Module name Module type Number of code lines Procedures by module Declaratives
Document Standard AA_Variables Standard 33  
REM  *****  BASIC  *****
REM This module contains variables, which are used very often by many of the following macros.
REM Variables, wchich are declared here, mustn't be declared ad the beginning of every procedure.
REM It could be, that variables, which are declared outside a procedure, contain a value when you change from on procedure to another.

REM Variables to get access to the database
DIM oDataSource AS OBJECT ' This is the used data source. If a second datasource should be used, it must be saved in another variable.
DIM oConnection AS OBJECT ' Only one connection to the database is necessary to use for queries, updates, deletes and inserts.
REM The following three variables are used to create and execute a SQL-command.
REM If there are more than one SQL-commands running, there must be added more variables.
REM The following two variables are used to execute another update, insert or delete.
REM If you wish to execute a query there must be another variable for the content given back from the database.

REM Variables to get access to forms
DIM oDoc AS OBJECT ' Access to the database document - all the following procedures were running in the same document. So it could declared at the beginning.
DIM oDrawpage AS OBJECT ' Access to the drawpage, in this case the form - could be declared at the beginning, because all procedures refer to only one form.
DIM oDocCrl AS OBJECT ' Access to the controller of every field of a form

REM It's difficult to get all methods, properties or services of a field of a form. If you use dbg_methods and so on, you could get too much informations.
REM The whole informations couldn't be shown on the screen by msgbox.
REM This is the included tool of LO to see all methos and so on of one field:
REM GlobalScope.BasicLibraries.LoadLibrary("Tools")
REM WriteDbgInfo("fieldname")
REM It is created a writer-file, which could fill more than 5 pages.

DIM oDlg AS OBJECT 'The dialog must be started from one procedure and uses also other procedures. So it must be a varibale of the type "public"
Document Standard Backup Standard 61 BackupNow
Document Standard Comboboxes Standard 373 ColumnSize
REM  *****  BASIC  *****
REM The Modul "Comboboxen" changes combofields, where you could select or input new values, to
REM listfields with the possibility to enter new values. The foreignkeys for the listfield are saved in
REM the table, which is datasorce of the form. This keys were read out when form is loaded and every time a new row is entered.
REM The comboboxes are set to the value correlating to this key. This is only necessary if the datasource of the table
REM isn't created by a query, special a correlating subquery as shown in this database.

REM Before saving the whole row of the form the content of the listboxes would be saved, if it has been changed.
REM The key will be detected and written down in teh field for the foreignkey.
REM There wouldn't be recognized any action of a field, which isn't connected to the datasource. "GenerateRecordAction" will
REM generate this action. So the form recognize it when the content of the comboboxes would be changed.
REM Also this is only necessary if the datasource of the table
REM isn't created by a query, special a correlating subquery as shown in this database.
Document Standard Maintenance Standard 502 DatabaseCompressing
REM Maintenancemodul works with a dialog. Fields in dialogs are positioned as fields in forms.
REM Every field gets a separate name by default.
REM This is necessary to reach every field by macros. For userers it seems to be impossible to change names of the fields.
REM If declarations should be swaped from, for example, "label1" to "label2" and backwards,
REM you have to change one field to a name, which isn't used before.
REM There should never be the same declarations for two fields - not while using the dialog and not while editing it.
Document Standard Navigation Standard 39 MainformOpen
REM This module iis for opening a form from another form.
REM At the same time the form, where the button is pressed, would be closed.
REM Will you get back from a form to one mainform (for naviagtion), you have only to start
REM ThisDatabaseDocument.FormDocuments.getByName( "Mainform" ).open
REM from the form in menue Tools → Customize → Events → Document is going to be closed
Document Standard Print Standard 16 ReportStart  
Document Standard Refreshing Standard 67 LoanRefresh