/usr/lib/libreoffice/share/extensions/canzeley-client/Kanzleiprogramm/FoBerMod1.xba is in libreoffice-canzeley-client 0.5.0-2.
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 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 | <?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="FoBerMod1" script:language="StarBasic">REM ***** BASIC *****
REM ***** Canzeley *****
REM Copyright (C) 2008, 2009 Dr. Michael Stehmann
REM info@rechtsanwalt-stehmann.de
REM This program is free software: you can redistribute it and/or modify it
REM under the terms of the GNU General Public License as published by the
REM Free Software Foundation, either version 3 of the License, or any later version.
REM This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
REM without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
REM See the GNU General Public License for more details.
REM You should have received a copy of the GNU General Public License along with this program.
REM If not, see <http://www.gnu.org/licenses/>.
REM *** Version 0.5.0 ***
REM **** Kanzleiprogramm - FoBerMod1****
Option Explicit
Private sZusatz As String
Private sPfadUndDatei As String
Private iFoBerFrom As Integer
Private iPruef As Integer
Sub ForderungsberechnungMit
Dim iNoAuswahl As Integer
iFoBerFrom = 1 : iNoAuswahl = 0
AktenAnsMod1.GerichtAuswahlPruefen(iNoAuswahl)
If iNoAuswahl = 1 Then Exit Sub
AktenAnsMod1.GerichtStringBilden
AktenAnsMod1.GeschaeftszeichenUndRubrumErmitteln
Forderungsberechnung
End Sub
Sub ForderungsberechnungOhne
iFoBerFrom = 0
Forderungsberechnung
End Sub
Sub Forderungsberechnung
iPruef = 0
DocPfadFoBer
FilenameFoBerBilden
If iPruef = 1 Then Exit Sub
VorlageFoBerLaden
If iPruef = 1 Then Exit Sub
DatenEinfuegen
FoBerDokumentSpeichern
End Sub
REM ** Pfad zur Vorlage und Url bilden, Vorlage laden **
Sub VorlageFoBerLaden
Dim aArgs(0) As New com.sun.star.beans.PropertyValue
FSMod.Vorlagenpfad
sUrl = ConvertToURL(sVorlagenPfad+"Sonstiges/Forderungsberechnung367.ots")
If FileExists(sUrl) Then
aArgs(0).Name = "MacroExecutionMode"
aArgs(0).Value = com.sun.star.document.MacroExecMode.ALWAYS_EXECUTE_NO_WARN
oDoc = StarDesktop.loadComponentFromURL(sUrl, "_blank", 0, aArgs())
Else
iPruef = 1
MsgBox ("Vorlage Forderungsberechnung367.ots existiert nicht!", 16, "Leider:")
End If
End Sub
Sub DatenEinfuegen
Dim oSheet As Object
Dim oSheets As Object
Dim oCell As Object
Dim sTabName As String
Dim iBindestrich As Integer
Dim iSheet As Integer
REM *Druckbereichshack *
Dim oPrintRange As new com.sun.star.table.CellRangeAddress
Dim oTitleRange As new com.sun.star.table.CellRangeAddress
Dim aPrintRanges(0)
sTabName = sRegisterNr
iBindestrich = InStr(sTabName, "-")
Mid(sTabName, iBindestrich, 1, "_")
oSheets = oDoc.getSheets()
REM * Tabellenblatt loeschen *
oSheets.removeByName("Copyright")
REM * Tabellenblatt umbenennen *
iSheet = oSheets.getCount()
oSheets.copyByName("Forderung", sTabName, iSheet)
oSheets.removeByName("Forderung")
oSheet = oDoc.Sheets.getByName(sTabName)
REM * Druckbereichshack s. Issue 105170 *
With oPrintRange
.startColumn = 2
.endColumn = 14
.startRow = 0
.endRow = 65000
End With
aPrintRanges(0) = oPrintRange
With oTitleRange
.startRow = 8
.endRow = 9
End With
With oSheet
.setPrintAreas(aPrintRanges)
.setTitleRows(oTitleRange)
End With
REM * Ende Druckbereichshack *
If iFoBerFrom = 1 Then
REM * Gerichsdaten einfuegen *
oCell = oSheet.getCellRangebyName("D5")
oCell.String = sGericht
oCell = oSheet.getCellRangebyName("L5")
oCell.String = sGeschaeftszeichen
Else
REM * Gerichtsfelder leeren *
oCell = oSheet.getCellRangebyName("C5")
oCell.String = ""
oCell = oSheet.getCellRangebyName("G5")
oCell.String = ""
oCell = oSheet.getCellRangebyName("J5")
oCell.String = ""
End If
End Sub
Sub DocPfadFoBer
sPfadUndDatei = sVuDPfad+"Dokumente/"+sRegisterNr+"/Forderungsberechnung.ods"
End Sub
Sub FilenameFoBerBilden
Dim iAntwort As Integer
Dim iAntwortZ As Integer
Dim aArgs(0) As New com.sun.star.beans.PropertyValue
If FileExists(sPfadUndDatei) Then
iAntwort = MsgBox("Wollen Sie eine neue Forderungsberechnungsdatei anlegen?", 3+32, "Datei "+sPfadUndDatei+" existiert bereits!")
Select Case iAntwort
Case 2 REM "Abbrechen"
iPruef = 1
Case 6 REM "Ja"
iAntwortZ = MsgBox("Wollen Sie die Datei "+sPfadUndDatei+" überschreiben?", 4+32, "Noch eine Frage:")
If iAntwortZ = 7 Then NeueDatei REM "Nein"
Case 7 REM "Nein"
iPruef = 1
sPfadUndDatei = ConvertToURL(sPfadUndDatei)
aArgs(0).Name = "MacroExecutionMode"
aArgs(0).Value = com.sun.star.document.MacroExecMode.ALWAYS_EXECUTE_NO_WARN
oDoc = StarDesktop.loadComponentFromURL(sPfadUndDatei, "_blank", 0, aArgs())
End Select
End If
End Sub
Sub NeueDatei
Dim sZusatzAlt As String
Dim sZusatz As String
sZusatzAlt = sZusatz
sZusatz = InputBox("Bitte Zusatz eingeben:", "Datei "+sPfadUndDatei+" existiert bereits.")
REM * Sonderzeichen in sZusatz umwandeln *
FSMod.ZeichenUmwandlung (sZusatz)
sZusatz = sZusatzAlt+sZusatz
sPfadUndDatei = sVuDPfad+"Dokumente/"+sRegisterNr+"/Forderungsberechnung"+sZusatz+".ods"
FilenameFoBerBilden
End Sub
Sub FoBerDokumentSpeichern
Dim sUrl As String
Dim anoArgs()
Dim sChown As String
Dim sChmod As String
On Local Error Goto Fehler
REM * Wenn Automount = Ja, dann Test durchführen *
iMountTest = 0
If iOs = 4 And iAutoMount = 1 Then
FSMod.Mounttest
Else
iMountTest = 1
End If
If iMountTest = 1 Then
REM * URL bilden *
sUrl = ConvertToURL(sPfadUndDatei)
REM * Speichern *
oDoc.storeAsURL(sUrl, anoArgs())
REM * Gruppe der Datei auf "canzeley" setzen und Rechte aendern *
REM * - nur bei unixoiden Systemen *
If iOs = 4 Then
sChown = ":canzeley "+sPfadUndDatei
Shell("chown",0,sChown,True)
sChmod = "g+w,o-r "+sPfadUndDatei
Shell("chmod",0,sChmod,True)
End If
Else
MsgBox ("Datei "+sPfadUndDatei+" kann nicht gespeichert werden!",16,"Mounttest fehlgeschlagen!")
End If
Exit Sub
Fehler:
MsgBox ("Datei kann nicht gespeichert werden!",16,"Es ist ein Fehler aufgetreten:")
End Sub
</script:module>
|