/usr/lib/libreoffice/share/extensions/canzeley-client/Kanzleiprogramm/DBAnbindMod.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 | <?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="DBAnbindMod" script:language="StarBasic">REM ***** BASIC *****
REM ***** Canzeley *****
REM Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013 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 - DBAnbindMod ****
Option Explicit
REM ** Dieses Makro stellt die Verbindung zur Datenbank Kanzlei her **
Sub Datenbankanbindung
Dim oDatabaseContext As Object
Dim oDataSource As Object
Dim oInteractionHandler As Object
Dim sErgebnis As String
On Local Error Goto Fehler
REM * Die Variable sDataBaseName enthaelt den Namen der *
REM * registrierten Datenbankanbindung *
oDatabaseContext = createUnoService("com.sun.star.sdb.DatabaseContext")
oDataSource = oDatabaseContext.getByName(sDataBaseName)
oInteractionHandler = createUnoService("com.sun.star.sdb.InteractionHandler")
oConnection= oDataSource.ConnectWithCompletion(oInteractionHandler)
If isNull(oConnection) Then
DBAnbindMod.Abbruch
Exit Sub
End If
REM * Prüfung der Datenbankanbindung *
iAbbruchFlag = 0
SQLMod.DBAnbindModAbfrage1
While (oResultSet.next)
sErgebnis = oResultSet.getString(1)
If sErgebnis="" Then
MsgBox ("Datenbankversion konnte nicht ermittelt werden!",16,"Merkwürdig!")
If iSysDatenFrom = 1 Then
sDBVersion = "Unbekannte Version!"
Else
iAbbruchFlag = 1
Start.Ende
End If
Exit Sub
End If
Wend
sErgebnis = LTrim(sErgebnis)
sErgebnis = RTrim(sErgebnis)
If Len(sErgebnis) = 2 Then sDBVersion = "0."+Left(sErgebnis,1)+"."+Right(sErgebnis,1)
If Len(sErgebnis) = 3 Then sDBVersion = Left(sErgebnis,1)+"."+Mid(sErgebnis,2,1)+"."+Right(sErgebnis,1)
If Not CInt(sErgebnis) >= 40 Then
MsgBox("Die Datenbankversion ist inkompatibel zur Programmversion",16,"Falsche Datenbankversion!")
iPruef = 1
If iSysDatenFrom = 1 Then
sDBVersion = sDBVersion + " - inkompatibel!"
Else
iAbbruchFlag = 1
Start.Ende
End If
End If
Exit Sub
REM * Fehlerbehandlung *
Fehler:
Dim iAntwort As Integer
Dim iAntwort2 As Integer
iAbbruchFlag = 1
iAntwort = MsgBox ("Wollen Sie ein erneutes Login versuchen?",4+32,"Verbindung mit Datenbank gescheitert!")
If iAntwort = 6 Then REM Antwort: Ja
Datenbankanbindung
End If
If iAntwort = 7 Then
If iSysDatenFrom = 0 Then
iAntwort2 = MsgBox ("Wollen Sie es mit einen anderen Namen der Datenbankdatei versuchen",4+32,"Neuer Datenbankdateiname?")
If iAntwort2 = 7 Then REM Antwort: Nein
MsgBox ("Bitte Fehlerursache suchen!", 16, "Vor einem neuen Versuch:")
FSMod.Umount
Else REM Antwort: Ja
SysDatenMod1.DataBaseNameAbfragen
SysDatenMod1.ProgrammdokumentSpeichern
Datenbankanbindung
End If
End If
End If
End Sub
REM ** Dieses Makro beendet das Programm **
REM ** (wenn der Nutzer dies wirklich will ;-)) **
Sub Abbruch
Dim iAntwort As Integer
iAntwort = MsgBox ("Wollen Sie wirklich aufhören?", 4+32+256, "Nur noch eine Frage:")
If iAntwort = 7 Then
Datenbankanbindung
Else
iAbbruchFlag = 1
FSMod.Umount
End If
End Sub
</script:module>
|