/usr/lib/libreoffice/share/extensions/DmathsAddon/OOoGdmath/AdditionCodeB.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 | <?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="AdditionCodeB" script:language="StarBasic">'OOoGdmath
'Copyright (C) 2005-2009 Gilles Daurat
'This program is free software; you can redistribute it and/or
'modify it under the terms of the GNU General Public License
'as published by the Free Software Foundation; either version 2
'of the License, or (at your option) any later version.
'This program is distributed in the hope that it will be useful,
'but WITHOUT ANY WARRANTY; without even the implied warranty of
'MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
'GNU General Public License for more details.
'You should have received a copy of the GNU General Public License
'along with this program; if not, write to the Free Software
'Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Option Explicit
Sub Main
Dim unTableau
dim l,h
InitialiseDessin(False)
DimensionTexte("8", 12,l ,h)
unTableau=InsereTableau(l,10,8)
AfficheTexteTableau(unTableau,1,1,"1")
AfficheTexteTableau(unTableau,3,2,"2")
End Sub
Function InsereTableau(x,l,h) as Object
Dim monCurseur
dim monTableau as Object
Dim i,j
Dim unBord as New com.sun.star.table.BorderLine
Dim uneCellule as Object
unBord.OuterLineWidth=0
monCurseur=oDocumentTexte.Text.CreateTextCursor
monTableau=oDocumentTexte.CreateInstance("com.sun.star.text.TextTable")
monTableau.initialize(h,l)
monTableau.HoriOrient=com.sun.star.text.HoriOrientation.LEFT
monTableau.IsWidthRelative=False
monTableau.Width=x*l*8000/14110
oDocumentTexte.Text.insertTextContent(monCurseur, monTableau, false)
for i=0 to l-1
for j=0 to h-1
uneCellule=monTableau.getCellByPosition(i,j)
uneCellule.LeftBorder=unBord
uneCellule.TopBorder=unBord
uneCellule.BottomBorder=unBord
uneCellule.RightBorder=unBord
monCurseur=uneCellule.createTextCursor
monCurseur.ParaAdjust=com.sun.star.style.ParagraphAdjust.CENTER
next j
next i
InsereTableau()=monTableau
End Function
Sub AfficheTexteTableau(unTableau,x,y,texte)
Dim uneCellule as Object
Dim unCurseur as Object
uneCellule=unTableau.getCellByPosition(x,y)
uneCellule.String = texte
End Sub
</script:module>
|