/usr/lib/libreoffice/share/extensions/DmathsAddon/OOoGdmath/FiguresGeometriques.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 | <?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="FiguresGeometriques" 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.
Global Const FG_RIEN = 0
Global Const FG_CROIX = 1
global Const FG_TRAIT = 2
Sub DeplaceRayonCercle(x0, y0, rayon, Angle,xx,yy)
oDeplaceRayonForm=LoadDialog("OOoGdmath","DeplaceRayonForm")
oDeplaceRayonForm.Model.Label1.Label = x0
oDeplaceRayonForm.Model.Label2.Label = y0
oDeplaceRayonForm.Model.Label3.Label = rayon
oDeplaceRayonForm.Model.Label5.Label = "x"
oDeplaceRayonForm.Model.Label6.Label = "x"
DeplaceRayonForm.Main
xx = CSng(oDeplaceRayonForm.Model.Label5.Label)
yy = CSng(oDeplaceRayonForm.Model.Label6.Label)
End Sub
Sub DeplaceTangenteCercle(x0, y0, rayon, Angle,xx,yy,xx1,yy1)
oDeplaceTangenteForm=LoadDialog("OOoGdmath","DeplaceTangenteForm")
oDeplaceTangenteForm.Model.Label1.Label = x0
oDeplaceTangenteForm.Model.Label2.Label = y0
oDeplaceTangenteForm.Model.Label3.Label = rayon
oDeplaceTangenteForm.Model.Label5.Label = "x"
oDeplaceTangenteForm.Model.Label6.Label = "x"
DeplaceTangenteForm.TraceTangente
oDeplaceTangenteForm.Execute()
xx = CSng(oDeplaceTangenteForm.Model.Label5.Label)
yy = CSng(oDeplaceTangenteForm.Model.Label6.Label)
xx1 = CSng(oDeplaceTangenteForm.Model.Label7.Label)
yy1 = CSng(oDeplaceTangenteForm.Model.Label8.Label)
End Sub
Sub DeplaceDiametreCercle(x0, y0, rayon, Angle,xx,yy)
oDeplaceDiametreForm=LoadDialog("OOoGdmath","DeplaceDiametreForm")
oDeplaceDiametreForm.Model.Label1.Label = x0
oDeplaceDiametreForm.Model.Label2.Label = y0
oDeplaceDiametreForm.Model.Label3.Label = rayon
oDeplaceDiametreForm.Model.Label5.Label = "x"
oDeplaceDiametreForm.Model.Label6.Label = "x"
DeplaceDiametreForm.TraceDiametre
oDeplaceDiametreForm.Execute()
xx = CSng(oDeplaceDiametreForm.Model.Label5.Label)
yy = CSng(oDeplaceDiametreForm.Model.Label6.Label)
End Sub
Sub DeplaceCordeCercle(x0, y0, rayon, Angle,xx,yy,xx1,yy1)
Dim texte as string
oDeplaceCordeForm=LoadDialog("OOoGdmath","DeplaceCordeForm")
oDeplaceCordeForm.Model.Label1.Label = x0
oDeplaceCordeForm.Model.Label2.Label = y0
oDeplaceCordeForm.Model.Label3.Label = rayon
oDeplaceCordeForm.Model.Label5.Label = "x"
oDeplaceCordeForm.Model.Label6.Label = "x"
DeplaceCordeForm.TraceCorde
oDeplaceCordeForm.Execute()
xx = CSng(oDeplaceCordeForm.Model.Label5.Label)
yy = CSng(oDeplaceCordeForm.Model.Label6.Label)
xx1 = CSng(oDeplaceCordeForm.Model.Label7.Label)
yy1 = CSng(oDeplaceCordeForm.Model.Label8.Label)
End Sub
Sub AjoutePoint(x, y, nom, shapenom, typecroix, Optional angletrait As Double, Optional sgroup as object)
If CestUneFigureGeometrique Then
LesPoints(NbPoint).nom = nom
LesPoints(NbPoint).x = x
LesPoints(NbPoint).y = y
LesPoints(NbPoint).shapenom = shapenom
Select Case typecroix
Case FG_CROIX, True
LesPoints(NbPoint).Shape = croix(x, y, False)
shapenom.Visible = (Right(nom, 1) <> "b")
Case FG_TRAIT
InsereLigne x + 3 * Cos(angletrait), y + 200 * Sin(angletrait), x - 200 * Cos(angletrait), y - 200 * Sin(angletrait),LesPoints(NbPoint).Shape
LesPoints(NbPoint).Shape.Visible = (Right(nom, 1) <> "b")
End Select
NbPoint = NbPoint + 1
Else
Select Case typecroix
Case FG_CROIX, true
croix(x, y, sgroup)
Case FG_TRAIT
InsereLigne x + 200 * Cos(angletrait), y + 200 * Sin(angletrait), x - 200 * Cos(angletrait), y - 200 * Sin(angletrait), sgroup
End Select
End If
End Sub
</script:module>
|