La bibliothèque Tools

Pour accéder à cette commande...

Ouvrez Outils - Macros - LibreOffice Basic - Éditer et sélectionnez le conteneur LibreOffice Macros.


Icône Remarque

Cette bibliothèque doit être chargée avant l'exécution. Placez l'instruction suivante avant la première macro du module :
GlobalScope.BasicLibraries.LoadLibrary("Tools")


Module Debug

Module ListBox

ModuleMisc

Module ModuleControls

Module Strings

Module UCB

Module Debug

Fonctions et sous routines pour déboguer les macros Basic.

Macro

Appeler des paramètres et des commentaires

ActivateReadOnlyFlag

                        Sub ActivateReadOnlyFlag()
                    
DeactivateReadOnlyFlag

                        Sub DeactivateReadOnlyFlag()
                    
SetBasicReadOnlyFlag

                        Sub SetBasicReadOnlyFlag(bReadOnly as Boolean)
                    
WritedbgInfo

                        Sub WritedbgInfo(LocObject as Object)
                    
WriteDbgString

                        Sub WriteDbgString(LocString as String)
                    
ShowArray

                        Sub ShowArray(LocArray())
                    
ShowPropertyValues

                        Sub ShowPropertyValues(oLocObject as Object)
                    
ShowNameValuePair

                        Sub ShowNameValuePair(Pair())
                    
ShowElementNames

' Retrieves all the Elements of aSequence of an object, with the

' possibility to define a filter(sfilter <> "")


                        Sub ShowElementNames(
                        oLocElements() as Object,
                        Optional sFiltername as String)
                    
ShowSupportedServiceNames

' Retrieves all the supported servicenames of an object, with the

' possibility to define a filter(sfilter <> "")


                        Sub ShowSupportedServiceNames(
                        oLocObject as Object,
                        Optional sFilterName as String)
                    
ShowAvailableServiceNames

' Retrieves all the available Servicenames of an object, with the

' possibility to define a filter(sfilter <> "")


                        Sub ShowAvailableServiceNames(
                        oLocObject as Object, 
                        Optional sFilterName as String)
                    
ShowCommands

                        Sub ShowCommands(oLocObject as Object)
                    
ProtectCurrentSheets

                        Sub ProtectCurrentSheets()
                    
FillDocument

                        Sub FillDocument()
                    

Module ListBox

Fonctions et sous routines pour gérer les éléments ListBox.

Icône Avertissement

Cette page d'aide nécessite d'être retravaillée et complétée. Joignez le projet LibreOffice et aidez-nous à écrire les informations manquantes. Visitez notre page d'aide sur l'écriture du contenu de l'aide.


Module Misc

Fonctions et sous routines diverses.

Macro

Appeler des paramètres et des commentaires

RegisterNewDataSource

                        Function RegisterNewDataSource(
                        DSName as  String, 
                        PropertyList(), 
                        Optional DriverProperties() 
                        as New com.sun.star.beans.PropertyValue)
                    
ConnecttoDatabase

                        Function ConnecttoDatabase(
                        DSName as String, 
                        UserID as String, 
                        Password as String, 
                        Optional Propertylist(), 
                        Optional DriverProperties() 
                        as New com.sun.star.beans.PropertyValue)
                    
GetStarOfficeLocale

                        Function GetStarOfficeLocale() 
                        as New com.sun.star.lang.Locale
                    
GetRegistryKeyContent

                        Function GetRegistryKeyContent(
                        sKeyName as string, 
                        Optional bforUpdate as Boolean)
                    
GetProductname

                        Function GetProductname() as String
                    
OpenDocument

' Opens a Document, checks beforehand, whether it has to be loaded or whether it is already on the desktop. If the parameter bDisposable is set to False then the returned document should not be disposed afterwards, because it is already opened.


                        Function OpenDocument(
                        DocPath as String, 
                        Args(), 
                        Optional bDisposable as Boolean)
                    
TaskonDesktop

                        Function TaskonDesktop(DocPath as String) as Boolean
                    
RetrieveFileName

' Retrieves a FileName out of a StarOffice-Document.


                        Function RetrieveFileName(LocDoc as Object)
                    
GetPathSettings

' Gets a special configured PathSetting.


                        Function GetPathSettings(
                        sPathType as String,
                        Optional bshowall as Boolean, 
                        Optional ListIndex as integer) as String
                    
GetOfficeSubPath

' Gets the fully qualified path to a subdirectory of the Template Directory, e. g. with the parameter "wizard/bitmap". The parameter must be passed over in Url-scription. The return-Value is in Urlscription.


                        Function GetOfficeSubPath(
                        sOfficePath as String, 
                        ByVal sSubDir as String)
                    
ShowNoOfficePathError

                        Sub ShowNoOfficePathError() 
                    
InitResources

                        Function InitResources(
                        Description, 
                        ShortDescription as String) as boolean
                    
GetResText

                        Function GetResText( nID as integer ) As string
                    
CutPathView

                        Function CutPathView(
                        sDocUrl as String, 
                        Optional PathLen as Integer)
                    
DeleteInputCells

' Deletes the content of all cells that are softformatted according to the 'InputStyleName'.


                        Sub DeleteInputCells(
                        oSheet as Object, 
                        InputStyleName as String)
                    
ChangeValueofRange

' Inserts a certain String to all cells of a Range that ist passed over either as an object or as the RangeName.


                        Sub ChangeValueofRange(
                        oSheet as Object, 
                        Range, 
                        ReplaceValue, 
                        Optional StyleName as String)
                    
ReplaceRangeValues