/usr/lib/libreoffice/share/extensions/DmathsAddon/Dmaths2/AxesDialogFns.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 | <?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="AxesDialogFns" script:language="StarBasic">'************************************************
'Copyright (C) Andy Lewis. (lewiss@ntlworld.com)
'téléchargé sur www.ooomacros.org
'
'This library is free software; you can redistribute it and/or
'modify it under the terms of the GNU Lesser General Public Licence (LGPL)
'as published by the Free Software Foundation; either
'version 2.1 of the License, or (at your option) any later version.
'This library 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 Licence (GPL)
'along with this library; if not, write to the Free Software
'Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
'************************************************
'Routines required by the AxesDialog box
'This module requires modules "AxesSetup", "AxesDrawing" and "PiDialogFns"
option explicit
private goAxesDialog as object
private AxesDialogExists as boolean
sub StopButton_Click
oDesktop = createUnoService("com.sun.star.frame.Desktop")
If getguitype = 1 Then oDocumentCourant.CurrentController.Frame.ContainerWindow.Visible = True
goDoc= oDesktop.getCurrentComponent()
goDoc.CurrentController.Select(oCollectionFigures)
ClipboardCopy(goDoc)
goDoc.Dispose()
If Not IsNull(oCollectionFigures) Then
ClipboardPaste(oDocumentCourant)
ToucheEchap(oDocumentCourant)
Endif
Stop
end sub
'___________________________________________________________________________________________
sub OpenAxesDialog()
DialogLibraries.loadLibrary( "Dmaths" )
DialogLibraries.loadLibrary( "Dmaths2" )
if not AxesDialogExists then
goAxesDialog = Dmaths.LoadDialog("Dmaths2","AxesDialog")
AxesDialogExists=TRUE
end if
goAxesDialog.SetVisible(TRUE)
goAxesDialog.SetPosSize(0,2900,0,0,com.sun.star.awt.PosSize.POS)
If getguitype = 1 Then oDocumentCourant.CurrentController.Frame.ContainerWindow.Visible = False
do
loop
end sub
'___________________________________________________________________________________________
sub AxesDialog_DrawAxes_Click()
Dim Param()
AxesParametres = TRUE
GetInitialScaleValues()
GetAxesParameters(Param())
ClearDrawPage2()
DrawAxes(Param())
Call GraphDrawing.Grouper rem fait grouper les objets
end sub
'___________________________________________________________________________________________
sub AxesDialog_Close_Click()
goAxesDialog.SetVisible(FALSE)
end sub
'___________________________________________________________________________________________
sub GetInitialScaleValues()
Dim DiagramHeight as Long, DiagramWidth as Long, DiagramLeft as Long, DiagramBottom as Long
Dim ScaleLeft as Single, ScaleRight as Single, ScaleTop as Single, ScaleBottom as Single
Dim temp as string, temp2 as object
DiagramHeight=goAxesDialog.getControl("DiagramHeight").getValue()*1000
DiagramWidth=goAxesDialog.getControl("DiagramWidth").getValue()*1000
DiagramLeft=2000
DiagramBottom=DiagramHeight+2000
InitialiseDiagramArea(FALSE,DiagramHeight, DiagramWidth, DiagramLeft, DiagramBottom)
temp2=goAxesDialog.getControl("ScaleLeft")
ScaleLeft=goAxesDialog.getControl("ScaleLeft").Model.Value
ScaleRight=goAxesDialog.getControl("ScaleRight").Model.Value
ScaleTop=goAxesDialog.getControl("ScaleTop").Model.Value
ScaleBottom=goAxesDialog.getControl("ScaleBottom").Model.Value
InitialiseGraphArea(ScaleLeft, ScaleRight, ScaleBottom, ScaleTop)
DegreesFlag=goAxesDialog.getControl("Degrees").getState()
end sub
'___________________________________________________________________________________________
sub GetAxesParameters(Param())
ReDim Param(1,11)
Param(xAxis,ShowAxis)=goAxesDialog.getControl("ShowXaxis").getState()
Param(xAxis,ShowMinorGrid) = goAxesDialog.getControl("xMinorGrid").getState()
Param(xAxis,ShowMinorTicks) = goAxesDialog.getControl("xMinorTicks").getState()
Param(xAxis,ShowMajorGrid) = goAxesDialog.getControl("xMajorGrid").getState()
Param(xAxis,ShowMajorTicks) = goAxesDialog.getControl("xMajorTicks").getState()
Param(xAxis,PiScaling) = goAxesDialog.getControl("xPiScaling").getState()
Param(xAxis,MinorTickGap) = goAxesDialog.getControl("xMinorTickGap").Model.Value
Param(xAxis,MajorTickGap)= goAxesDialog.getControl("xMajorTickGap").Model.Value
Param(xAxis,ScaleGap) = goAxesDialog.getControl("xScaleGap").Model.Value
Param(xAxis,MinorTickLength) = goAxesDialog.getControl("xMinorTickLength").getValue()*100
Param(xAxis,MajorTickLength) =goAxesDialog.getControl("xMajorTickLength").getValue()*100
Param(xAxis,AxisLabel) = goAxesDialog.getControl("xAxisLabel").Peer.getText()
Param(yAxis,ShowAxis)=goAxesDialog.getControl("ShowYaxis").getState()
Param(yaxis,ShowMinorGrid) = goAxesDialog.getControl("yMinorGrid").getState()
Param(yaxis,ShowMinorTicks) = goAxesDialog.getControl("yMinorTicks").getState()
Param(yaxis,ShowMajorGrid) = goAxesDialog.getControl("yMajorGrid").getState()
Param(yaxis,ShowMajorTicks) = goAxesDialog.getControl("yMajorTicks").getState()
Param(yaxis,PiScaling) = goAxesDialog.getControl("yPiScaling").getState()
Param(yaxis,MinorTickGap) = goAxesDialog.getControl("yMinorTickGap").Model.Value
Param(yaxis,MajorTickGap)= goAxesDialog.getControl("yMajorTickGap").Model.Value
Param(yaxis,ScaleGap) = goAxesDialog.getControl("yScaleGap").Model.Value
Param(yaxis,MinorTickLength) = goAxesDialog.getControl("yMinorTickLength").getValue()*100
Param(yaxis,MajorTickLength) =goAxesDialog.getControl("yMajorTickLength").getValue()*100
Param(yaxis,AxisLabel) = goAxesDialog.getControl("yAxisLabel").Peer.getText()
end sub
'___________________________________________________________________________________________
sub SetUpDefaultTicks()
Dim TempParam(1,11), oNull as object
AxesParametres = TRUE
GetInitialScaleValues()
CalculateDefaultTicks(xAxis,TempParam())
goAxesDialog.getControl("xScaleGap").setText(CStr(TempParam(xAxis,ScaleGap)))
' goAxesDialog.getControl("xScaleGap").TextChanged(oNull)
goAxesDialog.getControl("xMajorTickGap").setText(CStr(TempParam(xAxis,MajorTickGap)))
' goAxesDialog.getControl("xMajorTickGap").TextChanged(oNull)
goAxesDialog.getControl("xMinorTickGap").setText(CStr(TempParam(xAxis,MinorTickGap)))
' goAxesDialog.getControl("xMinorTickGap").TextChanged(oNull)
CalculateDefaultTicks(yAxis,TempParam())
goAxesDialog.getControl("yScaleGap").setText(CStr(TempParam(yAxis,ScaleGap)))
' goAxesDialog.getControl("yScaleGap").TextChanged(oNull)
goAxesDialog.getControl("yMajorTickGap").setText(CStr(TempParam(yAxis,MajorTickGap)))
' goAxesDialog.getControl("yMajorTickGap").TextChanged(oNull)
goAxesDialog.getControl("yMinorTickGap").setText(CStr(TempParam(yAxis,MinorTickGap)))
' goAxesDialog.getControl("yMinorTickGap").TextChanged(oNull)
End Sub
'___________________________________________________________________________________________
sub xMinorTickGap_Click()
If goAxesDialog.getControl("xPiScaling").getState() = 1 then
goAxesDialog.getControl("xMinorTickGap").setText(CStr(getPiScaling))
end if
end sub
sub xMajorTickGap_Click()
If goAxesDialog.getControl("xPiScaling").getState() = 1 then
goAxesDialog.getControl("xMajorTickGap").setText(CStr(getPiScaling))
end if
end sub
sub xScaleGap_Click()
If goAxesDialog.getControl("xPiScaling").getState() = 1 then
goAxesDialog.getControl("xScaleGap").setText(CStr(getPiScaling))
end if
end sub
sub ScaleLeft_Click()
If goAxesDialog.getControl("xPiScaling").getState() = 1 then
goAxesDialog.getControl("ScaleLeft").setText(CStr(getPiScaling))
end if
end sub
sub ScaleRight_Click()
If goAxesDialog.getControl("xPiScaling").getState() = 1 then
goAxesDialog.getControl("ScaleRight").setText(CStr(getPiScaling))
end if
end sub
sub yMinorTickGap_Click()
If goAxesDialog.getControl("yPiScaling").getState() = 1 then
goAxesDialog.getControl("yMinorTickGap").setText(CStr(getPiScaling))
end if
end sub
sub yMajorTickGap_Click()
If goAxesDialog.getControl("yPiScaling").getState() = 1 then
goAxesDialog.getControl("yMajorTickGap").setText(CStr(getPiScaling))
end if
end sub
sub yScaleGap_Click()
If goAxesDialog.getControl("yPiScaling").getState() = 1 then
goAxesDialog.getControl("yScaleGap").setText(CStr(getPiScaling))
end if
end sub
sub ScaleTop_Click()
If goAxesDialog.getControl("yPiScaling").getState() = 1 then
goAxesDialog.getControl("ScaleTop").setText(CStr(getPiScaling))
end if
end sub
sub ScaleBottom_Click()
If goAxesDialog.getControl("yPiScaling").getState() = 1 then
goAxesDialog.getControl("ScaleBottom").setText(CStr(getPiScaling))
end if
end sub
</script:module>
|