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_loadsave_vba.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 : joerg.skottke@sun.com
36 '* short description : Test VBA settings-page
38 '\******************************************************************************
42 Dim lbSave ( 7 ) as Boolean
44 '///check if all settings are saved in configuration ( Load & Save / VBA Settings )
46 '///open a new document
48 '///+open tools / options / load & save / VBA settings
50 hToolsOptions ( "LoadSave", "VBAProperties" )
53 printlog " - save old settings"
54 lbSave ( 1 ) = WinwordBasicLaden.IsChecked
55 lbSave ( 2 ) = WinwordBasicSpeichern.IsChecked
56 lbSave ( 3 ) = ExcelBasicLaden.IsChecked
57 lbSave ( 4 ) = ExcelBasicSpeichern.IsChecked
58 lbSave ( 5 ) = PowerpointBasicLaden.IsChecked
59 lbSave ( 6 ) = PowerpointBasicSpeichern.IsChecked
61 '///invert all settings
62 printlog " - invert settings"
63 if lbSave ( 1 ) = TRUE then WinwordBasicLaden.UnCheck else WinwordBasicLaden.Check
64 if lbSave ( 2 ) = TRUE then WinwordBasicSpeichern.UnCheck else WinwordBasicSpeichern.Check
65 if lbSave ( 3 ) = TRUE then ExcelBasicLaden.UnCheck else ExcelBasicLaden.Check
66 if lbSave ( 4 ) = TRUE then ExcelBasicSpeichern.UnCheck else ExcelBasicSpeichern.Check
67 if lbSave ( 5 ) = TRUE then PowerpointBasicLaden.UnCheck else PowerpointBasicLaden.Check
68 if lbSave ( 6 ) = TRUE then PowerpointBasicSpeichern.UnCheck else PowerpointBasicSpeichern.Check
70 '///+close options dialog with OK
71 Kontext "ExtrasOptionenDlg"
75 '///+close the document
78 '///exit and restart StarOffice
79 printlog " - exit/restart StarOffice"
82 '///check the invitation
83 printlog " - check inverting"
84 '///+open tools / options / load & save / VBA settings
86 hToolsOptions ( "LoadSave", "VBAProperties" )
88 if WinwordBasicLaden.IsChecked = lbSave ( 1 ) then Warnlog "'Load Winword basic' => changes not saved!"
89 if WinwordBasicSpeichern.IsChecked = lbSave ( 2 ) then Warnlog "'Save Winword basic' => changes not saved!"
90 if ExcelBasicLaden.IsChecked = lbSave ( 3 ) then Warnlog "'Load Excel basic' => changes not saved!"
91 if ExcelBasicSpeichern.IsChecked = lbSave ( 4 ) then Warnlog "'Save Excel basic' => changes not saved!"
92 if PowerpointBasicLaden.IsChecked = lbSave ( 5 ) then Warnlog "'Load Powerpoint basic' => changes not saved!"
93 if PowerpointBasicSpeichern.IsChecked = lbSave ( 6 ) then Warnlog "'Save Powerpoint basic' => changes not saved!"
95 '///make other changes
96 printlog " - make other changes"
97 WinwordBasicLaden.Check
98 WinwordBasicSpeichern.Uncheck
99 ExcelBasicLaden.Uncheck
100 ExcelBasicSpeichern.Check
101 PowerpointBasicLaden.Uncheck
102 PowerpointBasicSpeichern.Check
104 '///+close options dialog with OK
105 Kontext "ExtrasOptionenDlg"
110 printlog " - check changes"
111 '///+open tools / options / load & save / VBA settings
113 hToolsOptions ( "LoadSave", "VBAProperties" )
115 if WinwordBasicLaden.IsChecked <> TRUE then Warnlog "'Load Winword basic' => changes not saved!"
116 if WinwordBasicSpeichern.IsChecked <> FALSE then Warnlog "'Save Winword basic' => changes not saved!"
117 if ExcelBasicLaden.IsChecked <> FALSE then Warnlog "'Load Excel basic' => changes not saved!"
118 if ExcelBasicSpeichern.IsChecked <> TRUE then Warnlog "'Save Excel basic' => changes not saved!"
119 if PowerpointBasicLaden.IsChecked <> FALSE then Warnlog "'Load Powerpoint basic' => changes not saved!"
120 if PowerpointBasicSpeichern.IsChecked <> TRUE then Warnlog "'Save Powerpoint basic' => changes not saved!"
122 '///reset to default settings
123 printlog " - reset to saved settings"
125 if lbSave ( 1 ) = TRUE then WinwordBasicLaden.Check else WinwordBasicLaden.UnCheck
126 if lbSave ( 2 ) = TRUE then WinwordBasicSpeichern.Check else WinwordBasicSpeichern.UnCheck
127 if lbSave ( 3 ) = TRUE then ExcelBasicLaden.Check else ExcelBasicLaden.UnCheck
128 if lbSave ( 4 ) = TRUE then ExcelBasicSpeichern.Check else ExcelBasicSpeichern.UnCheck
129 if lbSave ( 5 ) = TRUE then PowerpointBasicLaden.Check else PowerpointBasicLaden.UnCheck
130 if lbSave ( 6 ) = TRUE then PowerpointBasicSpeichern.Check else PowerpointBasicSpeichern.UnCheck
132 '///+close options dialog with OK
133 Kontext "ExtrasOptionenDlg"
138 printlog " - check settings"
139 '///+open tools / options / load & save / VBA settings
141 hToolsOptions ( "LoadSave", "VBAProperties" )
143 if WinwordBasicLaden.IsChecked <> lbSave ( 1 ) then Warnlog "'Load Winword basic' => changes not saved!"
144 if WinwordBasicSpeichern.IsChecked <> lbSave ( 2 ) then Warnlog "'Save Winword basic' => changes not saved!"
145 if ExcelBasicLaden.IsChecked <> lbSave ( 3 ) then Warnlog "'Load Excel basic' => changes not saved!"
146 if ExcelBasicSpeichern.IsChecked <> lbSave ( 4 ) then Warnlog "'Save Excel basic' => changes not saved!"
147 if PowerpointBasicLaden.IsChecked <> lbSave ( 5 ) then Warnlog "'Load Powerpoint basic' => changes not saved!"
148 if PowerpointBasicSpeichern.IsChecked <> lbSave ( 6 ) then Warnlog "'Save Powerpoint basic' => changes not saved!"
150 '///+close options dialog with OK
151 Kontext "ExtrasOptionenDlg"