This file is indexed.

/usr/lib/libreoffice/share/extensions/DmathsAddon/OOoGdmath/MultiCode.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
<?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="MultiCode" 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 oMultiForm as object

Sub Main
	oMultiForm = LoadDialog(&quot;OOoGdmath&quot;,&quot;MultiForm&quot;)
	ChangeTitreDialog(oMultiForm)
&apos;	RestaureForm(oMultiForm)
	oMultiForm.Execute()
End Sub

Private Sub MultiCode_CheckBox1_Click()
    oMultiForm.Model.TextBox4.Enabled = oMultiForm.Model.CheckBox1.State
End Sub

Private Sub MultiCode_CheckBox2_Click()
    oMultiForm.Model.TextBox3.Enabled = oMultiForm.Model.CheckBox2.State
End Sub

Private Sub MultiCode_CommandButton1_Click()
Dim MM, m
dim param() as string

    oMultiForm.EndExecute()
	sauveForm(oMultiForm)
    ChargeParametre oMultiForm.Model.TextBox1.Text,param(),&quot;*&quot;
    MM = param(0)
    RemplaceVirgulePoint MM
    m = param(1)
    RemplaceVirgulePoint m
    InsereMultiplication MM, m, MIif(oMultiForm.Model.CheckBox1.State, oMultiForm.Model.TextBox4.Text,&quot;&quot;),MIif(oMultiForm.Model.CheckBox2.State, oMultiForm.Model.TextBox3.Text,&quot;&quot;), oMultiForm.Model.CheckBox3.State
End Sub

Private Sub MultiCode_CommandButton2_Click()
    oMultiForm.EndExecute()
End Sub

Private Sub MultiCode_Image1_Click()
    ChangeCouleur oMultiForm.Model.Image1
End Sub

Private Sub MultiCode_TextBox4_Change()
    oMultiForm.Model.TextBox4.Text = Left$(oMultiForm.Model.TextBox4.Text, 1)
End Sub

Private Sub MultiCode_TextBox3_Change()
    oMultiForm.Model.TextBox3.Text = Left$(oMultiForm.Model.TextBox3.Text, 1)
End Sub

Sub InsereMultiplication(MM, m, OperationTrou,CarDecalage,Intermediaire)
Dim l,h, nchiffre1, nchiffre2, nchiffre3, piz, i, c, mp$, j, mpp$, Resultat$
Dim Shapes as Object

    InitialiseDessin(False)
    Shapes=InitialiseGroupe()
    DimensionTexte &quot;8&quot;,12,l,h
    RemplaceVirgulePoint MM
    RemplaceVirgulePoint m
    nchiffre1 = InStr(1, MM, &quot;.&quot;)
    If nchiffre1 &gt; 0 Then nchiffre1 = Len(MM) - nchiffre1
    nchiffre2 = InStr(1, m, &quot;.&quot;)
    If nchiffre2 &gt; 0 Then nchiffre2 = Len(m) - nchiffre2
    If nchiffre1 &gt; 0 Then MM = Left$(MM, Len(MM) - 1 - nchiffre1) &amp; Right$(MM, nchiffre1)
    If nchiffre2 &gt; 0 Then m = Left$(m, Len(m) - 1 - nchiffre2) &amp; Right$(m, nchiffre2)
    AfficheTexte 10, 1, MM, nchiffre1 &gt; 0, nchiffre1, Shapes,l,h
    AfficheTexte 10 - max(Len(m), Len(MM)), 2, Chr(180), False, 0, Shapes,l,h
    AfficheTexte 10, 2, m, nchiffre2 &gt; 0, nchiffre2, Shapes,l,h

	TraceLigneGroupe Shapes, &quot;s&quot;, oMultiForm.Model.Image1

    nchiffre3 = nchiffre1 + nchiffre2
    While Left$(m, 1) = &quot;0&quot;
        m = Right$(m, Len(m) - 1)
    Wend
    While Left$(MM, 1) = &quot;0&quot;
        MM = Right$(MM, Len(MM) - 1)
    Wend
    piz = 0
    For i = 1 To Len(m)
        c = Mid$(m, Len(m) + 1 - i, 1)
        mp$ = Str(Val(MM) * Val(c))
        mp$ = Right$(mp, Len(mp$) - InStr(1, mp$, &quot; &quot;))
        If mp$ = &quot;0&quot; Then
            piz = piz + 1
        Else
            If OperationTrou &lt;&gt; &quot;&quot; Then RemplaceChiffreCaractere mp$, OperationTrou
            If Len(m) = 1 Then
                AfficheTexte 11 - i, i + 2 - piz, mp$, nchiffre3 &gt; 0, nchiffre3, Shapes,l,h
            Else
            	if Intermediaire then 
            		if OperationTrou &lt;&gt; &quot;&quot; Then 
            			CarDecalage = OperationTrou
            		else
	            		CarDecalage = &quot;0&quot;
	            	End if
            	End if
                If CarDecalage &lt;&gt; &quot;&quot; Then
                    For j = 1 To i - 1
                        mp$ = mp$ &amp; CarDecalage
                    Next j
                    AfficheTexte 10, i + 2 - piz, mp$, False, 0, Shapes,l,h
                Else
                    AfficheTexte 11 - i, i + 2 - piz, mp$, False, 0, Shapes,l,h
                End If
            End If
        End If
    Next i
    If Len(m) &gt; 1 Then
        Resultat$ = Str(Val(MM) * Val(m))
        Resultat$ = Right$(Resultat$, Len(Resultat$) - 1)
        If OperationTrou &lt;&gt; &quot;&quot; Then RemplaceChiffreCaractere Resultat$, OperationTrou

		TraceLigneGroupe Shapes, &quot;s&quot;, oMultiForm.Model.Image1

        AfficheTexte 10, Len(m) + 3 - piz, Resultat$, nchiffre1 + nchiffre2 &gt; 0, nchiffre1 + nchiffre2, Shapes,l,h
    End If

    For i = 1 To Len(m)
        c = Mid$(m, Len(m) + 1 - i, 1)
        mp$ = Str(Val(MM) * Val(c))
        mp$ = Right$(mp, Len(mp$) - InStr(1, mp$, &quot; &quot;))
        If mp$ = &quot;0&quot; Then
            piz = piz + 1
        Else
            If OperationTrou &lt;&gt; &quot;&quot; Then RemplaceChiffreCaractere mp$, OperationTrou
            If Len(m) &gt; 1 Then
                If Intermediaire Then
                    mpp$ = &quot; = &quot; &amp; MM &amp; &quot; x &quot; &amp; c
                    If CarDecalage&lt;&gt;&quot;&quot; Then
                        For j = 1 To i - 1
                            mpp$ = mpp$ &amp; &quot;0&quot;
                        Next j
                    End If
                    InsereTexte mpp$, 10*l, (i + 3 - piz)*h, Shapes,0,1,-1
                End If
            End If
        End If
    Next i

	Dim aPoint As New com.sun.star.awt.Point
    Dim TheSize as new com.sun.star.awt.Size
    Dim Group as Object
    
	aPoint.x=3000
	aPoint.y=3000
	Group = GroupeObjet(Shapes)
	Group.Position=aPoint
	TermineDessin()
End Sub


</script:module>