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 Security
32 '\******************************************************************************
37 if ( getDocumentCount() < 1 ) then call hNewDocument()
38 _file = gTesttoolPath & "framework\optional\input\options\ooo_security_defaults.ref"
39 checkSecurityPage( _file )
41 if ( getDocumentCount() < 1 ) then call hNewDocument()
42 _file = gTesttoolPath & "framework\optional\input\options\ooo_security_changed.ref"
43 changeSecurityPage( _file )
45 if ( getDocumentCount() < 1 ) then call hNewDocument()
46 checkSecurityPage( _file )
48 if ( getDocumentCount() < 1 ) then call hNewDocument()
49 _file = gTesttoolPath & "framework\optional\input\options\ooo_security_defaults.ref"
50 changeSecurityPage( _file )
52 if ( getDocumentCount() < 1 ) then call hNewDocument()
53 checkSecurityPage( _file )
55 kontext "ExtrasOptionenDlg"
56 if ( ExtrasOptionenDlg.exists() ) then
57 ExtrasOptionenDlg.ok()
59 warnlog( "options dialog not available"
61 if ( getDocumentCount() > 0 ) then call hCloseDocument()
65 '*******************************************************************************
67 sub checkSecurityPage( _file as string )
68 _file = convertpath( _file )
70 printlog( " * Testing current settings against a reference list." )
71 printlog( " * Using settings from file: " & _file )
74 call hToolsOptions("StarOffice", "Security")
77 if ( TabSecurity.exists() ) then
81 Kontext "TabSecurityOptionsAndWarnings"
82 if ( TabSecurityOptionsAndWarnings.exists( 2 ) ) then
83 checkCheckBox( _file , "*" , SavingOrSendingDocuments )
84 checkCheckBox( _file , "*" , SigningDocuments )
85 checkCheckBox( _file , "*" , PrintingDocuments )
86 checkCheckBox( _file , "*" , CreatingPDFfiles )
87 checkCheckBox( _file , "*" , RemovePersonalInformationOnSaving )
88 checkCheckBox( _file , "*" , RecommendPasswordProtectionOnSaving )
89 TabSecurityOptionsAndWarnings.cancel
91 warnlog( "Failed to open Security options" )
95 warnlog( "Security Tabpage not available" )
99 '*******************************************************************************
101 sub changeSecurityPage( _file as string )
102 _file = convertpath( _file )
104 printlog( " * Changing current settings according to the reference list." )
105 printlog( " * Using settings from file: " & _file )
107 kontext "TabSecurity"
108 if ( TabSecurity.exists() ) then
111 Kontext "TabSecurityOptionsAndWarnings"
112 setCheckBox( _file , "*" , SavingOrSendingDocuments )
113 setCheckBox( _file , "*" , SigningDocuments )
114 setCheckBox( _file , "*" , PrintingDocuments )
115 setCheckBox( _file , "*" , CreatingPDFfiles )
116 setCheckBox( _file , "*" , RemovePersonalInformationOnSaving )
117 setCheckBox( _file , "*" , RecommendPasswordProtectionOnSaving )
118 TabSecurityOptionsAndWarnings.cancel
120 Kontext "OptionenDLG"
123 warnlog( "Security Tabpage not available" )
127 call exitRestartTheOffice()