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 2008 by Sun Microsystems, Inc.
7 '* OpenOffice.org - a multi-platform office productivity suite
9 '* $RCSfile: options_ooo_userdata.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 12:18:15 $
15 '* This file is part of OpenOffice.org.
17 '* OpenOffice.org is free software: you can redistribute it and/or modify
18 '* it under the terms of the GNU Lesser General Public License version 3
19 '* only, as published by the Free Software Foundation.
21 '* OpenOffice.org is distributed in the hope that it will be useful,
22 '* but WITHOUT ANY WARRANTY; without even the implied warranty of
23 '* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 '* GNU Lesser General Public License version 3 for more details
25 '* (a copy is included in the LICENSE file that accompanied this code).
27 '* You should have received a copy of the GNU Lesser General Public License
28 '* version 3 along with OpenOffice.org. If not, see
29 '* <http://www.openoffice.org/license.html>
30 '* for a copy of the LGPLv3 License.
32 '/************************************************************************
34 '* owner : thorsten.bosbach@sun.com
36 '* short description : Tools->Options: OpenOffice.org User Data
38 '\******************************************************************************
42 Dim lsSave ( 20 ) as String
44 '///short test if 'StarOffice / User data' is saved in configuration
45 '///Start the test again, and you do not get the error. If you get the warning again, you have to check this.</FONT>
47 '///open a new document
50 hToolsOptions ( "StarOffice", "UserData" )
53 printlog " - save old data"
54 lsSave ( 1 ) = Firma.GetText
55 lsSave ( 2 ) = VorName.GetText
56 lsSave ( 3 ) = ZuName.GetText
57 lsSave ( 4 ) = Kuerzel.GetText
58 lsSave ( 5 ) = Strasse.GetText
59 lsSave ( 6 ) = Land.GetText
60 lsSave ( 7 ) = Titel.GetText
61 lsSave ( 8 ) = Position.GetText
62 lsSave ( 9 ) = TelPriv.GetText
63 lsSave ( 10 ) = TelGe.GetText
64 lsSave ( 11 ) = Fax.GetText
65 lsSave ( 12 ) = EMail.GetText
68 lsSave ( 13 ) = City.GetText
69 lsSave ( 14 ) = State.GetText
70 lsSave ( 15 ) = Zip.GetText
72 lsSave ( 16 ) = PLZ.GetText
73 lsSave ( 17 ) = Ort.GetText
75 if Apartmentnummer.IsVisible then lsSave ( 18 ) = Apartmentnummer.GetText
76 if iSprache = 07 then lsSave ( 19 ) = NameDesVaters.GetText
79 printlog " - change data"
80 Firma.SetText "Company name"
81 VorName.SetText "First name"
82 ZuName.SetText "Last name"
83 Kuerzel.SetText "FnLn"
84 Strasse.SetText "Street name"
85 Land.SetText "Land name"
86 Titel.SetText "Title name"
87 Position.SetText "Position name"
88 TelPriv.SetText "TelHome number"
89 TelGe.SetText "TelWork number"
90 Fax.SetText "Fax number"
91 EMail.SetText "eMail-adress"
94 City.SetText "City name"
95 State.SetText "State name"
96 Zip.SetText "Zip code"
98 PLZ.SetText "PLZ name"
99 Ort.SetText "Ort name"
101 if Apartmentnummer.IsVisible then Apartmentnummer.SetText "Appart number"
102 if iSprache = 07 then NameDesVaters.SetText "Farthers name"
104 '///close the options-dialog with OK
105 Kontext "ExtrasOptionenDlg"
109 '///close the document
112 '///exit / restart StarOffice
113 printlog " - exit/restart StarOffice"
116 '///open options 'StarOffice' / 'Userdata'
117 printlog " - check changes"
119 hToolsOptions ( "StarOffice", "UserData" )
122 if Firma.GetText <> "Company name" then Warnlog "Company => changes not saved"
123 if VorName.GetText <> "First name" then Warnlog "First name => changes not saved"
124 if ZuName.GetText <> "Last name" then Warnlog "Last name => changes not saved"
125 if Kuerzel.GetText <> "FnLn" then Warnlog "Initials => changes not saved"
126 if Strasse.GetText <> "Street name" then Warnlog "Street => changes not saved"
127 if Land.GetText <> "Land name" then Warnlog "Land => changes not saved"
128 if Titel.GetText <> "Title name" then Warnlog "Title => changes not saved"
129 if Position.GetText <> "Position name" then Warnlog "Position => changes not saved"
130 if TelPriv.GetText <> "TelHome number" then Warnlog "Tel-home => changes not saved"
131 if TelGe.GetText <> "TelWork number" then Warnlog "tel-work => changes not saved"
132 if Fax.GetText <> "Fax number" then Warnlog "Fax => changes not saved"
133 if EMail.GetText <> "eMail-adress" then Warnlog "eMail => changes not saved"
135 if iSprache = 01 then
136 if City.GetText <> "City name" then Warnlog "City => changes not saved"
137 if State.GetText <> "State name" then Warnlog "State => changes not saved"
138 if Zip.GetText <> "Zip code" then Warnlog "Zip => changes not saved"
140 if PLZ.GetText <> "PLZ name" then Warnlog "PLZ => changes not saved"
141 if Ort.GetText <> "Ort name" then Warnlog "Ort => changes not saved"
143 if Apartmentnummer.IsVisible then
144 if Apartmentnummer.GetText <> "Appart number" then Warnlog "Appartment => changes not saved"
146 if iSprache = 07 then
147 if NameDesVaters.GetText <> "Farthers name" then Warnlog "Farthers name => changes not saved"
150 '///reset to saved data
151 printlog " - reset to saved data"
153 Firma.SetText lsSave ( 1 )
154 VorName.SetText lsSave ( 2 )
155 ZuName.SetText lsSave ( 3 )
156 Kuerzel.SetText lsSave ( 4 )
157 Strasse.SetText lsSave ( 5 )
158 Land.SetText lsSave ( 6 )
159 Titel.SetText lsSave ( 7 )
160 Position.SetText lsSave ( 8 )
161 TelPriv.SetText lsSave ( 9 )
162 TelGe.SetText lsSave ( 10 )
163 Fax.SetText lsSave ( 11 )
164 EMail.SetText lsSave ( 12 )
166 if iSprache = 01 then
167 City.SetText lsSave ( 13 )
168 State.SetText lsSave ( 14 )
169 Zip.SetText lsSave ( 15 )
171 PLZ.SetText lsSave ( 16 )
172 Ort.SetText lsSave ( 17 )
174 if Apartmentnummer.IsVisible then Apartmentnummer.SetText lsSave ( 18 )
175 if iSprache = 07 then NameDesVaters.SetText lsSave ( 19 )
177 '///close the options-dialog with OK
178 Kontext "ExtrasOptionenDlg"
182 '///open options 'StarOffice' / 'Userdata'
183 printlog " - check data"
186 hToolsOptions ( "StarOffice", "UserData" )
189 if Firma.GetText <> lsSave ( 1 ) then Warnlog "Company => changes not saved"
190 if VorName.GetText <> lsSave ( 2 ) then Warnlog "First name => changes not saved"
191 if ZuName.GetText <> lsSave ( 3 ) then Warnlog "Last name => changes not saved"
192 if Kuerzel.GetText <> lsSave ( 4 ) then Warnlog "Initials => changes not saved"
193 if Strasse.GetText <> lsSave ( 5 ) then Warnlog "Street => changes not saved"
194 if Land.GetText <> lsSave ( 6 ) then Warnlog "Land => changes not saved"
195 if Titel.GetText <> lsSave ( 7 ) then Warnlog "Title => changes not saved"
196 if Position.GetText <> lsSave ( 8 ) then Warnlog "Position => changes not saved"
197 if TelPriv.GetText <> lsSave ( 9 ) then Warnlog "Tel-home => changes not saved"
198 if TelGe.GetText <> lsSave ( 10 ) then Warnlog "tel-work => changes not saved"
199 if Fax.GetText <> lsSave ( 11 ) then Warnlog "Fax => changes not saved"
200 if EMail.GetText <> lsSave ( 12 ) then Warnlog "eMail => changes not saved"
202 if iSprache = 01 then
203 if City.GetText <> lsSave ( 13 ) then Warnlog "City => changes not saved"
204 if State.GetText <> lsSave ( 14 ) then Warnlog "State => changes not saved"
205 if Zip.GetText <> lsSave ( 15 ) then Warnlog "Zip => changes not saved"
207 if PLZ.GetText <> lsSave ( 16 ) then Warnlog "PLZ => changes not saved"
208 if Ort.GetText <> lsSave ( 17 ) then Warnlog "Ort => changes not saved"
210 if Apartmentnummer.IsVisible then
211 if Apartmentnummer.GetText <> lsSave ( 18 ) then Warnlog "Appartment => changes not saved"
213 if iSprache = 07 then
214 if NameDesVaters.GetText <> lsSave ( 19 ) then Warnlog "Farthers name => changes not saved"
217 '///close the options-dialog with OK
218 Kontext "ExtrasOptionenDlg"