This file is indexed.

/usr/lib/libreoffice/share/extensions/DmathsAddon/Dmaths/RaccAutotextes.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
<?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="RaccAutotextes" 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;************************************************
&apos;------------------------------------------------------------------------------------------------------------------

rem cette macro permet d&apos;inserer des autotextes collés


Sub SuperAutotexte rem écrit le 19 avril 2005 par Didier Dorange-Pattoret
	rem on charge le dictionnaire si besoin
	If DictionnaireCharge = False Then ChargementDuDictionnaire
	  rem Rien pour Auto5 comme &quot;foncs&quot;?
	Dim oDesktop, oDocument, oText, oVCursor, oTextActif, oCursor as Object
	Dim dispatcher, oFrame as Object
	Dim Lachaine as String
	Dim NRecul as Integer  rem on doit reculer de NRecul caractere
	oDesktop = createUnoService(&quot;com.sun.star.frame.Desktop&quot;)
	oDocument= oDesktop.getCurrentComponent()
	oText = oDocument.Text
	oVCursor = oDocument.currentcontroller.getViewCursor()
	oTextActif = oVCursor.Text &apos; la zone de texte actif page ou cellule ....
	oCursor = oTextActif.createTextCursorByRange(oVCursor)
	oFrame = oDocument.CurrentController.Frame
	dispatcher = createUnoService(&quot;com.sun.star.frame.DispatchHelper&quot;)
	
	If oVCursor.IsCollapsed Then
	For I =1 To 4
	If Not oCursor.IsStartOfParagraph Then oCursor.Goleft(1,True)
	Next I
	Lachaine = oCursor.String
	Else
	LaChaine = oVCursor.String
	oCursor.Goleft(Len(LaChaine),True)
	Endif
	
	rem initialisation de NRecul
	NRecul = 0


	If Len(Lachaine)=1 Then lachaine = &quot;   &quot;+Lachaine
	If Len(Lachaine)=2 Then Lachaine = &quot;  &quot;+Lachaine
	If Len(Lachaine)=3 Then Lachaine = &quot; &quot;+Lachaine
	
					
		For I = 1 To Len(Auto(iLang,4))/4 
			If Mid(Lachaine,1,4)=Mid(Auto(iLang,4),4*I-3,4) Then
				If oVCursor.IsCollapsed then oVCursor.Goleft(4,True)		
				Goto Glossaire
			Endif
		Next I
		For I = 1 To Len(Auto(iLang,3))/3 
			If Mid(Lachaine,2,3)=Mid(Auto(iLang,3),3*I-2,3) Then
				If oVCursor.IsCollapsed then oVCursor.Goleft(3,True)	
				Goto Glossaire
			Endif
		Next I
		For I = 1 To Len(AutoFormule(iLang,3))/3 
			If Mid(Lachaine,2,3)=Mid(AutoFormule(iLang,3),3*I-2,3) Then
				If oVCursor.IsCollapsed then oVCursor.Goleft(3,True)
				EcritLaFormuleAutotexte(Mid(Lachaine,2,3),oVCursor)
				Exit Sub
			Endif
		Next I
		For I = 1 To Len(Auto(iLang,2))/2 
			If Mid(Lachaine,3,2)=Mid(Auto(iLang,2),2*I-1,2) Then
				If oVCursor.IsCollapsed then oVCursor.Goleft(2,True)
				If Mid(Lachaine,3,2) = &quot;ni&quot; then NRecul = 1 rem permet de reculer de 2 caracteres	
				If Mid(Lachaine,3,2) = &quot;ba&quot; then NRecul = 1	
				Goto Glossaire
			Endif
		Next I
		For I = 1 To Len(AutoFormule(iLang,2))/2 
			If Mid(Lachaine,3,2)=Mid(AutoFormule(iLang,2),2*I-1,2) Then
				If oVCursor.IsCollapsed then oVCursor.Goleft(2,True)	
				EcritLaFormuleAutotexte(Mid(Lachaine,3,2),oVCursor)			
				Exit Sub
			Endif
		Next I
		For I = 1 To Len(Auto(iLang,1)) 
			If Mid(Lachaine,4,1)=Mid(Auto(iLang,1),I,1) Then
				If oVCursor.IsCollapsed then oVCursor.Goleft(1,True)
				rem correction du bug sur d
				If oVCursor.String()=&quot;d&quot; Then oVCursor.String()=&quot;deci&quot;
				If oVCursor.String()=&quot;c&quot; Then oVCursor.String()=&quot;cp&quot;
				If Mid(Lachaine,4,1) = &quot;i&quot; Then NRecul = 1 rem permet de reculer de 1 caractere	
				Goto Glossaire				
			Endif
		Next I
		
		Glossaire:
			
		If (Lachaine = &quot; oij&quot; or Lachaine = &quot;oijk&quot; or Lachaine = &quot; ouv&quot;) Then
			If Lachaine = &quot; oij&quot; Then InsereRepereOij
			If Lachaine = &quot;oijk&quot; Then InsereRepereOijk
			If Lachaine = &quot; ouv&quot; Then RepereGraphique
		Else
			dim Array(0) as new com.sun.star.beans.PropertyValue 
			dispatcher.executeDispatch(oFrame, &quot;.uno:ExpandGlossary&quot;, &quot;&quot;, 0, Array())
			If NRecul &gt; 0 Then  recul (NRecul) rem recule de NRecul caracteres
			rem dispatcher.executeDispatch(oFrame, &quot;.uno:ResetAttributes&quot;, &quot;&quot;, 0, Array())
			rem    ligne précédente en commentaire pour éviter le formattage du paragraphe
			rem    dans le style par défaut, dont l&apos;alignement...
		Endif
		
End sub


Sub EcritLaFormuleAutotexte(Raccourci as String, oVCursor as Object )
	Dim LeCodeSource as String
	Dim  iTailleDElaFormule as Integer
	Select Case Raccourci
		Case &quot;cb&quot;		
		LeCodeSource = &quot;left( matrix{ n##p } right) = {n nitalic !}over {p nitalic !(n-p) nitalic !}&quot;
		Case &quot;arr&quot;		
		LeCodeSource = &quot;{A_n^p} = {n nitalic !}over {(n-p) nitalic !}&quot;
		Case &quot;fcf&quot;
		LeCodeSource = &quot;[a_{1},a_{2}, dotslow , a_{n}] = size 12{1 over {a_{1}+ 1 over {a_{2}+1 over { {dotsaxis + 1 over {a_{n}}}} }}}&quot;
		Case &quot;fci&quot;
		LeCodeSource = &quot;[a_{1},a_{2}, a_{3},dotslow] = size 12{1 over {a_{1}+ 1 over {a_{2}+1 over {  {a_{3}+{1 over {~ dotsdown}}}}} }}&quot;
		Case &quot;ic&quot;
		LeCodeSource = &quot;int from{%GAMMA} nitalic P dx + nitalic Q dy + nitalic R dz&quot;
		Case &quot;id&quot;
		LeCodeSource = &quot;iint from{%DELTA} f(x,y)dx dy&quot;
		Case &quot;it&quot;
		LeCodeSource = &quot;iiint from{%SIGMA} f(x,y,z) dx dy dz&quot;
		Case &quot;pc&quot;
		LeCodeSource = &quot;P(A`/B)= {P(A intersection B)} over {P(B)}&quot;		 
	End Select

		oVCursor.String = LeCodeSource
		IsFormuleItalic = bItalic
		If bManuelFormula = FALSE  Then InsereObjetFormule
End Sub
</script:module>