This file is indexed.

/usr/lib/libreoffice/share/extensions/DmathsAddon/OOoGdmath/ChangerTexteCode.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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
<?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="ChangerTexteCode" script:language="StarBasic">&apos;OOoGdmath
&apos;Copyright (C) 2005-2009  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
dim oChangeTexteForm as Object
dim unGroupe as Object
dim texteCourant as Object
dim indice() as String

Sub Main
Dim Param() as string

	oChangeTexteForm=LoadDialog(&quot;OOoGdmath&quot;, &quot;ChangerTexteForm&quot;)
	ChangeTitreDialog(oChangeTexteForm)

	&apos;on charge les polices
	ChargeNomPolice(param())
	oChangeTexteForm.GetControl(&quot;ComboBox2&quot;).Model.StringItemList=param()
	SetListIndex(oChangeTexteForm, &quot;ComboBox2&quot;, 0)
	
	&apos;on charge les formes
	if (ChargeTexteForme(param()) = 1 ) Then
		oChangeTexteForm.GetControl(&quot;ComboBox1&quot;).Model.StringItemList=param()
		oChangeTexteForm.GetControl(&quot;ComboBox3&quot;).Model.StringItemList=indice()
		SetListIndex(oChangeTexteForm, &quot;ComboBox1&quot;, 0)
		SetListIndex(oChangeTexteForm, &quot;ComboBox3&quot;, 0)
	
		oChangeTexteForm.Execute()
	Else
		oChangeTexteForm.EndExecute()
	End if
End Sub


Function ChargeTexteForme(param() as string) as integer
Dim uneForme as Object
Dim i,j
dim fparam() as string
dim iparam() as string
Dim unDocument as Object

	on error goto erreur
&apos; Cette macro met à 0 l&apos;angle de rotation de tous les textes de la sélection
	unDocument=thisComponent
	unGroupe=unDocument.CurrentSelection(0)
	if unGroupe.ShapeType = &quot;com.sun.star.drawing.GroupShape&quot; Then
		redim fparam(0 to unGroupe.Count-1)
		redim iparam(0 to unGroupe.Count-1)
		j=0
		for i=0 to unGroupe.Count-1
			uneForme = unGroupe(i)
			if uneForme.ShapeType=&quot;com.sun.star.drawing.TextShape&quot; then
				uneForme.RotateAngle=0
				if uneForme.String&lt;&gt;&quot; &quot; then 
					fparam(j)=uneForme.String
					iparam(j)=i
					j=j+1
				end if
			end if	
		next i
		redim param(0 to j-1)
		redim indice(0 to j-1)
		for i=0 to j-1
			param(i)=fparam(i)
			indice(i)=iparam(i)
		next i
	Endif
	ChargeTexteForme = 1
	exit function
erreur:
	ChargeTexteForme = 0
	MsgBoxP &quot;message4&quot;
End Function

Private Sub ChangeTexteForm_DeplaceObjet(Evenement as Objet)
Dim aPoint As New com.sun.star.awt.Point

	aPoint = unGroupe(val(indice(GetListIndex(oChangeTexteForm, &quot;ComboBox1&quot;)))).Position
	Select Case Evenement.Source.Model.Name
	case &quot;CommandButton2&quot;
		aPoint.x = aPoint.x - 100
	case &quot;CommandButton3&quot;
		aPoint.y = aPoint.y - 100
	case &quot;CommandButton4&quot;
		aPoint.x = aPoint.x + 100
	case &quot;CommandButton5&quot;
		aPoint.y = aPoint.y + 100
	case &quot;CommandButton6&quot;
		aPoint.x = aPoint.x - 300
	case &quot;CommandButton7&quot;
		aPoint.y = aPoint.y - 300
	case &quot;CommandButton8&quot;
		aPoint.x = aPoint.x + 300
	case &quot;CommandButton9&quot;
		aPoint.y = aPoint.y + 300
	End Select
	unGroupe(val(indice(GetListIndex(oChangeTexteForm, &quot;ComboBox1&quot;)))).Position = aPoint
End Sub

Private Sub ChargeTexteForm_CommandButton1()
	oChangeTexteForm.EndExecute()
End Sub

