/usr/lib/libreoffice/share/extensions/DmathsAddon/Dmaths/Module5.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 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | <?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="Module5" script:language="StarBasic">'************************************************
'Copyright (C) 2008 Didier Dorange-Pattoret
'38, chemin de l'Abbaye
'74940 Annecy le Vieux
'France
'ddorange@dmaths.com
'
'
'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
'************************************************
Global bManuelFormula, bModifieTailleFormule as Boolean
' Ce paramètre prend la valeur TRUE si la taille par defaut a été changée.
Sub ChangeModeFormule rem permet de changer le mode formule mise a jour le 29 fevrier 2008
Call VerifOperationnel
If bManuelFormula = -1 Then
msgbox(sVocab(iLang,234),64,"Dmaths")
bManuelFormula = 0
Else
msgbox(sVocab(iLang,235),64,"Dmaths")
bManuelFormula = -1
Endif
End Sub
Function LoadDialog(Libname as String, DialogName as String) ', Optional oLibContainer) rem charge une boite de dialogue
Dim oLib,oLibDialog,oRuntimeDialog,oDialogModel,oVar,oVar1 as Object
Dim langue As New com.sun.star.lang.Locale
DialogLibraries.LoadLibrary(LibName)
oLib = DialogLibraries.GetByName(Libname)
oLibDialog = oLib.GetByName(DialogName)
oRuntimeDialog = CreateUnoDialog(oLibDialog)
oDialogModel = oRuntimeDialog.Model
If DialogName="DmOptions" Then rem initialise la boîte Dmoptions
If bItalic=False Then oRuntimeDialog.GetControl("CheckBox1").State=0
If bVecteursItalic= False Then oRuntimeDialog.GetControl("CheckBox2").State=0
If bAnglesItalic = False Then oRuntimeDialog.GetControl("CheckBox3").State=0
If bMesuresAlgItalic = False Then oRuntimeDialog.GetControl("CheckBox4").State=0
If bEdroit = FALSE Then oRuntimeDialog.GetControl("CheckBox5").State=0
If bChiffresDroits = FALSE Then oRuntimeDialog.GetControl("CheckBox6").State=0
If sBorneInfIntegrales = "_" Then oRuntimeDialog.GetControl("CheckBox7").State=0
If bTextMode = True Then oRuntimeDialog.GetControl("CheckBox8").State=1
If bCoordColonne = True Then oRuntimeDialog.GetControl("CheckBox9").State=1
If bFormulesGras = True Then oRuntimeDialog.GetControl("CheckBox10").State=1
If bSystemesAlignes = True Then oRuntimeDialog.GetControl("CheckBox11").State=1
If bTailleFormCarac = True Then oRuntimeDialog.GetControl("CheckBox12").State=1
If bTailleFormCarac = True Then oRuntimeDialog.GetControl("TextField1").Enable=False
If bPoliceFormCarac = True Then oRuntimeDialog.GetControl("CheckBox19").State=1
If bUsingDisPatcher Then oRuntimeDialog.GetControl("CheckBox20").State=1
If bConcateneFormules = True Then oRuntimeDialog.GetControl("CheckBox21").State=1
If bXpointaulieux = TRUE Then oRuntimeDialog.GetControl("CheckBox23").State=1
If bLettresAreScalaires = False Then
oRuntimeDialog.GetControl("CheckBox22").State = 0
oRuntimeDialog.GetControl("TextField7").Enable = False
Endif
If bFormulesEspacees = True Then oRuntimeDialog.GetControl("CheckBox13").State=1
If bFormulesEncadrees = True Then oRuntimeDialog.GetControl("CheckBox14").State=1
If bGrandesParentheses = False Then oRuntimeDialog.GetControl("CheckBox15").State=0
If bIdroit = False Then oRuntimeDialog.GetControl("CheckBox16").State=0
If bFractions = True Then oRuntimeDialog.GetControl("CheckBox17").State=1
If bModeFactoriel = True Then oRuntimeDialog.GetControl("CheckBox18").State=1
If bMatricesRondes = False Then oRuntimeDialog.GetControl("OptionButton2").State=1
If Len(sThemeIcons) <> 0 Then oRuntimeDialog.GetControl("OptionButton"& Mid(sThemeIcons,6,1)).State = 1 Else oRuntimeDialog.GetControl("OptionButton1").State = 1
For I = 1 To iNbreThemesIcones
oRuntimeDialog.GetControl("OptionButton"&Cstr(I)).Model.ImageURL = sChemindmaths & "icons/theme"&Cstr(I)&"/metenvecteur_16.bmp"
Next I
For I = iNbreThemesIcones+1 To 7
oRuntimeDialog.GetControl("OptionButton"&Cstr(I)).Visible = False
Next I
oRuntimeDialog.GetControl("TextField1").Text = iTailleFormules
oRuntimeDialog.GetControl("TextField2").Text = iMarqHorPoints
oRuntimeDialog.GetControl("TextField3").Text = iMarqVerPoints
oRuntimeDialog.GetControl("TextField4").Text = iDelaiEntreSauvegardes
oRuntimeDialog.GetControl("TextField5").Text = sNomPoliceCursive
oRuntimeDialog.GetControl("TextField7").Text = sLettresScalaires
If Len(iMargesFormules) <> 0 then oRuntimeDialog.GetControl("TextField6").Text = iMargesFormules
oRuntimeDialog.GetControl("ListBox1").SelectItemPos(iLang,True)
End if
If DialogName="TailleFormule" Then
If bItalic=False Then oRuntimeDialog.GetControl("CheckBox1").State=0
If bTextMode = True Then oRuntimeDialog.GetControl("CheckBox2").State=1
EndIf
If DialogName="Tableau" Then
oRuntimeDialog.Model.TextField1.Text = iNbreLignes
oRuntimeDialog.Model.TextField2.Text = iNbreColonnes
If bTitre = True Then oRuntimeDialog.GetControl("CheckBox1").State=1 Else oRuntimeDialog.GetControl("CheckBox1").State=0
If bBordure = True Then oRuntimeDialog.GetControl("CheckBox2").State=1 Else oRuntimeDialog.GetControl("CheckBox2").State=0
If bCentreHorizontal = True Then oRuntimeDialog.GetControl("CheckBox3").State=1 Else oRuntimeDialog.GetControl("CheckBox3").State=0
If bCentreVertical = True Then oRuntimeDialog.GetControl("CheckBox4").State=1 Else oRuntimeDialog.GetControl("CheckBox4").State=0
Endif
If DialogName="ParCro" Then
bBoite=True
For I = 1 To 15
oRuntimeDialog.GetControl("CommandButton"+Mid(Str(I),2,Len(Str(I))-1)).Model.BackGroundColor = RGB(170,170,255)
Next I
Endif
If DialogName="Tava" Then
For I = 9 To 20
'Xray oRuntimeDialog.GetControl("CommandButton9")
oRuntimeDialog.GetControl("CommandButton"+cstr(I)).Label = "0"
Next I
Endif
select case iLang
case 1
langue.Language = "en"
langue.Country = "US"
case 2
langue.Language = "de"
langue.Country = "DE"
case Else
langue.Language = "fr"
langue.Country = "FR"
End Select
oRuntimeDialog.Model.ResourceResolver.setCurrentLocale(langue, True)
LoadDialog() = oRuntimeDialog
End Function
</script:module>
|