/usr/lib/libreoffice/share/extensions/DmathsAddon/OOoGdmath/ChangerPoliceCode.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 | <?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="ChangerPoliceCode" script:language="StarBasic">'OOoGdmath
'Copyright (C) 2005-2009 Gilles Daurat
'This program is free software; you can redistribute it and/or
'modify it under the terms of the GNU General Public License
'as published by the Free Software Foundation; either version 2
'of the License, or (at your option) any later version.
'This program 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 License
'along with this program; if not, write to the Free Software
'Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Option Explicit
dim oChangePoliceForm as Object
dim unGroupe as Object
dim texteCourant as Object
dim indice() as String
Sub Main
Dim Param() as string
Dim i
oChangePoliceForm=LoadDialog("OOoGdmath", "ChangerPoliceForm")
ChangeTitreDialog(oChangePoliceForm)
'on charge les polices
ChargeNomPolice(param())
oChangePoliceForm.GetControl("ComboBox2").Model.StringItemList=param()
for i = lbound(param()) to ubound(param())
if param(i)=OOoGdmath_NomPolice Then SetListIndex(oChangePoliceForm, "ComboBox2", i)
next i
oChangePoliceForm.Model.TextBox1.Text= OOoGdmath_TaillePolice
oChangePoliceForm.Model.ScrollBar1.ScrollValue = OOoGdmath_TaillePolice
oChangePoliceForm.Model.CheckBox3.State = MIif(OOoGdmath_SoulignePolice = com.sun.star.awt.FontUnderline.SINGLE, 1, 0)
oChangePoliceForm.Model.CheckBox2.State = MIif(OOoGdmath_ItaliquePolice = com.sun.star.awt.FontSlant.ITALIC, 1, 0)
oChangePoliceForm.Model.CheckBox1.State = MIif(OOoGdmath_GrasPolice = com.sun.star.awt.FontWeight.BOLD, 1, 0)
ChangePoliceForm_MiseAJourExemple
oChangePoliceForm.Execute()
End Sub
Private Sub ChangePoliceForm_CommandButton2()
oChangePoliceForm.EndExecute()
End Sub
Private Sub ChangePoliceForm_CommandButton1()
Dim unCurseur as Object
Dim i,j
on error resume next
RemplaceConstante "OOoGdmath_NomPolice", oChangePoliceForm.Model.ComboBox2.Text
RemplaceConstante "n_OOoGdmath_TaillePolice", val(oChangePoliceForm.Model.TextBox1.Text)
if oChangePoliceForm.Model.CheckBox3.State then
RemplaceConstante "n_OOoGdmath_SoulignePolice" , com.sun.star.awt.FontUnderline.SINGLE
else
RemplaceConstante "n_OOoGdmath_SoulignePolice" , com.sun.star.awt.FontUnderline.NONE
end if
if oChangePoliceForm.Model.CheckBox2.State then
RemplaceConstante "n_OOoGdmath_ItaliquePolice" , com.sun.star.awt.FontSlant.ITALIC
else
RemplaceConstante "n_OOoGdmath_ItaliquePolice" , com.sun.star.awt.FontSlant.NONE
end if
if oChangePoliceForm.Model.CheckBox1.State then
RemplaceConstante "n_OOoGdmath_GrasPolice" , com.sun.star.awt.FontWeight.BOLD
else
RemplaceConstante "n_OOoGdmath_GrasPolice" , com.sun.star.awt.FontWeight.NORMAL
end if
oChangePoliceForm.EndExecute()
End Sub
Private Sub ChangePoliceForm_CheckBox1()
ChangePoliceForm_MiseAJourExemple
End Sub
Private Sub ChangePoliceForm_CheckBox2()
ChangePoliceForm_MiseAJourExemple
End Sub
Private Sub ChangePoliceForm_CheckBox3()
ChangePoliceForm_MiseAJourExemple
End Sub
Private Sub ChangePoliceForm_Scroll1()
if oChangePoliceForm.Model.ScrollBar1.ScrollValue<>val(oChangePoliceForm.Model.TextBox1.Text) then
oChangePoliceForm.Model.TextBox1.Text=oChangePoliceForm.Model.ScrollBar1.ScrollValue
ChangePoliceForm_MiseAJourExemple
end if
End Sub
Private Sub ChangePoliceForm_ComboBox2()
ChangePoliceForm_MiseAJourExemple
End Sub
Private Sub ChangePoliceForm_TextBox1()
if oChangePoliceForm.Model.ScrollBar1.ScrollValue<>val(oChangePoliceForm.Model.TextBox1.Text) then
oChangePoliceForm.Model.ScrollBar1.ScrollValue = oChangePoliceForm.Model.TextBox1.Text
ChangePoliceForm_MiseAJourExemple
End if
End Sub
Private Sub ChangePoliceForm_MiseAJourExemple()
oChangePoliceForm.Model.Label3.FontHeight=val(oChangePoliceForm.Model.TextBox1.Text)
if oChangePoliceForm.Model.CheckBox3.State then
oChangePoliceForm.Model.Label3.FontUnderLine=com.sun.star.awt.FontUnderline.SINGLE
else
oChangePoliceForm.Model.Label3.FontUnderLine=com.sun.star.awt.FontUnderline.NONE
end if
if oChangePoliceForm.Model.CheckBox2.State then
oChangePoliceForm.Model.Label3.FontSlant=com.sun.star.awt.FontSlant.ITALIC
else
oChangePoliceForm.Model.Label3.FontSlant=com.sun.star.awt.FontSlant.NONE
end if
if oChangePoliceForm.Model.CheckBox1.State then
oChangePoliceForm.Model.Label3.FontWeight=com.sun.star.awt.FontWeight.BOLD
else
oChangePoliceForm.Model.Label3.FontWeight=com.sun.star.awt.FontWeight.NORMAL
End if
oChangePoliceForm.Model.Label3.FontName=oChangePoliceForm.Model.ComboBox2.Text
End Sub
</script:module>
|