This file is indexed.

/usr/lib/libreoffice/share/extensions/DmathsAddon/OOoGdmath/Iep.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
<?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="Iep" script:language="StarBasic">&apos;OOoGdmath 0.01
&apos;Copyright (C) 2005  Gilles Daurat

&apos;This program is free software; you can redistribute it and/or
&apos;modify it under the terms of the GNU General Public License
&apos;as published by the Free Software Foundation; either version 2
&apos;of the License, or (at your option) any later version.

&apos;This program is distributed in the hope that it will be useful,
&apos;but WITHOUT ANY WARRANTY; without even the implied warranty of
&apos;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
&apos;GNU General Public License for more details.

&apos;You should have received a copy of the GNU General Public License
&apos;along with this program; if not, write to the Free Software
&apos;Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

Option Explicit

Public Const nomFichier=&quot;C:\crayon.xml&quot;

Sub Main
dim ligne() as string
dim i as integer
dim param() as string
dim sGroupe as Object
dim x0 as long, y0 as long, x1 as long, y1 as long
dim unTrait as Object
dim unPolygone as Object
dim ang as double

	ExtraitLigne(ligne)
	sGroupe=InitialiseGroupe()
	InitialiseDessin()
	for i=LBound(ligne) to UBound(ligne) 
		select case Variable(ligne(i),&quot;objet&quot;)
		case &quot;crayon&quot;
			if Variable(Ligne(i),&quot;mouvement&quot;)=&quot;translation&quot; then
				x0=val(Variable(Ligne(i),&quot;var1&quot;))*1000/30
				y0=val(Variable(Ligne(i),&quot;var2&quot;))*1000/30
			else
				x1=val(Variable(Ligne(i),&quot;var1&quot;))*1000/30
				y1=val(Variable(Ligne(i),&quot;var2&quot;))*1000/30
				unTrait=InsereLigne(x0,y0,x1,y1,sGroupe)
				if Variable(ligne(i),&quot;couleur&quot;)&lt;&gt;&quot;&quot; then unTrait.LineColor=val(Variable(ligne(i),&quot;couleur&quot;))			
				if Variable(ligne(i),&quot;style&quot;)=&quot;vecteur&quot; then 
					ang=CalculeAngle(x0,y0,x1,y1)
					Dim secArray(0 to 2, 0 to 1) as single
					secArray(0,0)=x1
					secArray(0,1)=y1
					secArray(1,0)=x1+300*cos(ang+5*Pi/6)
					secArray(1,1)=y1+300*sin(ang+5*Pi/6)
					secArray(2,0)=x1+300*cos(ang-5*Pi/6)
					secArray(2,1)=y1+300*sin(ang-5*Pi/6)
					unPolygone=InserePolygoneB(secArray(),3,sGroupe)
					if Variable(ligne(i),&quot;couleur&quot;)&lt;&gt;&quot;&quot; then
						unPolygone.LineColor=val(Variable(ligne(i),&quot;couleur&quot;))
						unPolygone.FillStyle= com.sun.star.drawing.FillStyle.SOLID
						unPolygone.FillColor=val(Variable(ligne(i),&quot;couleur&quot;))
					else
						unPolygone.FillStyle= com.sun.star.drawing.FillStyle.SOLID
					end if
				end if
				if Variable(ligne(i),&quot;epaisseur&quot;)&lt;&gt;&quot;&quot; then unTrait.LineWidth=val(Variable(ligne(i),&quot;epaisseur&quot;))*1000/30
				if Variable(ligne(i),&quot;pointille&quot;)=&quot;tiret&quot; then
					unTrait.LineStyle = com.sun.star.drawing.LineStyle.DASH
					unTrait.LineDash = MakeLineDash( com.sun.star.drawing.DashStyle.ROUND, 3, 200, 4, 400, 300 )
				else
					unTrait.LineStyle = com.sun.star.drawing.LineStyle.SOLID
				end if
				x0=x1
				y0=y1
			end if
		end select
	next i		
	GroupeObjet(sGroupe)
	TermineDessin()
End Sub

Function LigneOk(uneLigne as string) as Boolean
	LigneOk=False
	if instr(1, uneLigne, &quot;crayon&quot;)&lt;&gt;0 then
		LigneOk=True
	end if 
End Function

Function Variable(uneLigne as string, etiquette as string) as string
dim a as integer
dim b as integer
dim c as integer

	Variable=&quot;&quot;
	a=instr(1,uneLigne, etiquette)
	if a&lt;&gt;0 then
		b=instr(a,uneLigne,&quot;&quot;&quot;&quot;)
		c=instr(b+1,uneLigne,&quot;&quot;&quot;&quot;)
		Variable=mid(uneLigne,b+1,c-b-1)
	end if
end function

Sub ExtraitLigne(ligne() as string)
dim f1 as integer
dim i as integer
dim uneLigne as string
	
	f1=freefile
	i=0
	Open NomFichier For Input as #f1
	do while not eof(f1)
		line input #f1, uneLigne
		if ligneok(uneLigne) then i=i+1
	loop
	close #f1
	redim ligne(0 to i-1) as String

	f1=freefile
	i=0
	Open NomFichier For Input as #f1
	do while not eof(f1)
		line input #f1, uneLigne
		if LigneOk(uneLigne) then
			Ligne(i)=uneLigne
			i=i+1
		end if
	loop
	close #f1
end Sub
 

</script:module>