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 : Update test for the dialog export feature
32 '\******************************************************************************
34 testcase tUpdtDialogExport
36 printlog( "Update test for the dialog export feature" )
41 dim cDlgName as string
42 cDlgName = hGetWorkPath() & "DialogTest"
44 const DLG_SUFFIX = ".xdl"
48 printlog( "Test init: Setting up environment" )
49 brc = hInitFormControls( "DialogExport" )
51 warnlog( "Failed to initialize BAIC IDE/Dialog editor, aborting" )
55 printlog( "Test begin" )
57 if ( not DialogBar.exists() ) then
58 warnlog( "DialogBar does not exist, aborting" )
64 printlog( "Click the Export button on the DialogBar" )
68 kontext "ExportierenDlg"
69 if ( not ExportierenDlg.exists( 1 ) ) then
70 warnlog( "Export dialog is not open, aborting" )
76 printlog( "Export dialog is open. Good." )
78 kontext "ExportierenDlg"
79 DateiName.setText( cDlgName )
83 if ( Active.exists() ) then
84 cMsg = active.getText()
85 cMsg = hRemoveLineBreaks( cMsg )
86 printlog( "File appears to exist, overwriting: " & cMsg )
91 if ( not DialogBar.exists() ) then
92 warnlog( "DialogBar is not visible, please check." )
95 printlog( "Back on the Basic IDE / Dialog Editor. Good." )
97 cDlgName = cDlgName & DLG_SUFFIX
98 if ( dir( cDlgName ) = "" ) then
99 warnlog( "The dialog was not saved to the expected location" )
101 hDeleteFile( cDlgName )
102 printlog( "Dialog was exported and deleted. Good." )
105 printlog( "Test end. Cleanup" )