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 : gregor.hartmann@oracle.com
30 '* short description : Password settings in Tools/Options
32 '\******************************************************************************
34 testcase tRecommendPassword( filetypeID as string )
37 dim workfile as string
38 workfile = "password" & hGetSuffix( filetypeID )
39 printlog( " * Name of workfile: " & workfile )
41 dim workpath as string
42 workpath = convertpath( gOfficePath & "user\work\" )
43 printlog( " * Save file to....: " & workpath )
47 printlog( "Open a new document" )
50 printlog( "Change the document" )
53 printlog( "Open filesave" )
55 kontext "SpeichernDlg"
56 if ( SpeichernDlg.exists( 2 ) ) then
57 printlog( "File Open dialog is open. Good" )
59 warnlog( "File Open dialog is not open." )
63 printlog( "Verify that the password-checkbox is enabled" )
64 if ( passwort.isenabled() ) then
65 printlog( " * Password checkbox is enabled. Good." )
67 if ( passwort.ischecked() ) then
68 printlog( " * Password checkbox is checked. Good." )
71 warnlog( "Password checkbox is not checked, the option " & _
72 "has not been transported from tools/options " & _
73 "to the dialog -> bug" )
77 warnlog( "#i36663# Password checkbox is disabled" )
83 AutomatischeDateinamenserweiterung.Uncheck
85 printlog( "Name the file" )
86 Dateiname.settext( workpath & workfile )
88 printlog( "Uncheck password-protection" )
91 printlog( "Save the file" )
95 if ( active.exists( 2 ) ) then
96 printlog( " - handle overwrite warning (if any)" )
100 Kontext "passwordDlg"
101 if ( passwordDlg.exists( 2 ) ) then
102 warnlog( "Password dialog comes up, this is not expected at this " & _
103 "point. Trying to handle the error gracefully" )
104 Password.settext( workfile )
105 PasswordConfirm.settext( workfile )
108 printlog( " * No password dialog is displayed. Good." )
111 hDeleteFile( workpath & workfile )
115 printlog( "Close the current document" )
116 call hCloseDocument()