/usr/lib/libreoffice/share/extensions/DmathsAddon/DmInstall/MajAuto.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 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | <?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="MajAuto" script:language="StarBasic">'************************************************
'Copyright (C) 2006-2010 Didier Dorange-Pattoret
'38, chemin de l'Abbaye
'74940 Annecy le Vieux
'France
'ddorange@dmaths.org
'
'
'This library is free software; you can redistribute it and/or
'modify it under the terms of the GNU General Public Licence (GPL)
'as published by the Free Software Foundation; either
'version 2.1 of the License, or (at your option) any later version.
'This library is distributed in the hope that it will be useful,
'but WITHOUT ANY WARRANTY; without even the implied warranty of
'MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
'General Public License for more details.
'You should have received a copy of the GNU General Public Licence (GPL)
'along with this library; if not, write to the Free Software
'Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
'************************************************
Public oDlgMajA as object
Private iLangNumberMaJ as Integer
Sub LanceMiseAJourAutomatique
Call MetAJourDescription rem met à jour le fichier description.xml si DmathsClub presente
Globalscope.DialogLibraries.loadLibrary("DmInstall")
BasicLibraries.loadLibrary("Dmaths")
oDlgMajA = Dmaths.Module5.LoadDialog("DmInstall","DlgMajA")
' oDlgMajA.Visible = True
exitOK = com.sun.star.ui.dialogs.ExecutableDialogResults.OK
If oDlgMajA.Execute = exitOK then
Globalscope.BasicLibraries.loadLibrary("Dmaths")
Call Dmaths.Tools.VerifOperationnel
oDlgMajA.Dispose()
LanceGestionnairedePackagesMAJ
Endif
End Sub
Sub LanceGestionnairedePackagesMAJ
Dim sCheminGPk, Chemin as String
sCheminGPk = TrouveCheminUnopkg
sCheminGPk = sCheminGPk & " gui "
Shell(sCheminGPk)
End Sub
Function TrouveCheminUnopkg as String
Dim sCheminUnopkgT as String
sCheminUnopkgT = GetRepertoirePathprog & "unopkg"
If Getguitype = 1 Then
sCheminUnopkgT = """" & sCheminUnopkgT & ".exe"""
Endif
TrouveCheminUnopkg = sCheminUnopkgT
End Function
Sub MetAJourDescription
Dim TheChemin as String
If BasicLibraries.hasByName("DmathsClub") and (Not TestInstallRezo or ControleDroits(GetRepertoirePath("inst"))) Then
BasicLibraries.loadLibrary("DmathsClub")
Call DmathsClub.Module1.TrouveLeFichier
TheChemin = Mid(fCheminDmaths,1,Len(fCheminDmaths)-9)
aFile = TheChemin & "description.xml"
aFileNew = TheChemin & "description.xml.new"
iNumberNew = Freefile
Open aFileNew For Output As iNumberNew
iNumber = Freefile
Open aFile For Input As iNumber
While not eof(iNumber)
Line Input #iNumber, sLine
If InStr(sLine, "<src xlink:href=") > 0 then
sLine = " <src xlink:href=""" & LeFichierNouvelleVersionClub & """/>"
end if
Print #iNumberNew, sLine
Wend
Close #iNumber
Close #iNumberNew
kill (aFile)
Name aFileNew as aFile
Endif
End sub
rem -----------------------------------------------------------------------------------------------------
rem *****************************************************************************************************
rem -----------------------------------------------------------------------------------------------------
</script:module>
|