Private Sub ChargeTexteForm_CommandButton2()
Dim unCurseur as Object
Dim i,j
	on error resume next
	if oChangeTexteForm.Model.CheckBox4.State&lt;&gt;1 then
		unCurseur=unGroupe(val(indice(GetListIndex(oChangeTexteForm, &quot;ComboBox1&quot;)))).Text.createTextCursor
		unCurseur.GotoStart(false)
		unCurseur.GotoEnd(true)
		unCurseur.CharHeight=val(oChangeTexteForm.Model.TextBox1.Text)
		if oChangeTexteForm.Model.CheckBox3.State then
			unCurseur.CharUnderLine=com.sun.star.awt.FontUnderline.SINGLE
		else
			unCurseur.CharUnderLine=com.sun.star.awt.FontUnderline.NONE
		end if
		if oChangeTexteForm.Model.CheckBox2.State then
			unCurseur.CharPosture=com.sun.star.awt.FontSlant.ITALIC
		else
			unCurseur.CharPosture=com.sun.star.awt.FontSlant.NONE
		end if
		if oChangeTexteForm.Model.CheckBox1.State then
			unCurseur.CharWeight=com.sun.star.awt.FontWeight.BOLD
		else
			unCurseur.CharWeight=com.sun.star.awt.FontWeight.NORMAL
		End if
		unCurseur.CharFontName=oChangeTexteForm.Model.ComboBox2.Text
	else
		for i=lbound(indice()) to ubound(indice())
			j=indice(i)
			unCurseur=unGroupe(val(j)).Text.createTextCursor
			unCurseur.GotoStart(false)
			unCurseur.GotoEnd(true)
			unCurseur.CharHeight=val(oChangeTexteForm.Model.TextBox1.Text)
			if oChangeTexteForm.Model.CheckBox3.State then
				unCurseur.CharUnderLine=com.sun.star.awt.FontUnderline.SINGLE
			else
				unCurseur.CharUnderLine=com.sun.star.awt.FontUnderline.NONE
			end if
			if oChangeTexteForm.Model.CheckBox2.State then
				unCurseur.CharPosture=com.sun.star.awt.FontSlant.ITALIC
			else
				unCurseur.CharPosture=com.sun.star.awt.FontSlant.NONE
			end if
			if oChangeTexteForm.Model.CheckBox1.State then
				unCurseur.CharWeight=com.sun.star.awt.FontWeight.BOLD
			else
				unCurseur.CharWeight=com.sun.star.awt.FontWeight.NORMAL
			End if
			unCurseur.CharFontName=oChangeTexteForm.Model.ComboBox2.Text
		next i
	end if
	with com.sun.star.awt.InvalidateStyle
		  ThisComponent.CurrentController.Frame.ComponentWindow.Invalidate(.CHILDREN+.UPDATE+.NOCLIPCHILDREN)
	end with 
End Sub

Private Sub ChargeTexteForm_CheckBox1()
	ChargeTexteForm_MiseAJourExemple
End Sub

Private Sub ChargeTexteForm_CheckBox2()
	ChargeTexteForm_MiseAJourExemple
End Sub

Private Sub ChargeTexteForm_CheckBox3()
	ChargeTexteForm_MiseAJourExemple
End Sub

Private Sub ChargeTexteForm_Scroll1()
	if oChangeTexteForm.Model.ScrollBar1.ScrollValue&lt;&gt;val(oChangeTexteForm.Model.TextBox1.Text) then
		oChangeTexteForm.Model.TextBox1.Text=oChangeTexteForm.Model.ScrollBar1.ScrollValue
		ChargeTexteForm_MiseAJourExemple
	end if
End Sub

Private Sub ChargeTexteForm_ComboBox1()
dim unCurseur

	unCurseur=unGroupe(val(indice(GetListIndex(oChangeTexteForm, &quot;ComboBox1&quot;)))).Text.createTextCursor
	unCurseur.GotoStart(false)
	unCurseur.GotoEnd(true)
	oChangeTexteForm.Model.CheckBox1.State=(unCurseur.CharWeight=com.sun.star.awt.FontWeight.BOLD)
	oChangeTexteForm.Model.CheckBox2.State=(unCurseur.CharPosture=com.sun.star.awt.FontSlant.ITALIC)
	oChangeTexteForm.Model.CheckBox3.State=(unCurseur.CharUnderline=com.sun.star.awt.FontUnderline.SINGLE)
	oChangeTexteForm.Model.TextBox1.Text=unCurseur.CharHeight
	oChangeTexteForm.Model.ScrollBar1.ScrollValue=unCurseur.CharHeight
	oChangeTexteForm.Model.ComboBox2.Text=unCurseur.CharFontName
	ChargeTexteForm_MiseAJourExemple
End Sub

Private Sub ChargeTexteForm_ComboBox2()
	ChargeTexteForm_MiseAJourExemple
End Sub

Private Sub ChargeTexteForm_TextBox1()
	if oChangeTexteForm.Model.ScrollBar1.ScrollValue&lt;&gt;val(oChangeTexteForm.Model.TextBox1.Text) then
		oChangeTexteForm.Model.ScrollBar1.ScrollValue = oChangeTexteForm.Model.TextBox1.Text
		ChargeTexteForm_MiseAJourExemple
	End if
End Sub

Private Sub ChargeTexteForm_MiseAJourExemple()
	oChangeTexteForm.Model.Label1.FontHeight=val(oChangeTexteForm.Model.TextBox1.Text)
	if oChangeTexteForm.Model.CheckBox3.State then
		oChangeTexteForm.Model.Label1.FontUnderLine=com.sun.star.awt.FontUnderline.SINGLE
	else
		oChangeTexteForm.Model.Label1.FontUnderLine=com.sun.star.awt.FontUnderline.NONE
	end if
	if oChangeTexteForm.Model.CheckBox2.State then
		oChangeTexteForm.Model.Label1.FontSlant=com.sun.star.awt.FontSlant.ITALIC
	else
		oChangeTexteForm.Model.Label1.FontSlant=com.sun.star.awt.FontSlant.NONE
	end if
	if oChangeTexteForm.Model.CheckBox1.State then
		oChangeTexteForm.Model.Label1.FontWeight=com.sun.star.awt.FontWeight.BOLD
	else
		oChangeTexteForm.Model.Label1.FontWeight=com.sun.star.awt.FontWeight.NORMAL
	End if
	oChangeTexteForm.Model.Label1.FontName=oChangeTexteForm.Model.ComboBox2.Text
	ChargeTexteForm_CommandButton2
End Sub

</script:module>