This file is indexed.

/usr/lib/libreoffice/share/extensions/DmathsAddon/Dmaths/Tableau.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
<?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="Tableau" script:language="StarBasic">&apos;************************************************
&apos;Copyright (C) 2008 Didier Dorange-Pattoret
&apos;38, chemin de l&apos;Abbaye 
&apos;74940 Annecy le Vieux
&apos;France
&apos;ddorange@dmaths.com
&apos;
&apos;
&apos;This library is free software; you can redistribute it and/or
&apos;modify it under the terms of the GNU General Public Licence (GPL)
&apos;as published by the Free Software Foundation; either
&apos;version 2.1 of the License, or (at your option) any later version.

&apos;This library 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 GNU
&apos;General Public License for more details.

&apos;You should have received a copy of the GNU General Public Licence (GPL)
&apos;along with this library; if not, write to the Free Software
&apos;Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
&apos;*************************************************

Public oDialogTableau as Object

Sub LanceCreationTableau
Call VerifOperationnel
oDialogTableau = LoadDialog(&quot;Dmaths&quot;,&quot;Tableau&quot;)
oDialogTableau.Execute()
End Sub


Sub FinCreationTableau
oDialogTableau.EndExecute()
End Sub

Sub InsereTableau
rem ----------------------------------------------------------------------
rem define variables
dim document   as object
dim dispatcher as object
dim inrows, incols,iflag as integer
rem ----------------------------------------------------------------------
rem get access to the document
 oDesktop = createUnoService(&quot;com.sun.star.frame.Desktop&quot;)
 document= oDesktop.getCurrentComponent().getCurrentController()
dispatcher = createUnoService(&quot;com.sun.star.frame.DispatchHelper&quot;)
rem ----------------------------------------------------------------------
inrows = Csng(oDialogTableau.Model.TextField1.Text)
incols = Csng(oDialogTableau.Model.TextField2.Text)
If oDialogTableau.Model.CheckBox1.State = 1 and oDialogTableau.Model.CheckBox2.State = 1 Then iflag = 15
If oDialogTableau.Model.CheckBox1.State = 0 and oDialogTableau.Model.CheckBox2.State = 0 Then iflag = 8
If oDialogTableau.Model.CheckBox1.State = 1 and oDialogTableau.Model.CheckBox2.State = 0 Then iflag = 14
If oDialogTableau.Model.CheckBox1.State = 0 and oDialogTableau.Model.CheckBox2.State = 1 Then iflag = 9

dim args1(3) as new com.sun.star.beans.PropertyValue
args1(0).Name = &quot;TableName&quot;
args1(0).Value = &quot;Tableau1&quot;
args1(1).Name = &quot;Columns&quot;
args1(1).Value = incols
args1(2).Name = &quot;Rows&quot;
args1(2).Value = inrows
args1(3).Name = &quot;Flags&quot;
args1(3).Value = iflag
dispatcher.executeDispatch(document, &quot;.uno:InsertTable&quot;, &quot;&quot;, 0, args1())

