/usr/lib/libreoffice/share/extensions/DmathsAddon/OOoGdmath/BarreOutils.xba is in libreoffice-dmaths 3.4+dfsg1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="BarreOutils" script:language="StarBasic">REM ***** BASIC *****
Sub Main
REM *** Modifies the standard bar of the BasicIDE module
REM *** Initialize strings
' sToolbar = "private:resource/toolbar/standardbar"
sToolbar = "private:resource/toolbar/myBar"
sMyToolbarCmdId = "vnd.openoffice.org:MyFunction"
REM *** Retrieve the module configuration manager from central module configuration manager supplier
oModuleCfgMgrSupplier = createUnoService("com.sun.star.ui.ModuleUIConfigurationManagerSupplier")
REM *** Retrieve the module configuration manager with module identifier
REM *** See drafts.com.sun.star.frame.ModuleManager for more information
' oModuleCfgMgr = oModuleCfgMgrSupplier.getUIConfigurationManager("com.sun.star.script.BasicIDE" )
' oModuleCfgMgr.removeSettings(sToolbar)
oModuleCfgMgr = oModuleCfgMgrSupplier.getUIConfigurationManager("com.sun.star.text.TextDocument" )
' oModuleCfgMgr.removeSettings(sToolbar)
oToolbarSettings = oModuleCfgMgr.createSettings()
REM *** Create a button
sString = "My Macro's"
oToolbarItem = CreateToolbarItem( "macro:///OOoGdmath.AdditionForm.Main()", "OOoGdmath.AdditionForm.Main" )
oToolbarSettings.UIName = "Test3"
oToolbarSettings.insertByIndex( 0, oToolbarItem )
oModuleCfgMgr.insertSettings( sToolbar, oToolbarSettings )
End Sub
Function CreateToolbarItem( Command as String, Label as String ) as Variant
Dim aToolbarItem(3) as new com.sun.star.beans.PropertyValue
aToolbarItem(0).Name = "CommandURL"
aToolbarItem(0).Value = Command
aToolbarItem(1).Name = "Label"
aToolbarItem(1).Value = Label
aToolbarItem(2).Name = "Type"
aToolbarItem(2).Value = 0
aToolbarItem(3).Name = "ImageURL"
aToolbarItem(3).Value = ""
CreateToolbarItem = aToolbarItem()
End Function
</script:module>
|