/usr/lib/libreoffice/share/extensions/DmathsAddon/OOoGdmath/AngleDDForm.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 | <?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="AngleDDForm" 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 oAngleDDForm as Object
Sub Main
REM '' and AfficheAngleDDForm() by Gisbert
'' oAngleDDForm = LoadDialog("OOoGdmath","AngleDDForm")
'' ChangeTitreDialog(oAngleDDForm)
' ChargeCouleurDefaut oAngleDDForm.Model.ImageControl1
' RestaureForm(oAngleDDForm)
'' oAngleDDForm.Execute()
AfficheAngleDDForm()
End Sub
Sub AfficheAngleDDForm()
oAngleDDForm = LoadDialog("OOoGdmath","AngleDDForm")
ChangeTitreDialog(oAngleDDForm)
oAngleDDForm.Model.Image1.ImageURL=fCheminImages & "angle.gif"
'' RestaureForm(oAngleDDForm)
oAngleDDForm.Execute()
End Sub
Private Sub AngleDDForm_CheckBox1_Click()
oAngleDDForm.Model.TextField3.Enabled = oAngleDDForm.Model.CheckBox1.State
End Sub
Private Sub AngleDDForm_CommandButton1_Click()
Dim secArray(0 to 2, 0 to 1) As Single
Dim posx, posy, tt, Debut, delta, x0, y0, x1, y1, x2, y2, xn, yn
Dim UneCourbe
Dim Shapes as Object
Dim LaBissectrice as Object
oAngleDDForm.EndExecute()
sauveForm(oAngleDDForm)
InitialiseDessin(False)
Shapes=InitialiseGroupe()
PointInsertion posx, posy
tt = oAngleDDForm.Model.TextField1.Text
RemplaceVirgulePoint tt
Debut = Val(tt)
tt = oAngleDDForm.Model.TextField2.Text
RemplaceVirgulePoint tt
delta = Abs(Val(tt))
x0 = posx
y0 = posy
x1 = x0 + 5000 * Cos(Debut * Pi / 180)
y1 = y0 - 5000 * Sin(Debut * Pi / 180)
x2 = x0 + 5000 * Cos((Debut + delta) * Pi / 180)
y2 = y0 - 5000 * Sin((Debut + delta) * Pi / 180)
secArray(0, 0) = x1
secArray(0, 1) = y1
secArray(1, 0) = x0
secArray(1, 1) = y0
secArray(2, 0) = x2
secArray(2, 1) = y2
InserePolygone secArray(), 3, Shapes, oAngleDDForm.Model.ImageControl2
If oAngleDDForm.Model.CheckBox2.State Then
if delta = 90 then
MarqueAngleDroit x0, y0, x2, y2, Shapes, oAngleDDForm.Model.ImageControl2
Else
MarqueAngle x1, y1, x0, y0, x2, y2, (delta > 180), 1, 0, Shapes, oAngleDDForm.Model.ImageControl2
End If
End If
If oAngleDDForm.Model.CheckBox3.State Then
NormaliseCoordonnees( xn, yn, x1, y1, x0, y0, x2, y2, -600)
InsereTexte Str(delta) & "°", xn, yn, Shapes, 0, 0, 0
End if
If oAngleDDForm.Model.CheckBox1.State Then
If Len(oAngleDDForm.Model.TextField3.Text) = 3 Then
InsereTexte Mid$(oAngleDDForm.Model.TextField3.Text, 1, 1), x1 + 500 * Sin(Debut * Pi / 180), y1 + 500 * Cos(Debut * Pi / 180), Shapes, 0, 0, 0
NormaliseCoordonnees( xn, yn, x1, y1, x0, y0, x2, y2)
InsereTexte Mid$(oAngleDDForm.Model.TextField3.Text, 2, 1), xn, yn, Shapes, 0, 0, 0
InsereTexte Mid$(oAngleDDForm.Model.TextField3.Text, 3, 1), x2 - 500 * Sin((Debut + delta) * Pi / 180), y2 - 500 * Cos((Debut + delta) * Pi / 180), Shapes, 0, 0 ,0
end if
InsereTexte "ang(" & oAngleDDForm.Model.TextField3.Text & ")" , x0 + 1000 * Sin((Debut + delta / 2) * Pi / 180), y0 - 1000 * Cos((Debut + delta / 2) * Pi / 180), Shapes, 0, 0, 0, True
End If
If oAngleDDForm.Model.CheckBox4.State Then
LaBissectrice=TraceBissectrice(x1, y1, x0, y0, x2, y2, Shapes)
IOAttribut LaBissectrice, oAngleDDForm.Model.ImageControl1
End If
GroupeObjet(Shapes)
TermineDessin()
End Sub
Private Sub AngleDDForm_CommandButton2_Click()
oAngleDDForm.EndExecute()
End Sub
Private Sub AngleDDForm_Image1_Click()
ChangeCouleur oAngleDDForm.Model.ImageControl1
End Sub
Private Sub AngleDDForm_Image2_Click()
ChangeCouleur oAngleDDForm.Model.ImageControl2
End Sub
</script:module>
|