1 'encoding UTF-8 Do not remove or change this line!
2 '**************************************************************************
3 ' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 ' Copyright 2000, 2010 Oracle and/or its affiliates.
7 ' OpenOffice.org - a multi-platform office productivity suite
9 ' This file is part of OpenOffice.org.
11 ' OpenOffice.org is free software: you can redistribute it and/or modify
12 ' it under the terms of the GNU Lesser General Public License version 3
13 ' only, as published by the Free Software Foundation.
15 ' OpenOffice.org is distributed in the hope that it will be useful,
16 ' but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ' GNU Lesser General Public License version 3 for more details
19 ' (a copy is included in the LICENSE file that accompanied this code).
21 ' You should have received a copy of the GNU Lesser General Public License
22 ' version 3 along with OpenOffice.org. If not, see
23 ' <http://www.openoffice.org/license.html>
24 ' for a copy of the LGPLv3 License.
26 '/************************************************************************
28 '* owner : thorsten.bosbach@oracle.com
30 '* short description : Tools->Options: OpenOffice.org User Data
32 '\******************************************************************************
36 Dim lsSave ( 20 ) as String
41 hToolsOptions ( "StarOffice", "UserData" )
43 printlog " - save old data"
44 lsSave ( 1 ) = Firma.GetText
45 lsSave ( 2 ) = VorName.GetText
46 lsSave ( 3 ) = ZuName.GetText
47 lsSave ( 4 ) = Kuerzel.GetText
48 lsSave ( 5 ) = Strasse.GetText
49 lsSave ( 6 ) = Land.GetText
50 lsSave ( 7 ) = Titel.GetText
51 lsSave ( 8 ) = Position.GetText
52 lsSave ( 9 ) = TelPriv.GetText
53 lsSave ( 10 ) = TelGe.GetText
54 lsSave ( 11 ) = Fax.GetText
55 lsSave ( 12 ) = EMail.GetText
58 lsSave ( 13 ) = City.GetText
59 lsSave ( 14 ) = State.GetText
60 lsSave ( 15 ) = Zip.GetText
62 lsSave ( 16 ) = PLZ.GetText
63 lsSave ( 17 ) = Ort.GetText
65 if Apartmentnummer.IsVisible then lsSave ( 18 ) = Apartmentnummer.GetText
66 if iSprache = 07 then lsSave ( 19 ) = NameDesVaters.GetText
68 printlog " - change data"
69 Firma.SetText "Company name"
70 VorName.SetText "First name"
71 ZuName.SetText "Last name"
72 Kuerzel.SetText "FnLn"
73 Strasse.SetText "Street name"
74 Land.SetText "Land name"
75 Titel.SetText "Title name"
76 Position.SetText "Position name"
77 TelPriv.SetText "TelHome number"
78 TelGe.SetText "TelWork number"
79 Fax.SetText "Fax number"
80 EMail.SetText "eMail-adress"
83 City.SetText "City name"
84 State.SetText "State name"
85 Zip.SetText "Zip code"
87 PLZ.SetText "PLZ name"
88 Ort.SetText "Ort name"
90 if Apartmentnummer.IsVisible then Apartmentnummer.SetText "Appart number"
91 if iSprache = 07 then NameDesVaters.SetText "Farthers name"
93 Kontext "ExtrasOptionenDlg"
95 if ( ExtrasOptionenDlg.notExists( 3 ) ) then
96 printlog( "Options closed" )
102 printlog " - exit/restart StarOffice"
105 printlog " - check changes"
107 hToolsOptions ( "StarOffice", "UserData" )
109 if Firma.GetText <> "Company name" then Warnlog "Company => changes not saved"
110 if VorName.GetText <> "First name" then Warnlog "First name => changes not saved"
111 if ZuName.GetText <> "Last name" then Warnlog "Last name => changes not saved"
112 if Kuerzel.GetText <> "FnLn" then Warnlog "Initials => changes not saved"
113 if Strasse.GetText <> "Street name" then Warnlog "Street => changes not saved"
114 if Land.GetText <> "Land name" then Warnlog "Land => changes not saved"
115 if Titel.GetText <> "Title name" then Warnlog "Title => changes not saved"
116 if Position.GetText <> "Position name" then Warnlog "Position => changes not saved"
117 if TelPriv.GetText <> "TelHome number" then Warnlog "Tel-home => changes not saved"
118 if TelGe.GetText <> "TelWork number" then Warnlog "tel-work => changes not saved"
119 if Fax.GetText <> "Fax number" then Warnlog "Fax => changes not saved"
120 if EMail.GetText <> "eMail-adress" then Warnlog "eMail => changes not saved"
122 if iSprache = 01 then
123 if City.GetText <> "City name" then Warnlog "City => changes not saved"
124 if State.GetText <> "State name" then Warnlog "State => changes not saved"
125 if Zip.GetText <> "Zip code" then Warnlog "Zip => changes not saved"
127 if PLZ.GetText <> "PLZ name" then Warnlog "PLZ => changes not saved"
128 if Ort.GetText <> "Ort name" then Warnlog "Ort => changes not saved"
130 if Apartmentnummer.IsVisible then
131 if Apartmentnummer.GetText <> "Appart number" then Warnlog "Appartment => changes not saved"
133 if iSprache = 07 then
134 if NameDesVaters.GetText <> "Farthers name" then Warnlog "Farthers name => changes not saved"
137 printlog " - reset to saved data"
139 Firma.SetText lsSave ( 1 )
140 VorName.SetText lsSave ( 2 )
141 ZuName.SetText lsSave ( 3 )
142 Kuerzel.SetText lsSave ( 4 )
143 Strasse.SetText lsSave ( 5 )
144 Land.SetText lsSave ( 6 )
145 Titel.SetText lsSave ( 7 )
146 Position.SetText lsSave ( 8 )
147 TelPriv.SetText lsSave ( 9 )
148 TelGe.SetText lsSave ( 10 )
149 Fax.SetText lsSave ( 11 )
150 EMail.SetText lsSave ( 12 )
152 if iSprache = 01 then
153 City.SetText lsSave ( 13 )
154 State.SetText lsSave ( 14 )
155 Zip.SetText lsSave ( 15 )
157 PLZ.SetText lsSave ( 16 )
158 Ort.SetText lsSave ( 17 )
160 if Apartmentnummer.IsVisible then Apartmentnummer.SetText lsSave ( 18 )
161 if iSprache = 07 then NameDesVaters.SetText lsSave ( 19 )
163 Kontext "ExtrasOptionenDlg"
165 if ( ExtrasOptionenDlg.notExists( 3 ) ) then
166 printlog( "Options closed" )
170 printlog " - check data"
173 hToolsOptions ( "StarOffice", "UserData" )
175 if Firma.GetText <> lsSave ( 1 ) then Warnlog "Company => changes not saved"
176 if VorName.GetText <> lsSave ( 2 ) then Warnlog "First name => changes not saved"
177 if ZuName.GetText <> lsSave ( 3 ) then Warnlog "Last name => changes not saved"
178 if Kuerzel.GetText <> lsSave ( 4 ) then Warnlog "Initials => changes not saved"
179 if Strasse.GetText <> lsSave ( 5 ) then Warnlog "Street => changes not saved"
180 if Land.GetText <> lsSave ( 6 ) then Warnlog "Land => changes not saved"
181 if Titel.GetText <> lsSave ( 7 ) then Warnlog "Title => changes not saved"
182 if Position.GetText <> lsSave ( 8 ) then Warnlog "Position => changes not saved"
183 if TelPriv.GetText <> lsSave ( 9 ) then Warnlog "Tel-home => changes not saved"
184 if TelGe.GetText <> lsSave ( 10 ) then Warnlog "tel-work => changes not saved"
185 if Fax.GetText <> lsSave ( 11 ) then Warnlog "Fax => changes not saved"
186 if EMail.GetText <> lsSave ( 12 ) then Warnlog "eMail => changes not saved"
188 if iSprache = 01 then
189 if City.GetText <> lsSave ( 13 ) then Warnlog "City => changes not saved"
190 if State.GetText <> lsSave ( 14 ) then Warnlog "State => changes not saved"
191 if Zip.GetText <> lsSave ( 15 ) then Warnlog "Zip => changes not saved"
193 if PLZ.GetText <> lsSave ( 16 ) then Warnlog "PLZ => changes not saved"
194 if Ort.GetText <> lsSave ( 17 ) then Warnlog "Ort => changes not saved"
196 if Apartmentnummer.IsVisible then
197 if Apartmentnummer.GetText <> lsSave ( 18 ) then Warnlog "Appartment => changes not saved"
199 if iSprache = 07 then
200 if NameDesVaters.GetText <> lsSave ( 19 ) then Warnlog "Farthers name => changes not saved"
203 Kontext "ExtrasOptionenDlg"
205 if ( ExtrasOptionenDlg.notExists( 3 ) ) then
206 printlog( "Options closed" )