If oDialogTableau.Model.CheckBox3.State = 1 or oDialogTableau.Model.CheckBox4.State = 1 Then

	rem ----------------------------------------------------------------------
	dim args2(1) as new com.sun.star.beans.PropertyValue
	args2(0).Name = &quot;Count&quot;
	args2(0).Value = inrows - 1
	args2(1).Name = &quot;Select&quot;
	args2(1).Value = true
	dispatcher.executeDispatch(document, &quot;.uno:GoDown&quot;, &quot;&quot;, 0, args2())

	rem ----------------------------------------------------------------------
	dim args3(1) as new com.sun.star.beans.PropertyValue
	args3(0).Name = &quot;Count&quot;
	args3(0).Value = incols - 1
	args3(1).Name = &quot;Select&quot;
	args3(1).Value = true
	dispatcher.executeDispatch(document, &quot;.uno:GoRight&quot;, &quot;&quot;, 0, args3())
	
	If oDialogTableau.Model.CheckBox3.State = 1 Then
		dim args4(0) as new com.sun.star.beans.PropertyValue
		args4(0).Name = &quot;CenterPara&quot;
		args4(0).Value = true
		dispatcher.executeDispatch(document, &quot;.uno:CenterPara&quot;, &quot;&quot;, 0, args4())
	Endif
	If oDialogTableau.Model.CheckBox4.State = 1 Then
		dim args5(0) as new com.sun.star.beans.PropertyValue
		args5(0).Name = &quot;CellVertCenter&quot;
		args5(0).Value = true
		dispatcher.executeDispatch(document, &quot;.uno:CellVertCenter&quot;, &quot;&quot;, 0, args5())
	Endif
	dim args6(1) as new com.sun.star.beans.PropertyValue
	args6(0).Name = &quot;Count&quot;
	args6(0).Value = incols - 1
	args6(1).Name = &quot;Select&quot;
	args6(1).Value = false
	dispatcher.executeDispatch(document, &quot;.uno:GoLeft&quot;, &quot;&quot;, 0, args6())
	dim args7(1) as new com.sun.star.beans.PropertyValue
	args7(0).Name = &quot;Count&quot;
	args7(0).Value = inrows - 1
	args7(1).Name = &quot;Select&quot;
	args7(1).Value = false
	dispatcher.executeDispatch(document, &quot;.uno:GoUp&quot;, &quot;&quot;, 0, args7())
Endif

	rem -------------------------------------------------------------------------
	rem copie les donnees du tableau dans DMoptionstableau
	Dim sSource,sNbreLignes,sNbreColonnes,sTitre,sBordure,sCentreH,sCentreV as String
	sNbreLignes = oDialogTableau.Model.TextField1.Text
	sNbreColonnes = oDialogTableau.Model.TextField2.Text
	If oDialogTableau.Model.CheckBox1.State=1 Then sTitre = &quot;TRUE&quot; Else sTitre = &quot;FALSE&quot;
	If oDialogTableau.Model.CheckBox2.State=1 Then sBordure = &quot;TRUE&quot; Else sBordure = &quot;FALSE&quot;
	If oDialogTableau.Model.CheckBox3.State=1 Then sCentreH = &quot;TRUE&quot; Else sCentreH = &quot;FALSE&quot;
	If oDialogTableau.Model.CheckBox4.State=1 Then sCentreV = &quot;TRUE&quot; Else sCentreV = &quot;FALSE&quot;
			
	sSource=&quot;Rem (C) Didier Dorange-Pattoret www.dmaths.com&quot;+Chr(13)
	sSource=sSource+&quot;Public const iNbreLignes = &quot;+sNbreLignes+Chr(13)
	sSource=sSource+&quot;Public const iNbreColonnes = &quot;+sNbreColonnes+Chr(13)
	sSource=sSource+&quot;Public const bTitre = &quot;+sTitre+Chr(13)
	sSource=sSource+&quot;Public const bBordure = &quot;+sBordure+Chr(13)
	sSource=sSource+&quot;Public const bCentreHorizontal = &quot;+sCentreH+Chr(13)
	sSource=sSource+&quot;Public const bCentreVertical = &quot;+sCentreV+Chr(13)
	sSource=sSource+&quot;Sub MyTest3&quot; &amp; Chr(13) &amp; &quot;Print &quot;&quot;Vive Dmaths !&quot;&quot;&quot; &amp; Chr(13) &amp; &quot;End Sub&quot;
	Dim oLib as Object
rem	Dim sLib as String
    Dim sMod as String
    sMod = &quot;DmOptionsTableau&quot;
    oLib = GlobalScope.BasicLibraries.Standard
    If oLib.hasByName(sMod) Then
       oLib.removeByName(sMod)
    EndIf
	oLib.InsertByName(sMod,sSource)
rem ------------------------------------------------------------------------------------------	
oDialogTableau.EndExecute()	
End Sub
</script:module>