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 : Edit several modules and dialogs in basic ide
32 '\******************************************************************************
35 testcase tMore_Modules_Dialogs
40 dim iCurrentTab as integer
43 cFile = gOfficePath & "user\work\basic.odt"
45 const FILTER = "writer8"
47 'const iTABCOUNT is the number of dialogs and modules.
48 'If iTABCOUNT = 10 then 20 tabs (+ the first one!) = 21 should be created.
50 const iTABCOUNT as Integer = 10
51 const CMODULE = "TTMODULE"
55 printlog "open a new writer-doc"
56 gApplication = "WRITER"
59 brc = hInitBasicIDE( CMODULE )
61 printlog "insert 10 modules"
63 for iCurrentTab = 1 to iTABCOUNT
64 printlog " - insert new module : " & iCurrentTab
67 Tabbar.OpenContextMenu
72 EditWindow.TypeKeys "'# " & ( iCurrentTab + 1 ) & ". module in this document"
76 printlog "insert 10 dialogs"
78 for iCurrentTab = 1 to iTABCOUNT
79 printlog " - insert new dialog : " & iCurrentTab
80 Tabbar.OpenContextMenu
84 if DialogWindow.Exists (2) <> TRUE then
85 warnlog "No dialog window is shown!"
90 printlog Chr(13) + "- close the BasicIDE"
93 printlog Chr(13) + "- save the document"
94 Call hFileSaveAsWithFilterKill( cFile , FILTER )
96 printlog Chr(13) + "- close the document"
99 printlog Chr(13) + "- open the saved document"
104 hSelectNodeByName( MakroAus , CMODULE )
108 printlog "delete all modules and dialogs"
110 for iCurrentTab = 1 to ( 2 * iTABCOUNT + 1 )
113 printlog "delete - " & iCurrentTab & "/" & ( 2 * iTABCOUNT + 1 )
117 Tabbar.OpenContextMenu
123 if Active.Exists then
126 warnlog "No warning after deleting a dialog!"
130 QAErrorLog "Deleting - " & iCurrentTab & "/" & ((2 * iTABCOUNT)+1) & " failed."